Il 08/08/2014 12:17, Michal Privoznik ha scritto:
> +        if (loader->nvram) {
> +            virBufferFreeAndReset(&buf);
> +            virBufferAsprintf(&buf,
> +                              "file=%s,if=pflash,format=raw,unit=1",
> +                              loader->nvram);
> +
> +            virCommandAddArg(cmd, "-drive");
> +            virCommandAddArgBuffer(cmd, &buf);
> +        }

Note that other machines may not need unit=1, for example pseries
doesn't need it (it uses -bios for the firmware, not -drive if=pflash).
 It would be nice to make this easily configurable.

Alternatively you could use unit=1 if there is a <loader type='pflash'>
element, and unit=0 otherwise.  We can then patch QEMU to reject unit=1
on machines that use -bios + -drive if=pflash,unit=0.

Laszlo, what happens on x86 with -bios + -drive if=pflash,unit=0?

Paolo

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to