#include <asm/io_apic.h>
#include <asm/hap.h>
#include <asm/hpet.h>
-#include <asm/mc146818rtc.h>
#include <public/version.h>
rc |= ioports_deny_access(d, pmtmr_ioport, pmtmr_ioport + 3);
/* PCI configuration space (NB. 0xcf8 has special treatment). */
rc |= ioports_deny_access(d, 0xcfc, 0xcff);
- /* Never permit direct access to the RTC/CMOS registers. */
- rc |= ioports_deny_access(d, RTC_PORT(0), RTC_PORT(1));
/* Command-line I/O ranges. */
process_dom0_ioports_disable(d);
if ( (port == 0xcf8) && (bytes == 4) )
return 0;
+ /* We also never permit direct access to the RTC/CMOS registers. */
+ if ( ((port & ~1) == RTC_PORT(0)) )
+ return 0;
+
return ioports_access_permitted(v->domain, port, port + bytes - 1);
}