[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] nestedsvm: fix interrupt handling
# HG changeset patch # User Christoph Egger <Christoph.Egger@xxxxxxx> # Date 1346444131 -3600 # Node ID 34e22386e7127f3ef77ac73098fc50c0fe7bab1f # Parent e9416bea04c103d3da1263322ed3c00c2d9cf46f nestedsvm: fix interrupt handling Give the l2 guest a chance to finish the delivery of the last injected interrupt or exception before we emulate a VMEXIT. For example after a NPF handled by the host there can be an interrupt for the l1 guest. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> Committed-by: Keir Fraser <keir@xxxxxxx> --- diff -r e9416bea04c1 -r 34e22386e712 xen/arch/x86/hvm/svm/nestedsvm.c --- a/xen/arch/x86/hvm/svm/nestedsvm.c Fri Aug 31 21:13:39 2012 +0100 +++ b/xen/arch/x86/hvm/svm/nestedsvm.c Fri Aug 31 21:15:31 2012 +0100 @@ -1164,6 +1164,8 @@ enum hvm_intblk nsvm_intr_blocked(struct return hvm_intblk_svm_gif; if ( nestedhvm_vcpu_in_guestmode(v) ) { + struct vmcb_struct *n2vmcb = nv->nv_n2vmcx; + if ( svm->ns_hostflags.fields.vintrmask ) if ( !svm->ns_hostflags.fields.rflagsif ) return hvm_intblk_rflags_ie; @@ -1176,6 +1178,14 @@ enum hvm_intblk nsvm_intr_blocked(struct */ if ( v->arch.hvm_vcpu.hvm_io.io_state != HVMIO_none ) return hvm_intblk_shadow; + + if ( !nv->nv_vmexit_pending && n2vmcb->exitintinfo.bytes != 0 ) { + /* Give the l2 guest a chance to finish the delivery of + * the last injected interrupt or exception before we + * emulate a VMEXIT (e.g. VMEXIT(INTR) ). + */ + return hvm_intblk_shadow; + } } if ( nv->nv_vmexit_pending ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |