41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * CPUM - CPU MSR Registers.
aae8a6a38fd27661046ab1d06cb2cb5c096c40edvboxsync * Copyright (C) 2013-201 Oracle Corporation
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * available from http://www.virtualbox.org. This file is free software;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * you can redistribute it and/or modify it under the terms of the GNU
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * General Public License (GPL) as published by the Free Software
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/*******************************************************************************
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync* Header Files *
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync*******************************************************************************/
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/*******************************************************************************
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync* Defined Constants And Macros *
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync*******************************************************************************/
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Validates the CPUMMSRRANGE::offCpumCpu value and declares a local variable
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * pointing to it.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * ASSUMES sizeof(a_Type) is a power of two and that the member is aligned
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * correctly.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync#define CPUM_MSR_ASSERT_CPUMCPU_OFFSET_RETURN(a_pVCpu, a_pRange, a_Type, a_VarName) \
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync && !((a_pRange)->offCpumCpu & (RT_MIN(sizeof(a_Type), 8) - 1)) \
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync , ("offCpumCpu=%#x %s\n", (a_pRange)->offCpumCpu, (a_pRange)->szName), \
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync a_Type *a_VarName = (a_Type *)((uintptr_t)&(a_pVCpu)->cpum.s + (a_pRange)->offCpumCpu)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/*******************************************************************************
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync* Structures and Typedefs *
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync*******************************************************************************/
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Implements reading one or more MSRs.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @returns VBox status code.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VINF_SUCCESS on success.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * @retval VINF_CPUM_R3_MSR_READ if the MSR read could not be serviced in the
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * current context (raw-mode or ring-0).
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VERR_CPUM_RAISE_GP_0 on failure (invalid MSR).
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVCpu Pointer to the VMCPU.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param idMsr The MSR we're reading.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pRange The MSR range descriptor.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param puValue Where to return the value.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsynctypedef DECLCALLBACK(VBOXSTRICTRC) FNCPUMRDMSR(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** Pointer to a RDMSR worker for a specific MSR or range of MSRs. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Implements writing one or more MSRs.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VINF_SUCCESS on success.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * @retval VINF_CPUM_R3_MSR_WRITE if the MSR write could not be serviced in the
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * current context (raw-mode or ring-0).
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VERR_CPUM_RAISE_GP_0 on failure.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVCpu Pointer to the VMCPU.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param idMsr The MSR we're writing.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pRange The MSR range descriptor.
728b52f802ac19865bd4aa8e9ade8f506a9e6c10vboxsync * @param uValue The value to set, ignored bits masked.
728b52f802ac19865bd4aa8e9ade8f506a9e6c10vboxsync * @param uRawValue The raw value with the ignored bits not masked.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsynctypedef DECLCALLBACK(VBOXSTRICTRC) FNCPUMWRMSR(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** Pointer to a WRMSR worker for a specific MSR or range of MSRs. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Generic functions.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Generic functions.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Generic functions.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_FixedValue(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IgnoreWrite(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Ignoring WRMSR %#x (%s), %#llx\n", idMsr, pRange->szName, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_WriteOnly(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_ReadOnly(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32P5McAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = 0; /** @todo implement machine check injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32P5McAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement machine check injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32P5McType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = 0; /** @todo implement machine check injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32P5McType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement machine check injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32TimestampCounter(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32TimestampCounter(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PlatformId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync /* Max allowed bus ratio present. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync /** @todo Implement scaled BUS frequency. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ApicBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
5a8e015c4fe7f3bfb93478a55b298aa7f21b5e08vboxsync#if 0 /** @todo Sort this one out properly. Evidence from ticks 12240 and 12875 suggest the apic base is still readable even
5a8e015c4fe7f3bfb93478a55b298aa7f21b5e08vboxsync * after the apic has been diabled. That makes common sense too. What we need to do here, though, is check whether
5a8e015c4fe7f3bfb93478a55b298aa7f21b5e08vboxsync * there is an APIC device associated with the VM, and GP if there isn't. But that's for later. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: %s, apic not present -> GP\n", pRange->szName));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ApicBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = 1; /* Locked, no VT-X, no SYSENTER micromanagement. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo fake microcode update. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
795d02542d53f15030f205374c4581d99ef581a4vboxsync /* Normally, zero is written to Ia32BiosSignId before reading it in order
795d02542d53f15030f205374c4581d99ef581a4vboxsync to select the signature instead of the BBL_CR_D3 behaviour. The GP mask
795d02542d53f15030f205374c4581d99ef581a4vboxsync of the database entry should take care of most illegal writes for now, so
795d02542d53f15030f205374c4581d99ef581a4vboxsync just ignore all writes atm. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Fake bios update trigger better. The value is the address to an
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * update package, I think. We should probably GP if it's invalid. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PmcN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo check CPUID leaf 0ah. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PmcN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo check CPUID leaf 0ah. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MonitorFilterLineSize(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo return 0x1000 if we try emulate mwait 100% correctly. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = 0x40; /** @todo Change to CPU cache line size. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MonitorFilterLineSize(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo should remember writes, though it's supposedly something only a BIOS
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * would write so, it's not extremely important. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MPerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Read MPERF: Adjust against previously written MPERF value. Is TSC
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * what we want? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MPerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Write MPERF: Calc adjustment. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32APerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Read APERF: Adjust against previously written MPERF value. Is TSC
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * what we want? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32APerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Write APERF: Calc adjustment. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* This is currently a bit weird. :-) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync bool const fSystemManagementRangeRegisters = false;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync | (fSystemManagementRangeRegisters ? RT_BIT_64(11) : 0);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement variable MTRR storage. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Validate the value.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Invalid type set writing MTRR PhysBase MSR %#x: %#llx (%#llx)\n", idMsr, uValue, uValue & 0xff));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync uint64_t fInvPhysMask = ~(RT_BIT_64(pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures.cMaxPhysAddrWidth) - 1U);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Invalid physical address bits set writing MTRR PhysBase MSR %#x: %#llx (%#llx)\n",
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Store it.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement variable MTRR storage. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement variable MTRR storage. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Validate the value.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync uint64_t fInvPhysMask = ~(RT_BIT_64(pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures.cMaxPhysAddrWidth) - 1U);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Invalid physical address bits set writing MTRR PhysMask MSR %#x: %#llx (%#llx)\n",
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Store it.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement variable MTRR storage. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_MSR_ASSERT_CPUMCPU_OFFSET_RETURN(pVCpu, pRange, uint64_t, puFixedMtrr);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_MSR_ASSERT_CPUMCPU_OFFSET_RETURN(pVCpu, pRange, uint64_t, puFixedMtrr);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync for (uint32_t cShift = 0; cShift < 63; cShift += 8)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Invalid MTRR type at %u:%u in fixed range (%#x/%s): %#llx (%#llx)\n",
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync cShift + 7, cShift, idMsr, pRange->szName, uValue, uType));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrDefType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = pVCpu->cpum.s.GuestMsrs.msr.MtrrDefType;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MtrrDefType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Invalid MTRR default type value: %#llx (%#llx)\n", pRange->szName, uValue, uValue & 0xff));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterCs(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterCs(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note! We used to mask this by 0xffff, but turns out real HW doesn't and
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync there are generally 32-bit working bits backing this register. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterEsp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterEsp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: IA32_SYSENTER_ESP not canonical! %#llx\n", uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SysEnterEip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SysEnterEip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
1c5db1d87255aa1b2449994a268de74d82aac1aavboxsync LogRel(("CPUM: IA32_SYSENTER_EIP not canonical! %#llx\n", uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: IA32_SYSENTER_EIP not canonical! %#llx\n", uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync#if 0 /** @todo implement machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McgStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McgCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McgCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DebugCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_DEBUGCTL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DebugCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_DEBUGCTL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmrrPhysBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmrrPhysBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SmrrPhysMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SmrrPhysMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PlatformDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel direct cache access (DCA)?? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PlatformDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel direct cache access (DCA)?? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32CpuDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel direct cache access (DCA)?? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel direct cache access (DCA)?? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel direct cache access (DCA)?? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_PERFEVTSEL0+. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_PERFEVTSEL0+. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync /* Always provide the max bus ratio for now. XNU expects it. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uValue &= ~((UINT64_C(0x1f) << 40) | RT_BIT_64(46));
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVM);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint8_t uTscRatio = (uint8_t)((uTscHz + uScalableBusHz / 2) / uScalableBusHz);
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /* Pentium4 allows writing, but all bits are ignored. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_PERFCTL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_PERFCTL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_FIXED_CTRn (fixed performance counters). */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_FIXED_CTRn (fixed performance counters). */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32PebsEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PebsEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ClockModulation(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_CLOCK_MODULATION. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ClockModulation(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_CLOCK_MODULATION. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ThermInterrupt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_THERM_INTERRUPT. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ThermInterrupt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_THERM_STATUS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ThermStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_THERM_STATUS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32ThermStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_THERM_INTERRUPT. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_THERM2_CTL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_THERM2_CTL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MiscEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32MiscEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync uint64_t const uOld = pVCpu->cpum.s.GuestMsrs.msr.MiscEnable;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Unsupported bits are generally ignored and stripped by the MSR range
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync entry that got us here. So, we just need to preserve fixed bits. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: IA32_MISC_ENABLE; old=%#llx written=%#llx => %#llx\n",
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync uOld, uValue, pVCpu->cpum.s.GuestMsrs.msr.MiscEnable));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Wire IA32_MISC_ENABLE bit 22 to our NT 4 CPUID trick. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Wire up MSR_IA32_MISC_ENABLE_XD_DISABLE. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McCtlStatusAddrMiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement machine check exception injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* The ADDR and MISC registers aren't accessible since the
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync corresponding STATUS bits are zero. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Reading IA32_MCi_ADDR %#x -> #GP\n", idMsr));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Reading IA32_MCi_MISC %#x -> #GP\n", idMsr));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McCtlStatusAddrMiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Ignore writes to the CTL register. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* According to specs, the STATUS register can only be written to
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync with the value 0. VBoxCpuReport thinks different for a
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Pentium M Dothan, but implementing according to specs now. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Writing non-zero value (%#llx) to IA32_MCi_STATUS %#x -> #GP\n", uValue, idMsr));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Specs states that ADDR and MISC can be cleared by writing zeros.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Writing 1s will GP. Need to figure out how this relates to the
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync ADDRV and MISCV status flags. If writing is independent of those
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync bits, we need to know whether the CPU really implements them since
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync that is exposed by writing 0 to them.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Implementing the solution with the fewer GPs for now. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Writing non-zero value (%#llx) to IA32_MCi_ADDR %#x -> #GP\n", uValue, idMsr));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Writing non-zero value (%#llx) to IA32_MCi_MISC %#x -> #GP\n", uValue, idMsr));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32McNCtl2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement machine check exception injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32McNCtl2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement machine check exception injection. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DsArea(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement IA32_DS_AREA. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DsArea(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32TscDeadline(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement TSC deadline timer. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32TscDeadline(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement TSC deadline timer. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32X2ApicN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync int rc = PDMApicReadMSR(pVCpu->CTX_SUFF(pVM), pVCpu->idCpu, idMsr, puValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: X2APIC %#x read => %Rrc => #GP\n", idMsr, rc));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32X2ApicN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync int rc = PDMApicWriteMSR(pVCpu->CTX_SUFF(pVM), pVCpu->idCpu, idMsr, uValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: X2APIC %#x write %#llx => %Rrc => #GP\n", idMsr, rc, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32DebugInterface(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo IA32_DEBUG_INTERFACE (no docs) */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32DebugInterface(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo IA32_DEBUG_INTERFACE (no docs) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxPinbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxProcbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxExitCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxEntryCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxMisc(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed0(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed0(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxVmcsEnum(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxProcBasedCtls2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxEptVpidCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTruePinbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueProcbasedCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueExitCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxTrueEntryCtls(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64Efer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64Efer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync uint64_t const uOldEfer = pVCpu->cpum.s.Guest.msrEFER;
f5906f8fb3e7988cbedcbb78fc7170b9b57bf026vboxsync uint32_t const fExtFeatures = pVM->cpum.s.aGuestCpuIdPatmExt[0].uEax >= 0x80000001
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Filter out those bits the guest is allowed to change. (e.g. LMA is read-only) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if (fExtFeatures & X86_CPUID_EXT_FEATURE_EDX_LONG_MODE)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if (fExtFeatures & X86_CPUID_EXT_FEATURE_EDX_SYSCALL)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if (fExtFeatures & X86_CPUID_AMD_FEATURE_EDX_FFXSR)
d59d81150ba00a699b20dd9c32cf3c5bd8406b72vboxsync /* #GP(0) If anything outside the allowed bits is set. */
d59d81150ba00a699b20dd9c32cf3c5bd8406b72vboxsync Log(("CPUM: Settings disallowed EFER bit. uValue=%#RX64 fAllowed=%#RX64 -> #GP(0)\n", uValue, fMask));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Check for illegal MSR_K6_EFER_LME transitions: not allowed to change LME if
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync paging is enabled. (AMD Arch. Programmer's Manual Volume 2: Table 14-5) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if ( (uOldEfer & MSR_K6_EFER_LME) != (uValue & fMask & MSR_K6_EFER_LME)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Illegal MSR_K6_EFER_LME change: paging is enabled!!\n"));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* There are a few more: e.g. MSR_K6_EFER_LMSLE */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertMsg(!(uValue & ~(MSR_K6_EFER_NXE | MSR_K6_EFER_LME | MSR_K6_EFER_LMA /* ignored anyway */ | MSR_K6_EFER_SCE | MSR_K6_EFER_FFXSR)),
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync pVCpu->cpum.s.Guest.msrEFER = (uOldEfer & ~fMask) | (uValue & fMask);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* AMD64 Architecture Programmer's Manual: 15.15 TLB Control; flush the TLB
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if MSR_K6_EFER_NXE, MSR_K6_EFER_LME or MSR_K6_EFER_LMA are changed. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if ( (uOldEfer & (MSR_K6_EFER_NXE | MSR_K6_EFER_LME | MSR_K6_EFER_LMA))
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync != (pVCpu->cpum.s.Guest.msrEFER & (MSR_K6_EFER_NXE | MSR_K6_EFER_LME | MSR_K6_EFER_LMA)))
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /// @todo PGMFlushTLB(pVCpu, cr3, true /*fGlobal*/);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Notify PGM about NXE changes. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync != (pVCpu->cpum.s.Guest.msrEFER & MSR_K6_EFER_NXE))
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync PGMNotifyNxeChanged(pVCpu, !(uOldEfer & MSR_K6_EFER_NXE));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64SyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64SyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64LongSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64LongSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64CompSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64CompSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64SyscallFlagMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64SyscallFlagMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64FsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64FsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64GsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64GsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64KernelGsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64KernelGsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Amd64TscAux(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Amd64TscAux(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Intel specific
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Intel specific
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Intel specific
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelEblCrPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo recalc clock frequency ratio? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelEblCrPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Write EBL_CR_POWERON: Remember written bits. */
325ca9249eb28df051883d8301542b38f9231c5evboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7CoreThreadCount(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
325ca9249eb28df051883d8301542b38f9231c5evboxsync /* Note! According to cpuid_set_info in XNU (10.7.0), Westmere CPU only
325ca9249eb28df051883d8301542b38f9231c5evboxsync have a 4-bit core count. */
325ca9249eb28df051883d8301542b38f9231c5evboxsync uint16_t cThreads = cCores; /** @todo hyper-threading. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo P4 hard power on config */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo P4 hard power on config */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo P4 soft power on config */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo P4 soft power on config */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVM);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync if (uScalableBusHz <= CPUM_SBUSFREQ_100MHZ && pVM->cpum.s.GuestFeatures.uModel <= 2)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync else if (uScalableBusHz <= CPUM_SBUSFREQ_267MHZ && pVM->cpum.s.GuestFeatures.uModel > 2)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint8_t uTscRatio = (uint8_t)((uTscHz + uScalableBusHz / 2) / uScalableBusHz);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync /* Probably more stuff here, but intel doesn't want to tell us. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uValue &= ~(RT_BIT_64(21) | RT_BIT_64(22) | RT_BIT_64(23)); /* 100 MHz is only documented value */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo P4 bus frequency config */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP6FsbFrequency(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync /* Convert the scalable bus frequency to the encoding in the intel manual (for core+). */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVCpu->CTX_SUFF(pVM));
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync else /*if (uScalableBusHz <= CPUM_SBUSFREQ_400MHZ)*/
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPlatformInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Just indicate a fixed TSC, no turbo boost, no programmable anything. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVM);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint8_t uTscRatio = (uint8_t)((uTscHz + uScalableBusHz / 2) / uScalableBusHz);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uValue = ((uint32_t)uTscRatio << 8) /* TSC invariant frequency. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync | ((uint64_t)uTscRatio << 40); /* The max turbo frequency. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync /* Ivy bridge has a minimum operating ratio as well. */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync if (true) /** @todo detect sandy bridge. */
32f0fdedfe738108db99663839011b23f7c3de68vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelFlexRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
32f0fdedfe738108db99663839011b23f7c3de68vboxsync uint64_t uValue = pRange->uValue & ~UINT64_C(0x1ff00);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uScalableBusHz = CPUMGetGuestScalableBusFrequency(pVM);
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint8_t uTscRatio = (uint8_t)((uTscHz + uScalableBusHz / 2) / uScalableBusHz);
32f0fdedfe738108db99663839011b23f7c3de68vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelFlexRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
32f0fdedfe738108db99663839011b23f7c3de68vboxsync /** @todo implement writing MSR_FLEX_RATIO. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPkgCStConfigControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = pVCpu->cpum.s.GuestMsrs.msr.PkgCStateCfgCtrl;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelPkgCStConfigControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if (pVCpu->cpum.s.GuestMsrs.msr.PkgCStateCfgCtrl & RT_BIT_64(15))
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: WRMDR %#x (%s), %#llx: Write protected -> #GP\n", idMsr, pRange->szName, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync#if 0 /** @todo check what real (old) hardware does. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: WRMDR %#x (%s), %#llx: Invalid limit (%d) -> #GP\n", idMsr, pRange->szName, uValue, (uint32_t)(uValue & 7)));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync pVCpu->cpum.s.GuestMsrs.msr.PkgCStateCfgCtrl = uValue;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelPmgIoCaptureBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement I/O mwait wakeup. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelPmgIoCaptureBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement I/O mwait wakeup. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchFromToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchFromToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchFromN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchFromN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Probing indicates that bit 63 is settable on SandyBridge, at least
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * if the rest of the bits are zero. Automatic sign extending?
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Investigate! */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Probing indicates that bit 63 is settable on SandyBridge, at least
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * if the rest of the bits are zero. Automatic sign extending?
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Investigate! */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelLastBranchTos(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelLastBranchTos(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7MsrOffCoreResponseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo machine check. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7MsrOffCoreResponseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo machine check. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
728b52f802ac19865bd4aa8e9ade8f506a9e6c10vboxsync int rc = CPUMGetGuestCRx(pVCpu, pRange->uValue, puValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* This CRx interface differs from the MOV CRx, GReg interface in that
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync #GP(0) isn't raised if unsupported bits are written to. Instead they
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync are simply ignored and masked off. (Pentium M Dothan) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement MSR_P6_CRx writing. Too much effort for very little, if
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * any, gain. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId1FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement CPUID masking. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId1FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement CPUID masking. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId1FeatureMaskEax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement CPUID masking. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId1FeatureMaskEax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement CPUID masking. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCpuId80000001FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement CPUID masking. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCpuId80000001FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement CPUID masking. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyAesNiCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement AES-NI. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = 3; /* Bit 0 is lock bit, bit 1 disables AES-NI. That's what they say. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyAesNiCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement AES-NI. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7TurboRatioLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel C states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7TurboRatioLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement intel C states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7LbrSelect(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last-branch-records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7LbrSelect(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last-branch-records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyErrorControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement memory error injection (MSR_ERROR_CONTROL). */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyErrorControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement memory error injection (MSR_ERROR_CONTROL). */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7VirtualLegacyWireCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement memory VLW? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note: A20M is known to be bit 1 as this was disclosed in spec update
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AAJ49/AAK51/????, which documents the inversion of this bit. The
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Sandy bridge CPU here has value 0x74, so it probably doesn't have a BIOS
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync that correct things. Some guesses at the other bits:
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync bit 2 = INTR
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync bit 4 = SMI
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync bit 5 = INIT
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync bit 6 = NMI */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PowerCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7PowerCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPebsNumAlt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPebsNumAlt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PebsLdLat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7PebsLdLat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7PkgCnResidencyN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7CoreCnResidencyN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyVrCurrentConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyVrCurrentConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyVrMiscConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyVrMiscConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyRaplPowerUnit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7SandyPkgC2Residency(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPkgPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgEnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPkgPowerInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplDramPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramEnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplDramPowerInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp0PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0EnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp0Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp0PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp1PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1EnergyStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel power management. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7RaplPp1Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7RaplPp1Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo intel RAPL. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpNominal(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpLevel1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpLevel2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyConfigTdpControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7IvyConfigTdpControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7IvyTurboActivationRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7IvyTurboActivationRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo intel power management. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfFixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfFixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncPerfFixedCtr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncPerfFixedCtr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncCBoxConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncArbPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncArbPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelI7UncArbPerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelI7UncArbPerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync /** @todo uncore msrs. */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo implement enhanced multi thread termal monitoring? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo implement enhanced multi thread termal monitoring? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo SMM & C-states? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo SMM & C-states? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo Core2+ platform environment control interface control register? */
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
9f22c692723a5d3cb78b91896c48cf681c4fb608vboxsync /** @todo Core2+ platform environment control interface control register? */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Multiple vendor P6 MSRs.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Multiple vendor P6 MSRs.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Multiple vendor P6 MSRs.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * These MSRs were introduced with the P6 but not elevated to architectural
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * MSRs, despite other vendors implementing them.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastBranchFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* AMD seems to just record RIP, while intel claims to record RIP+CS.BASE
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync if I read the docs correctly, thus the need for separate functions. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastBranchToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last branch records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastIntFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last exception records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_P6LastIntFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last exception records. */
9beef4ee5d54e5730fddfc924490944218af58a7vboxsync /* Note! On many CPUs, the high bit of the 0x000001dd register is always writable, even when the result is
9beef4ee5d54e5730fddfc924490944218af58a7vboxsync a non-cannonical address. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_P6LastIntToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last exception records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_P6LastIntToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo implement last exception records. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * AMD specific
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * AMD specific
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * AMD specific
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hTscRate(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement TscRateMsr */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync *puValue = RT_MAKE_U64(0, 1); /* 1.0 = reset value. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hTscRate(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement TscRateMsr */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note: Only listes in BKDG for Family 15H. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note: Only listes in BKDG for Family 15H. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo machine check. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo machine check. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD performance events. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD performance events. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD performance events. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD performance events. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SysCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SYS_CFG */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SysCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SYS_CFG */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8HwCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD HW_CFG */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8HwCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD HW_CFG */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IorrMask/IorrBase */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IorrMask/IorrBase */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IorrMask/IorrBase */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IorrMask/IorrBase */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo return 4GB - RamHoleSize here for TOPMEM. Figure out what to return
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * for TOPMEM2. */
728b52f802ac19865bd4aa8e9ade8f506a9e6c10vboxsync //if (pRange->uValue == 0)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync // *puValue = _4G - RamHoleSize;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD TOPMEM and TOPMEM2/TOM2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD NB_CFG1 */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD NB_CFG1 */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8McXcptRedir(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo machine check. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8McXcptRedir(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo machine check. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
b1ac43a82a2e4114bc44feb83007a10c99077085vboxsync PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), pRange->uValue / 2 + 0x80000001);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Remember guest programmed CPU name. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8HwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD HTC. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8HwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD HTC. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD STC. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD STC. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo AMD FIDVID_CTL. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo AMD FIDVID_CTL. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8FidVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo AMD FIDVID_STATUS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD MC. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD MC. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI and I/O trap. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI and I/O trap. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI and I/O trap. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI and I/O trap. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IntPendingMessage(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Interrupt pending message. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IntPendingMessage(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Interrupt pending message. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI and trigger I/O cycle. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI and trigger I/O cycle. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD MMIO Configuration base address. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD MMIO Configuration base address. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD 0xc0010059. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD 0xc0010059. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateCurLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hPStateN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hPStateN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCofVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCofVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCofVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCofVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note! Writing 0 seems to not GP, not sure if it does anything to the value... */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD P-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCStateIoBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD C-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCStateIoBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD C-states. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hCpuWatchdogTimer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hCpuWatchdogTimer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD machine checks. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8VmCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SVM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8VmCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SVM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8IgnNe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IGNNE\# control. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8IgnNe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IGNNE\# control. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SVM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SVM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hVmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SVM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hVmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SVM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hSmmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hSmmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hLocalSmiStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hLocalSmiStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD SMM/SMI. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hOsVisWrkIdLength(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD OS visible workaround. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hOsVisWrkIdLength(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD OS visible workaround. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD OS visible workaround. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD OS visible workaround. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD L2I performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD L2I performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD L2I performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD L2I performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hNorthbridgePerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD Northbridge performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hNorthbridgePerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD Northbridge performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hNorthbridgePerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD Northbridge performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hNorthbridgePerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD Northbridge performance counters. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Undocumented register only seen mentioned in fam15h erratum \#608. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Undocumented register only seen mentioned in fam15h erratum \#608. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7ClusterIdMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Undocumented register only seen mentioned in fam16h BKDG r3.00 when
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * describing EBL_CR_POWERON. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7ClusterIdMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Undocumented register only seen mentioned in fam16h BKDG r3.00 when
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * describing EBL_CR_POWERON. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
b1ac43a82a2e4114bc44feb83007a10c99077085vboxsync PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeafEx(pVCpu->CTX_SUFF(pVM), 0x00000007, 0, &fIgnored);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Changing CPUID leaf 7/0. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
b1ac43a82a2e4114bc44feb83007a10c99077085vboxsync PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), 0x00000006);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Changing CPUID leaf 6. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
b1ac43a82a2e4114bc44feb83007a10c99077085vboxsync PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), 0x00000001);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Changing CPUID leaf 0x80000001. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
b1ac43a82a2e4114bc44feb83007a10c99077085vboxsync PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), 0x80000001);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Changing CPUID leaf 0x80000001. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK8PatchLevel(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo Fake AMD microcode patching. */
83d61602c6968041692aa7203ee51c4085c7e460vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
83d61602c6968041692aa7203ee51c4085c7e460vboxsync /** @todo Fake AMD microcode patching. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DebugStatusMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DebugStatusMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7HardwareDebugToolCfgMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7HardwareDebugToolCfgMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7FastFlushCountMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7FastFlushCountMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo undocumented */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7NodeId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD node ID and bios scratch. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7NodeId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD node ID and bios scratch. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD DRx address masking (range breakpoints). */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD DRx address masking (range breakpoints). */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD undocument debugging features. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD undocument debugging features. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD undocument debugging features. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD undocument debugging features. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD load-store config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD load-store config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7InstrCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD instruction cache config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7InstrCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD instruction cache config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DataCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD data cache config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DataCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD data cache config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD bus unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD bus unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Undocument AMD debug control register \#2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * cpus. Need to be explored and verify K7 presence. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo Undocument AMD debug control register \#2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD FPU config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD FPU config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hDecoderCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD decoder config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hDecoderCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD decoder config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note! 10h and 16h */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD bus unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /* Note! 10h and 16h */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD bus unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD unit config 2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD unit config 2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hCombUnitCfg3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD combined unit config 3. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hCombUnitCfg3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD combined unit config 3. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hExecUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD execution unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hExecUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD execution unit config. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD load-store config 2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD load-store config 2. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsFetchPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsFetchPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsOpData3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsOpData3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_AmdFam14hIbsBrTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_AmdFam14hIbsBrTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync /** @todo AMD IBS. */
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: wrmsr %s(%#x), %#llx -> %#GP - not canonical\n", pRange->szName, idMsr, uValue));
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync * GIM MSRs.
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync * GIM MSRs.
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync * GIM MSRs.
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync/** @callback_method_impl{FNCPUMRDMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Gim(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync/** @callback_method_impl{FNCPUMWRMSR} */
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncstatic DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Gim(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync return GIMWriteMsr(pVCpu, idMsr, pRange, uValue, uRawValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * MSR read function table.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsyncstatic const PFNCPUMRDMSR g_aCpumRdMsrFns[kCpumMsrRdFn_End] =
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * MSR write function table.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsyncstatic const PFNCPUMWRMSR g_aCpumWrMsrFns[kCpumMsrWrFn_End] =
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Looks up the range for the given MSR.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @returns Pointer to the range if found, NULL if not.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVM The cross context VM structure.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param idMsr The MSR to look up.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsyncPCPUMMSRRANGE cpumLookupMsrRange(PVM pVM, uint32_t idMsr)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Binary lookup.
5707a990442370b231865c0f0bef3b2a746021d5vboxsync uint32_t cRanges = pVM->cpum.s.GuestInfo.cMsrRanges;
5707a990442370b231865c0f0bef3b2a746021d5vboxsync PCPUMMSRRANGE paRanges = pVM->cpum.s.GuestInfo.CTX_SUFF(paMsrRanges);
5707a990442370b231865c0f0bef3b2a746021d5vboxsync if (i == 0)
5707a990442370b231865c0f0bef3b2a746021d5vboxsync return cpumLookupMsrRange(pVM, paRanges[i].uValue);
5707a990442370b231865c0f0bef3b2a746021d5vboxsync * Linear lookup to verify the above binary search.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync PCPUMMSRRANGE pCur = pVM->cpum.s.GuestInfo.CTX_SUFF(paMsrRanges);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync while (cLeft-- > 0)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Query a guest MSR.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * The caller is responsible for checking privilege if the call is the result of
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * a RDMSR instruction. We'll do the rest.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VINF_SUCCESS on success.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * @retval VINF_CPUM_R3_MSR_READ if the MSR read could not be serviced in the
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * current context (raw-mode or ring-0).
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VERR_CPUM_RAISE_GP_0 on failure (invalid MSR), the caller is
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * expected to take the appropriate actions. @a *puValue is set to 0.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVCpu Pointer to the VMCPU.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param idMsr The MSR.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param puValue Where to return the value.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @remarks This will always return the right values, even when we're in the
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * recompiler.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncVMMDECL(VBOXSTRICTRC) CPUMQueryGuestMsr(PVMCPU pVCpu, uint32_t idMsr, uint64_t *puValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync PCPUMMSRRANGE pRange = cpumLookupMsrRange(pVM, idMsr);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUMMSRRDFN enmRdFn = (CPUMMSRRDFN)pRange->enmRdFn;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertReturn(enmRdFn > kCpumMsrRdFn_Invalid && enmRdFn < kCpumMsrRdFn_End, VERR_CPUM_IPE_1);
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync rcStrict = pfnRdMsr(pVCpu, idMsr, pRange, puValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log2(("CPUM: RDMSR %#x (%s) -> %#llx\n", idMsr, pRange->szName, *puValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: RDMSR %#x (%s) -> #GP(0)\n", idMsr, pRange->szName));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync STAM_REL_COUNTER_INC(&pVM->cpum.s.cMsrReadsRaiseGp);
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync Log(("CPUM: RDMSR %#x (%s) -> ring-3\n", idMsr, pRange->szName));
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync Log(("CPUM: RDMSR %#x (%s) -> rcStrict=%Rrc\n", idMsr, pRange->szName, VBOXSTRICTRC_VAL(rcStrict)));
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync AssertMsgStmt(RT_FAILURE_NP(rcStrict), ("%Rrc idMsr=%#x\n", VBOXSTRICTRC_VAL(rcStrict), idMsr),
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Unknown RDMSR %#x -> #GP(0)\n", idMsr));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync STAM_REL_COUNTER_INC(&pVM->cpum.s.cMsrReadsUnknown);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Writes to a guest MSR.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * The caller is responsible for checking privilege if the call is the result of
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * a WRMSR instruction. We'll do the rest.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VINF_SUCCESS on success.
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * @retval VINF_CPUM_R3_MSR_WRITE if the MSR write could not be serviced in the
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync * current context (raw-mode or ring-0).
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @retval VERR_CPUM_RAISE_GP_0 on failure, the caller is expected to take the
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * appropriate actions.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVCpu Pointer to the VMCPU.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param idMsr The MSR id.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param uValue The value to set.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @remarks Everyone changing MSR values, including the recompiler, shall do it
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * by calling this method. This makes sure we have current values and
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * that we trigger all the right actions when something changes.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * For performance reasons, this actually isn't entirely true for some
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * MSRs when in HM mode. The code here and in HM must be aware of
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsyncVMMDECL(VBOXSTRICTRC) CPUMSetGuestMsr(PVMCPU pVCpu, uint32_t idMsr, uint64_t uValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync PCPUMMSRRANGE pRange = cpumLookupMsrRange(pVM, idMsr);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUMMSRWRFN enmWrFn = (CPUMMSRWRFN)pRange->enmWrFn;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertReturn(enmWrFn > kCpumMsrWrFn_Invalid && enmWrFn < kCpumMsrWrFn_End, VERR_CPUM_IPE_1);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync uint64_t uValueAdjusted = uValue & ~pRange->fWrIgnMask;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync STAM_REL_COUNTER_INC(&pVM->cpum.s.cMsrWritesToIgnoredBits);
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync rcStrict = pfnWrMsr(pVCpu, idMsr, pRange, uValueAdjusted, uValue);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log2(("CPUM: WRMSR %#x (%s), %#llx [%#llx]\n", idMsr, pRange->szName, uValueAdjusted, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: WRMSR %#x (%s), %#llx [%#llx] -> #GP(0)\n", idMsr, pRange->szName, uValueAdjusted, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync STAM_REL_COUNTER_INC(&pVM->cpum.s.cMsrWritesRaiseGp);
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync Log(("CPUM: WRMSR %#x (%s), %#llx [%#llx] -> ring-3\n", idMsr, pRange->szName, uValueAdjusted, uValue));
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync Log(("CPUM: WRMSR %#x (%s), %#llx [%#llx] -> rcStrict=%Rrc\n",
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync idMsr, pRange->szName, uValueAdjusted, uValue, VBOXSTRICTRC_VAL(rcStrict)));
ad4f6ac2063d9b48efd9c3193442136a8c7c890avboxsync AssertMsgStmt(RT_FAILURE_NP(rcStrict), ("%Rrc idMsr=%#x\n", VBOXSTRICTRC_VAL(rcStrict), idMsr),
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: WRMSR %#x (%s), %#llx -> #GP(0) - invalid bits %#llx\n",
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync idMsr, pRange->szName, uValue, uValue & pRange->fWrGpMask));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync STAM_REL_COUNTER_INC(&pVM->cpum.s.cMsrWritesRaiseGp);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync Log(("CPUM: Unknown WRMSR %#x, %#llx -> #GP(0)\n", idMsr, uValue));
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync STAM_REL_COUNTER_INC(&pVM->cpum.s.cMsrWritesUnknown);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Performs some checks on the static data related to MSRs.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @returns VINF_SUCCESS on success, error on failure.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertReturn(g_aCpumRdMsrFns[kCpumMsrRdFn_##a_Register] == cpumMsrRd_##a_Register, VERR_CPUM_IPE_2);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertReturn(g_aCpumWrMsrFns[kCpumMsrWrFn_##a_Register] == cpumMsrWr_##a_Register, VERR_CPUM_IPE_2);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertReturn(g_aCpumRdMsrFns[kCpumMsrRdFn_Invalid] == NULL, VERR_CPUM_IPE_2);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(IntelCpuId80000001FeatureMaskEcdx);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(IntelI7VirtualLegacyWireCap);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(IntelI7SandyVrCurrentConfig);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(IntelI7RaplDramEnergyStatus);
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync CPUM_ASSERT_RD_MSR_FN(IntelI7IvyTurboActivationRatio);
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync CPUM_ASSERT_RD_MSR_FN(IntelI7UncPerfGlobalOvfCtrl);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(AmdFam15hNorthbridgePerfCtlN);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(AmdFam15hNorthbridgePerfCtrN);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_RD_MSR_FN(AmdK7HardwareDebugToolCfgMaybe);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync AssertReturn(g_aCpumWrMsrFns[kCpumMsrWrFn_Invalid] == NULL, VERR_CPUM_IPE_2);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_WR_MSR_FN(IntelCpuId80000001FeatureMaskEcdx);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_WR_MSR_FN(IntelI7SandyVrCurrentConfig);
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync CPUM_ASSERT_WR_MSR_FN(IntelI7IvyTurboActivationRatio);
6a0359b8230a1b91fe49967c124a75191c3dfbf9vboxsync CPUM_ASSERT_WR_MSR_FN(IntelI7UncPerfGlobalOvfCtrl);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_WR_MSR_FN(AmdFam15hNorthbridgePerfCtlN);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_WR_MSR_FN(AmdFam15hNorthbridgePerfCtrN);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync CPUM_ASSERT_WR_MSR_FN(AmdK7HardwareDebugToolCfgMaybe);
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync#endif /* VBOX_STRICT && IN_RING3 */
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync * Gets the scalable bus frequency.
32f0fdedfe738108db99663839011b23f7c3de68vboxsync * The bus frequency is used as a base in several MSRs that gives the CPU and
32f0fdedfe738108db99663839011b23f7c3de68vboxsync * other frequency ratios.
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync * @returns Scalable bus frequency in Hz. Will not return CPUM_SBUSFREQ_UNKNOWN.
32f0fdedfe738108db99663839011b23f7c3de68vboxsync * @param pVM Pointer to the shared VM structure.
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsyncVMMDECL(uint64_t) CPUMGetGuestScalableBusFrequency(PVM pVM)
ecb98c0e709a5cebd8877fb39f61a821804024bcvboxsync uint64_t uFreq = pVM->cpum.s.GuestInfo.uScalableBusFreq;
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Fast way for HM to access the MSR_K8_TSC_AUX register.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @returns The register value.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVCpu Pointer to the cross context CPU structure for
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * the calling EMT.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @thread EMT(pVCpu)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsyncVMMR0_INT_DECL(uint64_t) CPUMR0GetGuestTscAux(PVMCPU pVCpu)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * Fast way for HM to access the MSR_K8_TSC_AUX register.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param pVCpu Pointer to the cross context CPU structure for
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * the calling EMT.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @param uValue The new value.
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync * @thread EMT(pVCpu)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsyncVMMR0_INT_DECL(void) CPUMR0SetGuestTscAux(PVMCPU pVCpu, uint64_t uValue)
41d680dd6eb0287afc200adc5b0d61b07a32b72dvboxsync#endif /* IN_RING0 */