mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/i386: add support for MSR_IA32_TSX_CTRL
The MSR_IA32_TSX_CTRL MSR can be used to hide TSX (also known as the Trusty Side-channel Extension). By virtualizing the MSR, KVM guests can disable TSX and avoid paying the price of mitigating TSX-based attacks on microarchitectural side channels. Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0723cc8a55
commit
2a9758c51e
4 changed files with 39 additions and 1 deletions
|
@ -349,7 +349,11 @@ typedef enum X86Seg {
|
|||
#define MSR_VIRT_SSBD 0xc001011f
|
||||
#define MSR_IA32_PRED_CMD 0x49
|
||||
#define MSR_IA32_CORE_CAPABILITY 0xcf
|
||||
|
||||
#define MSR_IA32_ARCH_CAPABILITIES 0x10a
|
||||
#define ARCH_CAP_TSX_CTRL_MSR (1<<7)
|
||||
|
||||
#define MSR_IA32_TSX_CTRL 0x122
|
||||
#define MSR_IA32_TSCDEADLINE 0x6e0
|
||||
|
||||
#define FEATURE_CONTROL_LOCKED (1<<0)
|
||||
|
@ -1449,6 +1453,7 @@ typedef struct CPUX86State {
|
|||
uint64_t msr_smi_count;
|
||||
|
||||
uint32_t pkru;
|
||||
uint32_t tsx_ctrl;
|
||||
|
||||
uint64_t spec_ctrl;
|
||||
uint64_t virt_ssbd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue