From: "Jan Beulich" Subject: [PATCH v2] VMX: don't allow PVH to reach handle_mmio() Date: Mon, 08 Dec 2014 09:12:37 +0000 Message-ID: <54857995020000780004DA2D@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part47729B95.2__=" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XxuN0-0003hF-Do for xen-devel@lists.xenproject.org; Mon, 08 Dec 2014 09:12:42 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Kevin Tian , Eddie Dong , Jun Nakajima , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part47729B95.2__= Content-Type: text/plain; charset=UTF-8 Content-Length: 858 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline PVH guests accessing I/O ports via string ops is not supported yet. Reported-by: Roger Pau Monn=C3=A9 Signed-off-by: Jan Beulich --- v2: handle_pio() is already safe (pointed out by Mukesh), so only refuse entering handle_mmio(). Note: Only compile tested so far. --- unstable.orig/xen/arch/x86/hvm/vmx/vmx.c 2014-11-27 09:37:27.000000000 +0100 +++ unstable/xen/arch/x86/hvm/vmx/vmx.c 2014-12-08 10:04:27.000000000 +0100 @@ -3086,7 +3086,8 @@ void vmx_vmexit_handler(struct cpu_user_ if ( exit_qualification & 0x10 ) { /* INS, OUTS */ - if ( !handle_mmio() ) + if ( unlikely(is_pvh_vcpu(v)) /* PVH fixme */ || + !handle_mmio() ) hvm_inject_hw_exception(TRAP_gp_fault, 0); } else --=__Part47729B95.2__= Content-Type: text/plain; name="VMX-PVH-no-emulated-IO-string-ops.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="VMX-PVH-no-emulated-IO-string-ops.patch" PVH guests accessing I/O ports via string ops is not supported yet.=0A=0ARe= ported-by: Roger Pau Monn=C3=A9=0ASigned-off-by: Jan = Beulich =0A---=0Av2: handle_pio() is already safe = (pointed out by Mukesh), so only refuse=0A entering handle_mmio().=0ANot= e: Only compile tested so far.=0A=0A--- unstable.orig/xen/arch/x86/hvm/vmx/= vmx.c 2014-11-27 09:37:27.000000000 +0100=0A+++ unstable/xen/arch/x86/hvm= /vmx/vmx.c 2014-12-08 10:04:27.000000000 +0100=0A@@ -3086,7 +3086,8 = @@ void vmx_vmexit_handler(struct cpu_user_=0A if ( exit_qualificat= ion & 0x10 )=0A {=0A /* INS, OUTS */=0A- if = ( !handle_mmio() )=0A+ if ( unlikely(is_pvh_vcpu(v)) /* PVH = fixme */ ||=0A+ !handle_mmio() )=0A = hvm_inject_hw_exception(TRAP_gp_fault, 0);=0A }=0A else=0A --=__Part47729B95.2__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part47729B95.2__=--