[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/PV: allow PV guests to have an emulated PIT
commit bce296364e6ec320a33fc8770b20f552d6163af6 Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Fri Jan 22 16:18:29 2016 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Jan 22 16:18:29 2016 +0100 x86/PV: allow PV guests to have an emulated PIT 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@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/domain.c | 5 ++++- xen/arch/x86/hvm/i8254.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index e70c125..352c194 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -542,8 +542,11 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags, 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", diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c index b517cd6..577b43c 100644 --- a/xen/arch/x86/hvm/i8254.c +++ b/xen/arch/x86/hvm/i8254.c @@ -568,6 +568,9 @@ int pv_pit_handler(int port, int data, int write) .data = data }; + if ( !has_vpit(current->domain) ) + return ~0; + if ( is_hardware_domain(current->domain) && hwdom_pit_access(&ioreq) ) { /* nothing to do */; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |