Re: [PATCH v2] KVM: x86: Do not return host topology information from KVM_GET_SUPPORTED_CPUID
From: Paolo Bonzini
Date: Wed Jan 25 2023 - 09:18:21 EST
On 1/25/23 00:16, Jim Mattson wrote:
This is a userspace ABI change that breaks existing hypervisors.
Please don't do this. Userspace ABIs are supposed to be inviolate.
What exactly is broken?
Part of the definition of the API is that you can take
KVM_GET_SUPPORTED_CPUID and pass it to KVM_SET_CPUID2 for all vCPUs.
Returning host topology information for a random host vCPU definitely
violates the contract.
Furthermore, any existing userspace should be prepared to deal with
nonexistent host topology leaves. If you mean that said userspace would
now pass no topology to the guest, that's not an API change either.
(Now, there are certainly other parts of the KVM_GET_SUPPORTED_CPUID
contract that should be specified better. But that should be done for
each leaf one by one, which I intend to do, and would not extend to
these three host topology leaves).
Paolo