summaryrefslogtreecommitdiff
path: root/rust/alloc/collections/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorKevin Cheng <chengkev@google.com>2025-12-15 19:25:10 +0000
committerSean Christopherson <seanjc@google.com>2026-01-08 12:12:11 -0800
commit1d1722e52fcd70deb53d8c192f958fe34be14f5e (patch)
tree588016f5940f7f6a6c48fadb97139fda6cbb714b /rust/alloc/collections/git@git.tavy.me:linux.git
parent01cde4eaaecaf5df158234f0a52b4a1c55796858 (diff)
KVM: SVM: Don't allow L1 intercepts for instructions not advertised
If a feature is not advertised in the guest's CPUID, prevent L1 from intercepting the unsupported instructions by clearing the corresponding intercept in KVM's cached vmcb12. When an L2 guest executes an instruction that is not advertised to L1, we expect a #UD exception to be injected by L0. However, the nested svm exit handler first checks if the instruction intercept is set in vmcb12, and if so, synthesizes an exit from L2 to L1 instead of a #UD exception. If a feature is not advertised, the L1 intercept should be ignored. While creating KVM's cached vmcb12, sanitize the intercepts for instructions that are not advertised in the guest CPUID. This effectively ignores the L1 intercept on nested vm exit handling. It also ignores the L1 intercept when computing the intercepts in vmcb02, so if L0 (for some reason) does not intercept the instruction, KVM won't intercept it at all. Signed-off-by: Kevin Cheng <chengkev@google.com> Co-developed-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev> Link: https://patch.msgid.link/20251215192510.2300816-1-chengkev@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions