Commit d5f6f44
KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
[ Upstream commit a836839 ]
When RDTSCP is supported but RDPID is not supported in host,
RDPID emulation is available. However, __kvm_get_msr() would
only fail when RDTSCP/RDPID both are disabled in guest, so
the emulator wouldn't inject a #UD when RDPID is disabled but
RDTSCP is enabled in guest.
Fixes: fb6d4d3 ("KVM: x86: emulate RDPID")
Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
Message-Id: <1dfd46ae5b76d3ed87bde3154d51c64ea64c99c1.1646226788.git.houwenlong.hwl@antgroup.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent a997e0f commit d5f6f44
3 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3514 | 3514 | | |
3515 | 3515 | | |
3516 | 3516 | | |
3517 | | - | |
| 3517 | + | |
3518 | 3518 | | |
| 3519 | + | |
| 3520 | + | |
3519 | 3521 | | |
3520 | 3522 | | |
3521 | 3523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7393 | 7393 | | |
7394 | 7394 | | |
7395 | 7395 | | |
| 7396 | + | |
| 7397 | + | |
| 7398 | + | |
| 7399 | + | |
| 7400 | + | |
7396 | 7401 | | |
7397 | 7402 | | |
7398 | 7403 | | |
| |||
7475 | 7480 | | |
7476 | 7481 | | |
7477 | 7482 | | |
| 7483 | + | |
7478 | 7484 | | |
7479 | 7485 | | |
7480 | 7486 | | |
| |||
0 commit comments