From: Christoph Egger Subject: [PATCH 13/18] Nested Virtualization: interrupts (generic part) Date: Thu, 15 Apr 2010 14:38:00 +0200 Message-ID: <201004151438.00920.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_oiwxLUbRfK9B4LQ" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_oiwxLUbRfK9B4LQ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_oiwxLUbRfK9B4LQ Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_nh13_interrupts.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_nh13_interrupts.diff" # HG changeset patch # User cegger # Date 1271330308 -7200 Handle interrupts (generic part) diff -r 9731aece91ac -r 5a9a704c880e xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2233,10 +2233,20 @@ enum hvm_intblk hvm_interrupt_blocked(st ASSERT(v == current); + if ( nestedhvm_enabled(v->domain) && !nestedhvm_gif_isset(v) ) + return hvm_intblk_gif; + if ( (intack.source != hvm_intsrc_nmi) && !(guest_cpu_user_regs()->eflags & X86_EFLAGS_IF) ) return hvm_intblk_rflags_ie; + if ( nestedhvm_enabled(v->domain) && nestedhvm_vcpu_in_guestmode(v) ) { + if ( !VCPU_NESTEDHVM(v).nh_hostflags.fields.vintrmask ) + return hvm_intblk_rflags_ie; + if ( !VCPU_NESTEDHVM(v).nh_hostflags.fields.rflagsif ) + return hvm_intblk_rflags_ie; + } + intr_shadow = hvm_funcs.get_interrupt_shadow(v); if ( intr_shadow & (HVM_INTR_SHADOW_STI|HVM_INTR_SHADOW_MOV_SS) ) diff -r 9731aece91ac -r 5a9a704c880e xen/arch/x86/x86_32/asm-offsets.c --- a/xen/arch/x86/x86_32/asm-offsets.c +++ b/xen/arch/x86/x86_32/asm-offsets.c @@ -127,4 +127,7 @@ void __dummy__(void) BLANK(); OFFSET(CPUINFO_ext_features, struct cpuinfo_x86, x86_capability[1]); + + OFFSET(NESTEDHVM_hostflags, struct vcpu, arch.hvm_vcpu.nestedhvm.nh_hostflags.bytes); + DEFINE(NESTEDHVM_forcevmexit, 0x4); } diff -r 9731aece91ac -r 5a9a704c880e xen/arch/x86/x86_64/asm-offsets.c --- a/xen/arch/x86/x86_64/asm-offsets.c +++ b/xen/arch/x86/x86_64/asm-offsets.c @@ -151,4 +151,8 @@ void __dummy__(void) BLANK(); OFFSET(CPUINFO_ext_features, struct cpuinfo_x86, x86_capability[1]); + BLANK(); + + OFFSET(NESTEDHVM_hostflags, struct vcpu, arch.hvm_vcpu.nestedhvm.nh_hostflags.bytes); + DEFINE(NESTEDHVM_forcevmexit, 0x4); } --Boundary-00=_oiwxLUbRfK9B4LQ 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.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_oiwxLUbRfK9B4LQ--