On 21/09/2017 18:00, Greg Kurz wrote: > Some VM capabilities are currently checked with kvm_check_extension(). This > doesn't have any impact for most host architectures because they don't depend > on the KVM type. However, this is a problem for server-class ppc hosts that > can support the PR and HV KVM types. Both implementations can co-exist in the > kernel at the same time and we decide which one will be used with the "type" > argument of the KVM_CREATE_VM ioctl. > > Each KVM type has a different set of capabilities, and checking them with > kvm_check_extension() will always cause KVM to assume we're in HV mode, > even if they are VM specific and we have explicitely requested to run in > PR mode. This may produce unexpected results. > > Similar issues were recently fixed in the ppc code: > > https://github.com/qemu/qemu/commit/70a0c19e83aa4c71c879d51e426e89e4b3d4e014 > https://github.com/dgibson/qemu/commit/b152d74ebaed61f89fa1ab2c9b1526d9e9dabae5 > > This series focuses on capabilities that are checked by the common code.
Queued, thanks. Paolo > -- > Greg > > --- > > Greg Kurz (2): > kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension() > kvm: check KVM_CAP_NR_VCPUS with kvm_vm_check_extension() > > > accel/kvm/kvm-all.c | 51 > +++++++++++++++++++++++++----------------------- > accel/stubs/kvm-stub.c | 4 ++-- > include/sysemu/kvm.h | 2 +- > 3 files changed, 30 insertions(+), 27 deletions(-) >
