[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fsptnjic.fsf@redhat.com>
Date: Wed, 12 Jan 2022 14:58:19 +0100
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: Igor Mammedov <imammedo@...hat.com>
Cc: kvm@...r.kernel.org, Sean Christopherson <seanjc@...gle.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
linux-kernel@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 2/2] KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN
Igor Mammedov <imammedo@...hat.com> writes:
> On Fri, 7 Jan 2022 19:15:43 +0100
> Paolo Bonzini <pbonzini@...hat.com> wrote:
>
>> On 1/7/22 10:02, Vitaly Kuznetsov wrote:
>> >
>> > I'm again leaning towards an allowlist and currently I see only two
>> > candidates:
>> >
>> > CPUID.01H.EBX bits 31:24 (initial LAPIC id)
>> > CPUID.0BH.EDX (x2APIC id)
>> >
>> > Anything else I'm missing?
>>
>> I would also ignore completely CPUID leaves 03H, 04H, 0BH, 80000005h,
>> 80000006h, 8000001Dh, 8000001Eh (cache and processor topology), just to
>> err on the safe side.
>
> on top of that,
>
> 1Fh
>
The implementation turned out to be a bit more complex as kvm also
mangles CPUIDs so we need to account for that. Could you give the
attached series a spin to see if it works?
--
Vitaly
View attachment "0001-KVM-x86-Fix-indentation-in-kvm_set_cpuid.patch" of type "text/x-patch" (1417 bytes)
View attachment "0002-KVM-x86-Do-runtime-CPUID-update-before-updating-vcpu.patch" of type "text/x-patch" (4058 bytes)
View attachment "0003-KVM-x86-Partially-allow-KVM_SET_CPUID-2-after-KVM_RU.patch" of type "text/x-patch" (4788 bytes)
Powered by blists - more mailing lists