Changeset 63944 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 22, 2016 11:54:43 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/APIC.cpp
r63908 r63944 53 53 # define X2APIC_MSRRANGE(a_uFirst, a_uLast, a_szName) \ 54 54 { (a_uFirst), (a_uLast), kCpumMsrRdFn_Ia32X2ApicN, kCpumMsrWrFn_Ia32X2ApicN, 0, 0, 0, 0, 0, a_szName, { 0 }, { 0 }, { 0 }, { 0 } } 55 # define X2APIC_MSRRANGE_INVALID(a_uFirst, a_uLast, a_szName) \ 56 { (a_uFirst), (a_uLast), kCpumMsrRdFn_WriteOnly, kCpumMsrWrFn_ReadOnly, 0, 0, 0, 0, UINT64_MAX /*fWrGpMask*/, a_szName, { 0 }, { 0 }, { 0 }, { 0 } } 55 57 #else 56 58 # define X2APIC_MSRRANGE(a_uFirst, a_uLast, a_szName) \ 57 59 { (a_uFirst), (a_uLast), kCpumMsrRdFn_Ia32X2ApicN, kCpumMsrWrFn_Ia32X2ApicN, 0, 0, 0, 0, 0, a_szName } 60 # define X2APIC_MSRRANGE_INVALID(a_uFirst, a_uLast, a_szName) \ 61 { (a_uFirst), (a_uLast), kCpumMsrRdFn_WriteOnly, kCpumMsrWrFn_ReadOnly, 0, 0, 0, 0, UINT64_MAX /*fWrGpMask*/, a_szName } 58 62 #endif 59 63 … … 67 71 */ 68 72 static CPUMMSRRANGE const g_MsrRange_x2Apic = X2APIC_MSRRANGE(MSR_IA32_X2APIC_START, MSR_IA32_X2APIC_END, "x2APIC range"); 73 static CPUMMSRRANGE const g_MsrRange_x2Apic_Invalid = X2APIC_MSRRANGE_INVALID(MSR_IA32_X2APIC_START, MSR_IA32_X2APIC_END, "x2APIC range invalid"); 69 74 #undef X2APIC_MSRRANGE 75 #undef X2APIC_MSRRANGE_GP 70 76 71 77 /** Saved state field descriptors for XAPICPAGE. */ … … 1721 1727 * Initialize the APIC state. 1722 1728 */ 1723 /* First insert the MSR range of the x2APIC if enabled. */1729 /* First insert/remove the MSR range of the x2APIC. */ 1724 1730 if (pApic->enmMaxMode == PDMAPICMODE_X2APIC) 1725 1731 { 1726 1732 rc = CPUMR3MsrRangesInsert(pVM, &g_MsrRange_x2Apic); 1727 1733 AssertLogRelRCReturn(rc, rc); 1734 } 1735 else 1736 { 1737 /* We currently don't have a function to remove the range, so we register an range which will cause a #GP. */ 1738 rc = CPUMR3MsrRangesInsert(pVM, &g_MsrRange_x2Apic_Invalid); 1739 AssertLogRelRCReturn(rc, rc); 1740 LogRel(("APIC: Removed x2APIC MSR range\n")); 1728 1741 } 1729 1742
Note:
See TracChangeset
for help on using the changeset viewer.