qemu-devel
[Top][All Lists]
Advanced

[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: Tue, 11 Apr 2017 00:54:41 +0000

 
> I think we shouldn't read it like that. It seems that KVM is always
> returning the VAPIC capability except when the CPU is providing a
> special acceleration [0].
> 
> I would say you can't really refer yourself at this bit to enable or
> not kvmapic in QEMU.
> 
> Does that make sense?
> 
> [0]
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=774ead3ad9bc
> bc05ef6aaebb9bdf8b4c3126923b


>From this patch and commit message,

"Disable vapic support on Intel machines with FlexPriority"

If the CPU has accelerated tpr, vapic should be disabled.
The function pointer has the name cpu_has_accelerated_tpr.

kvmvapic was created for cpu which doesn't have accelerated tpr,
 https://lists.nongnu.org/archive/html/qemu-devel/2012-02/msg00515.html

from the commit message, I can infer VAPIC means kvmvapic.

My understanding is they are referring to the same thing, though
the return value of KVM_CAP_VAPIC is confusing.

Didn't find explanation about the return value of KVM_CAP_VAPIC,
We can interpret it as following from QEMU perspective,
If KVM_CAP_VAPIC return 1, QEMU should enable VAPIC(kvmvapic).
If KVM_CAP_VAPIC return 0, QEMU should disable VAPIC(kvmvapic).


Anthony






reply via email to

[Prev in Thread] Current Thread [Next in Thread]