Commit 3244616
committed
KVM: nVMX: Allow emulating RDPID on behalf of L2
Return X86EMUL_CONTINUE instead X86EMUL_UNHANDLEABLE when emulating RDPID
on behalf of L2 and L1 _does_ expose RDPID/RDTSCP to L2. When RDPID
emulation was added by commit fb6d4d3 ("KVM: x86: emulate RDPID"),
KVM incorrectly allowed emulation by default. Commit 07721fe ("KVM:
nVMX: Don't emulate instructions in guest mode") fixed that flaw, but
missed that RDPID emulation was relying on the common return path to allow
emulation on behalf of L2.
Fixes: 07721fe ("KVM: nVMX: Don't emulate instructions in guest mode")
Link: https://lore.kernel.org/r/20250201015518.689704-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent c8e612b commit 3244616
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8049 | 8049 | | |
8050 | 8050 | | |
8051 | 8051 | | |
8052 | | - | |
8053 | | - | |
8054 | | - | |
8055 | | - | |
8056 | | - | |
8057 | 8052 | | |
| 8053 | + | |
| 8054 | + | |
| 8055 | + | |
| 8056 | + | |
| 8057 | + | |
| 8058 | + | |
8058 | 8059 | | |
8059 | 8060 | | |
8060 | 8061 | | |
8061 | 8062 | | |
8062 | 8063 | | |
8063 | | - | |
| 8064 | + | |
8064 | 8065 | | |
8065 | 8066 | | |
8066 | 8067 | | |
| |||
0 commit comments