On Mon, Dec 02, 2013 at 11:15:17AM +0100, Peter Krempa wrote: > On 12/02/13 07:11, Hu Tao wrote: > > This patch will add -device pvpanic to qemu command line if user enables > > pvpanic in domain xml and the qemu version supports pvpanic. > > > > Signed-off-by: Hu Tao <hutao@xxxxxxxxxxxxxx> > > --- > > src/qemu/qemu_capabilities.c | 3 +++ > > src/qemu/qemu_capabilities.h | 2 ++ > > src/qemu/qemu_command.c | 10 ++++++++++ > > 3 files changed, 15 insertions(+) > > > > ... > > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > > index 763417f..6310bb2 100644 > > --- a/src/qemu/qemu_command.c > > +++ b/src/qemu/qemu_command.c > > @@ -9588,6 +9588,16 @@ qemuBuildCommandLine(virConnectPtr conn, > > goto error; > > } > > > > + if (def->pvpanic && > > + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PVPANIC)) { > > + if (def->pvpanic->ioport > 0) { > > + virCommandAddArg(cmd, "-device"); > > + virCommandAddArgFormat(cmd, "pvpanic,ioport=%d", > > + def->pvpanic->ioport); > > + } else > > + virCommandAddArgList(cmd, "-device", "pvpanic", NULL); > > If pvpanic is requested, but not available in qemu, libvirt should error > out instead of silently starting the VM without the device. > > > + } > > + > > if (mlock) { > > unsigned long long memKB; > > > > > > Also as said in review of 1/2. You need to add tests for the new device. Thanks. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list