Re: [PATCH v5 06/13] KVM: x86/vmx: Save/Restore host MSR_ARCH_LBR_CTL state
From: Jim Mattson
Date: Wed Jul 14 2021 - 12:15:26 EST
On Wed, Jul 14, 2021 at 6:33 AM Like Xu <like.xu.linux@xxxxxxxxx> wrote:
>
> On 14/7/2021 1:00 am, Jim Mattson wrote:
> > We have no such concept in our user space. Features that are not
> > migratable should clearly be identified as such by an appropriate KVM
> > API. At present, I don't believe there is such an API.
>
> I couldn't agree with you more on this point.
Maybe KVM_GET_SUPPORTED_CPUID could be made more useful if it took an
argument, such as 'MAX', 'MIGRATABLE', etc.
> We do have a code gap to make Arch LBR migratable for any KVM user.
Right. My point is that the feature as architected appears to be
migratable. Therefore, it would be reasonable for userspace to assume
that any KVM implementation that claims to support the feature (via
KVM_GET_SUPPORTED_CPUID) should support it in a fully migratable way
(i.e. if the hardware supports the guest LBR depth, then it should be
able to run the VM, without loss of functionality).