2009-06-11 22:17:42 +08:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef WITH_QEMU
|
|
|
|
|
2010-03-10 02:22:22 +08:00
|
|
|
# include <stdio.h>
|
|
|
|
# include <stdlib.h>
|
2009-06-11 22:17:42 +08:00
|
|
|
|
2010-03-10 02:22:22 +08:00
|
|
|
# include "testutils.h"
|
2010-12-18 00:41:51 +08:00
|
|
|
# include "qemu/qemu_capabilities.h"
|
2012-12-13 02:06:53 +08:00
|
|
|
# include "viralloc.h"
|
2009-06-11 22:17:42 +08:00
|
|
|
|
|
|
|
struct testInfo {
|
|
|
|
const char *name;
|
2013-02-01 21:48:58 +08:00
|
|
|
virQEMUCapsPtr flags;
|
2010-02-09 21:06:56 +08:00
|
|
|
unsigned int version;
|
|
|
|
unsigned int is_kvm;
|
|
|
|
unsigned int kvm_version;
|
2009-06-11 22:17:42 +08:00
|
|
|
};
|
|
|
|
|
2013-02-01 21:48:58 +08:00
|
|
|
static void printMismatchedFlags(virQEMUCapsPtr got,
|
|
|
|
virQEMUCapsPtr expect)
|
2009-12-22 04:36:32 +08:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2011-02-08 22:22:39 +08:00
|
|
|
for (i = 0 ; i < QEMU_CAPS_LAST ; i++) {
|
2013-02-01 21:48:58 +08:00
|
|
|
bool gotFlag = virQEMUCapsGet(got, i);
|
|
|
|
bool expectFlag = virQEMUCapsGet(expect, i);
|
2009-12-22 04:36:32 +08:00
|
|
|
if (gotFlag && !expectFlag)
|
|
|
|
fprintf(stderr, "Extra flag %i\n", i);
|
|
|
|
if (!gotFlag && expectFlag)
|
|
|
|
fprintf(stderr, "Missing flag %i\n", i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-06-11 22:17:42 +08:00
|
|
|
static int testHelpStrParsing(const void *data)
|
|
|
|
{
|
|
|
|
const struct testInfo *info = data;
|
2011-01-14 00:09:15 +08:00
|
|
|
char *path = NULL;
|
2011-04-25 06:25:10 +08:00
|
|
|
char *help = NULL;
|
2010-02-09 21:06:56 +08:00
|
|
|
unsigned int version, is_kvm, kvm_version;
|
2013-02-01 21:48:58 +08:00
|
|
|
virQEMUCapsPtr flags = NULL;
|
2011-01-14 00:09:15 +08:00
|
|
|
int ret = -1;
|
2011-02-08 22:22:39 +08:00
|
|
|
char *got = NULL;
|
|
|
|
char *expected = NULL;
|
2009-06-11 22:17:42 +08:00
|
|
|
|
2011-01-14 00:09:15 +08:00
|
|
|
if (virAsprintf(&path, "%s/qemuhelpdata/%s", abs_srcdir, info->name) < 0)
|
|
|
|
return -1;
|
2009-06-11 22:17:42 +08:00
|
|
|
|
2011-04-25 06:25:10 +08:00
|
|
|
if (virtTestLoadFile(path, &help) < 0)
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
2009-06-11 22:17:42 +08:00
|
|
|
|
2013-02-01 21:48:58 +08:00
|
|
|
if (!(flags = virQEMUCapsNew()))
|
2011-02-08 22:22:39 +08:00
|
|
|
goto cleanup;
|
|
|
|
|
2013-02-01 21:48:58 +08:00
|
|
|
if (virQEMUCapsParseHelpStr("QEMU", help, flags,
|
|
|
|
&version, &is_kvm, &kvm_version, false) == -1)
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
|
|
|
|
2012-09-20 19:57:13 +08:00
|
|
|
# ifndef WITH_YAJL
|
2013-02-01 21:48:58 +08:00
|
|
|
if (virQEMUCapsGet(info->flags, QEMU_CAPS_MONITOR_JSON))
|
|
|
|
virQEMUCapsSet(flags, QEMU_CAPS_MONITOR_JSON);
|
2011-10-21 04:36:32 +08:00
|
|
|
# endif
|
|
|
|
|
2013-02-01 21:48:58 +08:00
|
|
|
if (virQEMUCapsGet(info->flags, QEMU_CAPS_DEVICE)) {
|
2011-01-14 00:09:15 +08:00
|
|
|
VIR_FREE(path);
|
2011-04-25 06:25:10 +08:00
|
|
|
VIR_FREE(help);
|
2011-01-14 00:09:15 +08:00
|
|
|
if (virAsprintf(&path, "%s/qemuhelpdata/%s-device", abs_srcdir,
|
|
|
|
info->name) < 0)
|
|
|
|
goto cleanup;
|
|
|
|
|
2011-04-25 06:25:10 +08:00
|
|
|
if (virtTestLoadFile(path, &help) < 0)
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
|
|
|
|
2013-02-01 21:48:58 +08:00
|
|
|
if (virQEMUCapsParseDeviceStr(flags, help) < 0)
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
|
|
|
}
|
2009-06-11 22:17:42 +08:00
|
|
|
|
2013-02-01 21:48:58 +08:00
|
|
|
got = virQEMUCapsFlagsString(flags);
|
|
|
|
expected = virQEMUCapsFlagsString(info->flags);
|
2011-02-08 22:22:39 +08:00
|
|
|
if (!got || !expected)
|
|
|
|
goto cleanup;
|
|
|
|
|
|
|
|
if (STRNEQ(got, expected)) {
|
2011-12-20 09:08:29 +08:00
|
|
|
if (virTestGetVerbose() || virTestGetDebug())
|
|
|
|
fprintf(stderr,
|
|
|
|
"%s: computed flags do not match: got %s, expected %s\n",
|
|
|
|
info->name, got, expected);
|
2009-12-22 04:36:32 +08:00
|
|
|
|
2011-12-20 09:08:29 +08:00
|
|
|
if (virTestGetDebug())
|
2009-12-22 04:36:32 +08:00
|
|
|
printMismatchedFlags(flags, info->flags);
|
|
|
|
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
2009-06-11 22:17:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (version != info->version) {
|
2011-09-22 00:29:31 +08:00
|
|
|
fprintf(stderr, "%s: parsed versions do not match: got %u, expected %u\n",
|
|
|
|
info->name, version, info->version);
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
2009-06-11 22:17:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (is_kvm != info->is_kvm) {
|
2011-01-14 00:09:15 +08:00
|
|
|
fprintf(stderr,
|
2011-09-22 00:29:31 +08:00
|
|
|
"%s: parsed is_kvm flag does not match: got %u, expected %u\n",
|
|
|
|
info->name, is_kvm, info->is_kvm);
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
2009-06-11 22:17:42 +08:00
|
|
|
}
|
|
|
|
|
2009-12-22 04:36:32 +08:00
|
|
|
if (kvm_version != info->kvm_version) {
|
2011-01-14 00:09:15 +08:00
|
|
|
fprintf(stderr,
|
2011-09-22 00:29:31 +08:00
|
|
|
"%s: parsed KVM versions do not match: got %u, expected %u\n",
|
|
|
|
info->name, kvm_version, info->kvm_version);
|
2011-01-14 00:09:15 +08:00
|
|
|
goto cleanup;
|
2009-06-11 22:17:42 +08:00
|
|
|
}
|
|
|
|
|
2011-01-14 00:09:15 +08:00
|
|
|
ret = 0;
|
|
|
|
cleanup:
|
|
|
|
VIR_FREE(path);
|
2011-04-25 06:25:10 +08:00
|
|
|
VIR_FREE(help);
|
2012-08-21 00:44:14 +08:00
|
|
|
virObjectUnref(flags);
|
2011-02-08 22:22:39 +08:00
|
|
|
VIR_FREE(got);
|
|
|
|
VIR_FREE(expected);
|
2011-01-14 00:09:15 +08:00
|
|
|
return ret;
|
2009-06-11 22:17:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2011-04-30 00:21:20 +08:00
|
|
|
mymain(void)
|
2009-06-11 22:17:42 +08:00
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
|
2011-02-08 22:22:39 +08:00
|
|
|
# define DO_TEST(name, version, is_kvm, kvm_version, ...) \
|
|
|
|
do { \
|
|
|
|
struct testInfo info = { \
|
|
|
|
name, NULL, version, is_kvm, kvm_version \
|
|
|
|
}; \
|
2013-02-01 21:48:58 +08:00
|
|
|
if (!(info.flags = virQEMUCapsNew())) \
|
2011-02-08 22:22:39 +08:00
|
|
|
return EXIT_FAILURE; \
|
2013-02-01 21:48:58 +08:00
|
|
|
virQEMUCapsSetList(info.flags, __VA_ARGS__, QEMU_CAPS_LAST); \
|
2011-02-08 22:22:39 +08:00
|
|
|
if (virtTestRun("QEMU Help String Parsing " name, \
|
|
|
|
1, testHelpStrParsing, &info) < 0) \
|
|
|
|
ret = -1; \
|
2012-08-21 00:44:14 +08:00
|
|
|
virObjectUnref(info.flags); \
|
2009-06-11 22:17:42 +08:00
|
|
|
} while (0)
|
|
|
|
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("qemu-0.9.1", 9001, 0, 0,
|
|
|
|
QEMU_CAPS_KQEMU,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_NAME,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
|
|
|
QEMU_CAPS_VNC);
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("kvm-74", 9001, 1, 74,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_DRIVE_BOOT,
|
2011-02-07 22:54:08 +08:00
|
|
|
QEMU_CAPS_NAME,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_VNET_HDR,
|
|
|
|
QEMU_CAPS_MIGRATE_KVM_STDIO,
|
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_MEM_PATH,
|
2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_TDF,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
|
|
|
QEMU_CAPS_VNC);
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("kvm-83-rhel56", 9001, 1, 83,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_DRIVE_BOOT,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_VNET_HDR,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_EXEC,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_V2,
|
2011-09-23 03:33:47 +08:00
|
|
|
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_DRIVE_SERIAL,
|
|
|
|
QEMU_CAPS_VGA,
|
|
|
|
QEMU_CAPS_PCIDEVICE,
|
|
|
|
QEMU_CAPS_MEM_PATH,
|
|
|
|
QEMU_CAPS_BALLOON,
|
|
|
|
QEMU_CAPS_RTC_TD_HACK,
|
|
|
|
QEMU_CAPS_NO_HPET,
|
|
|
|
QEMU_CAPS_NO_KVM_PIT,
|
2011-02-07 22:54:08 +08:00
|
|
|
QEMU_CAPS_TDF,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_DRIVE_READONLY,
|
|
|
|
QEMU_CAPS_SMBIOS_TYPE,
|
2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_SPICE,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
|
|
|
QEMU_CAPS_VNC);
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("qemu-0.10.5", 10005, 0, 0,
|
|
|
|
QEMU_CAPS_KQEMU,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|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2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_DRIVE_AIO,
|
2011-09-21 01:31:52 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_PCI_ROMBAR,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
2011-12-21 20:47:17 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_CPU_HOST,
|
|
|
|
QEMU_CAPS_VNC);
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("qemu-kvm-0.12.1.2-rhel60", 12001, 1, 0,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_DRIVE_BOOT,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_VNET_HDR,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_EXEC,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_V2,
|
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_DRIVE_SERIAL,
|
|
|
|
QEMU_CAPS_DRIVE_READONLY,
|
|
|
|
QEMU_CAPS_VGA,
|
|
|
|
QEMU_CAPS_0_10,
|
|
|
|
QEMU_CAPS_PCIDEVICE,
|
|
|
|
QEMU_CAPS_MEM_PATH,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_UNIX,
|
|
|
|
QEMU_CAPS_CHARDEV,
|
|
|
|
QEMU_CAPS_ENABLE_KVM,
|
2012-01-26 12:33:21 +08:00
|
|
|
QEMU_CAPS_MONITOR_JSON,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_BALLOON,
|
|
|
|
QEMU_CAPS_DEVICE,
|
|
|
|
QEMU_CAPS_SMP_TOPOLOGY,
|
2012-01-26 12:33:21 +08:00
|
|
|
QEMU_CAPS_NETDEV,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_RTC,
|
2011-05-24 01:38:32 +08:00
|
|
|
QEMU_CAPS_VHOST_NET,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_NO_KVM_PIT,
|
|
|
|
QEMU_CAPS_TDF,
|
|
|
|
QEMU_CAPS_PCI_CONFIGFD,
|
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_BOOT_MENU,
|
|
|
|
QEMU_CAPS_NESTING,
|
|
|
|
QEMU_CAPS_NAME_PROCESS,
|
|
|
|
QEMU_CAPS_SMBIOS_TYPE,
|
|
|
|
QEMU_CAPS_VGA_QXL,
|
|
|
|
QEMU_CAPS_SPICE,
|
2011-02-07 22:54:08 +08:00
|
|
|
QEMU_CAPS_VGA_NONE,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_MIGRATE_QEMU_FD,
|
|
|
|
QEMU_CAPS_DRIVE_AIO,
|
2011-09-02 20:56:50 +08:00
|
|
|
QEMU_CAPS_DEVICE_SPICEVMC,
|
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI,
|
2011-09-02 22:20:40 +08:00
|
|
|
QEMU_CAPS_PIIX4_USB_UHCI,
|
2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_USB_HUB,
|
2011-09-21 01:31:52 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_PCI_ROMBAR,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
2011-12-21 20:47:17 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_CPU_HOST,
|
2012-12-14 15:06:31 +08:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2013-01-03 14:57:25 +08:00
|
|
|
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
2013-01-03 15:13:05 +08:00
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_USB_NET);
|
2011-02-08 22:22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CAPS_VGA_NONE,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_MIGRATE_QEMU_FD,
|
2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_DRIVE_AIO,
|
2011-09-21 01:31:52 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_PCI_ROMBAR,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
2011-12-21 20:47:17 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_CPU_HOST,
|
|
|
|
QEMU_CAPS_VNC);
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("qemu-kvm-0.13.0", 13000, 1, 0,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_DRIVE_BOOT,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_VNET_HDR,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_EXEC,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_V2,
|
2011-09-23 03:33:47 +08:00
|
|
|
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_DRIVE_SERIAL,
|
|
|
|
QEMU_CAPS_XEN_DOMID,
|
|
|
|
QEMU_CAPS_DRIVE_READONLY,
|
|
|
|
QEMU_CAPS_VGA,
|
|
|
|
QEMU_CAPS_0_10,
|
|
|
|
QEMU_CAPS_PCIDEVICE,
|
|
|
|
QEMU_CAPS_MEM_PATH,
|
|
|
|
QEMU_CAPS_SDL,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_UNIX,
|
|
|
|
QEMU_CAPS_CHARDEV,
|
|
|
|
QEMU_CAPS_ENABLE_KVM,
|
|
|
|
QEMU_CAPS_MONITOR_JSON,
|
|
|
|
QEMU_CAPS_BALLOON,
|
|
|
|
QEMU_CAPS_DEVICE,
|
|
|
|
QEMU_CAPS_SMP_TOPOLOGY,
|
|
|
|
QEMU_CAPS_NETDEV,
|
|
|
|
QEMU_CAPS_RTC,
|
2011-05-24 01:38:32 +08:00
|
|
|
QEMU_CAPS_VHOST_NET,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_NO_HPET,
|
|
|
|
QEMU_CAPS_NO_KVM_PIT,
|
|
|
|
QEMU_CAPS_TDF,
|
|
|
|
QEMU_CAPS_PCI_CONFIGFD,
|
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_BOOT_MENU,
|
|
|
|
QEMU_CAPS_FSDEV,
|
|
|
|
QEMU_CAPS_NESTING,
|
|
|
|
QEMU_CAPS_NAME_PROCESS,
|
|
|
|
QEMU_CAPS_SMBIOS_TYPE,
|
|
|
|
QEMU_CAPS_SPICE,
|
2011-02-07 22:54:08 +08:00
|
|
|
QEMU_CAPS_VGA_NONE,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_MIGRATE_QEMU_FD,
|
2011-02-07 22:54:08 +08:00
|
|
|
QEMU_CAPS_DRIVE_AIO,
|
2011-05-09 14:59:16 +08:00
|
|
|
QEMU_CAPS_DEVICE_SPICEVMC,
|
2011-09-02 20:56:50 +08:00
|
|
|
QEMU_CAPS_PCI_MULTIFUNCTION,
|
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI,
|
|
|
|
QEMU_CAPS_PIIX4_USB_UHCI,
|
|
|
|
QEMU_CAPS_VT82C686B_USB_UHCI,
|
2011-09-02 22:20:40 +08:00
|
|
|
QEMU_CAPS_PCI_OHCI,
|
2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_USB_HUB,
|
2011-09-21 01:31:52 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_PCI_ROMBAR,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
2011-12-21 20:47:17 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
2012-08-08 14:25:24 +08:00
|
|
|
QEMU_CAPS_CPU_HOST,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_SCSI_LSI,
|
2012-12-14 15:06:31 +08:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2013-01-03 14:57:25 +08:00
|
|
|
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
2013-01-03 15:13:05 +08:00
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_USB_NET);
|
2011-02-08 22:22:39 +08:00
|
|
|
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_VNET_HDR,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_EXEC,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_V2,
|
2011-09-23 03:33:47 +08:00
|
|
|
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_DRIVE_SERIAL,
|
|
|
|
QEMU_CAPS_DRIVE_READONLY,
|
|
|
|
QEMU_CAPS_VGA,
|
|
|
|
QEMU_CAPS_0_10,
|
|
|
|
QEMU_CAPS_PCIDEVICE,
|
|
|
|
QEMU_CAPS_MEM_PATH,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_UNIX,
|
|
|
|
QEMU_CAPS_CHARDEV,
|
|
|
|
QEMU_CAPS_ENABLE_KVM,
|
2012-01-26 12:33:21 +08:00
|
|
|
QEMU_CAPS_MONITOR_JSON,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_BALLOON,
|
|
|
|
QEMU_CAPS_DEVICE,
|
|
|
|
QEMU_CAPS_SMP_TOPOLOGY,
|
2012-01-26 12:33:21 +08:00
|
|
|
QEMU_CAPS_NETDEV,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_RTC,
|
2011-05-24 01:38:32 +08:00
|
|
|
QEMU_CAPS_VHOST_NET,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_NO_KVM_PIT,
|
|
|
|
QEMU_CAPS_TDF,
|
|
|
|
QEMU_CAPS_PCI_CONFIGFD,
|
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_BOOT_MENU,
|
|
|
|
QEMU_CAPS_NESTING,
|
|
|
|
QEMU_CAPS_NAME_PROCESS,
|
|
|
|
QEMU_CAPS_SMBIOS_TYPE,
|
|
|
|
QEMU_CAPS_VGA_QXL,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_VGA_NONE,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_FD,
|
|
|
|
QEMU_CAPS_HDA_DUPLEX,
|
2011-02-07 22:54:08 +08:00
|
|
|
QEMU_CAPS_DRIVE_AIO,
|
2011-02-08 22:22:39 +08:00
|
|
|
QEMU_CAPS_CCID_PASSTHRU,
|
|
|
|
QEMU_CAPS_CHARDEV_SPICEVMC,
|
qemu: Support vram for video of qxl type
For qemu names the primary vga as "qxl-vga":
1) if vram is specified for 2nd qxl device:
-vga qxl -global qxl-vga.vram_size=$SIZE \
-device qxl,id=video1,vram_size=$SIZE,...
2) if vram is not specified for 2nd qxl device, (use the default
set by global):
-vga qxl -global qxl-vga.vram_size=$SIZE \
-device qxl,id=video1,...
For qemu names all qxl devices as "qxl":
1) if vram is specified for 2nd qxl device:
-vga qxl -global qxl.vram_size=$SIZE \
-device qxl,id=video1,vram_size=$SIZE ...
2) if vram is not specified for 2nd qxl device:
-vga qxl -global qxl-vga.vram_size=$SIZE \
-device qxl,id=video1,...
"-global" is the only way to define vram_size for the primary qxl
device, regardless of how qemu names it, (It's not good a good
way, as original idea of "-global" is to set a global default for
a driver property, but to specify vram for first qxl device, we
have to use it).
For other qxl devices, as they are represented by "-device", could
specify it directly and seperately for each, and it overrides the
default set by "-global" if specified.
v1 - v2:
* modify "virDomainVideoDefaultRAM" so that it returns 16M as the
default vram_size for qxl device.
* vram_size * 1024 (qemu accepts bytes for vram_size).
* apply default vram_size for qxl device for which vram_size is
not specified.
* modify "graphics-spice" tests (more sensiable vram_size)
* Add an argument of virDomainDefPtr type for qemuBuildVideoDevStr,
to use virDomainVideoDefaultRAM in qemuBuildVideoDevStr).
v2 - v3:
* Modify default video memory size for qxl device from 16M to 24M
* Update codes to be consistent with changes on qemu_capabilities.*
2011-03-06 22:00:27 +08:00
|
|
|
QEMU_CAPS_DEVICE_QXL_VGA,
|
2011-06-20 16:26:47 +08:00
|
|
|
QEMU_CAPS_VIRTIO_TX_ALG,
|
2011-09-02 20:56:50 +08:00
|
|
|
QEMU_CAPS_VIRTIO_IOEVENTFD,
|
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI,
|
2011-09-02 22:20:40 +08:00
|
|
|
QEMU_CAPS_PIIX4_USB_UHCI,
|
2011-09-21 16:25:29 +08:00
|
|
|
QEMU_CAPS_USB_HUB,
|
2011-09-21 01:31:52 +08:00
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_PCI_ROMBAR,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
|
|
|
QEMU_CAPS_VIRTIO_BLK_SCSI,
|
2011-12-21 20:47:17 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
2012-08-29 23:48:31 +08:00
|
|
|
QEMU_CAPS_CPU_HOST,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_BLOCKIO,
|
2012-12-14 15:06:31 +08:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2013-01-03 14:57:25 +08:00
|
|
|
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
2013-01-03 15:13:05 +08:00
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_USB_NET);
|
2011-10-06 05:48:41 +08:00
|
|
|
DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_VNET_HDR,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_EXEC,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_V2,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
|
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_DRIVE_SERIAL,
|
|
|
|
QEMU_CAPS_DRIVE_READONLY,
|
|
|
|
QEMU_CAPS_VGA,
|
|
|
|
QEMU_CAPS_0_10,
|
|
|
|
QEMU_CAPS_PCIDEVICE,
|
|
|
|
QEMU_CAPS_MEM_PATH,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_UNIX,
|
|
|
|
QEMU_CAPS_CHARDEV,
|
|
|
|
QEMU_CAPS_ENABLE_KVM,
|
|
|
|
QEMU_CAPS_BALLOON,
|
2012-01-26 12:33:21 +08:00
|
|
|
QEMU_CAPS_MONITOR_JSON,
|
2011-10-06 05:48:41 +08:00
|
|
|
QEMU_CAPS_DEVICE,
|
|
|
|
QEMU_CAPS_SMP_TOPOLOGY,
|
2012-01-26 12:33:21 +08:00
|
|
|
QEMU_CAPS_NETDEV,
|
2011-10-06 05:48:41 +08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
|
QEMU_CAPS_PCI_ROMBAR,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
|
|
|
QEMU_CAPS_VIRTIO_BLK_SCSI,
|
2012-01-12 17:31:14 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|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_PCI_OHCI,
|
|
|
|
QEMU_CAPS_USB_HUB,
|
|
|
|
QEMU_CAPS_NO_SHUTDOWN,
|
|
|
|
QEMU_CAPS_PCI_ROMBAR,
|
2011-12-20 09:08:29 +08:00
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
2011-12-22 18:00:05 +08:00
|
|
|
QEMU_CAPS_NO_ACPI,
|
qemu: add new disk device='lun' for bus='virtio' & type='block'
In the past, generic SCSI commands issued from a guest to a virtio
disk were always passed through to the underlying disk by qemu, and
the kernel would also pass them on.
As a result of CVE-2011-4127 (see:
http://seclists.org/oss-sec/2011/q4/536), qemu now honors its
scsi=on|off device option for virtio-blk-pci (which enables/disables
passthrough of generic SCSI commands), and the kernel will only allow
the commands for physical devices (not for partitions or logical
volumes). The default behavior of qemu is still to allow sending
generic SCSI commands to physical disks that are presented to a guest
as virtio-blk-pci devices, but libvirt prefers to disable those
commands in the standard virtio block devices, enabling it only when
specifically requested (hopefully indicating that the requester
understands what they're asking for). For this purpose, a new libvirt
disk device type (device='lun') has been created.
device='lun' is identical to the default device='disk', except that:
1) It is only allowed if bus='virtio', type='block', and the qemu
version is "new enough" to support it ("new enough" == qemu 0.11 or
better), otherwise the domain will fail to start and a
CONFIG_UNSUPPORTED error will be logged).
2) The option "scsi=on" will be added to the -device arg to allow
SG_IO commands (if device !='lun', "scsi=off" will be added to the
-device arg so that SG_IO commands are specifically forbidden).
Guests which continue to use disk device='disk' (the default) will no
longer be able to use SG_IO commands on the disk; those that have
their disk device changed to device='lun' will still be able to use SG_IO
commands.
*docs/formatdomain.html.in - document the new device attribute value.
*docs/schemas/domaincommon.rng - allow it in the RNG
*tests/* - update the args of several existing tests to add scsi=off, and
add one new test that will test scsi=on.
*src/conf/domain_conf.c - update domain XML parser and formatter
*src/qemu/qemu_(command|driver|hotplug).c - treat
VIR_DOMAIN_DISK_DEVICE_LUN *almost* identically to
VIR_DOMAIN_DISK_DEVICE_DISK, except as indicated above.
Note that no support for this new device value was added to any
hypervisor drivers other than qemu, because it's unclear what it might
mean (if anything) to those drivers.
2012-01-05 11:48:38 +08:00
|
|
|
QEMU_CAPS_FSDEV_READONLY,
|
|
|
|
QEMU_CAPS_VIRTIO_BLK_SCSI,
|
2011-12-21 20:47:17 +08:00
|
|
|
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
2012-01-17 20:44:18 +08:00
|
|
|
QEMU_CAPS_CPU_HOST,
|
2012-03-12 22:19:56 +08:00
|
|
|
QEMU_CAPS_FSDEV_WRITEOUT,
|
2012-04-17 17:08:05 +08:00
|
|
|
QEMU_CAPS_SCSI_BLOCK,
|
2012-04-17 17:16:52 +08:00
|
|
|
QEMU_CAPS_SCSI_CD,
|
2012-08-08 14:25:24 +08:00
|
|
|
QEMU_CAPS_IDE_CD,
|
2012-08-29 23:48:31 +08:00
|
|
|
QEMU_CAPS_SCSI_LSI,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_BLOCKIO,
|
2012-12-14 15:06:31 +08:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2013-01-03 14:57:25 +08:00
|
|
|
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
2013-01-03 15:13:05 +08:00
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_USB_NET);
|
2012-06-05 21:34:09 +08:00
|
|
|
DO_TEST("qemu-1.1.0", 1001000, 0, 0,
|
2012-04-26 18:11:49 +08:00
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QE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 +08:00
|
|
|
QEMU_CAPS_HDA_MICRO,
|
2012-08-04 04:33:05 +08:00
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
2012-08-08 14:25:24 +08:00
|
|
|
QEMU_CAPS_NETDEV_BRIDGE,
|
|
|
|
QEMU_CAPS_SCSI_LSI,
|
2013-03-15 02:32:24 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_BLOCKIO,
|
2012-12-14 15:06:31 +08:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2013-01-03 14:57:25 +08:00
|
|
|
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
2013-01-03 15:13:05 +08:00
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_USB_NET);
|
2012-09-17 15:59:55 +08:00
|
|
|
DO_TEST("qemu-1.2.0", 1002000, 0, 0,
|
|
|
|
QEMU_CAPS_VNC_COLON,
|
|
|
|
QEMU_CAPS_NO_REBOOT,
|
|
|
|
QEMU_CAPS_DRIVE,
|
|
|
|
QEMU_CAPS_NAME,
|
|
|
|
QEMU_CAPS_UUID,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_TCP,
|
|
|
|
QEMU_CAPS_MIGRATE_QEMU_EXEC,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_V2,
|
|
|
|
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
|
|
|
|
QEMU_CAPS_DRIVE_FORMAT,
|
|
|
|
QEMU_CAPS_DRIVE_SERIAL,
|
|
|
|
QEMU_CAPS_XEN_DOMID,
|
|
|
|
QEMU_CAPS_DRIVE_READONLY,
|
|
|
|
QEMU_CAPS_VGA,
|
|
|
|
QEMU_CAPS_0_10,
|
|
|
|
QEM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|
|
|
|
QEMU_CAPS_IDE_CD,
|
|
|
|
QEMU_CAPS_NO_USER_CONFIG,
|
|
|
|
QEMU_CAPS_HDA_MICRO,
|
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
|
|
|
QEMU_CAPS_NETDEV_BRIDGE,
|
|
|
|
QEMU_CAPS_SCSI_LSI,
|
2013-03-15 02:32:24 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
2012-09-17 15:59:55 +08:00
|
|
|
QEMU_CAPS_BLOCKIO,
|
2012-11-21 02:47:10 +08:00
|
|
|
QEMU_CAPS_DISABLE_S3,
|
|
|
|
QEMU_CAPS_DISABLE_S4,
|
|
|
|
QEMU_CAPS_USB_REDIR_FILTER,
|
|
|
|
QEMU_CAPS_IDE_DRIVE_WWN,
|
2012-09-18 17:17:26 +08:00
|
|
|
QEMU_CAPS_SCSI_DISK_WWN,
|
2012-08-15 15:59:24 +08:00
|
|
|
QEMU_CAPS_SECCOMP_SANDBOX,
|
2012-10-20 03:40:52 +08:00
|
|
|
QEMU_CAPS_DUMP_GUEST_CORE,
|
2012-11-21 02:47:10 +08:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_USB_REDIR_BOOTINDEX,
|
2012-12-14 15:06:31 +08:00
|
|
|
QEMU_CAPS_USB_HOST_BOOTINDEX,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_DEVICE_VMWARE_SVGA,
|
2013-01-03 14:57:25 +08:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2013-01-03 15:13:05 +08:00
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_USB_NET);
|
2009-06-11 22:17:42 +08:00
|
|
|
|
|
|
|
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
VIRT_TEST_MAIN(mymain)
|
|
|
|
|
|
|
|
#else
|
2011-12-02 04:47:34 +08:00
|
|
|
# include "testutils.h"
|
2009-06-11 22:17:42 +08:00
|
|
|
|
2011-07-09 07:24:44 +08:00
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
return EXIT_AM_SKIP;
|
|
|
|
}
|
2009-06-11 22:17:42 +08:00
|
|
|
|
|
|
|
#endif /* WITH_QEMU */
|