|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/6] vmx/apicv: Fix vmx_pi_hooks_assign() comment
When the VM is preempted/offline, we're looking to suppress
the notification (as we're going to resume the guest later on,
processing any pending interrupt) to avoid needlessy processing
interrupts in Xen.
That behavior is actually SN=1 and not SN=0 (which makes Xen process
interrupts).
Fixes: 4b759ce163f4 ("vmx: VT-d posted-interrupt core logic handling")
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
So it now matches what docs/misc/vtd-pi.txt says.
3. When vCPU is preempted or sleeping
- Set 'SN' to suppress non-urgent interrupts
(Currently, we only support non-urgent interrupts)
When vCPU is preempted or sleep, it doesn't need to accept
posted-interrupt notification event since we don't change the behavior
of scheduler when the interrupt occurs, we still need wait for the next
scheduling of the vCPU. When external interrupts from assigned devices
occur,
the interrupts are recorded in PIR, and will be synced to IRR before
VM-Entry.
- Set 'NV' to 'posted_intr_vector'.
xen/arch/x86/hvm/vmx/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 3c7374a9ff..31bb094d6f 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -303,7 +303,7 @@ void vmx_pi_desc_fixup(unsigned int cpu)
* If the VM is currently either preempted or offline (i.e., not running
* because of some reason other than blocking waiting for an interrupt),
* there's nothing Xen can do -- we want the interrupt pending bit set in
- * the guest, but we don't want to bother Xen with an interrupt (SN clear).
+ * the guest, but we don't want to bother Xen with an interrupt (SN set).
*
* There's a brief window of time between vmx_intr_assist() and checking
* softirqs where if an interrupt comes in it may be lost; so we need Xen
--
2.56.0
--
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |