[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.12] x86/msr: fix handling of MSR_IA32_PERF_{STATUS/CTL} (again)
commit f1f322610718c40680ac09e66f6c82e69c78ba3a Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Feb 4 15:39:45 2021 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Feb 4 15:39:45 2021 +0100 x86/msr: fix handling of MSR_IA32_PERF_{STATUS/CTL} (again) X86_VENDOR_* aren't bit masks in the older trees. Reported-by: James Dingwall <james@xxxxxxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/msr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c index 927ed625df..aefe0cbb4b 100644 --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -226,7 +226,8 @@ int guest_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val) */ case MSR_IA32_PERF_STATUS: case MSR_IA32_PERF_CTL: - if ( !(cp->x86_vendor & (X86_VENDOR_INTEL | X86_VENDOR_CENTAUR)) ) + if ( cp->x86_vendor != X86_VENDOR_INTEL && + cp->x86_vendor != X86_VENDOR_CENTAUR ) goto gp_fault; *val = 0; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.12
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |