From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: [PATCH] pvh: Fix regression caused by assumption that HVM paths MUST use io-backend device. Date: Mon, 3 Feb 2014 12:03:21 -0500 Message-ID: <1391447001-19100-2-git-send-email-konrad.wilk@oracle.com> References: <1391447001-19100-1-git-send-email-konrad.wilk@oracle.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 1WAMzZ-0003Pj-D9 for xen-devel@lists.xenproject.org; Mon, 03 Feb 2014 17:07:29 +0000 Received: by mail-qc0-f172.google.com with SMTP id c9so11749627qcz.31 for ; Mon, 03 Feb 2014 09:07:26 -0800 (PST) In-Reply-To: <1391447001-19100-1-git-send-email-konrad.wilk@oracle.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: jbeulich@suse.com, george.dunlap@eu.citrix.com, xen-devel@lists.xenproject.org, jun.nakajima@intel.com, mukesh.rathor@oracle.com, yang.z.zhang@Intel.com List-Id: xen-devel@lists.xenproject.org The commit 09bb434748af9bfe3f7fca4b6eef721a7d5042a4 "Nested VMX: prohibit virtual vmentry/vmexit during IO emulation" assumes that the HVM paths are only taken by HVM guests. With the PVH enabled that is no longer the case - which means that we do not have to have the IO-backend device (QEMU) enabled. As such, that patch can crash the hypervisor: Xen call trace: [] nvmx_switch_guest+0x4d/0x903 [] vmx_asm_vmexit_handler+0x4b/0xc0 Pagetable walk from 000000000000001e: L4[0x000] = 0000000000000000 ffffffffffffffff **************************************** Panic on CPU 7: FATAL PAGE FAULT [error_code=0000] Faulting linear address: 000000000000001e **************************************** as we do not have an io based backend. CC: Yang Zhang CC: Jun Nakajima Signed-off-by: Konrad Rzeszutek Wilk --- xen/arch/x86/hvm/vmx/vvmx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index d2ba435..2f516c9 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1400,7 +1400,7 @@ void nvmx_switch_guest(void) * 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 ( get_ioreq(v) && get_ioreq(v)->state != STATE_IOREQ_NONE ) return; /* * a softirq may interrupt us between a virtual vmentry is -- 1.7.7.6