2008-01-29 18:15:54 +00:00
|
|
|
#include <config.h>
|
2007-11-26 12:03:34 +00:00
|
|
|
|
|
|
|
#include <unistd.h>
|
2007-07-18 21:34:22 +00:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
2013-04-16 13:41:44 +00:00
|
|
|
#include "testutils.h"
|
|
|
|
|
2007-11-26 12:03:34 +00:00
|
|
|
#ifdef WITH_QEMU
|
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
2016-04-13 06:12:47 +00:00
|
|
|
# include "qemu/qemu_domain_address.h"
|
2011-07-11 17:29:09 +00:00
|
|
|
# include "qemu/qemu_domain.h"
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "testutilsqemu.h"
|
2013-04-03 10:36:23 +00:00
|
|
|
# include "virstring.h"
|
2007-07-18 21:34:22 +00:00
|
|
|
|
2013-06-07 15:10:28 +00:00
|
|
|
# define VIR_FROM_THIS VIR_FROM_NONE
|
|
|
|
|
2012-11-28 16:43:10 +00:00
|
|
|
static virQEMUDriver driver;
|
2007-07-18 21:34:22 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
enum {
|
|
|
|
WHEN_INACTIVE = 1,
|
|
|
|
WHEN_ACTIVE = 2,
|
|
|
|
WHEN_BOTH = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct testInfo {
|
|
|
|
char *inName;
|
|
|
|
char *outActiveName;
|
|
|
|
char *outInactiveName;
|
2016-01-08 03:50:05 +00:00
|
|
|
|
2016-07-01 08:30:53 +00:00
|
|
|
virBitmapPtr activeVcpus;
|
2017-09-26 14:37:47 +00:00
|
|
|
bool blockjobs;
|
2016-07-01 08:30:53 +00:00
|
|
|
|
2016-01-08 03:50:05 +00:00
|
|
|
virQEMUCapsPtr qemuCaps;
|
2015-03-23 16:24:43 +00:00
|
|
|
};
|
|
|
|
|
2016-01-27 21:03:52 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
static int
|
|
|
|
testXML2XMLActive(const void *opaque)
|
|
|
|
{
|
|
|
|
const struct testInfo *info = opaque;
|
|
|
|
|
2016-01-08 20:55:44 +00:00
|
|
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
2016-01-27 20:55:01 +00:00
|
|
|
info->inName, info->outActiveName, true,
|
2018-03-02 15:58:50 +00:00
|
|
|
0,
|
2016-04-08 16:04:10 +00:00
|
|
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
2015-03-23 16:24:43 +00:00
|
|
|
}
|
|
|
|
|
2010-07-24 22:18:18 +00:00
|
|
|
|
2011-04-24 22:25:10 +00:00
|
|
|
static int
|
2015-03-23 16:24:43 +00:00
|
|
|
testXML2XMLInactive(const void *opaque)
|
2011-04-24 22:25:10 +00:00
|
|
|
{
|
2015-03-23 16:24:43 +00:00
|
|
|
const struct testInfo *info = opaque;
|
|
|
|
|
2016-01-08 20:55:44 +00:00
|
|
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt, info->inName,
|
2016-01-27 20:55:01 +00:00
|
|
|
info->outInactiveName, false,
|
2018-03-02 15:58:50 +00:00
|
|
|
0,
|
2016-04-08 16:04:10 +00:00
|
|
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
|
2015-03-23 16:24:43 +00:00
|
|
|
}
|
2010-07-24 22:18:18 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2018-03-02 15:47:32 +00:00
|
|
|
static int
|
|
|
|
testCompareStatusXMLToXMLFiles(const void *opaque)
|
|
|
|
{
|
|
|
|
const struct testInfo *data = opaque;
|
|
|
|
virDomainObjPtr obj = NULL;
|
|
|
|
char *actual = NULL;
|
|
|
|
int ret = -1;
|
|
|
|
|
|
|
|
if (!(obj = virDomainObjParseFile(data->inName, driver.caps, driver.xmlopt,
|
|
|
|
VIR_DOMAIN_DEF_PARSE_STATUS |
|
|
|
|
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
|
|
|
|
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
|
|
|
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
|
|
|
|
VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL)))
|
|
|
|
goto cleanup;
|
|
|
|
|
|
|
|
if (!(actual = virDomainObjFormat(driver.xmlopt, obj, NULL,
|
|
|
|
VIR_DOMAIN_DEF_FORMAT_SECURE |
|
|
|
|
VIR_DOMAIN_DEF_FORMAT_STATUS |
|
|
|
|
VIR_DOMAIN_DEF_FORMAT_ACTUAL_NET |
|
|
|
|
VIR_DOMAIN_DEF_FORMAT_PCI_ORIG_STATES |
|
|
|
|
VIR_DOMAIN_DEF_FORMAT_CLOCK_ADJUST)))
|
|
|
|
|
|
|
|
goto cleanup;
|
|
|
|
|
|
|
|
if (virTestCompareToFile(actual, data->outActiveName) < 0)
|
|
|
|
goto cleanup;
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
cleanup:
|
2018-03-26 22:21:59 +00:00
|
|
|
virDomainObjEndAPI(&obj);
|
2018-03-02 15:47:32 +00:00
|
|
|
VIR_FREE(actual);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
static void
|
2018-03-02 14:41:46 +00:00
|
|
|
testInfoClear(struct testInfo *info)
|
2015-03-23 16:24:43 +00:00
|
|
|
{
|
|
|
|
VIR_FREE(info->inName);
|
|
|
|
VIR_FREE(info->outActiveName);
|
|
|
|
VIR_FREE(info->outInactiveName);
|
2016-01-08 03:50:05 +00:00
|
|
|
|
2016-07-01 08:30:53 +00:00
|
|
|
virBitmapFree(info->activeVcpus);
|
|
|
|
info->activeVcpus = NULL;
|
|
|
|
|
2016-01-08 03:50:05 +00:00
|
|
|
virObjectUnref(info->qemuCaps);
|
2015-03-23 16:24:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
2018-03-02 15:47:32 +00:00
|
|
|
testInfoSetCommon(struct testInfo *info,
|
|
|
|
int gic)
|
2015-03-23 16:24:43 +00:00
|
|
|
{
|
2016-01-08 03:50:05 +00:00
|
|
|
if (!(info->qemuCaps = virQEMUCapsNew()))
|
|
|
|
goto error;
|
|
|
|
|
2016-05-10 09:35:43 +00:00
|
|
|
if (testQemuCapsSetGIC(info->qemuCaps, gic) < 0)
|
|
|
|
goto error;
|
|
|
|
|
2017-04-11 12:02:06 +00:00
|
|
|
if (qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps) < 0)
|
2016-01-08 03:50:05 +00:00
|
|
|
goto error;
|
|
|
|
|
2018-03-02 15:47:32 +00:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
|
|
|
testInfoClear(info);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
testInfoSet(struct testInfo *info,
|
|
|
|
const char *name,
|
|
|
|
int when,
|
|
|
|
int gic)
|
|
|
|
{
|
|
|
|
if (testInfoSetCommon(info, gic) < 0)
|
|
|
|
return -1;
|
|
|
|
|
2017-12-01 14:18:49 +00:00
|
|
|
if (virAsprintf(&info->inName, "%s/qemuxml2argvdata/%s.xml",
|
2015-03-23 16:24:43 +00:00
|
|
|
abs_srcdir, name) < 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
if (when & WHEN_INACTIVE) {
|
2016-01-13 15:43:27 +00:00
|
|
|
if (virAsprintf(&info->outInactiveName,
|
2017-12-05 07:00:41 +00:00
|
|
|
"%s/qemuxml2xmloutdata/%s-inactive.xml",
|
2016-01-13 15:43:27 +00:00
|
|
|
abs_srcdir, name) < 0)
|
|
|
|
goto error;
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2016-01-13 15:43:27 +00:00
|
|
|
if (!virFileExists(info->outInactiveName)) {
|
|
|
|
VIR_FREE(info->outInactiveName);
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2016-01-13 15:43:27 +00:00
|
|
|
if (virAsprintf(&info->outInactiveName,
|
2017-12-05 07:00:41 +00:00
|
|
|
"%s/qemuxml2xmloutdata/%s.xml",
|
2016-01-13 15:43:27 +00:00
|
|
|
abs_srcdir, name) < 0)
|
2015-03-23 16:24:43 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-04-17 13:23:21 +00:00
|
|
|
}
|
2013-09-25 14:56:05 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
if (when & WHEN_ACTIVE) {
|
2016-01-13 15:43:27 +00:00
|
|
|
if (virAsprintf(&info->outActiveName,
|
2017-12-05 07:00:41 +00:00
|
|
|
"%s/qemuxml2xmloutdata/%s-active.xml",
|
2016-01-13 15:43:27 +00:00
|
|
|
abs_srcdir, name) < 0)
|
|
|
|
goto error;
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2016-01-13 15:43:27 +00:00
|
|
|
if (!virFileExists(info->outActiveName)) {
|
|
|
|
VIR_FREE(info->outActiveName);
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2016-01-13 15:43:27 +00:00
|
|
|
if (virAsprintf(&info->outActiveName,
|
2017-12-05 07:00:41 +00:00
|
|
|
"%s/qemuxml2xmloutdata/%s.xml",
|
2016-01-13 15:43:27 +00:00
|
|
|
abs_srcdir, name) < 0)
|
2015-03-23 16:24:43 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-04-17 13:23:21 +00:00
|
|
|
}
|
2013-09-25 14:56:05 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
return 0;
|
2010-07-24 22:18:18 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
error:
|
2018-03-02 14:41:46 +00:00
|
|
|
testInfoClear(info);
|
2015-03-23 16:24:43 +00:00
|
|
|
return -1;
|
2007-07-18 21:34:22 +00:00
|
|
|
}
|
|
|
|
|
2018-03-02 15:47:32 +00:00
|
|
|
|
|
|
|
static const char *statusPath = abs_srcdir "/qemustatusxml2xmldata/";
|
|
|
|
|
|
|
|
static int
|
|
|
|
testInfoSetStatus(struct testInfo *info,
|
|
|
|
const char *name,
|
|
|
|
int gic)
|
|
|
|
{
|
|
|
|
if (testInfoSetCommon(info, gic) < 0)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (virAsprintf(&info->inName, "%s%s-in.xml", statusPath, name) < 0 ||
|
|
|
|
virAsprintf(&info->outActiveName, "%s%s-out.xml", statusPath, name) < 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
|
|
|
testInfoClear(info);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-06-01 16:48:52 +00:00
|
|
|
# define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
|
2007-07-18 21:34:22 +00:00
|
|
|
|
2008-05-29 15:31:49 +00:00
|
|
|
static int
|
2011-04-29 16:21:20 +00:00
|
|
|
mymain(void)
|
2007-07-18 21:34:22 +00:00
|
|
|
{
|
|
|
|
int ret = 0;
|
2017-06-01 16:48:52 +00:00
|
|
|
char *fakerootdir;
|
2015-03-23 16:24:43 +00:00
|
|
|
struct testInfo info;
|
2016-04-26 12:27:16 +00:00
|
|
|
virQEMUDriverConfigPtr cfg = NULL;
|
2008-02-27 04:35:08 +00:00
|
|
|
|
2017-06-01 16:48:52 +00:00
|
|
|
if (VIR_STRDUP_QUIET(fakerootdir, FAKEROOTDIRTEMPLATE) < 0) {
|
|
|
|
fprintf(stderr, "Out of memory\n");
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!mkdtemp(fakerootdir)) {
|
|
|
|
fprintf(stderr, "Cannot create fakerootdir");
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
|
|
|
setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, 1);
|
|
|
|
|
2016-07-01 08:30:53 +00:00
|
|
|
memset(&info, 0, sizeof(info));
|
|
|
|
|
2015-09-15 06:16:02 +00:00
|
|
|
if (qemuTestDriverInit(&driver) < 0)
|
2012-03-22 11:33:35 +00:00
|
|
|
return EXIT_FAILURE;
|
2008-02-27 04:35:08 +00:00
|
|
|
|
2016-05-19 08:53:55 +00:00
|
|
|
cfg = virQEMUDriverGetConfig(&driver);
|
|
|
|
|
2017-11-03 12:09:47 +00:00
|
|
|
# define DO_TEST_FULL(name, when, gic, ...) \
|
|
|
|
do { \
|
|
|
|
if (testInfoSet(&info, name, when, gic) < 0) { \
|
|
|
|
VIR_TEST_DEBUG("Failed to generate test data for '%s'", name); \
|
|
|
|
return -1; \
|
|
|
|
} \
|
|
|
|
virQEMUCapsSetList(info.qemuCaps, __VA_ARGS__, QEMU_CAPS_LAST); \
|
|
|
|
\
|
|
|
|
if (info.outInactiveName) { \
|
|
|
|
if (virTestRun("QEMU XML-2-XML-inactive " name, \
|
|
|
|
testXML2XMLInactive, &info) < 0) \
|
|
|
|
ret = -1; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
if (info.outActiveName) { \
|
|
|
|
if (virTestRun("QEMU XML-2-XML-active " name, \
|
|
|
|
testXML2XMLActive, &info) < 0) \
|
|
|
|
ret = -1; \
|
|
|
|
} \
|
2018-03-02 14:41:46 +00:00
|
|
|
testInfoClear(&info); \
|
2010-07-24 22:18:18 +00:00
|
|
|
} while (0)
|
|
|
|
|
2016-01-27 21:19:40 +00:00
|
|
|
# define NONE QEMU_CAPS_LAST
|
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
# define DO_TEST(name, ...) \
|
|
|
|
DO_TEST_FULL(name, WHEN_BOTH, GIC_NONE, __VA_ARGS__)
|
2016-01-27 21:19:40 +00:00
|
|
|
|
|
|
|
|
2010-07-24 22:18:18 +00: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-25 20:46:13 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("minimal", NONE);
|
2018-04-09 16:10:02 +00:00
|
|
|
DO_TEST("genid", NONE);
|
|
|
|
DO_TEST("genid-auto", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("machine-core-on", NONE);
|
|
|
|
DO_TEST("machine-core-off", NONE);
|
2017-06-01 16:36:24 +00:00
|
|
|
DO_TEST("machine-loadparm-multiple-disks-nets-s390", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("default-kvm-host-arch", NONE);
|
|
|
|
DO_TEST("default-qemu-host-arch", NONE);
|
|
|
|
DO_TEST("boot-cdrom", NONE);
|
|
|
|
DO_TEST("boot-network", NONE);
|
|
|
|
DO_TEST("boot-floppy", NONE);
|
2017-02-23 17:47:36 +00:00
|
|
|
DO_TEST("boot-floppy-q35",
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("boot-multi", NONE);
|
|
|
|
DO_TEST("boot-menu-enable-with-timeout", NONE);
|
|
|
|
DO_TEST("boot-menu-disable", NONE);
|
|
|
|
DO_TEST("boot-menu-disable-with-timeout", NONE);
|
|
|
|
DO_TEST("boot-order", NONE);
|
|
|
|
|
|
|
|
DO_TEST("reboot-timeout-enabled", NONE);
|
|
|
|
DO_TEST("reboot-timeout-disabled", NONE);
|
|
|
|
|
|
|
|
DO_TEST("clock-utc", NONE);
|
|
|
|
DO_TEST("clock-localtime", NONE);
|
|
|
|
DO_TEST("cpu-empty", NONE);
|
|
|
|
DO_TEST("cpu-kvmclock", NONE);
|
|
|
|
DO_TEST("cpu-host-kvmclock", NONE);
|
|
|
|
DO_TEST("cpu-host-passthrough-features", NONE);
|
|
|
|
DO_TEST("cpu-host-model-features", NONE);
|
|
|
|
DO_TEST("clock-catchup", NONE);
|
|
|
|
DO_TEST("kvmclock", NONE);
|
|
|
|
DO_TEST("clock-timer-hyperv-rtc", NONE);
|
|
|
|
|
|
|
|
DO_TEST("cpu-eoi-disabled", NONE);
|
|
|
|
DO_TEST("cpu-eoi-enabled", NONE);
|
|
|
|
DO_TEST("eoi-disabled", NONE);
|
|
|
|
DO_TEST("eoi-enabled", NONE);
|
|
|
|
DO_TEST("pv-spinlock-disabled", NONE);
|
|
|
|
DO_TEST("pv-spinlock-enabled", NONE);
|
|
|
|
|
|
|
|
DO_TEST("hyperv", NONE);
|
|
|
|
DO_TEST("hyperv-off", NONE);
|
|
|
|
DO_TEST("hyperv-panic", NONE);
|
|
|
|
|
|
|
|
DO_TEST("kvm-features", NONE);
|
|
|
|
DO_TEST("kvm-features-off", NONE);
|
|
|
|
|
|
|
|
DO_TEST("pmu-feature", NONE);
|
|
|
|
DO_TEST("pmu-feature-off", NONE);
|
|
|
|
|
2018-08-08 10:27:18 +00:00
|
|
|
DO_TEST("pages-discard", NONE);
|
2018-08-09 11:26:53 +00:00
|
|
|
DO_TEST("pages-discard-hugepages", NONE);
|
2018-08-10 11:14:58 +00:00
|
|
|
DO_TEST("pages-dimm-discard", NONE);
|
2018-08-10 10:54:52 +00:00
|
|
|
DO_TEST("hugepages-default", NONE);
|
2018-08-10 11:12:43 +00:00
|
|
|
DO_TEST("hugepages-default-2M", NONE);
|
2018-08-10 11:13:34 +00:00
|
|
|
DO_TEST("hugepages-default-system-size", NONE);
|
2018-08-08 15:03:40 +00:00
|
|
|
DO_TEST("hugepages-nodeset", NONE);
|
2018-08-10 11:08:53 +00:00
|
|
|
DO_TEST("hugepages-numa-default-2M", NONE);
|
2018-08-07 15:00:02 +00:00
|
|
|
DO_TEST("hugepages-numa-default-dimm", NONE);
|
2018-08-10 11:05:50 +00:00
|
|
|
DO_TEST("hugepages-numa-nodeset", NONE);
|
2018-08-10 11:10:29 +00:00
|
|
|
DO_TEST("hugepages-numa-nodeset-part", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("hugepages-shared", NONE);
|
2017-06-06 08:58:37 +00:00
|
|
|
DO_TEST("hugepages-memaccess", NONE);
|
qemu: Prefer hugepages over mem source='file'
https://bugzilla.redhat.com/show_bug.cgi?id=1214369
Consider the following XML:
<memoryBacking>
<hugepages>
<page size='2048' unit='KiB' nodeset='1'/>
</hugepages>
<source type='file'/>
<access mode='shared'/>
</memoryBacking>
<numa>
<cell id='0' cpus='0-3' memory='512000' unit='KiB'/>
<cell id='1' cpus='4-7' memory='512000' unit='KiB'/>
</numa>
The following cmd line is generated:
-object
memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram,
share=yes,size=524288000 -numa node,nodeid=0,cpus=0-3,memdev=ram-node0
-object
memory-backend-file,id=ram-node1,mem-path=/var/lib/libvirt/qemu/ram,
share=yes,size=524288000 -numa node,nodeid=1,cpus=4-7,memdev=ram-node1
This is obviously wrong as for node 1 hugepages should have been
used. The hugepages configuration is more specific than <source
type='file'/>.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2017-06-08 14:45:02 +00:00
|
|
|
DO_TEST("hugepages-memaccess2", NONE);
|
2018-08-09 14:29:17 +00:00
|
|
|
DO_TEST("hugepages-nvdimm", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("nosharepages", NONE);
|
|
|
|
DO_TEST("restore-v2", NONE);
|
|
|
|
DO_TEST("migrate", NONE);
|
|
|
|
DO_TEST("qemu-ns-no-env", NONE);
|
|
|
|
DO_TEST("disk-aio", NONE);
|
|
|
|
DO_TEST("disk-cdrom", NONE);
|
|
|
|
DO_TEST("disk-floppy", NONE);
|
|
|
|
DO_TEST("disk-usb-device", NONE);
|
|
|
|
DO_TEST("disk-virtio", NONE);
|
|
|
|
DO_TEST("floppy-drive-fat", NONE);
|
2018-07-19 08:29:29 +00:00
|
|
|
DO_TEST("disk-virtio-queues", QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES);
|
|
|
|
DO_TEST("disk-boot-disk", NONE);
|
|
|
|
DO_TEST("disk-boot-cdrom", NONE);
|
|
|
|
DO_TEST("disk-error-policy", NONE);
|
|
|
|
DO_TEST("disk-fmt-qcow", NONE);
|
2018-07-19 13:21:40 +00:00
|
|
|
DO_TEST("disk-cache", QEMU_CAPS_SCSI_LSI);
|
2018-07-19 08:29:29 +00:00
|
|
|
DO_TEST("disk-network-nbd", NONE);
|
2018-07-19 13:39:23 +00:00
|
|
|
DO_TEST("disk-network-iscsi", QEMU_CAPS_VIRTIO_SCSI);
|
2018-07-19 08:29:29 +00:00
|
|
|
DO_TEST("disk-network-gluster", NONE);
|
|
|
|
DO_TEST("disk-network-rbd", NONE);
|
|
|
|
DO_TEST("disk-network-source-auth", NONE);
|
|
|
|
DO_TEST("disk-network-sheepdog", NONE);
|
|
|
|
DO_TEST("disk-network-vxhs", NONE);
|
|
|
|
DO_TEST("disk-network-tlsx509", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-device",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("disk-scsi-vscsi", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-virtio-scsi",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-virtio-scsi-num_queues",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2017-11-27 10:54:33 +00:00
|
|
|
DO_TEST("disk-virtio-scsi-reservations",
|
2018-05-11 12:53:54 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_PR_MANAGER_HELPER);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-virtio-scsi-cmd_per_lun",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-virtio-scsi-max_sectors",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-virtio-scsi-ioeventfd",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-megasas",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_SCSI_MEGASAS);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-mptsas1068",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_SCSI_MPTSAS1068,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_SCSI_DISK_WWN);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("disk-mirror-old", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-mirror", NONE);
|
2016-05-10 09:35:43 +00:00
|
|
|
DO_TEST_FULL("disk-active-commit", WHEN_ACTIVE, GIC_NONE, NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("graphics-listen-network", NONE);
|
|
|
|
DO_TEST("graphics-vnc", NONE);
|
|
|
|
DO_TEST("graphics-vnc-websocket", NONE);
|
|
|
|
DO_TEST("graphics-vnc-sasl", NONE);
|
|
|
|
DO_TEST("graphics-vnc-tls", NONE);
|
|
|
|
DO_TEST("graphics-vnc-no-listen-attr", NONE);
|
|
|
|
DO_TEST("graphics-vnc-remove-generated-socket", NONE);
|
2016-05-19 08:53:55 +00:00
|
|
|
cfg->vncAutoUnixSocket = true;
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("graphics-vnc-auto-socket-cfg", NONE);
|
2016-05-19 08:53:55 +00:00
|
|
|
cfg->vncAutoUnixSocket = false;
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("graphics-vnc-socket", NONE);
|
|
|
|
DO_TEST("graphics-vnc-auto-socket", NONE);
|
2018-06-30 14:23:01 +00:00
|
|
|
DO_TEST("graphics-vnc-egl-headless", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
|
|
|
|
DO_TEST("graphics-sdl", NONE);
|
|
|
|
DO_TEST("graphics-sdl-fullscreen", NONE);
|
|
|
|
DO_TEST("graphics-spice", NONE);
|
|
|
|
DO_TEST("graphics-spice-compression", NONE);
|
|
|
|
DO_TEST("graphics-spice-qxl-vga", NONE);
|
|
|
|
DO_TEST("graphics-spice-socket", NONE);
|
|
|
|
DO_TEST("graphics-spice-auto-socket", NONE);
|
2016-05-18 12:11:20 +00:00
|
|
|
cfg->spiceAutoUnixSocket = true;
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("graphics-spice-auto-socket-cfg", NONE);
|
2016-05-18 12:11:20 +00:00
|
|
|
cfg->spiceAutoUnixSocket = false;
|
2018-06-30 14:23:01 +00:00
|
|
|
DO_TEST("graphics-spice-egl-headless", NONE);
|
2016-05-18 12:11:20 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("input-usbmouse", NONE);
|
|
|
|
DO_TEST("input-usbtablet", NONE);
|
|
|
|
DO_TEST("misc-acpi", NONE);
|
|
|
|
DO_TEST("misc-disable-s3", NONE);
|
|
|
|
DO_TEST("misc-disable-suspends", NONE);
|
|
|
|
DO_TEST("misc-enable-s4", NONE);
|
|
|
|
DO_TEST("misc-no-reboot", NONE);
|
|
|
|
DO_TEST("misc-uuid", NONE);
|
|
|
|
DO_TEST("net-vhostuser", NONE);
|
|
|
|
DO_TEST("net-user", NONE);
|
2018-03-28 21:36:13 +00:00
|
|
|
DO_TEST("net-user-addr", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("net-virtio", NONE);
|
|
|
|
DO_TEST("net-virtio-device", NONE);
|
|
|
|
DO_TEST("net-virtio-disable-offloads", NONE);
|
|
|
|
DO_TEST("net-eth", NONE);
|
|
|
|
DO_TEST("net-eth-ifname", NONE);
|
|
|
|
DO_TEST("net-eth-hostip", NONE);
|
|
|
|
DO_TEST("net-virtio-network-portgroup", NONE);
|
2017-07-12 12:19:26 +00:00
|
|
|
DO_TEST("net-virtio-rxtxqueuesize", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("net-hostdev", NONE);
|
2018-09-07 01:09:45 +00:00
|
|
|
DO_TEST("net-hostdev-bootorder", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("net-hostdev-vfio", NONE);
|
|
|
|
DO_TEST("net-midonet", NONE);
|
|
|
|
DO_TEST("net-openvswitch", NONE);
|
|
|
|
DO_TEST("sound", NONE);
|
|
|
|
DO_TEST("sound-device", NONE);
|
|
|
|
DO_TEST("watchdog", NONE);
|
|
|
|
DO_TEST("net-bandwidth", NONE);
|
|
|
|
DO_TEST("net-bandwidth2", NONE);
|
2017-01-23 13:33:20 +00:00
|
|
|
DO_TEST("net-mtu", NONE);
|
2017-04-07 15:46:32 +00:00
|
|
|
DO_TEST("net-coalesce", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2016-06-14 19:52:37 +00:00
|
|
|
DO_TEST("serial-tcp-tlsx509-chardev", NONE);
|
2016-10-24 12:05:54 +00:00
|
|
|
DO_TEST("serial-tcp-tlsx509-chardev-notls", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("serial-spiceport", NONE);
|
|
|
|
DO_TEST("serial-spiceport-nospice", NONE);
|
|
|
|
DO_TEST("console-compat", NONE);
|
|
|
|
DO_TEST("console-compat2", NONE);
|
|
|
|
DO_TEST("console-virtio-many", NONE);
|
|
|
|
DO_TEST("channel-guestfwd", NONE);
|
|
|
|
DO_TEST("channel-virtio", NONE);
|
|
|
|
DO_TEST("channel-virtio-state", NONE);
|
|
|
|
|
2017-05-11 12:09:35 +00:00
|
|
|
DO_TEST_FULL("channel-unix-source-path", WHEN_INACTIVE, GIC_NONE, NONE);
|
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("hostdev-usb-address", NONE);
|
|
|
|
DO_TEST("hostdev-pci-address", NONE);
|
|
|
|
DO_TEST("hostdev-vfio", NONE);
|
2017-01-07 12:27:34 +00:00
|
|
|
DO_TEST("hostdev-mdev-precreated", NONE);
|
2018-05-24 14:04:26 +00:00
|
|
|
DO_TEST("hostdev-mdev-display", QEMU_CAPS_VFIO_PCI_DISPLAY);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("pci-rom", NONE);
|
2018-04-20 15:17:11 +00:00
|
|
|
DO_TEST("pci-rom-disabled", NONE);
|
2018-04-23 11:45:59 +00:00
|
|
|
DO_TEST("pci-rom-disabled-invalid", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("pci-serial-dev-chardev", NONE);
|
|
|
|
|
2018-05-22 12:53:06 +00:00
|
|
|
DO_TEST("encrypted-disk", QEMU_CAPS_QCOW2_LUKS);
|
|
|
|
DO_TEST("encrypted-disk-usage", QEMU_CAPS_QCOW2_LUKS);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("luks-disks", NONE);
|
2017-09-14 13:32:57 +00:00
|
|
|
DO_TEST("luks-disks-source", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("memtune", NONE);
|
|
|
|
DO_TEST("memtune-unlimited", NONE);
|
|
|
|
DO_TEST("blkiotune", NONE);
|
|
|
|
DO_TEST("blkiotune-device", NONE);
|
|
|
|
DO_TEST("cputune", NONE);
|
|
|
|
DO_TEST("cputune-zero-shares", NONE);
|
|
|
|
DO_TEST("cputune-iothreadsched", NONE);
|
|
|
|
DO_TEST("cputune-iothreadsched-zeropriority", NONE);
|
|
|
|
DO_TEST("cputune-numatune", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("vcpu-placement-static",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_OBJECT_IOTHREAD);
|
2010-04-27 10:01:32 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("smp", NONE);
|
|
|
|
DO_TEST("iothreads", NONE);
|
|
|
|
DO_TEST("iothreads-ids", NONE);
|
|
|
|
DO_TEST("iothreads-ids-partial", NONE);
|
|
|
|
DO_TEST("cputune-iothreads", NONE);
|
|
|
|
DO_TEST("iothreads-disk", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("iothreads-disk-virtio-ccw",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("iothreads-virtio-scsi-pci",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("iothreads-virtio-scsi-ccw",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_CCW,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_VIRTIO_S390);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("lease", NONE);
|
|
|
|
DO_TEST("event_idx", NONE);
|
|
|
|
DO_TEST("vhost_queues", NONE);
|
|
|
|
DO_TEST("interface-driver", NONE);
|
|
|
|
DO_TEST("interface-server", NONE);
|
|
|
|
DO_TEST("virtio-lun", NONE);
|
|
|
|
|
2016-07-29 14:09:53 +00:00
|
|
|
DO_TEST("usb-none", NONE);
|
|
|
|
DO_TEST("usb-controller", NONE);
|
|
|
|
DO_TEST("usb-piix3-controller",
|
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI);
|
|
|
|
DO_TEST("usb-controller-default-q35",
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_PCI_OHCI,
|
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI,
|
2016-07-29 14:09:53 +00:00
|
|
|
QEMU_CAPS_NEC_USB_XHCI);
|
|
|
|
DO_TEST("usb-controller-explicit-q35",
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_PCI_OHCI,
|
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI,
|
2016-07-29 14:09:53 +00:00
|
|
|
QEMU_CAPS_NEC_USB_XHCI);
|
|
|
|
DO_TEST("ppc64-usb-controller",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2016-07-29 14:09:53 +00:00
|
|
|
QEMU_CAPS_PCI_OHCI);
|
|
|
|
DO_TEST("ppc64-usb-controller-legacy",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2016-07-29 14:09:53 +00:00
|
|
|
QEMU_CAPS_PIIX3_USB_UHCI);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("usb-port-missing", NONE);
|
|
|
|
DO_TEST("usb-redir", NONE);
|
|
|
|
DO_TEST("usb-redir-filter", NONE);
|
|
|
|
DO_TEST("usb-redir-filter-version", NONE);
|
|
|
|
DO_TEST("blkdeviotune", NONE);
|
2016-09-19 13:52:10 +00:00
|
|
|
DO_TEST("blkdeviotune-max", NONE);
|
2016-10-01 13:01:06 +00:00
|
|
|
DO_TEST("blkdeviotune-group-num", NONE);
|
2016-09-19 10:41:05 +00:00
|
|
|
DO_TEST("blkdeviotune-max-length", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("controller-usb-order", NONE);
|
2011-09-02 15:09:14 +00:00
|
|
|
|
2016-05-10 09:35:43 +00: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);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("seclabel-static", NONE);
|
2016-05-10 09:35:43 +00:00
|
|
|
DO_TEST_FULL("seclabel-static-labelskip", WHEN_ACTIVE, GIC_NONE, NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("seclabel-none", NONE);
|
|
|
|
DO_TEST("seclabel-dac-none", NONE);
|
|
|
|
DO_TEST("seclabel-dynamic-none", NONE);
|
|
|
|
DO_TEST("seclabel-device-multiple", NONE);
|
2016-05-10 09:35:43 +00:00
|
|
|
DO_TEST_FULL("seclabel-dynamic-none-relabel", WHEN_INACTIVE, GIC_NONE, NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("numad-static-vcpu-no-numatune", NONE);
|
2011-12-23 00:47:46 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-lun-passthrough-sgio",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_SCSI_CD, QEMU_CAPS_SCSI_LSI,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN);
|
|
|
|
DO_TEST("disk-scsi-disk-vpd",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_SCSI_CD, QEMU_CAPS_SCSI_LSI,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("disk-source-pool", NONE);
|
|
|
|
DO_TEST("disk-source-pool-mode", NONE);
|
2012-12-06 10:23:02 +00:00
|
|
|
|
2018-07-19 08:29:29 +00:00
|
|
|
DO_TEST("disk-discard", NONE);
|
|
|
|
DO_TEST("disk-detect-zeroes", NONE);
|
2013-05-14 12:44:54 +00:00
|
|
|
|
2017-11-20 11:14:08 +00:00
|
|
|
DO_TEST("disk-serial", NONE);
|
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("virtio-rng-random", NONE);
|
|
|
|
DO_TEST("virtio-rng-egd", NONE);
|
2013-02-12 16:56:00 +00:00
|
|
|
|
2018-02-21 09:18:19 +00:00
|
|
|
DO_TEST("pseries-nvram",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
|
|
|
DO_TEST("pseries-panic-missing",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
|
|
|
DO_TEST("pseries-panic-no-address",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
2013-04-25 08:46:04 +00:00
|
|
|
|
2017-02-20 17:20:26 +00:00
|
|
|
DO_TEST("pseries-phb-simple",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
|
|
|
DO_TEST("pseries-phb-default-missing",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
2017-07-21 08:03:15 +00:00
|
|
|
DO_TEST("pseries-phb-numa-node",
|
|
|
|
QEMU_CAPS_NUMA,
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE);
|
2017-02-20 17:20:26 +00:00
|
|
|
|
2017-05-26 16:33:36 +00:00
|
|
|
DO_TEST("pseries-many-devices",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
|
|
|
DO_TEST("pseries-many-buses-1",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
|
|
|
DO_TEST("pseries-many-buses-2",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
|
|
|
DO_TEST("pseries-hostdevs-1",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
|
|
|
DO_TEST("pseries-hostdevs-2",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
|
|
|
DO_TEST("pseries-hostdevs-3",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
|
|
|
|
2018-03-01 17:13:23 +00:00
|
|
|
DO_TEST("pseries-features",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2018-05-23 16:18:01 +00:00
|
|
|
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE,
|
2018-07-02 08:35:54 +00:00
|
|
|
QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
|
2017-11-06 15:39:58 +00:00
|
|
|
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
|
|
|
|
2017-11-08 14:31:21 +00:00
|
|
|
DO_TEST("pseries-serial-native",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2017-11-08 14:31:21 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_VTY);
|
|
|
|
DO_TEST("pseries-serial+console-native",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2017-11-08 14:31:21 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_VTY);
|
|
|
|
DO_TEST("pseries-serial-compat",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2017-11-08 14:31:21 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_VTY);
|
2017-11-10 16:57:53 +00:00
|
|
|
DO_TEST("pseries-serial-pci",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2017-11-10 16:57:53 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_SERIAL);
|
|
|
|
DO_TEST("pseries-serial-usb",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2017-11-10 16:57:53 +00:00
|
|
|
QEMU_CAPS_DEVICE_QEMU_XHCI,
|
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL);
|
2017-11-08 14:31:21 +00:00
|
|
|
DO_TEST("pseries-console-native",
|
2018-02-21 09:18:19 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2017-11-08 14:31:21 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_VTY);
|
|
|
|
DO_TEST("pseries-console-virtio",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
|
|
|
|
|
|
|
DO_TEST("mach-virt-serial-native", NONE);
|
|
|
|
DO_TEST("mach-virt-serial+console-native", NONE);
|
|
|
|
DO_TEST("mach-virt-serial-compat", NONE);
|
2017-11-09 16:14:57 +00:00
|
|
|
DO_TEST("mach-virt-serial-pci",
|
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_SERIAL);
|
|
|
|
DO_TEST("mach-virt-serial-usb",
|
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
|
|
|
QEMU_CAPS_DEVICE_QEMU_XHCI,
|
|
|
|
QEMU_CAPS_DEVICE_USB_SERIAL);
|
2018-08-30 16:03:58 +00:00
|
|
|
DO_TEST("mach-virt-console-native",
|
|
|
|
QEMU_CAPS_DEVICE_PL011);
|
|
|
|
DO_TEST("mach-virt-console-virtio",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO);
|
2017-11-09 16:14:57 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("balloon-device-auto", NONE);
|
|
|
|
DO_TEST("balloon-device-period", NONE);
|
|
|
|
DO_TEST("channel-virtio-auto", NONE);
|
|
|
|
DO_TEST("console-compat-auto", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-device-auto",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("console-virtio", NONE);
|
|
|
|
DO_TEST("serial-target-port-auto", NONE);
|
|
|
|
DO_TEST("graphics-listen-network2", NONE);
|
|
|
|
DO_TEST("graphics-spice-timeout", NONE);
|
|
|
|
DO_TEST("numad-auto-vcpu-no-numatune", NONE);
|
|
|
|
DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement", NONE);
|
|
|
|
DO_TEST("numad-auto-memory-vcpu-cpuset", NONE);
|
|
|
|
DO_TEST("usb-ich9-ehci-addr", NONE);
|
|
|
|
DO_TEST("disk-copy_on_read", NONE);
|
|
|
|
DO_TEST("tpm-passthrough", NONE);
|
2018-04-26 17:42:16 +00:00
|
|
|
DO_TEST("tpm-passthrough-crb", NONE);
|
2017-04-04 16:22:31 +00:00
|
|
|
DO_TEST("tpm-emulator", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
|
|
|
|
DO_TEST("metadata", NONE);
|
|
|
|
DO_TEST("metadata-duplicate", NONE);
|
2012-01-24 02:26:18 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pci-bridge",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
|
|
|
DO_TEST("pci-many",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pci-bridge-many-disks",
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE);
|
|
|
|
DO_TEST("pci-autoadd-addr",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pci-autoadd-idx",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("pci-autofill-addr", NONE);
|
2016-01-27 21:03:52 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("q35",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("q35-usb2",
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("q35-usb2-multi",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("q35-usb2-reorder",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
qemu: assign virtio devices to PCIe slot when appropriate
libvirt previously assigned nearly all devices to a "hotpluggable"
legacy PCI slot even on machines with a PCIe root bus (and even though
most such machines don't even support hotplug on legacy PCI slots!)
Forcing all devices onto legacy PCI slots means that the domain will
need a dmi-to-pci-bridge (to convert from PCIe to legacy PCI) and a
pci-bridge (to provide hotpluggable legacy PCI slots which, again,
usually aren't hotpluggable anyway).
To help reduce the need for these legacy controllers, this patch tries
to assign virtio-1.0-capable devices to PCIe slots whenever possible,
by setting appropriate connectFlags in
virDomainCalculateDevicePCIConnectFlags(). Happily, when that function
was written (just a few commits ago) it was created with a
"virtioFlags" argument, set by both of its callers, which is the
proper connectFlags to set for any virtio-*-pci device - depending on
the arch/machinetype of the domain, and whether or not the qemu binary
supports virtio-1.0, that flag will have either been set to PCI or
PCIe. This patch merely enables the functionality by setting the flags
for the device to whatever is in virtioFlags if the device is a
virtio-*-pci device.
NB: the first virtio video device will be placed directly on bus 0
slot 1 rather than on a pcie-root-port due to the override for primary
video devices in qemuDomainValidateDevicePCISlotsQ35(). Whether or not
to change that is a topic of discussion, but this patch doesn't change
that particular behavior.
NB2: since the slot must be hotpluggable, and pcie-root (the PCIe root
complex) does *not* support hotplug, this means that suitable
controllers must also be in the config (i.e. either pcie-root-port, or
pcie-downstream-port). For now, libvirt doesn't add those
automatically, so if you put virtio devices in a config for a qemu
that has PCIe-capable virtio devices, you'll need to add extra
pcie-root-ports yourself. That requirement will be eliminated in a
future patch, but for now, it's simple to do this:
<controller type='pci' model='pcie-root-port'/>
<controller type='pci' model='pcie-root-port'/>
<controller type='pci' model='pcie-root-port'/>
...
Partially Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1330024
2016-08-13 22:10:41 +00:00
|
|
|
DO_TEST("q35-pcie",
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
2016-08-14 05:58:11 +00:00
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
qemu: assign virtio devices to PCIe slot when appropriate
libvirt previously assigned nearly all devices to a "hotpluggable"
legacy PCI slot even on machines with a PCIe root bus (and even though
most such machines don't even support hotplug on legacy PCI slots!)
Forcing all devices onto legacy PCI slots means that the domain will
need a dmi-to-pci-bridge (to convert from PCIe to legacy PCI) and a
pci-bridge (to provide hotpluggable legacy PCI slots which, again,
usually aren't hotpluggable anyway).
To help reduce the need for these legacy controllers, this patch tries
to assign virtio-1.0-capable devices to PCIe slots whenever possible,
by setting appropriate connectFlags in
virDomainCalculateDevicePCIConnectFlags(). Happily, when that function
was written (just a few commits ago) it was created with a
"virtioFlags" argument, set by both of its callers, which is the
proper connectFlags to set for any virtio-*-pci device - depending on
the arch/machinetype of the domain, and whether or not the qemu binary
supports virtio-1.0, that flag will have either been set to PCI or
PCIe. This patch merely enables the functionality by setting the flags
for the device to whatever is in virtioFlags if the device is a
virtio-*-pci device.
NB: the first virtio video device will be placed directly on bus 0
slot 1 rather than on a pcie-root-port due to the override for primary
video devices in qemuDomainValidateDevicePCISlotsQ35(). Whether or not
to change that is a topic of discussion, but this patch doesn't change
that particular behavior.
NB2: since the slot must be hotpluggable, and pcie-root (the PCIe root
complex) does *not* support hotplug, this means that suitable
controllers must also be in the config (i.e. either pcie-root-port, or
pcie-downstream-port). For now, libvirt doesn't add those
automatically, so if you put virtio devices in a config for a qemu
that has PCIe-capable virtio devices, you'll need to add extra
pcie-root-ports yourself. That requirement will be eliminated in a
future patch, but for now, it's simple to do this:
<controller type='pci' model='pcie-root-port'/>
<controller type='pci' model='pcie-root-port'/>
<controller type='pci' model='pcie-root-port'/>
...
Partially Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1330024
2016-08-13 22:10:41 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
|
|
|
|
/* same XML as q35-pcie, but don't set
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY */
|
|
|
|
DO_TEST("q35-virtio-pci",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
2016-08-14 05:58:11 +00:00
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
qemu: assign virtio devices to PCIe slot when appropriate
libvirt previously assigned nearly all devices to a "hotpluggable"
legacy PCI slot even on machines with a PCIe root bus (and even though
most such machines don't even support hotplug on legacy PCI slots!)
Forcing all devices onto legacy PCI slots means that the domain will
need a dmi-to-pci-bridge (to convert from PCIe to legacy PCI) and a
pci-bridge (to provide hotpluggable legacy PCI slots which, again,
usually aren't hotpluggable anyway).
To help reduce the need for these legacy controllers, this patch tries
to assign virtio-1.0-capable devices to PCIe slots whenever possible,
by setting appropriate connectFlags in
virDomainCalculateDevicePCIConnectFlags(). Happily, when that function
was written (just a few commits ago) it was created with a
"virtioFlags" argument, set by both of its callers, which is the
proper connectFlags to set for any virtio-*-pci device - depending on
the arch/machinetype of the domain, and whether or not the qemu binary
supports virtio-1.0, that flag will have either been set to PCI or
PCIe. This patch merely enables the functionality by setting the flags
for the device to whatever is in virtioFlags if the device is a
virtio-*-pci device.
NB: the first virtio video device will be placed directly on bus 0
slot 1 rather than on a pcie-root-port due to the override for primary
video devices in qemuDomainValidateDevicePCISlotsQ35(). Whether or not
to change that is a topic of discussion, but this patch doesn't change
that particular behavior.
NB2: since the slot must be hotpluggable, and pcie-root (the PCIe root
complex) does *not* support hotplug, this means that suitable
controllers must also be in the config (i.e. either pcie-root-port, or
pcie-downstream-port). For now, libvirt doesn't add those
automatically, so if you put virtio devices in a config for a qemu
that has PCIe-capable virtio devices, you'll need to add extra
pcie-root-ports yourself. That requirement will be eliminated in a
future patch, but for now, it's simple to do this:
<controller type='pci' model='pcie-root-port'/>
<controller type='pci' model='pcie-root-port'/>
<controller type='pci' model='pcie-root-port'/>
...
Partially Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1330024
2016-08-13 22:10:41 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
|
qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed
Previously libvirt would only add pci-bridge devices automatically
when an address was requested for a device that required a legacy PCI
slot and none was available. This patch expands that support to
dmi-to-pci-bridge (which is needed in order to add a pci-bridge on a
machine with a pcie-root), and pcie-root-port (which is needed to add
a hotpluggable PCIe device). It does *not* automatically add
pcie-switch-upstream-ports or pcie-switch-downstream-ports (and
currently there are no plans for that).
Given the existing code to auto-add pci-bridge devices, automatically
adding pcie-root-ports is fairly straightforward. The
dmi-to-pci-bridge support is a bit tricky though, for a few reasons:
1) Although the only reason to add a dmi-to-pci-bridge is so that
there is a reasonable place to plug in a pci-bridge controller,
most of the time it's not the presence of a pci-bridge *in the
config* that triggers the requirement to add a dmi-to-pci-bridge.
Rather, it is the presence of a legacy-PCI device in the config,
which triggers auto-add of a pci-bridge, which triggers auto-add of
a dmi-to-pci-bridge (this is handled in
virDomainPCIAddressSetGrow() - if there's a request to add a
pci-bridge we'll check if there is a suitable bus to plug it into;
if not, we first add a dmi-to-pci-bridge).
2) Once there is already a single dmi-to-pci-bridge on the system,
there won't be a need for any more, even if it's full, as long as
there is a pci-bridge with an open slot - you can also plug
pci-bridges into existing pci-bridges. So we have to make sure we
don't add a dmi-to-pci-bridge unless there aren't any
dmi-to-pci-bridges *or* any pci-bridges.
3) Although it is strongly discouraged, it is legal for a pci-bridge
to be directly plugged into pcie-root, and we don't want to
auto-add a dmi-to-pci-bridge if there is already a pci-bridge
that's been forced directly into pcie-root.
Although libvirt will now automatically create a dmi-to-pci-bridge
when it's needed, the code still remains for now that forces a
dmi-to-pci-bridge on all domains with pcie-root (in
qemuDomainDefAddDefaultDevices()). That will be removed in a future
patch.
For now, the pcie-root-ports are added one to a slot, which is a bit
wasteful and means it will fail after 31 total PCIe devices (30 if
there are also some PCI devices), but helps keep the changeset down
for this patch. A future patch will have 8 pcie-root-ports sharing the
functions on a single slot.
2016-09-19 18:38:47 +00:00
|
|
|
/* same as q35-pcie, but all PCI controllers are added automatically */
|
|
|
|
DO_TEST("q35-pcie-autoadd",
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
2016-09-19 22:46:41 +00:00
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
|
|
|
|
DO_TEST("q35-default-devices-only",
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed
Previously libvirt would only add pci-bridge devices automatically
when an address was requested for a device that required a legacy PCI
slot and none was available. This patch expands that support to
dmi-to-pci-bridge (which is needed in order to add a pci-bridge on a
machine with a pcie-root), and pcie-root-port (which is needed to add
a hotpluggable PCIe device). It does *not* automatically add
pcie-switch-upstream-ports or pcie-switch-downstream-ports (and
currently there are no plans for that).
Given the existing code to auto-add pci-bridge devices, automatically
adding pcie-root-ports is fairly straightforward. The
dmi-to-pci-bridge support is a bit tricky though, for a few reasons:
1) Although the only reason to add a dmi-to-pci-bridge is so that
there is a reasonable place to plug in a pci-bridge controller,
most of the time it's not the presence of a pci-bridge *in the
config* that triggers the requirement to add a dmi-to-pci-bridge.
Rather, it is the presence of a legacy-PCI device in the config,
which triggers auto-add of a pci-bridge, which triggers auto-add of
a dmi-to-pci-bridge (this is handled in
virDomainPCIAddressSetGrow() - if there's a request to add a
pci-bridge we'll check if there is a suitable bus to plug it into;
if not, we first add a dmi-to-pci-bridge).
2) Once there is already a single dmi-to-pci-bridge on the system,
there won't be a need for any more, even if it's full, as long as
there is a pci-bridge with an open slot - you can also plug
pci-bridges into existing pci-bridges. So we have to make sure we
don't add a dmi-to-pci-bridge unless there aren't any
dmi-to-pci-bridges *or* any pci-bridges.
3) Although it is strongly discouraged, it is legal for a pci-bridge
to be directly plugged into pcie-root, and we don't want to
auto-add a dmi-to-pci-bridge if there is already a pci-bridge
that's been forced directly into pcie-root.
Although libvirt will now automatically create a dmi-to-pci-bridge
when it's needed, the code still remains for now that forces a
dmi-to-pci-bridge on all domains with pcie-root (in
qemuDomainDefAddDefaultDevices()). That will be removed in a future
patch.
For now, the pcie-root-ports are added one to a slot, which is a bit
wasteful and means it will fail after 31 total PCIe devices (30 if
there are also some PCI devices), but helps keep the changeset down
for this patch. A future patch will have 8 pcie-root-ports sharing the
functions on a single slot.
2016-09-19 18:38:47 +00:00
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
2017-01-10 05:20:11 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
|
|
|
|
DO_TEST("q35-multifunction",
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed
Previously libvirt would only add pci-bridge devices automatically
when an address was requested for a device that required a legacy PCI
slot and none was available. This patch expands that support to
dmi-to-pci-bridge (which is needed in order to add a pci-bridge on a
machine with a pcie-root), and pcie-root-port (which is needed to add
a hotpluggable PCIe device). It does *not* automatically add
pcie-switch-upstream-ports or pcie-switch-downstream-ports (and
currently there are no plans for that).
Given the existing code to auto-add pci-bridge devices, automatically
adding pcie-root-ports is fairly straightforward. The
dmi-to-pci-bridge support is a bit tricky though, for a few reasons:
1) Although the only reason to add a dmi-to-pci-bridge is so that
there is a reasonable place to plug in a pci-bridge controller,
most of the time it's not the presence of a pci-bridge *in the
config* that triggers the requirement to add a dmi-to-pci-bridge.
Rather, it is the presence of a legacy-PCI device in the config,
which triggers auto-add of a pci-bridge, which triggers auto-add of
a dmi-to-pci-bridge (this is handled in
virDomainPCIAddressSetGrow() - if there's a request to add a
pci-bridge we'll check if there is a suitable bus to plug it into;
if not, we first add a dmi-to-pci-bridge).
2) Once there is already a single dmi-to-pci-bridge on the system,
there won't be a need for any more, even if it's full, as long as
there is a pci-bridge with an open slot - you can also plug
pci-bridges into existing pci-bridges. So we have to make sure we
don't add a dmi-to-pci-bridge unless there aren't any
dmi-to-pci-bridges *or* any pci-bridges.
3) Although it is strongly discouraged, it is legal for a pci-bridge
to be directly plugged into pcie-root, and we don't want to
auto-add a dmi-to-pci-bridge if there is already a pci-bridge
that's been forced directly into pcie-root.
Although libvirt will now automatically create a dmi-to-pci-bridge
when it's needed, the code still remains for now that forces a
dmi-to-pci-bridge on all domains with pcie-root (in
qemuDomainDefAddDefaultDevices()). That will be removed in a future
patch.
For now, the pcie-root-ports are added one to a slot, which is a bit
wasteful and means it will fail after 31 total PCIe devices (30 if
there are also some PCI devices), but helps keep the changeset down
for this patch. A future patch will have 8 pcie-root-ports sharing the
functions on a single slot.
2016-09-19 18:38:47 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
|
2016-09-20 17:12:55 +00:00
|
|
|
DO_TEST("q35-virt-manager-basic",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_ICH9_DISABLE_S3,
|
|
|
|
QEMU_CAPS_ICH9_DISABLE_S4,
|
2016-09-20 17:12:55 +00:00
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
|
|
|
QEMU_CAPS_NEC_USB_XHCI,
|
|
|
|
QEMU_CAPS_DEVICE_ICH9_INTEL_HDA,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_HDA_DUPLEX,
|
|
|
|
QEMU_CAPS_USB_REDIR);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pcie-root",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
2016-10-11 15:46:39 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2017-03-16 16:41:21 +00:00
|
|
|
|
|
|
|
/* Test automatic and manual setting of pcie-root-port attributes */
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pcie-root-port",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
2016-10-11 15:46:39 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2017-03-16 16:41:21 +00:00
|
|
|
|
|
|
|
/* Make sure the default model for PCIe Root Ports is picked correctly
|
|
|
|
* based on QEMU binary capabilities. We use x86/q35 for the test, but
|
|
|
|
* any PCIe machine type (such as aarch64/virt) will behave the same */
|
|
|
|
DO_TEST("pcie-root-port-model-generic",
|
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
2018-03-28 21:20:45 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420);
|
2017-03-16 16:41:21 +00:00
|
|
|
DO_TEST("pcie-root-port-model-ioh3420",
|
2018-03-28 21:20:45 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420);
|
2017-03-16 16:41:21 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pcie-switch-upstream-port",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_DEVICE_X3130_UPSTREAM,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
2016-10-11 15:46:39 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pcie-switch-downstream-port",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_DEVICE_X3130_UPSTREAM,
|
|
|
|
QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
2016-10-11 15:46:39 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pci-expander-bus",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_PXB);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pcie-expander-bus",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_DEVICE_X3130_UPSTREAM,
|
|
|
|
QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
|
|
|
|
QEMU_CAPS_DEVICE_PXB_PCIE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("autoindex",
|
2017-02-23 17:47:36 +00: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_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_ICH9_USB_EHCI1,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_NEC_USB_XHCI);
|
2016-10-12 15:02:37 +00:00
|
|
|
/* Make sure the user can always override libvirt's default device
|
|
|
|
* placement policy by providing an explicit PCI address */
|
|
|
|
DO_TEST("q35-pci-force-address",
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_HDA_DUPLEX);
|
2016-07-29 13:27:03 +00:00
|
|
|
|
2016-11-22 03:58:20 +00:00
|
|
|
DO_TEST("hostdev-scsi-vhost-scsi-ccw",
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI,
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_CCW);
|
2016-11-22 03:58:20 +00:00
|
|
|
DO_TEST("hostdev-scsi-vhost-scsi-pci",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_VHOST_SCSI);
|
qemu: assign correct type of PCI address for vhost-scsi when using pcie-root
Commit 10c73bf1 fixed a bug that I had introduced back in commit
70249927 - if a vhost-scsi device had no manually assigned PCI
address, one wouldn't be assigned automatically. There was a slight
problem with the logic of the fix though - in the case of domains with
pcie-root (e.g. those with a q35 machinetype),
qemuDomainDeviceCalculatePCIConnectFlags() will attempt to determine
if the host-side PCI device is Express or legacy by examining sysfs
based on the host-side PCI address stored in
hostdev->source.subsys.u.pci.addr, but that part of the union is only
valid for PCI hostdevs, *not* for SCSI hostdevs. So we end up trying
to read sysfs for some probably-non-existent device, which fails, and
the function virPCIDeviceIsPCIExpress() returns failure (-1).
By coincidence, the return value is being examined as a boolean, and
since -1 is true, we still end up assigning the vhost-scsi device to
an Express slot, but that is just by chance (and could fail in the
case that the gibberish in the "hostside PCI address" was the address
of a real device that happened to be legacy PCI).
Since (according to Paolo Bonzini) vhost-scsi devices appear just like
virtio-scsi devices in the guest, they should follow the same rules as
virtio devices when deciding whether they should be placed in an
Express or a legacy slot. That's accomplished in this patch by
returning early with virtioFlags, rather than erroneously using
hostdev->source.subsys.u.pci.addr. It also adds a test case for PCIe
to assure it doesn't get broken in the future.
2017-12-15 16:42:35 +00:00
|
|
|
DO_TEST("hostdev-scsi-vhost-scsi-pcie",
|
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI,
|
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-lsi",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-virtio-scsi",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-readonly",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
|
|
|
|
DO_TEST("hostdev-scsi-shareable",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-sgio",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-rawio",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
|
|
|
|
DO_TEST("hostdev-scsi-autogen-address",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-large-unit",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
|
|
|
|
DO_TEST("hostdev-scsi-lsi-iscsi",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-lsi-iscsi-auth",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-virtio-iscsi",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("hostdev-scsi-virtio-iscsi-auth",
|
2018-09-18 10:29:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_LSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
|
2018-05-07 14:41:14 +00:00
|
|
|
DO_TEST("hostdev-subsys-mdev-vfio-ccw",
|
|
|
|
QEMU_CAPS_CCW,
|
|
|
|
QEMU_CAPS_CCW_CSSID_UNRESTRICTED,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_CCW);
|
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("s390-defaultconsole",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("s390-panic",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("s390-panic-missing",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("s390-panic-no-address",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2017-11-14 15:27:04 +00:00
|
|
|
DO_TEST("s390-serial",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2017-11-14 15:27:04 +00:00
|
|
|
DO_TEST("s390-serial-2",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2017-11-14 15:27:04 +00:00
|
|
|
DO_TEST("s390-serial-console",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
|
2013-06-17 14:17:36 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("pcihole64", NONE);
|
|
|
|
DO_TEST("pcihole64-gib", NONE);
|
|
|
|
DO_TEST("pcihole64-none", NONE);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("pcihole64-q35",
|
qemu: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
2016-07-29 13:27:03 +00:00
|
|
|
QEMU_CAPS_Q35_PCI_HOLE64_SIZE);
|
2013-08-12 11:39:04 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("panic", NONE);
|
|
|
|
DO_TEST("panic-isa", NONE);
|
2018-02-21 09:18:19 +00:00
|
|
|
DO_TEST("panic-pseries",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("panic-double", NONE);
|
|
|
|
DO_TEST("panic-no-address", NONE);
|
2013-12-09 09:11:15 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("disk-backing-chains", NONE);
|
2018-06-19 11:16:54 +00:00
|
|
|
DO_TEST("disk-backing-chains-index", NONE);
|
|
|
|
DO_TEST("disk-backing-chains-noindex", NONE);
|
2014-04-17 13:37:51 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("chardev-label", NONE);
|
2014-05-16 12:31:28 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("cpu-numa1", NONE);
|
|
|
|
DO_TEST("cpu-numa2", NONE);
|
|
|
|
DO_TEST("cpu-numa-no-memory-element", NONE);
|
|
|
|
DO_TEST("cpu-numa-disordered", NONE);
|
|
|
|
DO_TEST("cpu-numa-disjoint", NONE);
|
|
|
|
DO_TEST("cpu-numa-memshared", NONE);
|
2014-05-22 07:13:05 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("numatune-auto-prefer", NONE);
|
|
|
|
DO_TEST("numatune-memnode", NONE);
|
|
|
|
DO_TEST("numatune-memnode-no-memory", NONE);
|
2014-06-09 13:00:22 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("bios-nvram", NONE);
|
|
|
|
DO_TEST("bios-nvram-os-interleave", NONE);
|
2014-08-06 11:18:53 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("tap-vhost", NONE);
|
|
|
|
DO_TEST("tap-vhost-incorrect", NONE);
|
|
|
|
DO_TEST("shmem", NONE);
|
2016-08-19 12:58:35 +00:00
|
|
|
DO_TEST("shmem-plain-doorbell", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("smbios", NONE);
|
|
|
|
DO_TEST("smbios-multiple-type2", NONE);
|
2014-09-11 15:11:28 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("aarch64-aavmf-virtio-mmio",
|
2016-01-27 22:47:14 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("aarch64-virtio-pci-default",
|
2016-10-21 09:50:15 +00:00
|
|
|
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
|
2016-01-27 22:47:14 +00:00
|
|
|
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: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("aarch64-virtio-pci-manual-addresses",
|
2016-01-27 22:47:14 +00:00
|
|
|
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: initially reserve one open pcie-root-port for hotplug
For machinetypes with a pci-root bus (all legacy PCI), libvirt will
make a "fake" reservation for one extra slot prior to assigning
addresses to unaddressed PCI endpoint devices in the domain. This will
trigger auto-adding of a pci-bridge for the final device to be
assigned an address *if that device would have otherwise instead been
the last device on the last available pci-bridge*; thus it assures
that there will always be at least one slot left open in the domain's
bus topology for expansion (which is important both for hotplug (since
a new pci-bridge can't be added while the guest is running) as well as
for offline additions to the config (since adding a new device might
otherwise in some cases require re-addressing existing devices, which
we want to avoid)).
It's important to note that for the above case (legacy PCI), we must
check for the special case of all slots on all buses being occupied
*prior to assigning any addresses*, and avoid attempting to reserve
the extra address in that case, because there is no free address in
the existing topology, so no place to auto-add a pci-bridge for
expansion (i.e. it would always fail anyway). Since that condition can
only be reached by manual intervention, this is acceptable.
For machinetypes with pcie-root (Q35, aarch64 virt), libvirt's
methodology for automatically expanding the bus topology is different
- pcie-root-ports are plugged into slots (soon to be functions) of
pcie-root as needed, and the new endpoint devices are assigned to the
single slot in each pcie-root-port. This is done so that the devices
are, by default, hotpluggable (the slots of pcie-root don't support
hotplug, but the single slot of the pcie-root-port does). Since
pcie-root-ports can only be plugged into pcie-root, and we don't
auto-assign endpoint devices to the pcie-root slots, this means
topology expansion doesn't compete with endpoint devices for slots, so
we don't need to worry about checking for all "useful" slots being
free *prior* to assigning addresses to new endpoint devices - as a
matter of fact, if we attempt to reserve the open slots before the
used slots, it can lead to errors.
Instead this patch just reserves one slot for a "future potential"
PCIe device after doing the assignment for actual devices, but only
if the only PCI controller defined prior to starting address
assignment was pcie-root, and only if we auto-added at least one PCI
controller during address assignment. This assures two things:
1) that reserving the open slots will only be done when the domain is
initially defined, never at any time after, and
2) that if the user understands enough about PCI controllers that they
are adding them manually, that we don't mess up their plan by
adding extras - if they know enough to add one pcie-root-port, or
to manually assign addresses such that no pcie-root-ports are
needed, they know enough to add extra pcie-root-ports if they want
them (this could be called the "libguestfs clause", since
libguestfs needs to be able to create domains with as few
devices/controllers as possible).
This is set to reserve a single free port for now, but could be
increased in the future if public sentiment goes in that direction
(it's easy to increase later, but essentially impossible to decrease)
2016-09-28 00:37:30 +00:00
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
qemu: map "virtio" video model to "virt" machtype correctly (arm/aarch64)
Most of QEMU's PCI display device models, such as:
libvirt video/model/@type QEMU -device
------------------------- ------------
cirrus cirrus-vga
vga VGA
qxl qxl-vga
virtio virtio-vga
come with a linear framebuffer (sometimes called "VGA compatibility
framebuffer"). This linear framebuffer lives in one of the PCI device's
MMIO BARs, and allows guest code (primarily: firmware drivers, and
non-accelerated OS drivers) to display graphics with direct memory access.
Due to architectural reasons on aarch64/KVM hosts, this kind of
framebuffer doesn't / can't work in
qemu-system-(arm|aarch64) -M virt
machines. Cache coherency issues guarantee a corrupted / unusable display.
The problem has been researched by several people, including kvm-arm
maintainers, and it's been decided that the best way (practically the only
way) to have boot time graphics for such guests is to consolidate on
QEMU's "virtio-gpu-pci" device.
>From <https://bugzilla.redhat.com/show_bug.cgi?id=1195176>, libvirt
supports
<devices>
<video>
<model type='virtio'/>
</video>
</devices>
but libvirt unconditionally maps @type='virtio' to QEMU's "virtio-vga"
device model. (See the qemuBuildDeviceVideoStr() function and the
"qemuDeviceVideo" enum impl.)
According to the above, this is not right for the "virt" machine type; the
qemu-system-(arm|aarch64) binaries don't even recognize the "virtio-vga"
device model (justifiedly). Whereas "virtio-gpu-pci", which is a pure
virtio device without a compatibility framebuffer, is available, and works
fine.
(The ArmVirtQemu ("AAVMF") platform of edk2 -- that is, the UEFI firmware
for "virt" -- supports "virtio-gpu-pci", as of upstream commit
3ef3209d3028. See
<https://tianocore.acgmultimedia.com/show_bug.cgi?id=66>.)
Override the default mapping of "virtio", from "virtio-vga" to
"virtio-gpu-pci", if qemuDomainMachineIsVirt() evaluates to true.
Cc: Andrea Bolognani <abologna@redhat.com>
Cc: Drew Jones <drjones@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Martin Kletzander <mkletzan@redhat.com>
Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372901
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Martin Kletzander <mkletzan@redhat.com>
2016-09-16 07:30:23 +00:00
|
|
|
DO_TEST("aarch64-video-virtio-gpu-pci",
|
2018-03-29 10:51:55 +00:00
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
qemu: map "virtio" video model to "virt" machtype correctly (arm/aarch64)
Most of QEMU's PCI display device models, such as:
libvirt video/model/@type QEMU -device
------------------------- ------------
cirrus cirrus-vga
vga VGA
qxl qxl-vga
virtio virtio-vga
come with a linear framebuffer (sometimes called "VGA compatibility
framebuffer"). This linear framebuffer lives in one of the PCI device's
MMIO BARs, and allows guest code (primarily: firmware drivers, and
non-accelerated OS drivers) to display graphics with direct memory access.
Due to architectural reasons on aarch64/KVM hosts, this kind of
framebuffer doesn't / can't work in
qemu-system-(arm|aarch64) -M virt
machines. Cache coherency issues guarantee a corrupted / unusable display.
The problem has been researched by several people, including kvm-arm
maintainers, and it's been decided that the best way (practically the only
way) to have boot time graphics for such guests is to consolidate on
QEMU's "virtio-gpu-pci" device.
>From <https://bugzilla.redhat.com/show_bug.cgi?id=1195176>, libvirt
supports
<devices>
<video>
<model type='virtio'/>
</video>
</devices>
but libvirt unconditionally maps @type='virtio' to QEMU's "virtio-vga"
device model. (See the qemuBuildDeviceVideoStr() function and the
"qemuDeviceVideo" enum impl.)
According to the above, this is not right for the "virt" machine type; the
qemu-system-(arm|aarch64) binaries don't even recognize the "virtio-vga"
device model (justifiedly). Whereas "virtio-gpu-pci", which is a pure
virtio device without a compatibility framebuffer, is available, and works
fine.
(The ArmVirtQemu ("AAVMF") platform of edk2 -- that is, the UEFI firmware
for "virt" -- supports "virtio-gpu-pci", as of upstream commit
3ef3209d3028. See
<https://tianocore.acgmultimedia.com/show_bug.cgi?id=66>.)
Override the default mapping of "virtio", from "virtio-vga" to
"virtio-gpu-pci", if qemuDomainMachineIsVirt() evaluates to true.
Cc: Andrea Bolognani <abologna@redhat.com>
Cc: Drew Jones <drjones@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Martin Kletzander <mkletzan@redhat.com>
Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372901
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Martin Kletzander <mkletzan@redhat.com>
2016-09-16 07:30:23 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420,
|
2018-03-28 21:20:45 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
2018-08-09 11:26:17 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU);
|
2017-06-26 16:10:49 +00:00
|
|
|
DO_TEST("aarch64-pci-serial",
|
|
|
|
QEMU_CAPS_DEVICE_PCI_SERIAL,
|
|
|
|
QEMU_CAPS_CHARDEV_LOGFILE,
|
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT);
|
2018-01-09 17:42:51 +00:00
|
|
|
DO_TEST("aarch64-traditional-pci",
|
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
2018-03-28 10:48:38 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE,
|
2018-01-09 17:42:51 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_SERIAL);
|
2017-08-27 15:04:42 +00:00
|
|
|
DO_TEST("aarch64-video-default",
|
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_VNC);
|
2016-02-03 13:35:41 +00:00
|
|
|
|
2016-05-10 10:36:10 +00:00
|
|
|
DO_TEST_FULL("aarch64-gic-none", WHEN_BOTH, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-v2", WHEN_BOTH, GIC_V2, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-v3", WHEN_BOTH, GIC_V3, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-both", WHEN_BOTH, GIC_BOTH, NONE);
|
2017-05-12 12:05:55 +00:00
|
|
|
DO_TEST_FULL("aarch64-gic-none-tcg", WHEN_BOTH, GIC_BOTH, NONE);
|
2016-05-10 10:36:10 +00:00
|
|
|
DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_NONE, NONE);
|
2018-02-01 17:17:13 +00:00
|
|
|
DO_TEST_FULL("aarch64-gic-default-v2", WHEN_BOTH, GIC_V2, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-default-v3", WHEN_BOTH, GIC_V3, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-default-both", WHEN_BOTH, GIC_BOTH, NONE);
|
2016-05-10 10:36:10 +00:00
|
|
|
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_V2, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_V3, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_BOTH, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_V2, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_V3, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_BOTH, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_NONE, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_V2, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_V3, NONE);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_BOTH, NONE);
|
2015-09-30 14:36:24 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("memory-hotplug", NONE);
|
|
|
|
DO_TEST("memory-hotplug-nonuma", NONE);
|
|
|
|
DO_TEST("memory-hotplug-dimm", NONE);
|
2016-07-28 16:54:18 +00:00
|
|
|
DO_TEST("memory-hotplug-nvdimm", NONE);
|
2016-08-01 12:59:38 +00:00
|
|
|
DO_TEST("memory-hotplug-nvdimm-access", NONE);
|
2017-02-27 10:20:26 +00:00
|
|
|
DO_TEST("memory-hotplug-nvdimm-label", NONE);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("net-udp", NONE);
|
2014-10-06 12:18:37 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("video-virtio-gpu-device", NONE);
|
|
|
|
DO_TEST("video-virtio-gpu-virgl", NONE);
|
|
|
|
DO_TEST("video-virtio-gpu-spice-gl", NONE);
|
2018-05-10 10:53:57 +00:00
|
|
|
DO_TEST("video-virtio-gpu-sdl-gl", NONE);
|
2018-09-05 15:51:24 +00:00
|
|
|
|
|
|
|
DO_TEST("virtio-input",
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET);
|
|
|
|
DO_TEST("virtio-input-passthrough",
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST);
|
2015-11-25 08:42:32 +00:00
|
|
|
|
2017-02-02 13:27:32 +00:00
|
|
|
DO_TEST("memorybacking-set", NONE);
|
|
|
|
DO_TEST("memorybacking-unset", NONE);
|
2018-09-05 15:51:24 +00:00
|
|
|
|
|
|
|
DO_TEST("virtio-options",
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_VIRTIO_INPUT_HOST,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM,
|
|
|
|
QEMU_CAPS_VIRTIO_PCI_ATS);
|
2017-02-02 13:27:32 +00:00
|
|
|
|
2016-04-26 12:27:16 +00:00
|
|
|
virObjectUnref(cfg);
|
2016-04-18 15:13:02 +00:00
|
|
|
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("acpi-table", NONE);
|
2016-04-18 15:13:02 +00:00
|
|
|
|
2017-02-23 17:47:36 +00:00
|
|
|
DO_TEST("video-device-pciaddr-default",
|
|
|
|
QEMU_CAPS_KVM,
|
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2016-07-29 13:13:56 +00:00
|
|
|
DO_TEST("video-qxl-heads", NONE);
|
|
|
|
DO_TEST("video-qxl-noheads", NONE);
|
2016-10-10 18:19:06 +00:00
|
|
|
DO_TEST("video-virtio-gpu-secondary", NONE);
|
2018-03-23 17:22:38 +00:00
|
|
|
DO_TEST("video-virtio-gpu-ccw",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW,
|
2018-03-23 17:22:38 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
|
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
2018-03-23 17:22:40 +00:00
|
|
|
DO_TEST("video-virtio-gpu-ccw-auto",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW,
|
2018-03-23 17:22:40 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
|
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
2018-05-21 12:29:26 +00:00
|
|
|
DO_TEST("video-none-device", NONE);
|
2015-12-11 13:43:10 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("intel-iommu",
|
2017-02-23 17:47:36 +00:00
|
|
|
QEMU_CAPS_DEVICE_INTEL_IOMMU);
|
|
|
|
DO_TEST("intel-iommu-machine",
|
|
|
|
QEMU_CAPS_MACHINE_IOMMU);
|
2017-11-28 21:00:52 +00:00
|
|
|
DO_TEST("intel-iommu-caching-mode",
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420);
|
2017-05-17 15:22:30 +00:00
|
|
|
DO_TEST("intel-iommu-eim", NONE);
|
2017-05-03 15:07:55 +00:00
|
|
|
DO_TEST("intel-iommu-device-iotlb", NONE);
|
2016-06-22 14:28:22 +00:00
|
|
|
|
2017-03-01 15:12:07 +00:00
|
|
|
DO_TEST("cpu-check-none", NONE);
|
|
|
|
DO_TEST("cpu-check-partial", NONE);
|
|
|
|
DO_TEST("cpu-check-full", NONE);
|
|
|
|
DO_TEST("cpu-check-default-none", NONE);
|
|
|
|
DO_TEST("cpu-check-default-none2", NONE);
|
|
|
|
DO_TEST("cpu-check-default-partial", NONE);
|
|
|
|
DO_TEST("cpu-check-default-partial2", NONE);
|
2017-11-16 16:49:38 +00:00
|
|
|
DO_TEST("vmcoreinfo", NONE);
|
2017-03-01 15:12:07 +00:00
|
|
|
|
2017-08-03 12:26:47 +00:00
|
|
|
DO_TEST("smartcard-host", NONE);
|
|
|
|
DO_TEST("smartcard-host-certificates", NONE);
|
2018-06-15 14:45:05 +00:00
|
|
|
DO_TEST("smartcard-host-certificates-database", NONE);
|
2017-08-03 12:26:47 +00:00
|
|
|
DO_TEST("smartcard-passthrough-tcp", NONE);
|
|
|
|
DO_TEST("smartcard-passthrough-spicevmc", NONE);
|
|
|
|
DO_TEST("smartcard-controller", NONE);
|
|
|
|
|
2018-02-21 09:18:19 +00:00
|
|
|
DO_TEST("pseries-cpu-compat-power9",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
|
|
|
DO_TEST("pseries-cpu-compat",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
|
|
|
DO_TEST("pseries-cpu-exact",
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
2017-09-18 07:59:18 +00:00
|
|
|
|
2018-05-23 14:00:33 +00:00
|
|
|
DO_TEST("user-aliases", QEMU_CAPS_QCOW2_LUKS);
|
2018-03-23 17:22:42 +00:00
|
|
|
DO_TEST("input-virtio-ccw",
|
2018-05-07 14:41:11 +00:00
|
|
|
QEMU_CAPS_CCW,
|
2018-03-23 17:22:42 +00:00
|
|
|
QEMU_CAPS_VIRTIO_KEYBOARD,
|
|
|
|
QEMU_CAPS_VIRTIO_MOUSE,
|
|
|
|
QEMU_CAPS_VIRTIO_TABLET,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_KEYBOARD_CCW,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MOUSE_CCW,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW);
|
2017-10-20 14:48:14 +00:00
|
|
|
|
2018-05-10 21:37:18 +00:00
|
|
|
DO_TEST("tseg-explicit-size",
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI,
|
|
|
|
QEMU_CAPS_MACHINE_SMM_OPT,
|
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_MCH_EXTENDED_TSEG_MBYTES);
|
|
|
|
|
2018-03-02 15:47:32 +00:00
|
|
|
# define DO_TEST_STATUS(name) \
|
|
|
|
do { \
|
|
|
|
if (testInfoSetStatus(&info, name, GIC_NONE) < 0) { \
|
|
|
|
VIR_TEST_DEBUG("Failed to generate status test data for '%s'", name); \
|
|
|
|
return -1; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
if (virTestRun("QEMU status XML-2-XML " name, \
|
|
|
|
testCompareStatusXMLToXMLFiles, &info) < 0) \
|
|
|
|
ret = -1; \
|
|
|
|
\
|
|
|
|
testInfoClear(&info); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
DO_TEST_STATUS("blockjob-mirror");
|
|
|
|
DO_TEST_STATUS("vcpus-multi");
|
2018-03-02 16:36:46 +00:00
|
|
|
DO_TEST_STATUS("modern");
|
2018-03-02 16:45:31 +00:00
|
|
|
DO_TEST_STATUS("migration-out-nbd");
|
2018-03-19 13:57:09 +00:00
|
|
|
DO_TEST_STATUS("migration-in-params");
|
|
|
|
DO_TEST_STATUS("migration-out-params");
|
2018-03-12 15:36:24 +00:00
|
|
|
DO_TEST_STATUS("migration-out-nbd-tls");
|
2018-05-28 08:02:54 +00:00
|
|
|
DO_TEST_STATUS("disk-secinfo-upgrade");
|
2018-03-02 15:47:32 +00:00
|
|
|
|
2018-06-04 17:37:20 +00:00
|
|
|
DO_TEST("vhost-vsock", QEMU_CAPS_DEVICE_VHOST_VSOCK);
|
|
|
|
DO_TEST("vhost-vsock-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK);
|
2018-08-06 15:41:07 +00:00
|
|
|
DO_TEST("vhost-vsock-ccw", QEMU_CAPS_DEVICE_VHOST_VSOCK,
|
|
|
|
QEMU_CAPS_CCW);
|
|
|
|
DO_TEST("vhost-vsock-ccw-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK,
|
|
|
|
QEMU_CAPS_CCW);
|
|
|
|
|
2018-08-22 09:15:27 +00:00
|
|
|
DO_TEST("riscv64-virt",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO);
|
2018-05-22 09:21:15 +00:00
|
|
|
|
2017-06-01 16:48:52 +00:00
|
|
|
if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
|
|
|
|
virFileDeleteTree(fakerootdir);
|
|
|
|
|
2015-09-15 06:16:02 +00:00
|
|
|
qemuTestDriverFree(&driver);
|
2017-06-01 16:48:52 +00:00
|
|
|
VIR_FREE(fakerootdir);
|
2007-07-18 21:34:22 +00:00
|
|
|
|
2014-03-17 09:38:38 +00:00
|
|
|
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
2007-07-18 21:34:22 +00:00
|
|
|
}
|
|
|
|
|
2017-06-01 16:48:52 +00:00
|
|
|
VIR_TEST_MAIN_PRELOAD(mymain,
|
2018-04-09 16:10:02 +00:00
|
|
|
abs_builddir "/.libs/virpcimock.so",
|
|
|
|
abs_builddir "/.libs/virrandommock.so")
|
2008-05-29 15:31:49 +00:00
|
|
|
|
2007-11-26 12:03:34 +00:00
|
|
|
#else
|
|
|
|
|
2011-07-28 15:48:12 +00:00
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
return EXIT_AM_SKIP;
|
|
|
|
}
|
2007-11-26 12:03:34 +00:00
|
|
|
|
|
|
|
#endif /* WITH_QEMU */
|