From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH] Xen 4.4-rc3 regression with PVH compared to Xen 4.4-rc2. Date: Mon, 3 Feb 2014 12:01:56 -0800 Message-ID: <20140203120156.57dce238@mantra.us.oracle.com> References: <1391447001-19100-1-git-send-email-konrad.wilk@oracle.com> <20140203112605.66306ae9@mantra.us.oracle.com> <20140203195358.GB10738@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WAPjd-0001Tq-VG for xen-devel@lists.xenproject.org; Mon, 03 Feb 2014 20:03:14 +0000 In-Reply-To: <20140203195358.GB10738@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: jbeulich@suse.com, george.dunlap@eu.citrix.com, Konrad Rzeszutek Wilk , jun.nakajima@intel.com, yang.z.zhang@intel.com, xen-devel@lists.xenproject.org, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 3 Feb 2014 14:53:58 -0500 Konrad Rzeszutek Wilk wrote: > On Mon, Feb 03, 2014 at 11:26:05AM -0800, Mukesh Rathor wrote: > > On Mon, 3 Feb 2014 12:03:20 -0500 > > Konrad Rzeszutek Wilk wrote: > > > > > I am hereby requesting an Xen 4.4 exemption for this bug-fix. > > > > > > The PVH feature is considered experimental, but it would be good > > > to have it working out of the box without crashing the hypervisor. > > > > > > Sadly that is not the case as > > > 09bb434748af9bfe3f7fca4b6eef721a7d5042a4 "Nested VMX: prohibit > > > virtual vmentry/vmexit during IO emulation" casues an NULL > > > pointer dereference when starting a guest with 'pvh=1' in the > > > guest config. > > > > > > There are two ways of fixing this: > > > a). Add an '!xen_pvh_domain()' or '!xen_pvh_vcpu(current)' in the > > > path, or b). Check for ioreq() being NULL. This is actually done > > > in other places in the hypervisor - so I choose to piggyback on > > > that. > > > > > > > I was about to send this patch on friday: > > > > diff --git a/xen/arch/x86/hvm/vmx/vvmx.c > > b/xen/arch/x86/hvm/vmx/vvmx.c index d2ba435..563b02f 100644 > > --- a/xen/arch/x86/hvm/vmx/vvmx.c > > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > > @@ -1394,13 +1394,14 @@ void nvmx_switch_guest(void) > > struct vcpu *v = current; > > struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v); > > struct cpu_user_regs *regs = guest_cpu_user_regs(); > > + ioreq_t *ioreq = get_ioreq(v); > > > > /* > > * a pending IO emualtion may still no finished. In this case, > > * no virtual vmswith is allowed. Or else, the following IO > > * emulation will handled in a wrong VCPU context. > > */ > > - if ( get_ioreq(v)->state != STATE_IOREQ_NONE ) > > + if ( ioreq && ioreq->state != STATE_IOREQ_NONE ) > > return; > > /* > > * a softirq may interrupt us between a virtual vmentry is > > > > > > > > when I realized even after the above fix it is still crashing for > > me... debugging right now. JFYI. > > Are you doing it on a 'virgin' 4.4-rc3 or with your extra patches? Actually, it's with my extra dom0 patches. Mukesh