[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] x86/svm: Use the virtual NMI when available
- To: Abdelkareem Abdelsaamad <abdelkareem.abdelsaamad@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 16 Feb 2026 22:39:12 +0000
- 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=xHjXK+OGI9aiBsAuFp2tMbIuPCJIHSyjqu3esmX/aQc=; b=wUEO40kcN/WwZsl5PXhSg0AeYmOGQsfrMNfCJO+2JTH+TpNd4NzaU7syc9wwGXS4kDlIwcz7HTyILExNhXVIOJCt4TrZIAz8+f0klqOwiXSyOesBzOtrEuYbFDSjZ1HpNaHsMQV0JpDKMvf/j6dSrkxZa1uzSG/qKWH/eGz6NDNLvT/bVHCyRHJiYLeZROgoImCrB23Eja7x4N0RhxRHK1++OKthWyFFdseH3cnRn4Ob8/K6e9pfFcfDqKr16jcIkvlWSxO2Ke8TU3y3x8rDiek04GoCEqNDKojTliE47J2vq3MPYfhVUmBfJShFM2OKFyv9WxBl/X+G6djeeEmf7g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Nv7fTH971XI1vl/FhG5GGS+9JTHM1aDqbyiAYa3y9nKBdEFlYrCTK8Mzn9XjrwoorasLRwXk3z646d+N1NPmuIoxWcM05XLCioGJc3aRom96vo+K4GK1TBdba1TiiIe9uatQqIXSltXuaaRj/m2VhhJI+nxop8hBePceWLYk9FNgPEVUD3PgvQJ7jqfYdEqLpzhApll5h56O1U2BxUFYFLW8T51VJdcL9nxWoKxL7WYl+i8GhUOVOcZqJNZ03R6B5xYlJqDOyLPsLsVX/DWgBXfESBZ3smIVwQggDgOhpvMhiTR+fxJ/5YtwXwwcmCfGcJ7ePlqd5e67fncyco43hQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, teddy.astie@xxxxxxxxxx, roger.pau@xxxxxxxxxx, jbeulich@xxxxxxxx, jason.andryuk@xxxxxxx
- Delivery-date: Mon, 16 Feb 2026 22:39:33 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16/02/2026 4:10 pm, Abdelkareem Abdelsaamad wrote:
> On 16/02/2026 10:15 am, Andrew Cooper wrote:
>> So what happens to the NMI we're trying to inject when NMIs are
>> currently blocked?
> Ah, I see this...
> The handling flow will eventually land on the function svm_enable_intr_window
> with HVM_INTR_SHADOW_NMI.
What happens is that you drop the NMI on the floor and discard it. Note
how svm_inject_nmi() has no return value, and therefore must not fail.
It is buggy to check the blocked bit when injecting using this
mechanism. The blocked bit roughly equates to "NMI in progress" in the
guest, and it is explicitly possible to queue another NMI while the
first is in progress.
Both pending and masked being set roughly means "One NMI in progress,
and one queued", which is a perfectly fine state to be in.
~Andrew
|