x86/msr: fix X2APIC_LAST

The latest Intel manual now says the X2APIC reserved range is only
0x800 to 0x8ff (NOT 0xbff).
This changed between SDM 68 (Nov 2018) and SDM 69 (Jan 2019).
The AMD manual documents 0x800-0x8ff too.

There are non-X2APIC MSRs in the 0x900-0xbff range now:
e.g. 0x981 is IA32_TME_CAPABILITY, an architectural MSR.

The new MSR in this range appears to have been introduced in Icelake,
so this commit should be backported to Xen versions supporting Icelake.

Backport: 4.13+

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Edwin Török authored and Jan Beulich committed 2022-07-27 12:57:10 +02:00
1 parent b1f0183e50
commit 13316827fa
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -3397,7 +3397,7 @@ void vmx_vlapic_msr_changed(struct vcpu *v)
if ( cpu_has_vmx_apic_reg_virt )
{
for ( msr = MSR_X2APIC_FIRST;
msr <= MSR_X2APIC_FIRST + 0xff; msr++ )
msr <= MSR_X2APIC_LAST; msr++ )
vmx_clear_msr_intercept(v, msr, VMX_MSR_R);
vmx_set_msr_intercept(v, MSR_X2APIC_PPR, VMX_MSR_R);
@@ -3418,7 +3418,7 @@ void vmx_vlapic_msr_changed(struct vcpu *v)
if ( !(v->arch.hvm.vmx.secondary_exec_control &
SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE) )
for ( msr = MSR_X2APIC_FIRST;
msr <= MSR_X2APIC_FIRST + 0xff; msr++ )
msr <= MSR_X2APIC_LAST; msr++ )
vmx_set_msr_intercept(v, msr, VMX_MSR_RW);
vmx_update_secondary_exec_control(v);
+1 -1
View File
@@ -148,7 +148,7 @@
#define MSR_INTERRUPT_SSP_TABLE 0x000006a8
#define MSR_X2APIC_FIRST 0x00000800
#define MSR_X2APIC_LAST 0x00000bff
#define MSR_X2APIC_LAST 0x000008ff
#define MSR_X2APIC_TPR 0x00000808
#define MSR_X2APIC_PPR 0x0000080a
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.