[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YeBSrcNawgzvTzQ6@google.com>
Date: Thu, 13 Jan 2022 16:26:21 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Maxim Levitsky <mlevitsk@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Igor Mammedov <imammedo@...hat.com>, kvm@...r.kernel.org,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN
On Thu, Jan 13, 2022, Vitaly Kuznetsov wrote:
> Maxim Levitsky <mlevitsk@...hat.com> writes:
> > For my nested AVIC work I would really want the APIC ID of a VCPU to be read-only
> > and be equal to vcpu_id.
> >
>
> Doesn't APIC ID have topology encoded in it?
Yeah, APIC IDs are derived from the topology. From the SDM (this doesn't
talk about core/SMT info, but that's included as well):
The hardware assigned APIC ID is based on system topology and includes encoding
for socket position and cluster information.
The SDM also says:
Some processors permit software to modify the APIC ID. However, the ability of
software to modify the APIC ID is processor model specific.
So I _think_ we could define KVM behavior to ignore writes from the _guest_, but
the APIC_ID == vcpu_id requirement won't fly as userspace expects to be able to
stuff virtual toplogy info into the APIC ID.
Powered by blists - more mailing lists