[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1] x86/nestedsvm: honour L2's EFLAGS.IF when L1 clears V_INTR_MASKING
- To: ross.lagerwall@xxxxxxxxxx
- From: chunjie.zhu@xxxxxxxxxx
- Date: Tue, 3 Nov 2026 18:11:34 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=szakcAnkcLXK90/qg+4gQjsVE0kJ0fKqUUTwi6XSYbA=; b=OJdzFDk/56sCCBRcmYH5pSKHqGPhnJayI/sFex89DXLmTHz7d4f+LTj0K/5hqn0pW8swM2SVuPTc712vcsZYBT5inOG+yG4L/UUGV5ilqYfl6dysKgiStk0FwHuRQA2fPPMehFbzzvYDVm6AO0zwMCEz3uhJyehj7qM3vACRRMjJHFAuVEPQyhL0AkBTQK+IXHVjSx/BtPrRLn+PJ/ZYTSGxckLoMFogHnrvXzcnHO7vjYivYVDQwwUzeuZGaT1g5Si0/ts4C1dwAxiaHLtDWeN0OWTyDPlu0Xc8n4r55536G9ZWmWTCt3GrYe3jxvt5qVfCyLsjJ55Qk1uzcLavyg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AkaCa4aQRHNDdr3r1Dyw+vsd/MVAbUV9ZPUM/Vt2tnQ2DwM5QNO7EhDSqsGne2RjwxnkBpzmJ+ctq03QH85AdiVOpP1HBOHujQW+wgNIQJD5evlzn+UZkRWOfiSnuLGDijMkDxxgIuVnNJbt6Ob9U2c5x3+o1MSxWmNS/L+tPEoxYDmX/nzl1lbyGVLFOIWwZfOUYQ0IMsKcs7jPOdTR4AZJKOZuLrJgh2ILdAy1/x92R4ITDyUBogwf+SGbGrqGflLvslBxGq4OysVw03AAKReDp32tONDZzhCZtRf7gI5L2Qod5KwhyzfFzQUeF1szQEfw8FxQ57z4faENTLudjA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-Id:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: andrew.cooper3@xxxxxxxxxx, chunjie.zhu@xxxxxxxxxx, jason.andryuk@xxxxxxx, jbeulich@xxxxxxxx, roger@xxxxxxxxxxxxxx, teddy.astie@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 03 Nov 2026 10:12:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Oct 29, 2026 at 17:20, Ross Lagerwall wrote:
> Would it not make sense to check this in nsvm_intr_blocked() instead?
> There is already a similar (inverse) check there so extending that seems
> more logical to me.
Thanks for the suggestion, but I think there would be a regression.
nsvm_intr_blocked() has no access to the intack. Per the APM (vol.2,
section 15.21), V_INTR_MASKING controls whether the masking of interrupts
(EFLAGS.IF and TPR) is to be virtualized. That masking only applies to
maskable external interrupts (PIC/LAPIC/vector). NMI is not masked by
IF/TPR, and #MC is an exception, so neither is affected.
With the check moved into nsvm_intr_blocked(), an NMI/#MC aimed at L1
would be held pending whenever V_INTR_MASKING=0 and L2's IF is clear,
which would be a regression for L1 hypervisors that intercept NMI/#MC.
So I would prefer to keep the check in the hvm_intsrc_pic/lapic/vector
case of nestedsvm_vcpu_interrupt(), where the source is known. If you
would rather have it in nsvm_intr_blocked(), I can instead pass the
intack down (changing nhvm_interrupt_blocked()) so that the IF check
is applied to non-NMI/MCE sources only.
Let me know which you prefer.
Regards,
Chunjie
|