This fixes the fallout from the HVMlite series, that removed the emulated
PIT from PV(H) guests. Also, this patch forces the hardware domain to
always have an emulated PIT, regardless of whether the toolstack specified
one or not.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
d->domain_id, config->emulation_flags);
return -EINVAL;
}
+ if ( is_hardware_domain(d) )
+ config->emulation_flags |= XEN_X86_EMU_PIT;
if ( config->emulation_flags != 0 &&
- (!is_hvm_domain(d) || config->emulation_flags != XEN_X86_EMU_ALL) )
+ (config->emulation_flags !=
+ (is_hvm_domain(d) ? XEN_X86_EMU_ALL : XEN_X86_EMU_PIT)) )
{
printk(XENLOG_G_ERR "d%d: Xen does not allow %s domain creation "
"with the current selection of emulators: %#x\n",
.data = data
};
+ if ( !has_vpit(current->domain) )
+ return ~0;
+
if ( is_hardware_domain(current->domain) && hwdom_pit_access(&ioreq) )
{
/* nothing to do */;