aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/unix_bpf.c
diff options
context:
space:
mode:
authorPaolo Bonzini <[email protected]>2025-03-06 20:29:22 +0000
committerPaolo Bonzini <[email protected]>2025-03-14 18:20:03 +0000
commit74c1807f6c4feddb3c3cb1056c54531d4adbaea6 (patch)
treee39bef76c21a6af069d528e18e1a4dc568886712 /net/unix/unix_bpf.c
parentKVM: x86: Add infrastructure for secure TSC (diff)
downloadkernel-74c1807f6c4feddb3c3cb1056c54531d4adbaea6.tar.gz
kernel-74c1807f6c4feddb3c3cb1056c54531d4adbaea6.zip
KVM: x86: block KVM_CAP_SYNC_REGS if guest state is protected
KVM_CAP_SYNC_REGS does not make sense for VMs with protected guest state, since the register values cannot actually be written. Return 0 when using the VM-level KVM_CHECK_EXTENSION ioctl, and accordingly return -EINVAL from KVM_RUN if the valid/dirty fields are nonzero. However, on exit from KVM_RUN userspace could have placed a nonzero value into kvm_run->kvm_valid_regs, so check guest_state_protected again and skip store_regs() in that case. Cc: [email protected] Fixes: 517987e3fb19 ("KVM: x86: add fields to struct kvm_arch for CoCo features") Signed-off-by: Paolo Bonzini <[email protected]> Message-ID: <[email protected]> Reviewed-by: Pankaj Gupta <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions