On 01/11/2013 08:30 AM, Viktor Mihajlovski wrote: > The way in that memory balloon suppression was handled for S390 > is flawed for a number or reasons. > 1. Just preventing the default balloon to be created in the case > of VIR_ARCH_S390[X] is not sufficient. An explicit memballoon > element in the guest definition will still be honored, resulting > both in a -balloon option and the allocation of a PCI bus address, > neither being supported. > 2. Prohibiting balloon for S390 altogether at a domain_conf level > is no good solution either as there's work in progress on the QEMU > side to implement a virtio-balloon device, although in > conjunction with a new machine type. Suppressing the balloon > should therefore be done at the QEMU driver level depending > on the present capabilities. > > Therefore we remove the conditional suppression of the default > balloon in domain_conf.c. > Further, we are claiming the memballoon device for virtio-s390 > during device address assignment to prevent it from being considered > as a PCI device. > Finally, we suppress the generation of the balloon command line option > if this is a virtio-s390 machine. > > Signed-off-by: Viktor Mihajlovski <[email protected]> > --- > src/conf/domain_conf.c | 4 +--- > src/qemu/qemu_command.c | 9 ++++++++- > 2 files changed, 9 insertions(+), 4 deletions(-)
> @@ -6956,6 +6960,9 @@ qemuBuildCommandLine(virConnectPtr conn,
> * NB: Earlier we declared that VirtIO balloon will always be in
> * slot 0x3 on bus 0x0
> */
> + if (qemuCapsGet(caps, QEMU_CAPS_VIRTIO_S390) && (def->memballoon))
Spurious ().
> + def->memballoon->model = VIR_DOMAIN_MEMBALLOON_MODEL_NONE;
> +
> if ((def->memballoon) &&
But you were just copying from a bad example.
> (def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_NONE)) {
> if (def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
>
ACK and pushed.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
