[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.13 v4 1/3] vmx: add ASSERT to prevent syncing PIR to IRR...
... if the vCPU is different than the one currently running or if it's running on a different pCPU. No functional change intended. Suggested by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Juergen Gross <jgross@xxxxxxxx> --- xen/arch/x86/hvm/vmx/vmx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index a55ff37733..e5e674c373 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2054,6 +2054,17 @@ static void vmx_sync_pir_to_irr(struct vcpu *v) unsigned int group, i; DECLARE_BITMAP(pending_intr, NR_VECTORS); + if ( v != current && v->is_running ) + { + /* + * Syncing PIR to IRR must not be done behind the back of the CPU, + * since the IRR is controlled by the hardware when the vCPU is + * executing. + */ + ASSERT_UNREACHABLE(); + return; + } + if ( !pi_test_and_clear_on(&v->arch.hvm.vmx.pi_desc) ) return; -- 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |