On Fri, Oct 10, 2014 at 04:12:26PM +0530, Prerna Saxena wrote:
On Friday 10 October 2014 03:46 PM, Daniel P. Berrange wrote:
> On Fri, Oct 10, 2014 at 03:42:41PM +0530, Prerna Saxena wrote:
>> >From 7228aacaa4b24907b1cbf33838ada8fb81890419 Mon Sep 17 00:00:00 2001
>> From: Prerna Saxena <prerna(a)linux.vnet.ibm.com>
>> Date: Tue, 7 Oct 2014 10:53:08 +0530
>>
>> PowerISA allows processors to run VMs in binary compatibility
("compat")
>> mode supporting an older version of ISA. QEMU has recently added support to
>> explicitly denote a VM running in compatibility mode through commit 6d9412ea
>> & 8dfa3a5e85.
>> Now, a "compat" mode VM can be run by invoking this qemu commandline
on a
>> POWER8 host: -cpu host,compat=power7.
> If this is using 'host'
>
>> This patch allows libvirt to extend the "fallback" semantics of cpu
model to
>> describe this new mode for PowerKVM guests.
>> As an example:
>> When a user wants to request a power7 vm to run in compatibility mode on
>> a Power8 host, this can be described in XML as follows :
>> <cpu mode='custom' match='exact'>
>> <model fallback='compat'>power7</model>
>> </cpu>
> Then I don't think this should be using mode='custom', but rather it
> should be 'host-passthrough'. We would use the <model> to denote the
> compatibility mode for the host passthrough. IOW, it feels like this
> is better described as
>
> <cpu mode='host-passthrough' match='exact'>
> <model>power7</model>
> </cpu>
Hi Daniel,
Thanks for taking a look.
It appears that my example didnt bring out the use case very clearly.
On PowerKVM, we can run VMs in 2 possible vCPU configurations:
1) Host native mode:
Where host is power7; guest VMs also see power7 vcpus..
Required qemu command line : "-cpu host"
You correctly pointed out that this would use <cpu
mode='host-passthrough'.>
2) Compat mode:
In this case, the host CPU is power7, but it can run in binary compatibility mode
with an older version of ISA(such as power6). So it will exhibit only those features that
were available in an older generation of Power ISA. The guest will see a
"power6" vCPU even though it is
running on a physical "power7" chip.
Required QEMU command line for PowerKVM : "-cpu host,compat=power6"
My patch attempts to define semantics for this mode of execution.
<cpu mode='custom' match='exact'>
<model fallback='compat'>power7</model>
</cpu>
I came up with this ^^^ XML schema to denote a compat mode guest.
The CPU mode 'host' is a form of host CPU passthrough.
ie Running '-cpu host,compat=power6' on a Power7 host is
equivalent to running '-cpu host' on a Power6 host.
So IMHO that should still use mode='host-passthrough' in
libvirt not mode=custom
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|