On 23.01.2013, at 23:41, David Gibson wrote: > On Wed, Jan 23, 2013 at 11:52:54AM -0600, Scott Wood wrote: >> On 01/22/2013 11:04:59 PM, David Gibson wrote: >>> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c >>> index 2f4f068..e84b993 100644 >>> --- a/target-ppc/kvm.c >>> +++ b/target-ppc/kvm.c >>> @@ -60,7 +60,7 @@ static int cap_booke_sregs; >>> static int cap_ppc_smt; >>> static int cap_ppc_rma; >>> static int cap_spapr_tce; >>> -static int cap_hior; >>> +static int cap_one_reg; >>> >>> /* XXX We have a race condition where we actually have a level >>> triggered >>> * interrupt, but the infrastructure can't expose that yet, >>> so the guest >>> @@ -89,7 +89,11 @@ int kvm_arch_init(KVMState *s) >>> cap_ppc_smt = kvm_check_extension(s, KVM_CAP_PPC_SMT); >>> cap_ppc_rma = kvm_check_extension(s, KVM_CAP_PPC_RMA); >>> cap_spapr_tce = kvm_check_extension(s, KVM_CAP_SPAPR_TCE); >>> - cap_hior = kvm_check_extension(s, KVM_CAP_PPC_HIOR); >>> + /* This capability is misnamed - it was introduced with the >>> + * KVM_SET_ONE_REG ioctl(), which at the time only supported the >>> + * HIOR. We don't want a different capability for every register >>> + * the interface can support though. */ >>> + cap_one_reg = kvm_check_extension(s, KVM_CAP_PPC_HIOR); >> >> So what happens when we want to use onereg for booke, which doesn't >> have KVM_CAP_PPC_HIOR? Into what variable would we put a check for >> KVM_CAP_ONE_REG? > > Drat, good point. There is no KVM_CAP_ONE_REG
Of course there is a KVM_CAP_ONE_REG :). Alex