On Fri, Mar 20, 2015 at 03:25:45PM +0530, Prerna Saxena wrote:
On Friday 20 March 2015 01:51 PM, Ján Tomko wrote:
> On Mon, Mar 16, 2015 at 04:56:49PM +0530, Prerna Saxena wrote:
>> [PATCH] PowerPC : Do not allow an empty model spec for 'host-model'
>>
>> On PowerPC, a guest VM having CPU mode as 'host-model'
>> represents a 'compat' mode VM. This cannot have a NULL
>> CPU model.
> I thought the compat= mode was only used when mode == HOST_MODEL
> and a model is specified. And HOST_MODEL with no model behaves like on
> x86_64 - copies the features from the host capabilities.
>
> Was this functionality broken by commit addce06 or did it never produce
> useful results?
>
> Jan
> --
> libvir-list mailing list
> libvir-list(a)redhat.com
>
https://www.redhat.com/mailman/listinfo/libvir-list
Hi Jan,
This commit does not break anything. It addresses a few corner cases not completely
addressed by commits addce06 & 5e4f49ab8aa2.
PowerPC pseries KVM is a paravirtualized platform, wherein there are only 2 allowed vcpu
configurations of running a guest :
1) Native mode, where the guest sees the same vcpu model as the host -- this is reflected
in libvirt by "host-passthrough" mode;
2) Compat mode, where the physical processor itself runs in binary compatibility with an
older cpu model. This is marked in libvirt by "host-model" mode, which takes on
an additional argument -- the
guest CPU model which needs to be run. This was introduced by commit addce06.
I see now that neither libvirt nor QEMU have feature flags for PPC.
But there are other machine types than pseries on PPC, some of them
might want host-model to generate a -cpu argument, not -cpu compat=.
PowerKVM, being a paravirt platform, does not emulate a guest vcpu
based on features copied from host. This behaviour is unlike x86 KVM. Hence , the
host-model mode on PowerKVM needs to error out in
case the model which needs to be run in binary compatibility is not specified by user.
Instead of erroring out, can it be filled with a sensible value?
E.g. on a POWER8 host we fill it out with <model>POWER8</model>.
The reason for this commit was a bug seen even after 5e4f49ab8aa2. A
null cpu model XML was causing an incorrect "best-fit" model (just like x86) to
be passed to the VM after a save/restore. Hence the
need for this check.
So even though the correct model was specified, cpuUpdate removes it
after restore? It would be nice to mention that in the commit message.
Jan