[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/3] x86/hvm: don't let EFLAGS.IF block NMI/#MC due to nested state


  • To: chunjie.zhu@xxxxxxxxxx
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Thu, 19 Nov 2026 11:55:05 +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=9cmGdthkLBHjJ8hahufzVZB6gsAkLF+rEULto5VyKts=; b=pyjYV66jYPu8bOx61CWWROePXeNiQY8pIKpHviMVMZYbRomze5ylrOZzr+GeU43Yz1QYMkD+9s+OiK4Vwk0y3z2PlTqDafWY/vgkg0PuTpdM7h50Jbx2mSOEWQVNuPtCbm4GnELywIdB6+UWS0x4NMclPqgdCfOW1ljzJuNI7K9T7wrkF95PHJtT1OYRCYcfaBMP+FQD7PnRV+VIj/ygXk56z+YqlknDKKPz166nv/zdHOev3sCJM97fmxjzx0bV9CyzB23ArdXcA0FpU3jvPLG53AVC+BmQwbwPnGk1yHyXHW6NdNgJzU9K13U4tqeteTrtkiu55CNNrgezwabalg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OKHtf0rIW1AimlFOqh7wpZ0Za+OMA1+tQm8Y9M7yFLlJDq6N4oXXS5d7b51aeA4EQXbwCPnKf5PzYZNMpKT8eaI3VP1Z94wZbsmL+G7OUHIK91tGvE827ZdULbqV2MkJj+QwuZT9HdggaoNLJ4bbXxeyJwvyEHMNrTf3/23ZfIdhORBB+R9k2OTRu4bRhvYlnxN1tRGQAY4hdtBTv13iErpCsMREajUyaCio32mrC+zpCcBolAQqD9T83lW0aqmj/NvHb4Ks5KYMg9/904Oo9P92eOXV/IP644zf5h0M/i6bGh0DzrMtlAiK4uDRCkkFJ+6YVWKq6bQef/l6SIYytA==
  • 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, jason.andryuk@xxxxxxx, jbeulich@xxxxxxxx, roger@xxxxxxxxxxxxxx, teddy.astie@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 19 Nov 2026 11:55:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/12/26 11:35 AM, chunjie.zhu@xxxxxxxxxx wrote:
From: Chunjie Zhu <chunjie.zhu@xxxxxxxxxx>

nhvm_interrupt_blocked() reports why an interrupt is blocked, but both
callers, nestedsvm_vcpu_interrupt() and hvm_interrupt_blocked(), treat any
reason as blocking every event source.  EFLAGS.IF (hvm_intblk_rflags_ie)
doesn't mask NMI or #MC, so NMI/#MC get held pending needlessly, e.g. when
L1 sets V_INTR_MASKING and L1's IF is clear.

Have nhvm_interrupt_blocked() take the intack and report no block for
NMI/#MC when the reason is hvm_intblk_rflags_ie.

nvmx_intr_blocked() used hvm_intblk_rflags_ie for vmexit/vmentry in
progress and a valid VM_ENTRY_INTR_INFO.  Those block every event source
and have nothing to do with RFLAGS.IF, so report hvm_intblk_arch instead.
This doesn't change behaviour as all callers only compare against
hvm_intblk_none and hvm_intblk_tpr.

Signed-off-by: Chunjie Zhu <chunjie.zhu@xxxxxxxxxx>

It's not completely clear what the Fixes tag should be for this. Perhaps:

Fixes: 3a1ef3c33fa7 ("Implement SVM specific interrupt handling")
Fixes: 479d4619fd5b ("Nested VMX: interrupt/exception handling for n2 guest")

With that,

Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.