[virt-tools-list] [PATCH 3/3] add a checkbox for cpu host-model mode, remove 'copy' button

Jiri Denemark jdenemar at redhat.com
Thu Apr 18 07:08:47 UTC 2013


On Wed, Apr 17, 2013 at 13:32:39 -0400, Cole Robinson wrote:
> On 04/16/2013 07:02 AM, Guannan Ren wrote:
> > If the host-model is selected, disable the cpu model drop down
> > and features list. They still show what exact configuration the
> > host-model is using.
> > For the old libvirt which doesn't support <cpu mode='host-model'/>
> > virt-manager still copy cpu configs from caps XML to domain XML.
> > If a certain libvirt version supports host-model, but the UPDATE_CPU
> > flag doesn't exist, a WARN image will show up on UI to give a hint.
> > ---
> >  ui/vmm-details.ui      | 246 ++++++++++++++++++++++++-------------------------
> >  virtManager/details.py |  44 +++++----
> >  virtManager/domain.py  |  17 ++--
> >  3 files changed, 156 insertions(+), 151 deletions(-)
> > 
> 
> UI generally looks fine, nice work.
> 
> I'd change the check box to be labeled 'Use host CPU model'.
> I'd remove the lightbulb icon, and just stick the tooltip on the checkbutton.
> I'd slightly reword it to:
> 
> Use CPU model which most closely matches the host. This gives maximum
> functionality and performance.
> 
> There's a problem here with using host-model though, but maybe it isn't really
> virt-manager's problem. The majority of CPU flags require host HW support
> before they can be offered to the guest. There is at least x2apic though which
> we want to enable unconditionally, since they are 1) emulated, 2) give a
> performance improvement, and 3) don't have any known side effects. How is
> virt-manager supposed any client app supposed to handle this?

Yeah, as you say that's not really virt-manager's problem :-) Libvirt is
supposed to select the right model and features (including those qemu
can efficiently emulate). Once the interface for querying QEMU for CPU
features provided by each model and what features it would enable when
asked for -cpu host, we will start doing this kind of clever things.
And, among others, we will make sure that QEMU will enable all features
libvirt asked for, which is not the case today (and guest CPU may
actually change when the domain is migrated or started on a different
host/kernel/QEMU combination).

Jirka




More information about the virt-tools-list mailing list