[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH]Enable kvmvapic only when host doesn't support V
From: |
Xu, Anthony |
Subject: |
Re: [Qemu-devel] [PATCH]Enable kvmvapic only when host doesn't support VAPIC capability in KVM mode |
Date: |
Thu, 6 Apr 2017 18:18:33 +0000 |
> > --- a/kvm-all.c
> > +++ b/kvm-all.c
> > @@ -2232,6 +2232,10 @@ int kvm_has_sync_mmu(void)
> > return kvm_check_extension(kvm_state, KVM_CAP_SYNC_MMU);
> > }
> >
> > +int kvm_has_vapic(void){
> > + return !kvm_check_extension(kvm_state, KVM_CAP_VAPIC);
> > +}
> > +
>
> Is that function shouldn't return true if KVM is providing VAPIC
> capability?
>
It should, but it doesn't. see below KVM kernel code segment,
it returns false if KVM provides VAPIC.
Thanks for your comments,
Will resend the patch.
Anthony
arch/x86/kvm/x86.c
case KVM_CAP_VAPIC:
r = !kvm_x86_ops->cpu_has_accelerated_tpr();
break;