Searched hist:"6977 afda16c1e09dfbce4bdd877459a287269b72" (Results 1 – 1 of 1) sorted by relevance
/qemu/target/ppc/ |
H A D | kvm.c | 6977afda16c1e09dfbce4bdd877459a287269b72 Thu Sep 14 19:25:43 UTC 2017 Greg Kurz <groug@kaod.org> ppc/kvm: check some capabilities with kvm_vm_check_extension()
The following capabilities are VM specific: - KVM_CAP_PPC_SMT_POSSIBLE - KVM_CAP_PPC_HTAB_FD - KVM_CAP_PPC_ALLOC_HTAB
If both KVM HV and KVM PR are present, checking them always return the HV value, even if we explicitely requested to use PR.
This has no visible effect for KVM_CAP_PPC_ALLOC_HTAB, because we also try the KVM_PPC_ALLOCATE_HTAB ioctl which is only suppored by HV. As a consequence, the spapr code doesn't even check KVM_CAP_PPC_HTAB_FD.
However, this will cause kvmppc_hint_smt_possible(), introduced by commit fa98fbfcdfcb9, to report several VSMT modes (eg, Available VSMT modes: 8 4 2 1) whereas PR only support mode 1.
This patch fixes all three anyway to use kvm_vm_check_extension(). It is okay since the VM is already created at the time kvm_arch_init() or kvmppc_reset_htab() is called.
Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|