diff options
| author | Liran Alon <[email protected]> | 2017-12-24 16:12:55 +0000 |
|---|---|---|
| committer | Radim Krčmář <[email protected]> | 2018-01-16 15:40:09 +0000 |
| commit | f27a85c4988d408a2918a3bcbc3d7fe4fb2dc2b3 (patch) | |
| tree | 6783014be25e51b83b6e66e22475b7574585f1e1 /tools/perf/scripts/python/syscall-counts.py | |
| parent | KVM: x86: Change __kvm_apic_update_irr() to also return if max IRR updated (diff) | |
| download | kernel-f27a85c4988d408a2918a3bcbc3d7fe4fb2dc2b3.tar.gz kernel-f27a85c4988d408a2918a3bcbc3d7fe4fb2dc2b3.zip | |
KVM: nVMX: Re-evaluate L1 pending events when running L2 and L1 got posted-interrupt
In case posted-interrupt was delivered to CPU while it is in host
(outside guest), then posted-interrupt delivery will be done by
calling sync_pir_to_irr() at vmentry after interrupts are disabled.
sync_pir_to_irr() will check vmx->pi_desc.control ON bit and if
set, it will sync vmx->pi_desc.pir to IRR and afterwards update RVI to
ensure virtual-interrupt-delivery will dispatch interrupt to guest.
However, it is possible that L1 will receive a posted-interrupt while
CPU runs at host and is about to enter L2. In this case, the call to
sync_pir_to_irr() will indeed update the L1's APIC IRR but
vcpu_enter_guest() will then just resume into L2 guest without
re-evaluating if it should exit from L2 to L1 as a result of this
new pending L1 event.
To address this case, if sync_pir_to_irr() has a new L1 injectable
interrupt and CPU is running L2, we force exit GUEST_MODE which will
result in another iteration of vcpu_run() run loop which will call
kvm_vcpu_running() which will call check_nested_events() which will
handle the pending L1 event properly.
Signed-off-by: Liran Alon <[email protected]>
Reviewed-by: Nikita Leshenko <[email protected]>
Reviewed-by: Krish Sadhukhan <[email protected]>
Reviewed-by: Liam Merwick <[email protected]>
Signed-off-by: Liam Merwick <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
