aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorMaxim Levitsky <[email protected]>2023-02-27 14:10:08 +0530
committerSean Christopherson <[email protected]>2023-03-22 12:33:58 -0700
commit5d1ec4565200f461943990f0988932ca86823087 (patch)
tree72e872a10ec2d2880479c4ba91943feafb17dbca /lib/test_fortify/write_overflow-strncpy-src.c
parent7334ede457c6f1f7a26344ed25928f63f9a53a8d (diff)
KVM: nSVM: Raise event on nested VM exit if L1 doesn't intercept IRQs
If L1 doesn't intercept interrupts, then KVM will use vmcb02's V_IRQ to detect an interrupt window for L1 IRQs. On a subsequent nested VM-Exit, KVM might need to copy the current V_IRQ from vmcb02 to vmcb01 to continue waiting for an interrupt window, i.e. if there is still a pending IRQ for L1. Raise KVM_REQ_EVENT on nested exit if L1 isn't intercepting IRQs to ensure that KVM will re-enable interrupt window detection if needed. Note that this is a theoretical bug because KVM already raises KVM_REQ_EVENT on each nested VM exit, because the nested VM exit resets RFLAGS and kvm_set_rflags() raises the KVM_REQ_EVENT unconditionally. Explicitly raise KVM_REQ_EVENT for the interrupt window case to avoid having an unnecessary dependency on kvm_set_rflags(), and to document the scenario. Signed-off-by: Maxim Levitsky <[email protected]> [santosh: reworded description as per Sean's v2 comment] Signed-off-by: Santosh Shukla <[email protected]> Link: https://lore.kernel.org/r/[email protected] [sean: further massage changelog and comment] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions