2008-01-30 02:15:54 +08:00
|
|
|
#include <config.h>
|
2007-11-26 20:03:34 +08:00
|
|
|
|
2007-07-19 05:34:22 +08:00
|
|
|
#include <stdio.h>
|
2007-11-26 20:03:34 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
2007-07-19 05:34:22 +08:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
2013-04-16 21:41:44 +08:00
|
|
|
#include "testutils.h"
|
|
|
|
|
2007-11-26 20:03:34 +08:00
|
|
|
#ifdef WITH_QEMU
|
|
|
|
|
2010-03-10 02:22:22 +08:00
|
|
|
# include "internal.h"
|
2016-04-13 14:12:47 +08:00
|
|
|
# include "qemu/qemu_domain_address.h"
|
2011-07-12 01:29:09 +08:00
|
|
|
# include "qemu/qemu_domain.h"
|
2010-03-10 02:22:22 +08:00
|
|
|
# include "testutilsqemu.h"
|
2013-04-03 18:36:23 +08:00
|
|
|
# include "virstring.h"
|
2007-07-19 05:34:22 +08:00
|
|
|
|
2013-06-07 23:10:28 +08:00
|
|
|
# define VIR_FROM_THIS VIR_FROM_NONE
|
|
|
|
|
2012-11-29 00:43:10 +08:00
|
|
|
static virQEMUDriver driver;
|
2007-07-19 05:34:22 +08:00
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
enum {
|
|
|
|
WHEN_INACTIVE = 1,
|
|
|
|
WHEN_ACTIVE = 2,
|
|
|
|
WHEN_BOTH = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct testInfo {
|
|
|
|
char *inName;
|
|
|
|
char *outActiveName;
|
|
|
|
char *outInactiveName;
|
2016-01-08 11:50:05 +08:00
|
|
|
|
|
|
|
virQEMUCapsPtr qemuCaps;
|
2015-03-24 00:24:43 +08:00
|
|
|
};
|
|
|
|
|
2016-01-28 05:03:52 +08:00
|
|
|
static int
|
|
|
|
qemuXML2XMLPreFormatCallback(virDomainDefPtr def, const void *opaque)
|
|
|
|
{
|
|
|
|
const struct testInfo *info = opaque;
|
|
|
|
|
|
|
|
if (qemuDomainAssignAddresses(def, info->qemuCaps, NULL))
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
static int
|
|
|
|
testXML2XMLActive(const void *opaque)
|
|
|
|
{
|
|
|
|
const struct testInfo *info = opaque;
|
|
|
|
|
2016-01-09 04:55:44 +08:00
|
|
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
2016-01-28 04:55:01 +08:00
|
|
|
info->inName, info->outActiveName, true,
|
2016-04-09 00:04:10 +08:00
|
|
|
qemuXML2XMLPreFormatCallback, opaque, 0,
|
|
|
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
2015-03-24 00:24:43 +08:00
|
|
|
}
|
|
|
|
|
2010-07-25 06:18:18 +08:00
|
|
|
|
2011-04-25 06:25:10 +08:00
|
|
|
static int
|
2015-03-24 00:24:43 +08:00
|
|
|
testXML2XMLInactive(const void *opaque)
|
2011-04-25 06:25:10 +08:00
|
|
|
{
|
2015-03-24 00:24:43 +08:00
|
|
|
const struct testInfo *info = opaque;
|
|
|
|
|
2016-01-09 04:55:44 +08:00
|
|
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName,
|
2016-01-28 04:55:01 +08:00
|
|
|
info->outInactiveName, false,
|
2016-04-09 00:04:10 +08:00
|
|
|
qemuXML2XMLPreFormatCallback, opaque, 0,
|
|
|
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
2015-03-24 00:24:43 +08:00
|
|
|
}
|
2010-07-25 06:18:18 +08:00
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
|
2015-03-24 20:25:27 +08:00
|
|
|
static const char testStatusXMLPrefix[] =
|
|
|
|
"<domstatus state='running' reason='booted' pid='3803518'>\n"
|
|
|
|
" <taint flag='high-privileges'/>\n"
|
|
|
|
" <monitor path='/var/lib/libvirt/qemu/test.monitor' json='1' type='unix'/>\n"
|
|
|
|
" <vcpus>\n"
|
|
|
|
" <vcpu pid='3803519'/>\n"
|
|
|
|
" </vcpus>\n"
|
|
|
|
" <qemuCaps>\n"
|
|
|
|
" <flag name='vnet-hdr'/>\n"
|
|
|
|
" <flag name='qxl.vgamem_mb'/>\n"
|
|
|
|
" <flag name='qxl-vga.vgamem_mb'/>\n"
|
|
|
|
" <flag name='pc-dimm'/>\n"
|
|
|
|
" </qemuCaps>\n"
|
|
|
|
" <devices>\n"
|
|
|
|
" <device alias='balloon0'/>\n"
|
|
|
|
" <device alias='video0'/>\n"
|
|
|
|
" <device alias='serial0'/>\n"
|
|
|
|
" <device alias='net0'/>\n"
|
|
|
|
" <device alias='usb'/>\n"
|
2015-07-24 22:06:33 +08:00
|
|
|
" </devices>\n"
|
2016-02-26 16:15:55 +08:00
|
|
|
" <numad nodeset='0-2'/>\n"
|
|
|
|
" <libDir path='/tmp'/>\n"
|
|
|
|
" <channelTargetDir path='/tmp/channel'/>\n";
|
2015-03-24 20:25:27 +08:00
|
|
|
|
|
|
|
static const char testStatusXMLSuffix[] =
|
|
|
|
"</domstatus>\n";
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
testCompareStatusXMLToXMLFiles(const void *opaque)
|
|
|
|
{
|
|
|
|
const struct testInfo *data = opaque;
|
|
|
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
|
|
|
xmlDocPtr xml = NULL;
|
|
|
|
virDomainObjPtr obj = NULL;
|
|
|
|
char *expect = NULL;
|
|
|
|
char *actual = NULL;
|
|
|
|
char *source = NULL;
|
2016-01-09 05:41:37 +08:00
|
|
|
char *inFile = NULL, *outActiveFile = NULL;
|
2015-03-24 20:25:27 +08:00
|
|
|
int ret = -1;
|
|
|
|
int keepBlanksDefault = xmlKeepBlanksDefault(0);
|
|
|
|
|
2016-01-09 05:41:37 +08:00
|
|
|
if (virtTestLoadFile(data->inName, &inFile) < 0)
|
|
|
|
goto cleanup;
|
|
|
|
if (virtTestLoadFile(data->outActiveName, &outActiveFile) < 0)
|
|
|
|
goto cleanup;
|
|
|
|
|
2015-03-24 20:25:27 +08:00
|
|
|
/* construct faked source status XML */
|
|
|
|
virBufferAdd(&buf, testStatusXMLPrefix, -1);
|
|
|
|
virBufferAdjustIndent(&buf, 2);
|
2016-01-09 05:41:37 +08:00
|
|
|
virBufferAddStr(&buf, inFile);
|
2015-03-24 20:25:27 +08:00
|
|
|
virBufferAdjustIndent(&buf, -2);
|
|
|
|
virBufferAdd(&buf, testStatusXMLSuffix, -1);
|
|
|
|
|
|
|
|
if (!(source = virBufferContentAndReset(&buf))) {
|
2016-01-08 06:36:07 +08:00
|
|
|
VIR_TEST_DEBUG("Failed to create the source XML");
|
2015-03-24 20:25:27 +08:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* construct the expect string */
|
|
|
|
virBufferAdd(&buf, testStatusXMLPrefix, -1);
|
|
|
|
virBufferAdjustIndent(&buf, 2);
|
2016-01-09 05:41:37 +08:00
|
|
|
virBufferAddStr(&buf, outActiveFile);
|
2015-03-24 20:25:27 +08:00
|
|
|
virBufferAdjustIndent(&buf, -2);
|
|
|
|
virBufferAdd(&buf, testStatusXMLSuffix, -1);
|
|
|
|
|
|
|
|
if (!(expect = virBufferContentAndReset(&buf))) {
|
2016-01-08 06:36:07 +08:00
|
|
|
VIR_TEST_DEBUG("Failed to create the expect XML");
|
2015-03-24 20:25:27 +08:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* parse the fake source status XML */
|
|
|
|
if (!(xml = virXMLParseString(source, "(domain_status_test_XML)")) ||
|
|
|
|
!(obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
|
|
|
|
driver.caps, driver.xmlopt,
|
|
|
|
VIR_DOMAIN_DEF_PARSE_STATUS |
|
|
|
|
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
|
2015-09-15 20:08:52 +08:00
|
|
|
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES))) {
|
2016-01-08 06:36:07 +08:00
|
|
|
VIR_TEST_DEBUG("Failed to parse domain status XML:\n%s", source);
|
2015-03-24 20:25:27 +08:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
2016-01-28 05:03:52 +08:00
|
|
|
if (qemuDomainAssignAddresses(obj->def, data->qemuCaps, NULL))
|
|
|
|
goto cleanup;
|
|
|
|
|
2015-03-24 20:25:27 +08:00
|
|
|
/* format it back */
|
2016-02-04 20:32:45 +08:00
|
|
|
if (!(actual = virDomainObjFormat(driver.xmlopt, obj, NULL,
|
2015-03-24 20:25:27 +08:00
|
|
|
VIR_DOMAIN_DEF_FORMAT_SECURE))) {
|
2016-01-08 06:36:07 +08:00
|
|
|
VIR_TEST_DEBUG("Failed to format domain status XML");
|
2015-03-24 20:25:27 +08:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (STRNEQ(actual, expect)) {
|
2015-12-10 20:40:54 +08:00
|
|
|
/* For status test we don't want to regenerate output to not
|
|
|
|
* add the status data.*/
|
|
|
|
virtTestDifferenceFullNoRegenerate(stderr,
|
|
|
|
expect, data->outActiveName,
|
|
|
|
actual, data->inName);
|
2015-03-24 20:25:27 +08:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
xmlKeepBlanksDefault(keepBlanksDefault);
|
|
|
|
xmlFreeDoc(xml);
|
|
|
|
virObjectUnref(obj);
|
|
|
|
VIR_FREE(expect);
|
|
|
|
VIR_FREE(actual);
|
|
|
|
VIR_FREE(source);
|
2016-01-09 05:41:37 +08:00
|
|
|
VIR_FREE(inFile);
|
|
|
|
VIR_FREE(outActiveFile);
|
2015-03-24 20:25:27 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
static void
|
|
|
|
testInfoFree(struct testInfo *info)
|
|
|
|
{
|
|
|
|
VIR_FREE(info->inName);
|
|
|
|
VIR_FREE(info->outActiveName);
|
|
|
|
VIR_FREE(info->outInactiveName);
|
2016-01-08 11:50:05 +08:00
|
|
|
|
|
|
|
virObjectUnref(info->qemuCaps);
|
2015-03-24 00:24:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
testInfoSet(struct testInfo *info,
|
|
|
|
const char *name,
|
2016-05-10 17:35:43 +08:00
|
|
|
int when,
|
|
|
|
int gic)
|
2015-03-24 00:24:43 +08:00
|
|
|
{
|
2016-01-08 11:50:05 +08:00
|
|
|
if (!(info->qemuCaps = virQEMUCapsNew()))
|
|
|
|
goto error;
|
|
|
|
|
2016-01-13 08:26:40 +08:00
|
|
|
virQEMUCapsSetList(info->qemuCaps,
|
|
|
|
QEMU_CAPS_DEVICE,
|
|
|
|
QEMU_CAPS_LAST);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
if (testQemuCapsSetGIC(info->qemuCaps, gic) < 0)
|
|
|
|
goto error;
|
|
|
|
|
2016-01-08 11:50:05 +08:00
|
|
|
if (qemuTestCapsCacheInsert(driver.qemuCapsCache, name,
|
|
|
|
info->qemuCaps) < 0)
|
|
|
|
goto error;
|
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
if (virAsprintf(&info->inName, "%s/qemuxml2argvdata/qemuxml2argv-%s.xml",
|
|
|
|
abs_srcdir, name) < 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
if (when & WHEN_INACTIVE) {
|
2016-01-13 23:43:27 +08:00
|
|
|
if (virAsprintf(&info->outInactiveName,
|
|
|
|
"%s/qemuxml2xmloutdata/qemuxml2xmlout-%s-inactive.xml",
|
|
|
|
abs_srcdir, name) < 0)
|
|
|
|
goto error;
|
2015-03-24 00:24:43 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
if (!virFileExists(info->outInactiveName)) {
|
|
|
|
VIR_FREE(info->outInactiveName);
|
2015-03-24 00:24:43 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
if (virAsprintf(&info->outInactiveName,
|
|
|
|
"%s/qemuxml2xmloutdata/qemuxml2xmlout-%s.xml",
|
|
|
|
abs_srcdir, name) < 0)
|
2015-03-24 00:24:43 +08:00
|
|
|
goto error;
|
|
|
|
}
|
2014-04-17 21:23:21 +08:00
|
|
|
}
|
2013-09-25 22:56:05 +08:00
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
if (when & WHEN_ACTIVE) {
|
2016-01-13 23:43:27 +08:00
|
|
|
if (virAsprintf(&info->outActiveName,
|
|
|
|
"%s/qemuxml2xmloutdata/qemuxml2xmlout-%s-active.xml",
|
|
|
|
abs_srcdir, name) < 0)
|
|
|
|
goto error;
|
2015-03-24 00:24:43 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
if (!virFileExists(info->outActiveName)) {
|
|
|
|
VIR_FREE(info->outActiveName);
|
2015-03-24 00:24:43 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
if (virAsprintf(&info->outActiveName,
|
|
|
|
"%s/qemuxml2xmloutdata/qemuxml2xmlout-%s.xml",
|
|
|
|
abs_srcdir, name) < 0)
|
2015-03-24 00:24:43 +08:00
|
|
|
goto error;
|
|
|
|
}
|
2014-04-17 21:23:21 +08:00
|
|
|
}
|
2013-09-25 22:56:05 +08:00
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
return 0;
|
2010-07-25 06:18:18 +08:00
|
|
|
|
2015-03-24 00:24:43 +08:00
|
|
|
error:
|
|
|
|
testInfoFree(info);
|
|
|
|
return -1;
|
2007-07-19 05:34:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-05-29 23:31:49 +08:00
|
|
|
static int
|
2011-04-30 00:21:20 +08:00
|
|
|
mymain(void)
|
2007-07-19 05:34:22 +08:00
|
|
|
{
|
|
|
|
int ret = 0;
|
2015-03-24 00:24:43 +08:00
|
|
|
struct testInfo info;
|
2016-04-26 20:27:16 +08:00
|
|
|
virQEMUDriverConfigPtr cfg = NULL;
|
2008-02-27 12:35:08 +08:00
|
|
|
|
2015-09-15 14:16:02 +08:00
|
|
|
if (qemuTestDriverInit(&driver) < 0)
|
2012-03-22 19:33:35 +08:00
|
|
|
return EXIT_FAILURE;
|
2008-02-27 12:35:08 +08:00
|
|
|
|
2015-09-15 14:16:02 +08:00
|
|
|
/* TODO: test with format probing disabled too */
|
|
|
|
driver.config->allowDiskFormatProbing = true;
|
2013-03-05 23:17:24 +08:00
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
# define DO_TEST_FULL(name, when, gic, ...) \
|
2015-03-24 00:24:43 +08:00
|
|
|
do { \
|
2016-05-10 17:35:43 +08:00
|
|
|
if (testInfoSet(&info, name, when, gic) < 0) { \
|
2016-01-08 06:36:07 +08:00
|
|
|
VIR_TEST_DEBUG("Failed to generate test data for '%s'", name); \
|
2015-03-24 00:24:43 +08:00
|
|
|
return -1; \
|
|
|
|
} \
|
2016-01-28 05:19:40 +08:00
|
|
|
virQEMUCapsSetList(info.qemuCaps, __VA_ARGS__, QEMU_CAPS_LAST); \
|
2015-03-24 00:24:43 +08:00
|
|
|
\
|
|
|
|
if (info.outInactiveName) { \
|
|
|
|
if (virtTestRun("QEMU XML-2-XML-inactive " name, \
|
|
|
|
testXML2XMLInactive, &info) < 0) \
|
|
|
|
ret = -1; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
if (info.outActiveName) { \
|
|
|
|
if (virtTestRun("QEMU XML-2-XML-active " name, \
|
|
|
|
testXML2XMLActive, &info) < 0) \
|
2015-03-24 20:25:27 +08:00
|
|
|
ret = -1; \
|
|
|
|
\
|
|
|
|
if (virtTestRun("QEMU XML-2-XML-status " name, \
|
|
|
|
testCompareStatusXMLToXMLFiles, &info) < 0) \
|
2015-03-24 00:24:43 +08:00
|
|
|
ret = -1; \
|
|
|
|
} \
|
|
|
|
testInfoFree(&info); \
|
2010-07-25 06:18:18 +08:00
|
|
|
} while (0)
|
|
|
|
|
2016-01-28 05:19:40 +08:00
|
|
|
# define NONE QEMU_CAPS_LAST
|
|
|
|
|
2010-03-10 02:22:22 +08:00
|
|
|
# define DO_TEST(name) \
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL(name, WHEN_BOTH, GIC_NONE, NONE)
|
2016-01-28 05:19:40 +08:00
|
|
|
|
|
|
|
|
2010-07-25 06:18:18 +08:00
|
|
|
|
|
|
|
/* Unset or set all envvars here that are copied in qemudBuildCommandLine
|
|
|
|
* using ADD_ENV_COPY, otherwise these tests may fail due to unexpected
|
|
|
|
* values for these envvars */
|
|
|
|
setenv("PATH", "/bin", 1);
|
2008-04-26 04:46:13 +08:00
|
|
|
|
|
|
|
DO_TEST("minimal");
|
2012-08-15 16:16:36 +08:00
|
|
|
DO_TEST("machine-core-on");
|
|
|
|
DO_TEST("machine-core-off");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("default-kvm-host-arch");
|
|
|
|
DO_TEST("default-qemu-host-arch");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("boot-cdrom");
|
|
|
|
DO_TEST("boot-network");
|
|
|
|
DO_TEST("boot-floppy");
|
2010-07-26 22:28:58 +08:00
|
|
|
DO_TEST("boot-multi");
|
2014-08-22 19:39:26 +08:00
|
|
|
DO_TEST("boot-menu-enable-with-timeout");
|
2010-07-26 22:28:58 +08:00
|
|
|
DO_TEST("boot-menu-disable");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("boot-menu-disable-with-timeout");
|
2011-01-13 18:46:43 +08:00
|
|
|
DO_TEST("boot-order");
|
2012-09-18 18:32:07 +08:00
|
|
|
|
|
|
|
DO_TEST("reboot-timeout-enabled");
|
|
|
|
DO_TEST("reboot-timeout-disabled");
|
|
|
|
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("clock-utc");
|
|
|
|
DO_TEST("clock-localtime");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("cpu-empty");
|
2012-01-27 21:49:52 +08:00
|
|
|
DO_TEST("cpu-kvmclock");
|
|
|
|
DO_TEST("cpu-host-kvmclock");
|
2015-01-06 00:03:58 +08:00
|
|
|
DO_TEST("cpu-host-passthrough-features");
|
2015-01-15 18:55:44 +08:00
|
|
|
DO_TEST("cpu-host-model-features");
|
2014-02-05 02:02:04 +08:00
|
|
|
DO_TEST("clock-catchup");
|
2012-01-27 21:49:52 +08:00
|
|
|
DO_TEST("kvmclock");
|
2014-01-22 01:50:12 +08:00
|
|
|
DO_TEST("clock-timer-hyperv-rtc");
|
2012-09-13 21:27:07 +08:00
|
|
|
|
|
|
|
DO_TEST("cpu-eoi-disabled");
|
|
|
|
DO_TEST("cpu-eoi-enabled");
|
|
|
|
DO_TEST("eoi-disabled");
|
|
|
|
DO_TEST("eoi-enabled");
|
2013-09-24 00:32:11 +08:00
|
|
|
DO_TEST("pv-spinlock-disabled");
|
|
|
|
DO_TEST("pv-spinlock-enabled");
|
2012-09-13 21:27:07 +08:00
|
|
|
|
2012-10-17 20:55:18 +08:00
|
|
|
DO_TEST("hyperv");
|
2013-07-04 18:12:57 +08:00
|
|
|
DO_TEST("hyperv-off");
|
2015-11-24 20:26:32 +08:00
|
|
|
DO_TEST("hyperv-panic");
|
2012-10-17 20:55:18 +08:00
|
|
|
|
2014-08-22 01:04:45 +08:00
|
|
|
DO_TEST("kvm-features");
|
|
|
|
DO_TEST("kvm-features-off");
|
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("pmu-feature");
|
2015-01-05 23:21:51 +08:00
|
|
|
DO_TEST("pmu-feature-off");
|
|
|
|
|
Support configuration of huge pages in guests
Add option to domain XML for
<memoryBacking>
<hugepages/>
</memoryBacking>
* configure.in: Add check for mntent.h
* qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf
Add 'hugetlbfs_mount' config parameter
* src/qemu_conf.c, src/qemu_conf.h: Check for -mem-path flag in QEMU,
and pass it when hugepages are requested.
Load hugetlbfs_mount config parameter, search for mount if not given.
* src/qemu_driver.c: Free hugetlbfs_mount/path parameter in driver shutdown.
Create directory for QEMU hugepage usage, chowning if required.
* docs/formatdomain.html.in: Document memoryBacking/hugepages elements
* docs/schemas/domain.rng: Add memoryBacking/hugepages elements to schema
* src/util.c, src/util.h, src/libvirt_private.syms: Add virFileFindMountPoint
helper API
* tests/qemuhelptest.c: Add -mem-path constants
* tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: Add tests for hugepage
handling
* tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml,
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args: Data files for
hugepage tests
2009-08-25 22:05:18 +08:00
|
|
|
DO_TEST("hugepages");
|
2014-07-23 23:37:20 +08:00
|
|
|
DO_TEST("hugepages-pages");
|
2014-07-23 23:37:21 +08:00
|
|
|
DO_TEST("hugepages-pages2");
|
|
|
|
DO_TEST("hugepages-pages3");
|
2014-09-08 17:34:22 +08:00
|
|
|
DO_TEST("hugepages-shared");
|
2013-05-14 13:25:50 +08:00
|
|
|
DO_TEST("nosharepages");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("restore-v2");
|
|
|
|
DO_TEST("migrate");
|
|
|
|
DO_TEST("qemu-ns-no-env");
|
2010-04-21 22:28:21 +08:00
|
|
|
DO_TEST("disk-aio");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("disk-cdrom");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("disk-cdrom-empty");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("disk-floppy");
|
|
|
|
DO_TEST("disk-many");
|
2008-05-16 00:05:41 +08:00
|
|
|
DO_TEST("disk-xenvbd");
|
2016-01-13 09:41:49 +08:00
|
|
|
DO_TEST("disk-usb-device");
|
2009-12-23 00:53:20 +08:00
|
|
|
DO_TEST("disk-virtio");
|
2009-11-17 02:08:29 +08:00
|
|
|
DO_TEST("floppy-drive-fat");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("disk-drive-boot-disk");
|
|
|
|
DO_TEST("disk-drive-boot-cdrom");
|
|
|
|
DO_TEST("disk-drive-error-policy-stop");
|
|
|
|
DO_TEST("disk-drive-error-policy-enospace");
|
|
|
|
DO_TEST("disk-drive-error-policy-wreport-rignore");
|
2009-11-17 02:08:29 +08:00
|
|
|
DO_TEST("disk-drive-fat");
|
2009-01-24 00:22:20 +08:00
|
|
|
DO_TEST("disk-drive-fmt-qcow");
|
2014-04-15 06:54:19 +08:00
|
|
|
DO_TEST("disk-drive-copy-on-read");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("disk-drive-cache-v2-wt");
|
|
|
|
DO_TEST("disk-drive-cache-v2-wb");
|
|
|
|
DO_TEST("disk-drive-cache-v2-none");
|
|
|
|
DO_TEST("disk-drive-cache-directsync");
|
|
|
|
DO_TEST("disk-drive-cache-unsafe");
|
2013-02-26 01:44:22 +08:00
|
|
|
DO_TEST("disk-drive-network-nbd");
|
2013-02-26 01:44:23 +08:00
|
|
|
DO_TEST("disk-drive-network-nbd-export");
|
2013-02-26 01:44:25 +08:00
|
|
|
DO_TEST("disk-drive-network-nbd-ipv6");
|
|
|
|
DO_TEST("disk-drive-network-nbd-ipv6-export");
|
2013-02-26 01:44:24 +08:00
|
|
|
DO_TEST("disk-drive-network-nbd-unix");
|
2013-02-26 01:44:26 +08:00
|
|
|
DO_TEST("disk-drive-network-iscsi");
|
2013-03-21 19:53:53 +08:00
|
|
|
DO_TEST("disk-drive-network-iscsi-auth");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("disk-drive-network-gluster");
|
|
|
|
DO_TEST("disk-drive-network-rbd");
|
|
|
|
DO_TEST("disk-drive-network-rbd-auth");
|
|
|
|
DO_TEST("disk-drive-network-rbd-ipv6");
|
|
|
|
DO_TEST("disk-drive-network-rbd-ceph-env");
|
|
|
|
DO_TEST("disk-drive-network-sheepdog");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-device", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2012-02-28 14:01:31 +08:00
|
|
|
DO_TEST("disk-scsi-vscsi");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-virtio-scsi", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-virtio-scsi-num_queues", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-virtio-scsi-cmd_per_lun", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-virtio-scsi-max_sectors", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-virtio-scsi-ioeventfd", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-megasas", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_SCSI_MEGASAS);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-mptsas1068", WHEN_ACTIVE, GIC_NONE,
|
2016-02-11 18:48:20 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_SCSI_MPTSAS1068,
|
|
|
|
QEMU_CAPS_SCSI_DISK_WWN);
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("disk-mirror-old");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-mirror", WHEN_ACTIVE, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("disk-mirror", WHEN_INACTIVE, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("disk-active-commit", WHEN_ACTIVE, GIC_NONE, NONE);
|
conf: add <listen> subelement to domain <graphics> element
Once it's plugged in, the <listen> element will be an optional
replacement for the "listen" attribute that graphics elements already
have. If the <listen> element is type='address', it will have an
attribute called 'address' which will contain an IP address or dns
name that the guest's display server should listen on. If, however,
type='network', the <listen> element should have an attribute called
'network' that will be set to the name of a network configuration to
get the IP address from.
* docs/schemas/domain.rng: updated to allow the <listen> element
* docs/formatdomain.html.in: document the <listen> element and its
attributes.
* src/conf/domain_conf.[hc]:
1) The domain parser, formatter, and data structure are modified to
support 0 or more <listen> subelements to each <graphics>
element. The old style "legacy" listen attribute is also still
accepted, and will be stored internally just as if it were a
separate <listen> element. On output (i.e. format), the address
attribute of the first <listen> element of type 'address' will be
duplicated in the legacy "listen" attribute of the <graphic>
element.
2) The "listenAddr" attribute has been removed from the unions in
virDomainGRaphicsDef for graphics types vnc, rdp, and spice.
This attribute is now in the <listen> subelement (aka
virDomainGraphicsListenDef)
3) Helper functions were written to provide simple access
(both Get and Set) to the listen elements and their attributes.
* src/libvirt_private.syms: export the listen helper functions
* src/qemu/qemu_command.c, src/qemu/qemu_hotplug.c,
src/qemu/qemu_migration.c, src/vbox/vbox_tmpl.c,
src/vmx/vmx.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c
Modify all these files to use the listen helper functions rather
than directly referencing the (now missing) listenAddr
attribute. There can be multiple <listen> elements to a single
<graphics>, but the drivers all currently only support one, so all
replacements of direct access with a helper function indicate index
"0".
* tests/* - only 3 of these are new files added explicitly to test the
new <listen> element. All the others have been modified to reflect
the fact that any legacy "listen" attributes passed in to the domain
parse will be saved in a <listen> element (i.e. one of the
virDomainGraphicsListenDefs), and during the domain format function,
both the <listen> element as well as the legacy attributes will be
output.
2011-07-07 12:20:28 +08:00
|
|
|
DO_TEST("graphics-listen-network");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("graphics-vnc");
|
2013-04-30 22:26:43 +08:00
|
|
|
DO_TEST("graphics-vnc-websocket");
|
2009-07-06 21:59:19 +08:00
|
|
|
DO_TEST("graphics-vnc-sasl");
|
|
|
|
DO_TEST("graphics-vnc-tls");
|
2016-04-11 19:05:42 +08:00
|
|
|
DO_TEST("graphics-vnc-no-listen-attr");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("graphics-sdl");
|
2008-12-11 19:44:30 +08:00
|
|
|
DO_TEST("graphics-sdl-fullscreen");
|
2010-03-06 01:12:52 +08:00
|
|
|
DO_TEST("graphics-spice");
|
2011-05-31 21:52:05 +08:00
|
|
|
DO_TEST("graphics-spice-compression");
|
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
|
|
|
DO_TEST("graphics-spice-qxl-vga");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("nographics-vga");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("input-usbmouse");
|
|
|
|
DO_TEST("input-usbtablet");
|
|
|
|
DO_TEST("misc-acpi");
|
2012-08-02 18:18:16 +08:00
|
|
|
DO_TEST("misc-disable-s3");
|
|
|
|
DO_TEST("misc-disable-suspends");
|
|
|
|
DO_TEST("misc-enable-s4");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("misc-no-reboot");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("misc-uuid");
|
2014-07-12 01:47:31 +08:00
|
|
|
DO_TEST("net-vhostuser");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("net-user");
|
2008-04-30 20:30:55 +08:00
|
|
|
DO_TEST("net-virtio");
|
Add txmode attribute to interface XML for virtio backend
This is in response to:
https://bugzilla.redhat.com/show_bug.cgi?id=629662
Explanation
qemu's virtio-net-pci driver allows setting the algorithm used for tx
packets to either "bh" or "timer". This is done by adding ",tx=bh" or
",tx=timer" to the "-device virtio-net-pci" commandline option.
'bh' stands for 'bottom half'; when this is set, packet tx is all done
in an iothread in the bottom half of the driver. (In libvirt, this
option is called the more descriptive "iothread".)
'timer' means that tx work is done in qemu, and if there is more tx
data than can be sent at the present time, a timer is set before qemu
moves on to do other things; when the timer fires, another attempt is
made to send more data. (libvirt retains the name "timer" for this
option.)
The resulting difference, according to the qemu developer who added
the option is:
bh makes tx more asynchronous and reduces latency, but potentially
causes more processor bandwidth contention since the cpu doing the
tx isn't necessarily the cpu where the guest generated the
packets.
Solution
This patch provides a libvirt domain xml knob to change the option on
the qemu commandline, by adding a new attribute "txmode" to the
<driver> element that can be placed inside any <interface> element in
a domain definition. It's use would be something like this:
<interface ...>
...
<model type='virtio'/>
<driver txmode='iothread'/>
...
</interface>
I chose to put this setting as an attribute to <driver> rather than as
a sub-element to <tune> because it is specific to the virtio-net
driver, not something that is generally usable by all network drivers.
(note that this is the same placement as the "driver name=..."
attribute used to choose kernel vs. userland backend for the
virtio-net driver.)
Actually adding the tx=xxx option to the qemu commandline is only done
if the version of qemu being used advertises it in the output of
qemu -device virtio-net-pci,?
If a particular txmode is requested in the XML, and the option isn't
listed in that help output, an UNSUPPORTED_CONFIG error is logged, and
the domain fails to start.
2011-02-04 04:20:01 +08:00
|
|
|
DO_TEST("net-virtio-device");
|
2014-09-11 18:56:31 +08:00
|
|
|
DO_TEST("net-virtio-disable-offloads");
|
2009-01-31 01:17:58 +08:00
|
|
|
DO_TEST("net-eth");
|
|
|
|
DO_TEST("net-eth-ifname");
|
2011-06-26 16:09:00 +08:00
|
|
|
DO_TEST("net-virtio-network-portgroup");
|
2012-02-16 01:37:15 +08:00
|
|
|
DO_TEST("net-hostdev");
|
2013-04-25 19:58:37 +08:00
|
|
|
DO_TEST("net-hostdev-vfio");
|
2015-02-24 04:54:55 +08:00
|
|
|
DO_TEST("net-midonet");
|
2012-08-12 15:51:30 +08:00
|
|
|
DO_TEST("net-openvswitch");
|
2008-07-12 03:34:11 +08:00
|
|
|
DO_TEST("sound");
|
2012-05-16 06:55:11 +08:00
|
|
|
DO_TEST("sound-device");
|
2016-01-08 22:48:06 +08:00
|
|
|
DO_TEST("watchdog");
|
2011-07-22 22:07:29 +08:00
|
|
|
DO_TEST("net-bandwidth");
|
2015-04-14 21:54:42 +08:00
|
|
|
DO_TEST("net-bandwidth2");
|
2008-04-26 04:46:13 +08:00
|
|
|
|
|
|
|
DO_TEST("serial-vc");
|
|
|
|
DO_TEST("serial-pty");
|
|
|
|
DO_TEST("serial-dev");
|
|
|
|
DO_TEST("serial-file");
|
|
|
|
DO_TEST("serial-unix");
|
|
|
|
DO_TEST("serial-tcp");
|
|
|
|
DO_TEST("serial-udp");
|
|
|
|
DO_TEST("serial-tcp-telnet");
|
|
|
|
DO_TEST("serial-many");
|
2014-01-30 19:19:12 +08:00
|
|
|
DO_TEST("serial-spiceport");
|
|
|
|
DO_TEST("serial-spiceport-nospice");
|
2008-04-26 04:46:13 +08:00
|
|
|
DO_TEST("parallel-tcp");
|
|
|
|
DO_TEST("console-compat");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("console-compat2");
|
Allow multiple consoles per virtual guest
While Xen only has a single paravirt console, UML, and
QEMU both support multiple paravirt consoles. The LXC
driver can also be trivially made to support multiple
consoles. This patch extends the XML to allow multiple
<console> elements in the XML. It also makes the UML
and QEMU drivers support this config.
* src/conf/domain_conf.c, src/conf/domain_conf.h: Allow
multiple <console> devices
* src/lxc/lxc_driver.c, src/xen/xen_driver.c,
src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c: Update for
internal API changes
* src/security/security_selinux.c, src/security/virt-aa-helper.c:
Only label consoles that aren't a copy of the serial device
* src/qemu/qemu_command.c, src/qemu/qemu_driver.c,
src/qemu/qemu_process.c, src/uml/uml_conf.c,
src/uml/uml_driver.c: Support multiple console devices
* tests/qemuxml2xmltest.c, tests/qemuxml2argvtest.c: Extra
tests for multiple virtio consoles. Set QEMU_CAPS_CHARDEV
for all console /channel tests
* tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args,
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args
tests/qemuxml2argvdata/qemuxml2argv-console-virtio.args: Update
for correct chardev syntax
* tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.args,
tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml: New
test file
2011-02-24 02:27:23 +08:00
|
|
|
DO_TEST("console-virtio-many");
|
2009-11-05 22:31:03 +08:00
|
|
|
DO_TEST("channel-guestfwd");
|
2010-02-19 00:52:03 +08:00
|
|
|
DO_TEST("channel-virtio");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("channel-virtio-state");
|
2007-07-19 05:34:22 +08:00
|
|
|
|
2008-08-08 22:27:05 +08:00
|
|
|
DO_TEST("hostdev-usb-address");
|
2009-01-12 23:09:19 +08:00
|
|
|
DO_TEST("hostdev-pci-address");
|
2013-04-25 19:58:37 +08:00
|
|
|
DO_TEST("hostdev-vfio");
|
2012-01-25 08:54:12 +08:00
|
|
|
DO_TEST("pci-rom");
|
2015-05-06 23:42:41 +08:00
|
|
|
DO_TEST("pci-serial-dev-chardev");
|
2008-08-08 22:27:05 +08:00
|
|
|
|
2010-04-27 18:01:32 +08:00
|
|
|
DO_TEST("encrypted-disk");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("memtune");
|
|
|
|
DO_TEST("memtune-unlimited");
|
2011-02-08 14:59:38 +08:00
|
|
|
DO_TEST("blkiotune");
|
2011-11-08 19:00:34 +08:00
|
|
|
DO_TEST("blkiotune-device");
|
2011-03-29 21:44:14 +08:00
|
|
|
DO_TEST("cputune");
|
2014-03-04 19:39:46 +08:00
|
|
|
DO_TEST("cputune-zero-shares");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("cputune-iothreadsched");
|
2015-06-24 12:00:36 +08:00
|
|
|
DO_TEST("cputune-iothreadsched-zeropriority");
|
2015-01-22 20:57:22 +08:00
|
|
|
DO_TEST("cputune-numatune");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("vcpu-placement-static", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
2010-04-27 18:01:32 +08:00
|
|
|
|
2010-09-30 05:58:47 +08:00
|
|
|
DO_TEST("smp");
|
2014-08-23 06:15:30 +08:00
|
|
|
DO_TEST("iothreads");
|
2015-04-10 21:21:23 +08:00
|
|
|
DO_TEST("iothreads-ids");
|
|
|
|
DO_TEST("iothreads-ids-partial");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("cputune-iothreads");
|
2014-08-26 03:59:32 +08:00
|
|
|
DO_TEST("iothreads-disk");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("iothreads-disk-virtio-ccw", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("iothreads-virtio-scsi-pci", WHEN_ACTIVE, GIC_NONE,
|
2016-04-20 22:49:21 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("iothreads-virtio-scsi-ccw", WHEN_ACTIVE, GIC_NONE,
|
2016-04-20 22:49:21 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_VIRTIO_CCW,
|
|
|
|
QEMU_CAPS_VIRTIO_S390);
|
2010-12-10 02:25:11 +08:00
|
|
|
DO_TEST("lease");
|
2011-08-13 14:32:45 +08:00
|
|
|
DO_TEST("event_idx");
|
2013-04-10 18:19:37 +08:00
|
|
|
DO_TEST("vhost_queues");
|
2014-08-11 20:51:49 +08:00
|
|
|
DO_TEST("interface-driver");
|
2015-01-29 01:14:22 +08:00
|
|
|
DO_TEST("interface-server");
|
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
|
|
|
DO_TEST("virtio-lun");
|
2010-09-30 05:58:47 +08:00
|
|
|
|
2011-09-02 23:09:14 +08:00
|
|
|
DO_TEST("usb-redir");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("usb-redir-filter");
|
|
|
|
DO_TEST("usb-redir-filter-version");
|
2011-11-15 17:02:50 +08:00
|
|
|
DO_TEST("blkdeviotune");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("controller-usb-order");
|
2011-09-02 23:09:14 +08:00
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("seclabel-dynamic-baselabel", WHEN_INACTIVE, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("seclabel-dynamic-override", WHEN_INACTIVE, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("seclabel-dynamic-labelskip", WHEN_INACTIVE, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("seclabel-dynamic-relabel", WHEN_INACTIVE, GIC_NONE, NONE);
|
2011-12-23 08:47:46 +08:00
|
|
|
DO_TEST("seclabel-static");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("seclabel-static-labelskip", WHEN_ACTIVE, GIC_NONE, NONE);
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("seclabel-none");
|
2014-06-10 16:19:40 +08:00
|
|
|
DO_TEST("seclabel-dac-none");
|
2014-07-09 20:36:04 +08:00
|
|
|
DO_TEST("seclabel-dynamic-none");
|
2015-02-11 00:17:36 +08:00
|
|
|
DO_TEST("seclabel-device-multiple");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("seclabel-dynamic-none-relabel", WHEN_INACTIVE, GIC_NONE, NONE);
|
numad: Set memory policy from numad advisory nodeset
Though numad will manage the memory allocation of task dynamically,
it wants management application (libvirt) to pre-set the memory
policy according to the advisory nodeset returned from querying numad,
(just like pre-bind CPU nodeset for domain process), and thus the
performance could benefit much more from it.
This patch introduces new XML tag 'placement', value 'auto' indicates
whether to set the memory policy with the advisory nodeset from numad,
and its value defaults to the value of <vcpu> placement, or 'static'
if 'nodeset' is specified. Example of the new XML tag's usage:
<numatune>
<memory placement='auto' mode='interleave'/>
</numatune>
Just like what current "numatune" does, the 'auto' numa memory policy
setting uses libnuma's API too.
If <vcpu> "placement" is "auto", and <numatune> is not specified
explicitly, a default <numatume> will be added with "placement"
set as "auto", and "mode" set as "strict".
The following XML can now fully drive numad:
1) <vcpu> placement is 'auto', no <numatune> is specified.
<vcpu placement='auto'>10</vcpu>
2) <vcpu> placement is 'auto', no 'placement' is specified for
<numatune>.
<vcpu placement='auto'>10</vcpu>
<numatune>
<memory mode='interleave'/>
</numatune>
And it's also able to control the CPU placement and memory policy
independently. e.g.
1) <vcpu> placement is 'auto', and <numatune> placement is 'static'
<vcpu placement='auto'>10</vcpu>
<numatune>
<memory mode='strict' nodeset='0-10,^7'/>
</numatune>
2) <vcpu> placement is 'static', and <numatune> placement is 'auto'
<vcpu placement='static' cpuset='0-24,^12'>10</vcpu>
<numatune>
<memory mode='interleave' placement='auto'/>
</numatume>
A follow up patch will change the XML formatting codes to always output
'placement' for <vcpu>, even it's 'static'.
2012-05-09 00:04:34 +08:00
|
|
|
DO_TEST("numad-static-vcpu-no-numatune");
|
2011-12-23 08:47:46 +08:00
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-lun-passthrough-sgio", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_SCSI_CD, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_DISK_WWN);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-disk-vpd", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_SCSI_CD, QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_DISK_WWN);
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("disk-source-pool");
|
2013-07-19 01:18:03 +08:00
|
|
|
DO_TEST("disk-source-pool-mode");
|
2012-12-06 18:23:02 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("disk-drive-discard");
|
2013-05-14 20:44:54 +08:00
|
|
|
|
2013-02-13 00:56:00 +08:00
|
|
|
DO_TEST("virtio-rng-random");
|
|
|
|
DO_TEST("virtio-rng-egd");
|
|
|
|
|
2013-04-25 16:46:04 +08:00
|
|
|
DO_TEST("pseries-nvram");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("pseries-panic-missing");
|
|
|
|
DO_TEST("pseries-panic-no-address");
|
2013-04-25 16:46:04 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("balloon-device-auto");
|
|
|
|
DO_TEST("balloon-device-period");
|
|
|
|
DO_TEST("channel-virtio-auto");
|
|
|
|
DO_TEST("console-compat-auto");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("disk-scsi-device-auto", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("console-virtio");
|
|
|
|
DO_TEST("serial-target-port-auto");
|
|
|
|
DO_TEST("graphics-listen-network2");
|
|
|
|
DO_TEST("graphics-spice-timeout");
|
|
|
|
DO_TEST("numad-auto-vcpu-no-numatune");
|
|
|
|
DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement");
|
|
|
|
DO_TEST("numad-auto-memory-vcpu-cpuset");
|
|
|
|
DO_TEST("usb-ich9-ehci-addr");
|
2016-01-28 05:03:52 +08:00
|
|
|
DO_TEST("disk-copy_on_read");
|
|
|
|
DO_TEST("tpm-passthrough");
|
2016-01-13 23:43:27 +08:00
|
|
|
|
|
|
|
DO_TEST("metadata");
|
|
|
|
DO_TEST("metadata-duplicate");
|
2012-01-24 10:26:18 +08:00
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pci-bridge", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pci-bridge-many-disks", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pci-autoadd-addr", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pci-autoadd-idx", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("q35", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("q35-usb2", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("q35-usb2-multi", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("q35-usb2-reorder", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pcie-root", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pcie-root-port", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pcie-switch-upstream-port", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pcie-switch-downstream-port", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pci-expander-bus", WHEN_ACTIVE, GIC_NONE,
|
2016-03-04 23:26:23 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_PXB);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pcie-expander-bus", WHEN_ACTIVE, GIC_NONE,
|
2016-03-17 01:37:14 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_DEVICE_X3130_UPSTREAM,
|
|
|
|
QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
|
|
|
|
QEMU_CAPS_DEVICE_PXB_PCIE);
|
2016-01-28 05:03:52 +08:00
|
|
|
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-lsi", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-virtio-scsi", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-readonly", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-shareable", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-sgio", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-rawio", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-autogen-address", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-large-unit", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-lsi-iscsi", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-lsi-iscsi-auth", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-virtio-iscsi", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("hostdev-scsi-virtio-iscsi-auth", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
|
|
|
|
QEMU_CAPS_DEVICE_SCSI_GENERIC);
|
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("s390-defaultconsole", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("s390-panic", WHEN_BOTH, GIC_NONE,
|
2016-04-29 21:23:43 +08:00
|
|
|
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("s390-panic-missing", WHEN_BOTH, GIC_NONE,
|
2016-04-29 21:23:43 +08:00
|
|
|
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("s390-panic-no-address", WHEN_BOTH, GIC_NONE,
|
2016-04-29 21:23:43 +08:00
|
|
|
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
2013-06-17 22:17:36 +08:00
|
|
|
|
2013-08-12 19:39:04 +08:00
|
|
|
DO_TEST("pcihole64");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("pcihole64-gib");
|
2013-08-12 19:39:04 +08:00
|
|
|
DO_TEST("pcihole64-none");
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("pcihole64-q35", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 05:03:52 +08:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_Q35_PCI_HOLE64_SIZE);
|
2013-08-12 19:39:04 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("panic");
|
2015-11-24 20:26:32 +08:00
|
|
|
DO_TEST("panic-isa");
|
|
|
|
DO_TEST("panic-pseries");
|
2015-11-24 20:26:36 +08:00
|
|
|
DO_TEST("panic-double");
|
2015-02-26 22:28:07 +08:00
|
|
|
DO_TEST("panic-no-address");
|
2013-12-09 17:11:15 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("disk-backing-chains");
|
2014-04-17 21:37:51 +08:00
|
|
|
|
2014-05-16 20:31:28 +08:00
|
|
|
DO_TEST("chardev-label");
|
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("cpu-numa1");
|
|
|
|
DO_TEST("cpu-numa2");
|
|
|
|
DO_TEST("cpu-numa-no-memory-element");
|
|
|
|
DO_TEST("cpu-numa-disordered");
|
2014-06-17 20:16:59 +08:00
|
|
|
DO_TEST("cpu-numa-disjoint");
|
2014-09-08 17:34:22 +08:00
|
|
|
DO_TEST("cpu-numa-memshared");
|
2014-05-22 15:13:05 +08:00
|
|
|
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("numatune-auto-prefer");
|
|
|
|
DO_TEST("numatune-memnode");
|
2014-07-15 17:39:44 +08:00
|
|
|
DO_TEST("numatune-memnode-no-memory");
|
2014-06-09 21:00:22 +08:00
|
|
|
|
2014-08-06 19:18:53 +08:00
|
|
|
DO_TEST("bios-nvram");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("bios-nvram-os-interleave");
|
2014-08-06 19:18:53 +08:00
|
|
|
|
2014-09-11 23:11:28 +08:00
|
|
|
DO_TEST("tap-vhost");
|
2016-01-13 23:43:27 +08:00
|
|
|
DO_TEST("tap-vhost-incorrect");
|
2014-09-22 16:49:39 +08:00
|
|
|
DO_TEST("shmem");
|
2014-10-24 01:35:57 +08:00
|
|
|
DO_TEST("smbios");
|
2015-05-12 22:47:49 +08:00
|
|
|
DO_TEST("smbios-multiple-type2");
|
2014-09-11 23:11:28 +08:00
|
|
|
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("aarch64-aavmf-virtio-mmio", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 06:47:14 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("aarch64-virtio-pci-default", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 06:47:14 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI);
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("aarch64-virtio-pci-manual-addresses", WHEN_ACTIVE, GIC_NONE,
|
2016-01-28 06:47:14 +08:00
|
|
|
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI);
|
2016-02-03 21:35:41 +08:00
|
|
|
|
|
|
|
DO_TEST("aarch64-gic-none");
|
|
|
|
DO_TEST("aarch64-gic-default");
|
2016-02-03 23:58:20 +08:00
|
|
|
DO_TEST("aarch64-gic-v2");
|
|
|
|
DO_TEST("aarch64-gic-v3");
|
2016-02-03 21:35:41 +08:00
|
|
|
DO_TEST("aarch64-gic-host");
|
2015-09-30 22:36:24 +08:00
|
|
|
|
2014-10-06 20:18:37 +08:00
|
|
|
DO_TEST("memory-hotplug");
|
|
|
|
DO_TEST("memory-hotplug-nonuma");
|
2015-01-09 17:40:37 +08:00
|
|
|
DO_TEST("memory-hotplug-dimm");
|
2015-08-30 04:19:10 +08:00
|
|
|
DO_TEST("net-udp");
|
2014-10-06 20:18:37 +08:00
|
|
|
|
2015-11-25 16:42:32 +08:00
|
|
|
DO_TEST("video-virtio-gpu-device");
|
2015-11-25 16:42:33 +08:00
|
|
|
DO_TEST("video-virtio-gpu-virgl");
|
2016-02-19 22:30:15 +08:00
|
|
|
DO_TEST("video-virtio-gpu-spice-gl");
|
2015-11-13 18:37:12 +08:00
|
|
|
DO_TEST("virtio-input");
|
2015-11-16 16:36:12 +08:00
|
|
|
DO_TEST("virtio-input-passthrough");
|
2015-11-25 16:42:32 +08:00
|
|
|
|
2016-04-26 20:27:16 +08:00
|
|
|
cfg = virQEMUDriverGetConfig(&driver);
|
|
|
|
cfg->vncAutoUnixSocket = true;
|
2016-05-10 17:35:43 +08:00
|
|
|
DO_TEST_FULL("graphics-vnc-autosocket", WHEN_INACTIVE, GIC_NONE, NONE);
|
2016-04-26 20:27:16 +08:00
|
|
|
cfg->vncAutoUnixSocket = false;
|
|
|
|
|
|
|
|
virObjectUnref(cfg);
|
2015-09-15 14:16:02 +08:00
|
|
|
qemuTestDriverFree(&driver);
|
2007-07-19 05:34:22 +08:00
|
|
|
|
2014-03-17 17:38:38 +08:00
|
|
|
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
2007-07-19 05:34:22 +08:00
|
|
|
}
|
|
|
|
|
2008-05-29 23:31:49 +08:00
|
|
|
VIRT_TEST_MAIN(mymain)
|
|
|
|
|
2007-11-26 20:03:34 +08:00
|
|
|
#else
|
|
|
|
|
2011-07-28 23:48:12 +08:00
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
return EXIT_AM_SKIP;
|
|
|
|
}
|
2007-11-26 20:03:34 +08:00
|
|
|
|
|
|
|
#endif /* WITH_QEMU */
|