Commit a836839
KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
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>1 parent e644896 commit a836839
3 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3521 | 3521 | | |
3522 | 3522 | | |
3523 | 3523 | | |
3524 | | - | |
| 3524 | + | |
3525 | 3525 | | |
| 3526 | + | |
| 3527 | + | |
3526 | 3528 | | |
3527 | 3529 | | |
3528 | 3530 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
7728 | 7728 | | |
7729 | 7729 | | |
7730 | 7730 | | |
| 7731 | + | |
| 7732 | + | |
| 7733 | + | |
| 7734 | + | |
| 7735 | + | |
7731 | 7736 | | |
7732 | 7737 | | |
7733 | 7738 | | |
| |||
7810 | 7815 | | |
7811 | 7816 | | |
7812 | 7817 | | |
| 7818 | + | |
7813 | 7819 | | |
7814 | 7820 | | |
7815 | 7821 | | |
| |||
0 commit comments