[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d0653777-55c6-ebb9-7be7-5bdd259b66fa@redhat.com>
Date: Thu, 5 Dec 2019 11:16:16 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Jim Mattson <jmattson@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kvm list <kvm@...r.kernel.org>,
Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH 4/5] KVM: vmx: implement MSR_IA32_TSX_CTRL disable RTM
functionality
On 05/12/19 00:49, Jim Mattson wrote:
>> if (!boot_cpu_has(X86_FEATURE_RTM))
>> - data &= ~ARCH_CAP_TAA_NO;
>> + data &= ~(ARCH_CAP_TAA_NO | ARCH_CAP_TSX_CTRL_MSR);
>> else if (!boot_cpu_has_bug(X86_BUG_TAA))
>> data |= ARCH_CAP_TAA_NO;
>> - else if (data & ARCH_CAP_TSX_CTRL_MSR)
>> - data &= ~ARCH_CAP_MDS_NO;
>>
>> - /* KVM does not emulate MSR_IA32_TSX_CTRL. */
>> - data &= ~ARCH_CAP_TSX_CTRL_MSR;
> Shouldn't kvm be masking off any bits that it doesn't know about here?
> Who knows what future features we may claim to support?
Good question, in the past the ARCH_CAPABILITIES were just "we don't
have this bug" so it made sense to pass everything through. Now we have
TSX_CTRL that is of a different kind and arguably should have been a
CPUID bit, so we should indeed mask unknown capabilties.
Paolo
Powered by blists - more mailing lists