lkml.org 
[lkml]   [2022]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 7/8] KVM: VMX: Update PID-pointer table entry when APIC ID is changed
On Thu, Jan 13, 2022 at 10:19:21PM +0000, Sean Christopherson wrote:
>On Tue, Jan 11, 2022, Maxim Levitsky wrote:
>> Both Intel and AMD's PRM also state that changing APIC ID is implementation
>> dependent.
>>
>> I vote to forbid changing apic id, at least in the case any APIC acceleration
>> is used, be that APICv or AVIC.
>
>That has my vote as well. For IPIv in particular there's not much concern with
>backwards compability, i.e. we can tie the behavior to enable_ipiv.

Hi Sean and Levitsky,

Let's align on the implementation.

To disable changes for xAPIC ID when IPIv/AVIC is enabled:

1. introduce a variable (forbid_apicid_change) for this behavior in kvm.ko
and export it so that kvm-intel, kvm-amd can set it when IPIv/AVIC is
enabled. To reduce complexity, this variable is a module level setting.

2. when guest attempts to change xAPIC ID but it is forbidden, KVM prints
a warning on host and injects a #GP to guest.

3. remove AVIC code that deals with changes to xAPIC ID.

\
 
 \ /
  Last update: 2022-01-14 03:49    [W:0.640 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site