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"
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#include "internal.h"
|
|
|
|
#include "testutilsqemu.h"
|
|
|
|
#include "virfilewrapper.h"
|
|
|
|
#include "configmake.h"
|
2007-11-26 12:03:34 +00:00
|
|
|
|
2021-04-09 13:41:53 +00:00
|
|
|
#define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
|
|
|
#include "qemu/qemu_capspriv.h"
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
2013-06-07 15:10:28 +00:00
|
|
|
|
2012-11-28 16:43:10 +00:00
|
|
|
static virQEMUDriver driver;
|
2022-01-06 11:32:33 +00:00
|
|
|
static virCaps *linuxCaps;
|
|
|
|
static virCaps *macOSCaps;
|
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,
|
|
|
|
};
|
|
|
|
|
2016-01-27 21:03:52 +00:00
|
|
|
|
2021-04-09 13:41:53 +00:00
|
|
|
static int
|
|
|
|
testXML2XMLCommon(const struct testQemuInfo *info)
|
|
|
|
{
|
2022-01-06 11:32:33 +00:00
|
|
|
int rc;
|
|
|
|
|
2021-08-17 13:30:44 +00:00
|
|
|
if (testQemuInfoInitArgs((struct testQemuInfo *) info) < 0)
|
|
|
|
return -1;
|
|
|
|
|
2022-01-06 11:32:33 +00:00
|
|
|
if (info->args.hostOS == HOST_OS_MACOS)
|
|
|
|
driver.caps = macOSCaps;
|
|
|
|
else
|
|
|
|
driver.caps = linuxCaps;
|
|
|
|
|
2021-08-17 13:30:44 +00:00
|
|
|
if (!(info->flags & FLAG_REAL_CAPS))
|
2021-04-09 13:41:53 +00:00
|
|
|
virQEMUCapsInitQMPBasicArch(info->qemuCaps);
|
2021-08-17 13:30:44 +00:00
|
|
|
|
2022-01-06 11:32:33 +00:00
|
|
|
if (info->args.hostOS == HOST_OS_MACOS)
|
|
|
|
rc = qemuTestCapsCacheInsertMacOS(driver.qemuCapsCache, info->qemuCaps);
|
|
|
|
else
|
|
|
|
rc = qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps);
|
|
|
|
if (rc < 0)
|
2021-08-17 13:30:44 +00:00
|
|
|
return -1;
|
2021-04-09 13:41:53 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
static int
|
|
|
|
testXML2XMLActive(const void *opaque)
|
|
|
|
{
|
2019-03-31 16:36:27 +00:00
|
|
|
const struct testQemuInfo *info = opaque;
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2021-08-17 14:35:20 +00:00
|
|
|
if (testXML2XMLCommon(info) < 0 ||
|
|
|
|
testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
|
|
|
info->infile, info->outfile, true,
|
|
|
|
info->parseFlags,
|
|
|
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS) < 0) {
|
2021-04-09 13:41:53 +00:00
|
|
|
return -1;
|
2021-08-17 14:35:20 +00:00
|
|
|
}
|
2021-04-09 13:41:53 +00:00
|
|
|
|
2021-08-17 14:35:20 +00:00
|
|
|
return 0;
|
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
|
|
|
{
|
2019-03-31 16:36:27 +00:00
|
|
|
const struct testQemuInfo *info = opaque;
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2021-08-17 14:35:20 +00:00
|
|
|
if (testXML2XMLCommon(info) < 0 ||
|
|
|
|
testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
|
|
|
info->infile, info->outfile, false,
|
|
|
|
info->parseFlags,
|
|
|
|
TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS) < 0) {
|
2021-04-09 13:41:53 +00:00
|
|
|
return -1;
|
2021-08-17 14:35:20 +00:00
|
|
|
}
|
2021-04-09 13:41:53 +00:00
|
|
|
|
2021-08-17 14:35:20 +00:00
|
|
|
return 0;
|
2015-03-23 16:24:43 +00:00
|
|
|
}
|
2010-07-24 22:18:18 +00:00
|
|
|
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2021-03-26 17:53:32 +00:00
|
|
|
static void
|
2019-03-31 16:36:27 +00:00
|
|
|
testInfoSetPaths(struct testQemuInfo *info,
|
2019-04-15 22:43:32 +00:00
|
|
|
const char *suffix,
|
2019-03-31 16:21:45 +00:00
|
|
|
int when)
|
2018-03-02 15:47:32 +00:00
|
|
|
{
|
2019-03-31 16:33:52 +00:00
|
|
|
VIR_FREE(info->infile);
|
|
|
|
VIR_FREE(info->outfile);
|
|
|
|
|
2019-10-22 13:26:14 +00:00
|
|
|
info->infile = g_strdup_printf("%s/qemuxml2argvdata/%s.xml", abs_srcdir,
|
|
|
|
info->name);
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2019-10-22 13:26:14 +00:00
|
|
|
info->outfile = g_strdup_printf("%s/qemuxml2xmloutdata/%s-%s%s.xml",
|
|
|
|
abs_srcdir, info->name,
|
|
|
|
when == WHEN_ACTIVE ? "active" : "inactive", suffix);
|
2015-03-23 16:24:43 +00:00
|
|
|
|
2019-03-31 16:33:52 +00:00
|
|
|
if (!virFileExists(info->outfile)) {
|
|
|
|
VIR_FREE(info->outfile);
|
2013-09-25 14:56:05 +00:00
|
|
|
|
2019-10-22 13:26:14 +00:00
|
|
|
info->outfile = g_strdup_printf("%s/qemuxml2xmloutdata/%s%s.xml",
|
|
|
|
abs_srcdir, info->name, suffix);
|
2014-04-17 13:23:21 +00:00
|
|
|
}
|
2007-07-18 21:34:22 +00:00
|
|
|
}
|
|
|
|
|
2018-03-02 15:47:32 +00:00
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX"
|
2020-05-07 20:31:04 +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;
|
2020-07-28 19:57:28 +00:00
|
|
|
g_autofree char *fakerootdir = NULL;
|
2020-09-04 06:59:08 +00:00
|
|
|
g_autoptr(virQEMUDriverConfig) cfg = NULL;
|
2021-08-17 14:26:58 +00:00
|
|
|
g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps();
|
2022-07-13 20:26:51 +00:00
|
|
|
g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref);
|
2020-06-25 14:34:30 +00:00
|
|
|
g_autoptr(virConnect) conn = NULL;
|
2021-08-17 14:26:58 +00:00
|
|
|
struct testQemuConf testConf = { .capslatest = capslatest,
|
|
|
|
.capscache = capscache,
|
2021-08-20 14:34:26 +00:00
|
|
|
.qapiSchemaCache = NULL };
|
2019-03-31 20:44:25 +00:00
|
|
|
|
|
|
|
if (!capslatest)
|
|
|
|
return EXIT_FAILURE;
|
2008-02-27 04:35:08 +00:00
|
|
|
|
2021-08-17 14:26:58 +00:00
|
|
|
|
2020-05-07 20:31:04 +00:00
|
|
|
fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
|
|
|
|
|
|
|
|
if (!g_mkdtemp(fakerootdir)) {
|
|
|
|
fprintf(stderr, "Cannot create fakerootdir");
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
|
|
|
g_setenv("LIBVIRT_FAKE_ROOT_DIR", fakerootdir, TRUE);
|
|
|
|
|
2019-08-12 15:06:22 +00:00
|
|
|
/* Required for tpm-emulator tests
|
|
|
|
*/
|
|
|
|
virFileWrapperAddPrefix(SYSCONFDIR "/qemu/firmware",
|
|
|
|
abs_srcdir "/qemufirmwaredata/etc/qemu/firmware");
|
|
|
|
virFileWrapperAddPrefix(PREFIX "/share/qemu/firmware",
|
|
|
|
abs_srcdir "/qemufirmwaredata/usr/share/qemu/firmware");
|
|
|
|
virFileWrapperAddPrefix("/home/user/.config/qemu/firmware",
|
|
|
|
abs_srcdir "/qemufirmwaredata/home/user/.config/qemu/firmware");
|
|
|
|
|
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
|
|
|
|
2022-01-06 11:32:33 +00:00
|
|
|
/* By default, the driver gets a virCaps instance that's suitable for
|
|
|
|
* tests that expect Linux as the host OS. We create another one for
|
|
|
|
* macOS and keep around pointers to both: this allows us to later
|
|
|
|
* pick the appropriate one for each test case */
|
|
|
|
linuxCaps = driver.caps;
|
|
|
|
macOSCaps = testQemuCapsInitMacOS();
|
|
|
|
|
2016-05-19 08:53:55 +00:00
|
|
|
cfg = virQEMUDriverGetConfig(&driver);
|
2020-02-26 11:51:44 +00:00
|
|
|
driver.privileged = true;
|
2016-05-19 08:53:55 +00:00
|
|
|
|
2020-06-25 14:34:30 +00:00
|
|
|
if (!(conn = virGetConnect()))
|
|
|
|
goto cleanup;
|
|
|
|
|
|
|
|
virSetConnectInterface(conn);
|
|
|
|
virSetConnectNetwork(conn);
|
|
|
|
virSetConnectNWFilter(conn);
|
|
|
|
virSetConnectNodeDev(conn);
|
|
|
|
virSetConnectSecret(conn);
|
|
|
|
virSetConnectStorage(conn);
|
|
|
|
|
2021-08-16 15:02:16 +00:00
|
|
|
#define DO_TEST_FULL(_name, suffix, when, ...) \
|
2017-11-03 12:09:47 +00:00
|
|
|
do { \
|
2019-04-15 22:19:19 +00:00
|
|
|
static struct testQemuInfo info = { \
|
|
|
|
.name = _name, \
|
|
|
|
}; \
|
2021-08-17 13:30:44 +00:00
|
|
|
testQemuInfoSetArgs(&info, &testConf, __VA_ARGS__); \
|
2017-11-03 12:09:47 +00:00
|
|
|
\
|
2019-03-31 16:33:52 +00:00
|
|
|
if (when & WHEN_INACTIVE) { \
|
2021-03-26 17:53:32 +00:00
|
|
|
testInfoSetPaths(&info, suffix, WHEN_INACTIVE); \
|
2021-08-20 14:34:26 +00:00
|
|
|
virTestRunLog(&ret, "QEMU XML-2-XML-inactive " _name, testXML2XMLInactive, &info); \
|
2017-11-03 12:09:47 +00:00
|
|
|
} \
|
|
|
|
\
|
2019-03-31 16:33:52 +00:00
|
|
|
if (when & WHEN_ACTIVE) { \
|
2021-03-26 17:53:32 +00:00
|
|
|
testInfoSetPaths(&info, suffix, WHEN_ACTIVE); \
|
2021-08-20 14:34:26 +00:00
|
|
|
virTestRunLog(&ret, "QEMU XML-2-XML-active " _name, testXML2XMLActive, &info); \
|
2017-11-03 12:09:47 +00:00
|
|
|
} \
|
2019-03-31 16:36:27 +00:00
|
|
|
testQemuInfoClear(&info); \
|
2010-07-24 22:18:18 +00:00
|
|
|
} while (0)
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_INTERNAL(name, arch, ver, ...) \
|
2021-08-16 15:02:16 +00:00
|
|
|
DO_TEST_FULL(name, "." arch "-" ver, WHEN_BOTH, \
|
|
|
|
ARG_CAPS_ARCH, arch, \
|
|
|
|
ARG_CAPS_VER, ver, \
|
|
|
|
__VA_ARGS__, \
|
|
|
|
ARG_END)
|
2019-04-15 22:43:32 +00:00
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \
|
2019-04-15 22:43:32 +00:00
|
|
|
DO_TEST_CAPS_INTERNAL(name, arch, "latest", __VA_ARGS__)
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \
|
2019-07-02 15:35:33 +00:00
|
|
|
DO_TEST_CAPS_INTERNAL(name, arch, ver, __VA_ARGS__)
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_ARCH_LATEST(name, arch) \
|
2019-04-15 22:43:32 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ARG_END)
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \
|
2019-07-02 15:35:33 +00:00
|
|
|
DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ARG_END)
|
2019-07-02 15:33:31 +00:00
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_LATEST(name) \
|
2019-04-15 22:43:32 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST(name, "x86_64")
|
2016-01-27 21:19:40 +00:00
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST_CAPS_VER(name, ver) \
|
2019-07-02 15:33:31 +00:00
|
|
|
DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver)
|
|
|
|
|
2020-10-05 15:52:29 +00:00
|
|
|
#define DO_TEST(name, ...) \
|
2021-08-16 15:02:16 +00:00
|
|
|
DO_TEST_FULL(name, "", WHEN_BOTH, \
|
|
|
|
ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END)
|
2021-08-17 08:35:53 +00:00
|
|
|
#define DO_TEST_NOCAPS(name) \
|
|
|
|
DO_TEST_FULL(name, "", WHEN_BOTH, ARG_END)
|
2019-07-02 15:33:31 +00:00
|
|
|
|
2022-01-06 11:32:33 +00:00
|
|
|
#define DO_TEST_MACOS(name, ...) \
|
|
|
|
DO_TEST_FULL(name, "", WHEN_BOTH, \
|
|
|
|
ARG_HOST_OS, HOST_OS_MACOS, \
|
|
|
|
ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END)
|
|
|
|
|
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 */
|
2019-12-18 17:16:19 +00:00
|
|
|
g_setenv("PATH", "/bin", TRUE);
|
2021-04-01 16:57:36 +00:00
|
|
|
g_unsetenv("QEMU_AUDIO_DRV");
|
|
|
|
g_unsetenv("SDL_AUDIODRIVER");
|
2008-04-25 20:46:13 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("minimal");
|
2019-04-15 23:00:46 +00:00
|
|
|
DO_TEST_CAPS_LATEST("genid");
|
|
|
|
DO_TEST_CAPS_LATEST("genid-auto");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("machine-core-on");
|
|
|
|
DO_TEST_NOCAPS("machine-core-off");
|
2022-05-13 14:00:09 +00:00
|
|
|
DO_TEST_CAPS_LATEST("machine-smm-on");
|
2022-05-13 14:05:26 +00:00
|
|
|
DO_TEST_CAPS_LATEST("machine-smm-off");
|
2022-09-30 12:01:44 +00:00
|
|
|
DO_TEST_NOCAPS("machine-loadparm-multiple-disks-nets-s390");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("default-kvm-host-arch");
|
|
|
|
DO_TEST_NOCAPS("default-qemu-host-arch");
|
|
|
|
DO_TEST_NOCAPS("boot-cdrom");
|
|
|
|
DO_TEST_NOCAPS("boot-network");
|
|
|
|
DO_TEST_NOCAPS("boot-floppy");
|
2017-02-23 17:47:36 +00:00
|
|
|
DO_TEST("boot-floppy-q35",
|
|
|
|
QEMU_CAPS_DEVICE_IOH3420,
|
|
|
|
QEMU_CAPS_ICH9_AHCI);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("boot-multi");
|
2021-08-09 11:15:11 +00:00
|
|
|
DO_TEST_NOCAPS("boot-menu-enable-with-timeout");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("boot-menu-disable");
|
|
|
|
DO_TEST_NOCAPS("boot-menu-disable-with-timeout");
|
|
|
|
DO_TEST_NOCAPS("boot-order");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-09 08:02:06 +00:00
|
|
|
DO_TEST_NOCAPS("reboot-timeout-enabled");
|
|
|
|
DO_TEST_NOCAPS("reboot-timeout-disabled");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("clock-utc");
|
|
|
|
DO_TEST_NOCAPS("clock-localtime");
|
|
|
|
DO_TEST_NOCAPS("cpu-empty");
|
|
|
|
DO_TEST_NOCAPS("cpu-kvmclock");
|
|
|
|
DO_TEST_NOCAPS("cpu-host-kvmclock");
|
|
|
|
DO_TEST_NOCAPS("cpu-host-passthrough-features");
|
|
|
|
DO_TEST_NOCAPS("cpu-host-model-features");
|
|
|
|
DO_TEST_NOCAPS("cpu-host-model-vendor");
|
2019-12-09 23:15:21 +00:00
|
|
|
DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("kvmclock");
|
|
|
|
DO_TEST_NOCAPS("clock-timer-hyperv-rtc");
|
2020-02-07 12:11:42 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("clock-timer-armvtimer", "aarch64");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("clock-realtime");
|
2022-04-26 15:00:36 +00:00
|
|
|
DO_TEST_CAPS_LATEST("clock-absolute");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("cpu-eoi-disabled");
|
|
|
|
DO_TEST_NOCAPS("cpu-eoi-enabled");
|
|
|
|
DO_TEST_NOCAPS("eoi-disabled");
|
|
|
|
DO_TEST_NOCAPS("eoi-enabled");
|
|
|
|
DO_TEST_NOCAPS("pv-spinlock-disabled");
|
|
|
|
DO_TEST_NOCAPS("pv-spinlock-enabled");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("hyperv");
|
|
|
|
DO_TEST_NOCAPS("hyperv-off");
|
|
|
|
DO_TEST_NOCAPS("hyperv-panic");
|
2021-11-25 18:57:49 +00:00
|
|
|
DO_TEST_NOCAPS("hyperv-passthrough");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("hyperv-stimer-direct");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("kvm-features");
|
|
|
|
DO_TEST_NOCAPS("kvm-features-off");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("pmu-feature");
|
|
|
|
DO_TEST_NOCAPS("pmu-feature-off");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("pages-discard");
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("pages-discard-hugepages", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2020-07-28 08:51:32 +00:00
|
|
|
DO_TEST("pages-dimm-discard", QEMU_CAPS_DEVICE_PC_DIMM);
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("hugepages-default", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
|
|
|
DO_TEST("hugepages-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2020-01-13 08:39:22 +00:00
|
|
|
DO_TEST("hugepages-default-system-size", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("hugepages-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
|
|
|
DO_TEST("hugepages-numa-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2020-07-28 08:51:32 +00:00
|
|
|
DO_TEST("hugepages-numa-default-dimm", QEMU_CAPS_DEVICE_PC_DIMM,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("hugepages-numa-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
|
|
|
DO_TEST("hugepages-numa-nodeset-part", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
|
|
|
DO_TEST("hugepages-shared", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2020-07-28 08:51:32 +00:00
|
|
|
DO_TEST("hugepages-memaccess", QEMU_CAPS_DEVICE_PC_DIMM,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
|
|
|
DO_TEST("hugepages-memaccess2", QEMU_CAPS_DEVICE_PC_DIMM,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("hugepages-nvdimm", QEMU_CAPS_DEVICE_NVDIMM,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("nosharepages");
|
|
|
|
DO_TEST_NOCAPS("restore-v2");
|
|
|
|
DO_TEST_NOCAPS("migrate");
|
|
|
|
DO_TEST_NOCAPS("qemu-ns-no-env");
|
2021-03-15 15:35:52 +00:00
|
|
|
DO_TEST_CAPS_LATEST("qemu-ns");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-aio");
|
2020-04-21 12:19:37 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-aio-io_uring");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-cdrom");
|
2019-10-15 13:19:58 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-cdrom-empty-network-invalid");
|
2022-04-20 07:26:57 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-cdrom-network");
|
2020-10-08 19:35:58 +00:00
|
|
|
DO_TEST("disk-cdrom-bus-other", QEMU_CAPS_DEVICE_USB_STORAGE);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-floppy");
|
2020-10-08 19:35:58 +00:00
|
|
|
DO_TEST("disk-usb-device", QEMU_CAPS_DEVICE_USB_STORAGE);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-virtio");
|
|
|
|
DO_TEST_NOCAPS("floppy-drive-fat");
|
2021-09-09 03:34:44 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-virtio-queues");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-boot-disk");
|
|
|
|
DO_TEST_NOCAPS("disk-boot-cdrom");
|
|
|
|
DO_TEST_NOCAPS("disk-error-policy");
|
2021-05-21 12:13:50 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-transient");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-fmt-qcow");
|
2020-01-22 16:15:35 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-cache");
|
2021-01-06 17:20:22 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-metadata-cache");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-network-nbd");
|
2020-10-08 16:02:12 +00:00
|
|
|
DO_TEST("disk-network-iscsi", QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_SCSI_BLOCK);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-network-gluster");
|
|
|
|
DO_TEST_NOCAPS("disk-network-rbd");
|
2021-10-24 09:51:29 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-network-rbd-encryption");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-network-source-auth");
|
|
|
|
DO_TEST_NOCAPS("disk-network-sheepdog");
|
|
|
|
DO_TEST_NOCAPS("disk-network-vxhs");
|
2021-01-06 21:32:32 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-network-nfs");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-network-tlsx509-nbd");
|
2022-03-10 09:05:53 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-network-tlsx509-nbd-hostname");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-network-tlsx509-vxhs");
|
2022-07-15 14:35:27 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-nvme");
|
2021-01-25 17:13:29 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-vhostuser");
|
2020-05-13 01:55:47 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-scsi");
|
2017-11-27 10:54:33 +00:00
|
|
|
DO_TEST("disk-virtio-scsi-reservations",
|
2020-10-08 16:02:12 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI,
|
|
|
|
QEMU_CAPS_PR_MANAGER_HELPER,
|
|
|
|
QEMU_CAPS_SCSI_BLOCK);
|
2019-01-28 09:47:21 +00:00
|
|
|
DO_TEST("controller-virtio-scsi", QEMU_CAPS_VIRTIO_SCSI);
|
2018-11-08 11:00:26 +00:00
|
|
|
DO_TEST("disk-virtio-s390-zpci",
|
2022-09-30 12:01:44 +00:00
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-mirror-old");
|
|
|
|
DO_TEST_NOCAPS("disk-mirror");
|
|
|
|
DO_TEST_NOCAPS("disk-active-commit");
|
2019-12-09 23:15:26 +00:00
|
|
|
DO_TEST("graphics-listen-network",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc-websocket",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc-sasl",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc-tls",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc-no-listen-attr",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc-remove-generated-socket",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
2016-05-19 08:53:55 +00:00
|
|
|
cfg->vncAutoUnixSocket = true;
|
2019-12-09 23:15:26 +00:00
|
|
|
DO_TEST("graphics-vnc-auto-socket-cfg",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
2016-05-19 08:53:55 +00:00
|
|
|
cfg->vncAutoUnixSocket = false;
|
2019-12-09 23:15:26 +00:00
|
|
|
DO_TEST("graphics-vnc-socket",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("graphics-vnc-auto-socket",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
2018-12-07 13:53:46 +00:00
|
|
|
DO_TEST("graphics-vnc-egl-headless",
|
2019-12-09 23:15:26 +00:00
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2021-06-15 09:46:54 +00:00
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_EGL_HEADLESS);
|
2019-10-18 15:30:11 +00:00
|
|
|
|
2022-05-13 18:38:11 +00:00
|
|
|
DO_TEST("graphics-dbus",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_DISPLAY_DBUS);
|
|
|
|
DO_TEST("graphics-dbus-address",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_DISPLAY_DBUS);
|
|
|
|
DO_TEST("graphics-dbus-p2p",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_DISPLAY_DBUS);
|
2022-05-13 18:38:15 +00:00
|
|
|
DO_TEST("graphics-dbus-audio",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2022-06-22 14:14:47 +00:00
|
|
|
QEMU_CAPS_DISPLAY_DBUS);
|
2022-05-13 18:38:17 +00:00
|
|
|
DO_TEST("graphics-dbus-chardev",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_DISPLAY_DBUS);
|
2022-05-13 18:38:11 +00:00
|
|
|
|
2019-11-25 10:54:26 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("default-video-type-aarch64", "aarch64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("default-video-type-ppc64", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("default-video-type-riscv64", "riscv64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("default-video-type-s390x", "s390x");
|
2019-12-09 23:15:27 +00:00
|
|
|
DO_TEST("default-video-type-x86_64-caps-test-0",
|
|
|
|
QEMU_CAPS_DEVICE_VGA,
|
|
|
|
QEMU_CAPS_SPICE);
|
|
|
|
DO_TEST("default-video-type-x86_64-caps-test-1",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_SPICE);
|
2019-11-25 10:54:26 +00:00
|
|
|
|
2021-06-15 09:46:54 +00:00
|
|
|
DO_TEST("graphics-sdl", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_SDL);
|
|
|
|
DO_TEST("graphics-sdl-fullscreen", QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_SDL);
|
2019-12-09 23:15:27 +00:00
|
|
|
|
|
|
|
cfg->spiceTLS = true;
|
2021-10-13 15:03:33 +00:00
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice");
|
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-compression");
|
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-qxl-vga");
|
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-socket");
|
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-auto-socket");
|
2016-05-18 12:11:20 +00:00
|
|
|
cfg->spiceAutoUnixSocket = true;
|
2021-10-13 15:03:33 +00:00
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-auto-socket-cfg");
|
2016-05-18 12:11:20 +00:00
|
|
|
cfg->spiceAutoUnixSocket = false;
|
2019-12-09 23:15:27 +00:00
|
|
|
cfg->spiceTLS = false;
|
2021-10-13 15:03:33 +00:00
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-egl-headless");
|
|
|
|
DO_TEST_CAPS_LATEST("graphics-spice-timeout");
|
2016-05-18 12:11:20 +00:00
|
|
|
|
2018-12-07 13:53:46 +00:00
|
|
|
DO_TEST("graphics-egl-headless-rendernode",
|
2019-10-18 15:30:11 +00:00
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2019-11-25 10:54:24 +00:00
|
|
|
QEMU_CAPS_EGL_HEADLESS_RENDERNODE,
|
2021-06-15 09:46:54 +00:00
|
|
|
QEMU_CAPS_EGL_HEADLESS);
|
2018-11-27 07:23:13 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("input-usbmouse");
|
|
|
|
DO_TEST_NOCAPS("input-usbtablet");
|
|
|
|
DO_TEST_NOCAPS("misc-acpi");
|
2019-12-09 23:15:22 +00:00
|
|
|
DO_TEST("misc-disable-s3", QEMU_CAPS_PIIX_DISABLE_S3);
|
2021-10-11 12:46:46 +00:00
|
|
|
DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-disable");
|
|
|
|
DO_TEST_CAPS_LATEST("pc-i440fx-acpi-root-hotplug-enable");
|
2019-12-09 23:15:22 +00:00
|
|
|
DO_TEST("misc-disable-suspends",
|
|
|
|
QEMU_CAPS_PIIX_DISABLE_S3,
|
|
|
|
QEMU_CAPS_PIIX_DISABLE_S4);
|
|
|
|
DO_TEST("misc-enable-s4", QEMU_CAPS_PIIX_DISABLE_S4);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("misc-no-reboot");
|
|
|
|
DO_TEST_NOCAPS("misc-uuid");
|
|
|
|
DO_TEST_NOCAPS("net-vhostuser");
|
|
|
|
DO_TEST_NOCAPS("net-user");
|
|
|
|
DO_TEST_NOCAPS("net-user-addr");
|
|
|
|
DO_TEST_NOCAPS("net-virtio");
|
2022-08-11 13:30:23 +00:00
|
|
|
DO_TEST_NOCAPS("net-virtio-device");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("net-virtio-disable-offloads");
|
|
|
|
DO_TEST_NOCAPS("net-eth");
|
|
|
|
DO_TEST_NOCAPS("net-eth-ifname");
|
|
|
|
DO_TEST_NOCAPS("net-eth-hostip");
|
|
|
|
DO_TEST_NOCAPS("net-eth-unmanaged-tap");
|
|
|
|
DO_TEST_NOCAPS("net-virtio-network-portgroup");
|
2020-10-09 14:08:49 +00:00
|
|
|
DO_TEST("net-virtio-rxtxqueuesize",
|
2020-10-09 14:14:00 +00:00
|
|
|
QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE,
|
|
|
|
QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE);
|
2020-01-22 21:24:10 +00:00
|
|
|
DO_TEST("net-virtio-teaming",
|
|
|
|
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
|
|
|
DO_TEST("net-virtio-teaming-network",
|
conf: parse/format <teaming> element in plain <hostdev>
The <teaming> element in <interface> allows pairing two interfaces
together as a simple "failover bond" network device in a guest. One of
the devices is the "transient" interface - it will be preferred for
all network traffic when it is present, but may be removed when
necessary, in particular during migration, when traffic will instead
go through the other interface of the pair - the "persistent"
interface. As it happens, in the QEMU implementation of this teaming
pair (called "virtio failover" in QEMU) the transient interface is
always a host network device assigned to the guest using VFIO (aka
"hostdev"); the persistent interface is always an emulated virtio NIC.
When support was initially added for <teaming>, it was written to
require that the transient/hostdev device be defined using <interface
type='hostdev'>; this was done because the virtio failover
implementation in QEMU and the virtio guest driver demands that the
two interfaces in the pair have matching MAC addresses, and the only
way libvirt can guarantee the MAC address of a hostdev network device
is to use <interface type='hostdev'>, whose main purpose is to
configure the device's MAC address before handing the device to
QEMU. (note that <interface type='hostdev'> in turn requires that the
network device be an SRIOV VF (Virtual Function), as that is the only
type of network device whose MAC address we can set in a way that will
survive the device's driver init in the guest).
It has recently come up that some users are unable to use <teaming>
because they are running in a container environment where libvirt
doesn't have the necessary privileges or resources to set the VF's MAC
address (because setting the VF MAC is done via the same device's PF
(Physical Function), and the PF is not exposed to libvirt's container).
At the same time, these users *are* able to set the VF's MAC address
themselves in advance of staring up libvirt in the container. So they
could theoretically use the <teaming> feature if libvirt just skipped
the "setting the MAC address" part.
Fortunately, that is *exactly* the difference between <interface
type='hostdev'> (which must be a "hostdev VF") and <hostdev> (a "plain
hostdev" - it could be *any* PCI device; libvirt doesn't know what type
of PCI device it is, and doesn't care).
But what is still needed is for libvirt to provide a small bit of
information on the QEMU commandline argument for the hostdev, telling
QEMU that this device will be part of a team ("failover pair"), and
the id of the other device in the pair.
To make both of those goals simultaneously possible, this patch adds
support for the <teaming> element to plain <hostdev> - libvirt doesn't
try to set any MAC addresses, and QEMU gets the extra commandline
argument it needs)
(actually, this patch adds only the parsing/formatting of the
<teaming> element in <hostdev>. The next patch will actually wire that
into the qemu driver.)
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-02-11 05:58:29 +00:00
|
|
|
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
|
|
|
DO_TEST("net-virtio-teaming-hostdev",
|
2020-01-22 21:24:10 +00:00
|
|
|
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
2020-01-29 15:29:21 +00:00
|
|
|
DO_TEST_CAPS_LATEST("net-isolated-port");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("net-hostdev");
|
|
|
|
DO_TEST_NOCAPS("net-hostdev-bootorder");
|
2019-12-09 23:15:18 +00:00
|
|
|
DO_TEST("net-hostdev-vfio", QEMU_CAPS_DEVICE_VFIO_PCI);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("net-midonet");
|
|
|
|
DO_TEST_NOCAPS("net-openvswitch");
|
|
|
|
DO_TEST_NOCAPS("sound");
|
2019-12-09 23:15:14 +00:00
|
|
|
DO_TEST("sound-device",
|
|
|
|
QEMU_CAPS_DEVICE_ICH9_INTEL_HDA,
|
2019-12-09 23:15:15 +00:00
|
|
|
QEMU_CAPS_OBJECT_USB_AUDIO,
|
|
|
|
QEMU_CAPS_HDA_MICRO,
|
|
|
|
QEMU_CAPS_HDA_DUPLEX,
|
|
|
|
QEMU_CAPS_HDA_OUTPUT);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("watchdog");
|
2019-12-09 23:15:26 +00:00
|
|
|
DO_TEST("net-bandwidth", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC);
|
|
|
|
DO_TEST("net-bandwidth2", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC);
|
2020-10-09 14:30:35 +00:00
|
|
|
DO_TEST("net-mtu", QEMU_CAPS_VIRTIO_NET_HOST_MTU);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("net-coalesce");
|
|
|
|
DO_TEST_NOCAPS("net-many-models");
|
2020-10-14 17:08:27 +00:00
|
|
|
DO_TEST("net-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA);
|
2022-03-01 22:55:21 +00:00
|
|
|
DO_TEST("net-vdpa-multiqueue", QEMU_CAPS_NETDEV_VHOST_VDPA);
|
2022-01-09 21:07:35 +00:00
|
|
|
DO_TEST_CAPS_LATEST("net-virtio-rss");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("serial-tcp-tlsx509-chardev");
|
|
|
|
DO_TEST_NOCAPS("serial-tcp-tlsx509-chardev-notls");
|
2019-12-09 23:15:27 +00:00
|
|
|
|
|
|
|
cfg->spiceTLS = true;
|
|
|
|
DO_TEST("serial-spiceport",
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
|
|
|
QEMU_CAPS_SPICE);
|
|
|
|
cfg->spiceTLS = false;
|
|
|
|
|
2022-02-02 11:54:59 +00:00
|
|
|
DO_TEST_NOCAPS("serial-debugcon");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("console-compat");
|
|
|
|
DO_TEST_NOCAPS("console-compat2");
|
|
|
|
DO_TEST_NOCAPS("console-virtio-many");
|
|
|
|
DO_TEST_NOCAPS("channel-guestfwd");
|
|
|
|
DO_TEST_NOCAPS("channel-virtio");
|
|
|
|
DO_TEST_NOCAPS("channel-virtio-state");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("channel-unix-source-path");
|
2017-05-11 12:09:35 +00:00
|
|
|
|
2022-07-12 11:00:33 +00:00
|
|
|
DO_TEST_CAPS_LATEST("hostdev-usb-address");
|
|
|
|
DO_TEST_CAPS_LATEST("hostdev-pci-address");
|
2019-12-17 20:35:02 +00:00
|
|
|
DO_TEST("hostdev-pci-address-unassigned", QEMU_CAPS_DEVICE_VFIO_PCI);
|
2019-12-09 23:15:18 +00:00
|
|
|
DO_TEST("hostdev-pci-multifunction", QEMU_CAPS_DEVICE_VFIO_PCI);
|
|
|
|
DO_TEST("hostdev-vfio", QEMU_CAPS_DEVICE_VFIO_PCI);
|
2018-11-08 11:00:26 +00:00
|
|
|
DO_TEST("hostdev-vfio-zpci",
|
2019-12-09 23:15:18 +00:00
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
2022-09-30 12:01:44 +00:00
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
2018-11-08 11:00:29 +00:00
|
|
|
DO_TEST("hostdev-vfio-zpci-multidomain-many",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
|
|
|
DO_TEST("hostdev-vfio-zpci-autogenerate",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
2020-06-18 08:25:17 +00:00
|
|
|
DO_TEST("hostdev-vfio-zpci-autogenerate-uids",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
|
|
|
DO_TEST("hostdev-vfio-zpci-autogenerate-fids",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
2018-11-08 11:00:29 +00:00
|
|
|
DO_TEST("hostdev-vfio-zpci-boundaries",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
2020-06-18 08:25:18 +00:00
|
|
|
DO_TEST("hostdev-vfio-zpci-ccw-memballoon",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_DEVICE_ZPCI);
|
2019-12-09 23:15:18 +00:00
|
|
|
DO_TEST("hostdev-mdev-precreated", QEMU_CAPS_DEVICE_VFIO_PCI);
|
2019-10-18 15:30:11 +00:00
|
|
|
DO_TEST("hostdev-mdev-display",
|
|
|
|
QEMU_CAPS_DEVICE_QXL,
|
2019-12-09 23:15:18 +00:00
|
|
|
QEMU_CAPS_VFIO_PCI_DISPLAY,
|
2019-12-09 23:15:26 +00:00
|
|
|
QEMU_CAPS_DEVICE_VFIO_PCI,
|
|
|
|
QEMU_CAPS_VNC);
|
2020-06-23 18:29:56 +00:00
|
|
|
DO_TEST_CAPS_LATEST("hostdev-mdev-display-ramfb");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("pci-rom");
|
|
|
|
DO_TEST_NOCAPS("pci-rom-disabled");
|
|
|
|
DO_TEST_NOCAPS("pci-rom-disabled-invalid");
|
|
|
|
DO_TEST_NOCAPS("pci-serial-dev-chardev");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2020-02-05 17:18:39 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-slices");
|
2021-03-31 09:17:07 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-rotation");
|
2020-02-05 17:18:39 +00:00
|
|
|
|
2022-07-15 14:35:27 +00:00
|
|
|
DO_TEST_CAPS_LATEST("encrypted-disk");
|
|
|
|
DO_TEST_CAPS_LATEST("encrypted-disk-usage");
|
2022-01-05 09:23:42 +00:00
|
|
|
DO_TEST_CAPS_LATEST("luks-disks");
|
|
|
|
DO_TEST_CAPS_LATEST("luks-disks-source");
|
2020-01-10 16:35:10 +00:00
|
|
|
DO_TEST_CAPS_LATEST("luks-disks-source-qcow2");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("memtune");
|
|
|
|
DO_TEST_NOCAPS("memtune-unlimited");
|
|
|
|
DO_TEST_NOCAPS("blkiotune");
|
|
|
|
DO_TEST_NOCAPS("blkiotune-device");
|
|
|
|
DO_TEST_NOCAPS("cputune");
|
|
|
|
DO_TEST_NOCAPS("cputune-zero-shares");
|
|
|
|
DO_TEST_NOCAPS("cputune-iothreadsched");
|
|
|
|
DO_TEST_NOCAPS("cputune-iothreadsched-zeropriority");
|
|
|
|
DO_TEST_NOCAPS("cputune-numatune");
|
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);
|
2020-06-11 11:57:07 +00:00
|
|
|
DO_TEST_CAPS_LATEST("cputune-cpuset-big-id");
|
2020-06-10 18:35:52 +00:00
|
|
|
DO_TEST_CAPS_LATEST("numavcpus-topology-mismatch");
|
2010-04-27 10:01:32 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("smp");
|
|
|
|
DO_TEST_NOCAPS("iothreads");
|
|
|
|
DO_TEST_NOCAPS("iothreads-ids");
|
2022-03-07 14:13:39 +00:00
|
|
|
DO_TEST_CAPS_LATEST("iothreads-ids-pool-sizes");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("iothreads-ids-partial");
|
|
|
|
DO_TEST_NOCAPS("cputune-iothreads");
|
|
|
|
DO_TEST_NOCAPS("iothreads-disk");
|
2022-09-30 12:01:44 +00:00
|
|
|
DO_TEST_NOCAPS("iothreads-disk-virtio-ccw");
|
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",
|
2022-09-30 12:01:44 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("lease");
|
|
|
|
DO_TEST_NOCAPS("event_idx");
|
|
|
|
DO_TEST_NOCAPS("vhost_queues");
|
|
|
|
DO_TEST_NOCAPS("interface-driver");
|
2022-01-05 11:35:40 +00:00
|
|
|
DO_TEST_NOCAPS("net-server");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("virtio-lun");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("usb-none");
|
|
|
|
DO_TEST_NOCAPS("usb-controller");
|
2016-07-29 14:09:53 +00:00
|
|
|
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);
|
2019-12-09 23:15:16 +00:00
|
|
|
DO_TEST("usb-port-missing", QEMU_CAPS_USB_HUB);
|
2022-05-12 07:40:03 +00:00
|
|
|
DO_TEST("usb-redir", QEMU_CAPS_USB_REDIR,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2020-10-13 20:10:08 +00:00
|
|
|
DO_TEST("usb-redir-filter",
|
|
|
|
QEMU_CAPS_USB_REDIR,
|
2022-05-12 07:40:03 +00:00
|
|
|
QEMU_CAPS_USB_REDIR_FILTER,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2020-10-13 20:10:08 +00:00
|
|
|
DO_TEST("usb-redir-filter-version",
|
|
|
|
QEMU_CAPS_USB_REDIR,
|
2022-05-12 07:40:03 +00:00
|
|
|
QEMU_CAPS_USB_REDIR_FILTER,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2020-05-04 16:16:26 +00:00
|
|
|
DO_TEST_CAPS_LATEST("blkdeviotune");
|
|
|
|
DO_TEST_CAPS_LATEST("blkdeviotune-max");
|
|
|
|
DO_TEST_CAPS_LATEST("blkdeviotune-group-num");
|
|
|
|
DO_TEST_CAPS_LATEST("blkdeviotune-max-length");
|
2022-01-05 12:01:10 +00:00
|
|
|
DO_TEST_CAPS_LATEST("controller-usb-order");
|
2020-06-10 18:11:49 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-single", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-tpmproxy-with-tpm", "ppc64");
|
2011-09-02 15:09:14 +00:00
|
|
|
|
2021-08-17 13:12:21 +00:00
|
|
|
DO_TEST_FULL("seclabel-dynamic-baselabel", "", WHEN_INACTIVE, ARG_END);
|
|
|
|
DO_TEST_FULL("seclabel-dynamic-override", "", WHEN_INACTIVE, ARG_END);
|
|
|
|
DO_TEST_FULL("seclabel-dynamic-labelskip", "", WHEN_INACTIVE, ARG_END);
|
|
|
|
DO_TEST_FULL("seclabel-dynamic-relabel", "", WHEN_INACTIVE, ARG_END);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("seclabel-static");
|
|
|
|
DO_TEST_NOCAPS("seclabel-static-labelskip");
|
|
|
|
DO_TEST_NOCAPS("seclabel-none");
|
|
|
|
DO_TEST_NOCAPS("seclabel-dac-none");
|
|
|
|
DO_TEST_NOCAPS("seclabel-dynamic-none");
|
|
|
|
DO_TEST_NOCAPS("seclabel-device-multiple");
|
2021-08-16 15:02:16 +00:00
|
|
|
DO_TEST_FULL("seclabel-dynamic-none-relabel", "", WHEN_INACTIVE,
|
2019-12-09 23:15:12 +00:00
|
|
|
ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
2019-12-09 23:15:27 +00:00
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE,
|
2021-08-17 11:46:55 +00:00
|
|
|
QEMU_CAPS_SPICE, QEMU_CAPS_LAST,
|
2021-08-16 15:02:16 +00:00
|
|
|
ARG_END);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("numad-static-vcpu-no-numatune");
|
2011-12-23 00:47:46 +00:00
|
|
|
|
2016-07-29 13:27:03 +00:00
|
|
|
DO_TEST("disk-scsi-disk-vpd",
|
2019-01-28 13:29:10 +00:00
|
|
|
QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-source-pool");
|
|
|
|
DO_TEST_NOCAPS("disk-source-pool-mode");
|
2012-12-06 10:23:02 +00:00
|
|
|
|
2020-05-04 16:53:31 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-discard");
|
|
|
|
DO_TEST_CAPS_LATEST("disk-detect-zeroes");
|
2013-05-14 12:44:54 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-serial");
|
2017-11-20 11:14:08 +00:00
|
|
|
|
2020-05-06 09:40:18 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("disk-arm-virtio-sd", "aarch64");
|
|
|
|
|
2019-01-22 19:02:27 +00:00
|
|
|
DO_TEST("virtio-rng-random",
|
2020-10-09 18:18:53 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM);
|
2019-01-22 19:02:27 +00:00
|
|
|
DO_TEST("virtio-rng-egd",
|
2020-10-09 18:18:53 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_EGD);
|
2020-01-09 08:00:08 +00:00
|
|
|
DO_TEST_CAPS_LATEST("virtio-rng-builtin");
|
2013-02-12 16:56:00 +00:00
|
|
|
|
2022-05-21 14:54:56 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-nvram", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-panic-missing", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-panic-no-address", "ppc64");
|
|
|
|
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-phb-simple", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-phb-default-missing", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-phb-numa-node", "ppc64");
|
|
|
|
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-many-devices", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-many-buses-1", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-many-buses-2", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-hostdevs-1", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-hostdevs-2", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-hostdevs-3", "ppc64");
|
|
|
|
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-features", "ppc64");
|
|
|
|
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-serial-native", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-serial+console-native", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-serial-compat", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-serial-pci", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-serial-usb", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-console-native", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-console-virtio", "ppc64");
|
2018-03-29 10:51:55 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("mach-virt-serial-native");
|
|
|
|
DO_TEST_NOCAPS("mach-virt-serial+console-native");
|
|
|
|
DO_TEST_NOCAPS("mach-virt-serial-compat");
|
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
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("balloon-device-auto");
|
|
|
|
DO_TEST_NOCAPS("balloon-device-period");
|
|
|
|
DO_TEST_NOCAPS("channel-virtio-auto");
|
|
|
|
DO_TEST_NOCAPS("console-compat-auto");
|
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);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("console-virtio");
|
|
|
|
DO_TEST_NOCAPS("serial-target-port-auto");
|
2019-12-09 23:15:26 +00:00
|
|
|
DO_TEST("graphics-listen-network2",
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA,
|
|
|
|
QEMU_CAPS_VNC);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("numad-auto-vcpu-no-numatune");
|
|
|
|
DO_TEST_NOCAPS("numad-auto-memory-vcpu-no-cpuset-and-placement");
|
|
|
|
DO_TEST_NOCAPS("numad-auto-memory-vcpu-cpuset");
|
|
|
|
DO_TEST_NOCAPS("usb-ich9-ehci-addr");
|
2022-08-11 13:29:33 +00:00
|
|
|
DO_TEST_NOCAPS("disk-copy_on_read");
|
2019-08-20 11:42:03 +00:00
|
|
|
DO_TEST_CAPS_LATEST("tpm-passthrough");
|
|
|
|
DO_TEST_CAPS_LATEST("tpm-passthrough-crb");
|
|
|
|
DO_TEST_CAPS_LATEST("tpm-emulator");
|
2022-01-04 07:38:37 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("tpm-emulator-spapr", "ppc64");
|
2019-08-20 11:42:03 +00:00
|
|
|
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2");
|
|
|
|
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-enc");
|
2021-01-04 02:31:59 +00:00
|
|
|
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-pstate");
|
2021-06-25 13:31:35 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-tpm", "aarch64");
|
2016-07-29 13:13:56 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("metadata");
|
|
|
|
DO_TEST_NOCAPS("metadata-duplicate");
|
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);
|
2019-10-18 15:30:11 +00:00
|
|
|
DO_TEST("pci-autofill-addr", QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
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,
|
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-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,
|
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,
|
2016-10-11 15:42:37 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2022-08-25 14:44:55 +00:00
|
|
|
DO_TEST_CAPS_LATEST("q35-pcie");
|
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 */
|
2022-08-25 14:44:55 +00:00
|
|
|
DO_TEST_CAPS_LATEST("q35-pcie-autoadd");
|
|
|
|
DO_TEST_CAPS_LATEST("q35-default-devices-only");
|
|
|
|
DO_TEST_CAPS_LATEST("q35-multifunction");
|
|
|
|
DO_TEST_CAPS_LATEST("q35-virt-manager-basic");
|
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: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: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);
|
2020-03-03 17:23:52 +00:00
|
|
|
DO_TEST_CAPS_LATEST("pcie-root-port-nohotplug");
|
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: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: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);
|
2021-07-22 13:06:03 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pcie-expander-bus-aarch64", "aarch64");
|
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",
|
2022-09-30 12:01:44 +00:00
|
|
|
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI);
|
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);
|
2022-08-25 14:44:55 +00:00
|
|
|
DO_TEST_CAPS_LATEST("hostdev-scsi-vhost-scsi-pcie");
|
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-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-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
|
|
|
|
2018-05-07 14:41:14 +00:00
|
|
|
DO_TEST("hostdev-subsys-mdev-vfio-ccw",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_CCW);
|
2019-08-27 14:19:23 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("hostdev-subsys-mdev-vfio-ccw-boot",
|
|
|
|
"s390x");
|
2019-08-27 14:19:18 +00:00
|
|
|
DO_TEST("hostdev-subsys-mdev-vfio-ap",
|
|
|
|
QEMU_CAPS_DEVICE_VFIO_AP);
|
2018-05-07 14:41:14 +00:00
|
|
|
|
2021-06-11 08:21:57 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390-defaultconsole", "s390x");
|
2022-09-30 12:01:44 +00:00
|
|
|
DO_TEST_NOCAPS("s390-panic");
|
|
|
|
DO_TEST_NOCAPS("s390-panic-missing");
|
|
|
|
DO_TEST_NOCAPS("s390-panic-no-address");
|
|
|
|
DO_TEST_NOCAPS("s390-serial");
|
|
|
|
DO_TEST_NOCAPS("s390-serial-2");
|
|
|
|
DO_TEST_NOCAPS("s390-serial-console");
|
2013-06-17 14:17:36 +00:00
|
|
|
|
2022-08-11 17:08:35 +00:00
|
|
|
DO_TEST_NOCAPS("pcihole64");
|
|
|
|
DO_TEST_NOCAPS("pcihole64-gib");
|
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,
|
2022-08-11 17:08:35 +00:00
|
|
|
QEMU_CAPS_DEVICE_QXL);
|
2013-08-12 11:39:04 +00:00
|
|
|
|
2020-10-13 21:38:07 +00:00
|
|
|
DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC);
|
|
|
|
DO_TEST("panic-double", QEMU_CAPS_DEVICE_PANIC);
|
|
|
|
DO_TEST("panic-no-address", QEMU_CAPS_DEVICE_PANIC);
|
2022-05-21 14:54:56 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("panic-pseries", "ppc64");
|
2013-12-09 09:11:15 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("disk-backing-chains");
|
|
|
|
DO_TEST_NOCAPS("disk-backing-chains-index");
|
|
|
|
DO_TEST_NOCAPS("disk-backing-chains-noindex");
|
2014-04-17 13:37:51 +00:00
|
|
|
|
2020-03-25 15:18:50 +00:00
|
|
|
DO_TEST_CAPS_LATEST("disk-network-http");
|
|
|
|
|
2019-01-22 19:02:27 +00:00
|
|
|
DO_TEST("chardev-label",
|
2020-10-09 18:18:53 +00:00
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_EGD);
|
2014-05-16 12:31:28 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("cpu-numa1");
|
|
|
|
DO_TEST_NOCAPS("cpu-numa2");
|
|
|
|
DO_TEST_NOCAPS("cpu-numa-no-memory-element");
|
|
|
|
DO_TEST_NOCAPS("cpu-numa-disordered");
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("cpu-numa-disjoint", QEMU_CAPS_NUMA);
|
|
|
|
DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2014-05-22 07:13:05 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("numatune-auto-prefer");
|
2019-12-09 23:15:12 +00:00
|
|
|
DO_TEST("numatune-memnode", QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_FILE);
|
|
|
|
DO_TEST("numatune-memnode-no-memory", QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2021-04-19 11:18:21 +00:00
|
|
|
DO_TEST("numatune-distances", QEMU_CAPS_NUMA);
|
2020-05-27 11:42:22 +00:00
|
|
|
DO_TEST("numatune-no-vcpu", QEMU_CAPS_NUMA);
|
2020-10-13 17:04:25 +00:00
|
|
|
DO_TEST("numatune-hmat", QEMU_CAPS_NUMA_HMAT, QEMU_CAPS_OBJECT_MEMORY_RAM);
|
2021-04-13 06:38:06 +00:00
|
|
|
DO_TEST_CAPS_LATEST("numatune-memnode-restrictive-mode");
|
2014-06-09 13:00:22 +00:00
|
|
|
|
conf: support stateless UEFI firmware
Normally when an UEFI firmware is marked as read-only, an associated
NVRAM file will be created. Some builds of UEFI firmware, however, wish
to remain stateless and so will be read-only, but never have any NVRAM
file. To represent this concept a 'stateless' tristate bool attribute
is introduced on the <loader/> element.
There are rather a large number of permutations to consider.
With default firmware selection
* <os/>
=> Historic default, no change
* <os>
<loader stateless='yes'/>
</os>
=> Explicit version of historic default, no change
* <os>
<loader stateless='no'/>
</os>
=> Invalid, bios is always stateless
With manual legacy BIOS selection
* <os>
<loader>/path/to/seabios</loader>
...
</os>
=> Historic default, no change
* <os>
<loader stateless='yes'>/path/to/seabios</loader>
...
</os>
=> Explicit version of historic default, no change
* <os>
<loader stateless='no'>/path/to/seabios</loader>
...
</os>
=> Invalid, bios is always stateless
With manual UEFI selection
* <os>
<loader type='pflash'>/path/to/edk2</loader>
...
</os>
=> Historic default, no change
* <os>
<loader type='pflash' stateless='yes'>/path/to/edk2</loader>
...
</os>
=> Skip auto-filling NVRAM / template
* <os>
<loader type='pflash' stateless='no'>/path/to/edk2</loader>
...
</os>
=> Explicit version of historic default, no change
With automatic firmware selection
* <os firmware='bios'/>
=> Historic default, no change
* <os firmware='bios'>
<loader stateless='yes'/>
</os>
=> Explicit version of historic default, no change
* <os firmware='bios'>
<loader stateless='no'/>
</os>
=> Invalid, bios is always stateless
* <os firmware='uefi'/>
=> Historic default, no change
* <os firmware='uefi'>
<loader stateless='yes'/>
</os>
=> Skip auto-filling NVRAM / template
* <os firmware='uefi'>
<loader stateless='no'/>
</os>
=> Explicit version of historic default, no change
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-22 14:27:55 +00:00
|
|
|
DO_TEST_NOCAPS("firmware-manual-bios");
|
|
|
|
DO_TEST_NOCAPS("firmware-manual-bios-stateless");
|
2022-06-09 13:54:36 +00:00
|
|
|
DO_TEST_NOCAPS("firmware-manual-efi");
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-manual-efi-nvram-network-iscsi");
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-manual-efi-nvram-network-nbd");
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-manual-efi-nvram-file");
|
|
|
|
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-bios");
|
conf: support stateless UEFI firmware
Normally when an UEFI firmware is marked as read-only, an associated
NVRAM file will be created. Some builds of UEFI firmware, however, wish
to remain stateless and so will be read-only, but never have any NVRAM
file. To represent this concept a 'stateless' tristate bool attribute
is introduced on the <loader/> element.
There are rather a large number of permutations to consider.
With default firmware selection
* <os/>
=> Historic default, no change
* <os>
<loader stateless='yes'/>
</os>
=> Explicit version of historic default, no change
* <os>
<loader stateless='no'/>
</os>
=> Invalid, bios is always stateless
With manual legacy BIOS selection
* <os>
<loader>/path/to/seabios</loader>
...
</os>
=> Historic default, no change
* <os>
<loader stateless='yes'>/path/to/seabios</loader>
...
</os>
=> Explicit version of historic default, no change
* <os>
<loader stateless='no'>/path/to/seabios</loader>
...
</os>
=> Invalid, bios is always stateless
With manual UEFI selection
* <os>
<loader type='pflash'>/path/to/edk2</loader>
...
</os>
=> Historic default, no change
* <os>
<loader type='pflash' stateless='yes'>/path/to/edk2</loader>
...
</os>
=> Skip auto-filling NVRAM / template
* <os>
<loader type='pflash' stateless='no'>/path/to/edk2</loader>
...
</os>
=> Explicit version of historic default, no change
With automatic firmware selection
* <os firmware='bios'/>
=> Historic default, no change
* <os firmware='bios'>
<loader stateless='yes'/>
</os>
=> Explicit version of historic default, no change
* <os firmware='bios'>
<loader stateless='no'/>
</os>
=> Invalid, bios is always stateless
* <os firmware='uefi'/>
=> Historic default, no change
* <os firmware='uefi'>
<loader stateless='yes'/>
</os>
=> Skip auto-filling NVRAM / template
* <os firmware='uefi'>
<loader stateless='no'/>
</os>
=> Explicit version of historic default, no change
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-07-22 14:27:55 +00:00
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-bios-stateless");
|
2022-06-09 13:54:36 +00:00
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi");
|
2022-06-09 13:56:32 +00:00
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram");
|
2022-06-09 13:54:36 +00:00
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-loader-secure");
|
2022-06-09 13:56:32 +00:00
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-secboot");
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-no-secboot");
|
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-enrolled-keys");
|
2022-06-09 13:54:36 +00:00
|
|
|
DO_TEST_CAPS_LATEST("firmware-auto-efi-no-enrolled-keys");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("firmware-auto-efi-aarch64", "aarch64");
|
2014-08-06 11:18:53 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("tap-vhost");
|
|
|
|
DO_TEST_NOCAPS("tap-vhost-incorrect");
|
2020-10-13 18:12:59 +00:00
|
|
|
DO_TEST("shmem", QEMU_CAPS_DEVICE_IVSHMEM);
|
2020-07-24 03:34:11 +00:00
|
|
|
DO_TEST("shmem-plain-doorbell",
|
|
|
|
QEMU_CAPS_DEVICE_IVSHMEM_PLAIN, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("smbios");
|
|
|
|
DO_TEST_NOCAPS("smbios-multiple-type2");
|
2021-09-20 15:04:33 +00:00
|
|
|
DO_TEST_NOCAPS("smbios-type-fwcfg");
|
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);
|
2022-08-25 14:44:55 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-virtio-pci-default", "aarch64");
|
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-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_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_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
|
|
|
|
QEMU_CAPS_VNC);
|
2016-02-03 13:35:41 +00:00
|
|
|
|
2021-08-17 13:12:21 +00:00
|
|
|
DO_TEST_FULL("aarch64-gic-none", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-v2", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-v3", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-both", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-none-tcg", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-default", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-default-v2", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-default-v3", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-default-both", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v2", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-v3", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_NONE, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_V2, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_V3, ARG_END);
|
|
|
|
DO_TEST_FULL("aarch64-gic-host", "", WHEN_BOTH, ARG_GIC, GIC_BOTH, ARG_END);
|
2015-09-30 14:36:24 +00:00
|
|
|
|
2019-06-24 13:22:24 +00:00
|
|
|
/* SVE aarch64 CPU features work on modern QEMU */
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64");
|
|
|
|
|
2020-12-02 18:56:57 +00:00
|
|
|
DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
|
2021-08-16 15:02:16 +00:00
|
|
|
DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", WHEN_BOTH,
|
qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE
qemuDomainAlignMemorySizes() has an operation order problem. We are
calculating 'initialmem' without aligning the memory modules first.
Since we're aligning the dimms afterwards this can create inconsistencies
in the end result. x86 has alignment of 1-2MiB and it's not severely
impacted by it, but pSeries works with 256MiB alignment and the difference
is noticeable.
This is the case of the existing 'memory-hotplug-ppc64-nonuma' test.
The test consists of a 2GiB (aligned value) guest with 2 ~520MiB dimms,
both unaligned. 'initialmem' is calculated by taking total_mem and
subtracting the dimms size (via virDomainDefGetMemoryInitial()), which
wil give us 2GiB - 520MiB - 520MiB, ending up with a little more than
an 1GiB of 'initialmem'. Note that this value is now unaligned, and
will be aligned up via VIR_ROUND_UP(), and we'll end up with 'initialmem'
of 1GiB + 256MiB. Given that the dimms are aligned later on, the end
result for QEMU is that the guest will have a 'mem' size of 1310720k,
plus the two 512 MiB dimms, exceeding in 256MiB the desired 2GiB
memory and currentMemory specified in the XML.
Existing guests can't be fixed without breaking ABI, but we have
code already in place to align pSeries NVDIMM modules for new guests.
Let's extend it to align all pSeries mem modules.
A new test, 'memory-hotplug-ppc64-nonuma-abi-update', a copy of the
existing 'memory-hotplug-ppc64-nonuma', was added to demonstrate the
result for new pSeries guests. For the same unaligned XML mentioned
above, after applying this patch:
- starting QEMU mem size without PARSE_ABI_UPDATE:
-m size=1310720k,slots=16,maxmem=4194304k \ (no changes)
- starting QEMU mem size with PARSE_ABI_UPDATE:
-m size=1048576k,slots=16,maxmem=4194304k \ (size fixed)
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2020-11-18 19:58:34 +00:00
|
|
|
ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
|
|
|
|
ARG_QEMU_CAPS,
|
|
|
|
QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM,
|
|
|
|
QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_RAM,
|
2021-08-16 15:02:16 +00:00
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_LAST, ARG_END);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("memory-hotplug");
|
2020-07-28 08:51:32 +00:00
|
|
|
DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM);
|
2022-07-26 17:26:52 +00:00
|
|
|
DO_TEST_CAPS_LATEST("memory-hotplug-dimm-addr");
|
2019-12-18 00:36:00 +00:00
|
|
|
DO_TEST("memory-hotplug-nvdimm", QEMU_CAPS_DEVICE_NVDIMM);
|
|
|
|
DO_TEST("memory-hotplug-nvdimm-access", QEMU_CAPS_DEVICE_NVDIMM);
|
|
|
|
DO_TEST("memory-hotplug-nvdimm-label", QEMU_CAPS_DEVICE_NVDIMM);
|
|
|
|
DO_TEST("memory-hotplug-nvdimm-align", QEMU_CAPS_DEVICE_NVDIMM);
|
|
|
|
DO_TEST("memory-hotplug-nvdimm-pmem", QEMU_CAPS_DEVICE_NVDIMM);
|
2020-10-14 13:11:13 +00:00
|
|
|
DO_TEST("memory-hotplug-nvdimm-readonly", QEMU_CAPS_DEVICE_NVDIMM,
|
|
|
|
QEMU_CAPS_DEVICE_NVDIMM_UNARMED);
|
2020-03-23 19:40:47 +00:00
|
|
|
DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
2020-12-02 18:56:57 +00:00
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE,
|
2020-03-23 19:40:47 +00:00
|
|
|
QEMU_CAPS_DEVICE_NVDIMM);
|
2021-08-16 15:02:16 +00:00
|
|
|
DO_TEST_FULL("memory-hotplug-nvdimm-ppc64-abi-update", "", WHEN_BOTH,
|
2020-11-18 19:58:33 +00:00
|
|
|
ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
|
|
|
|
ARG_QEMU_CAPS,
|
|
|
|
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
|
|
|
QEMU_CAPS_OBJECT_MEMORY_FILE,
|
|
|
|
QEMU_CAPS_DEVICE_NVDIMM,
|
2021-08-16 15:02:16 +00:00
|
|
|
QEMU_CAPS_LAST, ARG_END);
|
2020-12-07 14:24:17 +00:00
|
|
|
DO_TEST_CAPS_LATEST("memory-hotplug-virtio-pmem");
|
conf: Introduce virtio-mem <memory/> model
The virtio-mem is paravirtualized mechanism of adding/removing
memory to/from a VM. A virtio-mem-pci device is split into blocks
of equal size which are then exposed (all or only a requested
portion of them) to the guest kernel to use as regular memory.
Therefore, the device has two important attributes:
1) block-size, which defines the size of a block
2) requested-size, which defines how much memory (in bytes)
is the device requested to expose to the guest.
The 'block-size' is configured on command line and immutable
throughout device's lifetime. The 'requested-size' can be set on
the command line too, but also is adjustable via monitor. In
fact, that is how management software places its requests to
change the memory allocation. If it wants to give more memory to
the guest it changes 'requested-size' to a bigger value, and if it
wants to shrink guest memory it changes the 'requested-size' to a
smaller value. Note, value of zero means that guest should
release all memory offered by the device. Of course, guest has to
cooperate. Therefore, there is a third attribute 'size' which is
read only and reflects how much memory the guest still has. This
can be different to 'requested-size', obviously. Because of name
clash, I've named it 'current' and it is dealt with in future
commits (it is a runtime information anyway).
In the backend, memory for virtio-mem is backed by usual objects:
memory-backend-{ram,file,memfd} and their size puts the cap on
the amount of memory that a virtio-mem device can offer to a
guest. But we are already able to express this info using <size/>
under <target/>.
Therefore, we need only two more elements to cover 'block-size'
and 'requested-size' attributes. This is the XML I've came up
with:
<memory model='virtio-mem'>
<source>
<nodemask>1-3</nodemask>
<pagesize unit='KiB'>2048</pagesize>
</source>
<target>
<size unit='KiB'>2097152</size>
<node>0</node>
<block unit='KiB'>2048</block>
<requested unit='KiB'>1048576</requested>
</target>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memory>
I hope by now it is obvious that:
1) 'requested-size' must be an integer multiple of
'block-size', and
2) virtio-mem-pci device goes onto PCI bus and thus needs PCI
address.
Then there is a limitation that the minimal 'block-size' is
transparent huge page size (I'll leave this without explanation).
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-01-18 15:13:12 +00:00
|
|
|
DO_TEST_CAPS_LATEST("memory-hotplug-virtio-mem");
|
2020-12-02 18:56:57 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("net-udp");
|
2014-10-06 12:18:37 +00:00
|
|
|
|
2019-10-18 15:30:11 +00:00
|
|
|
DO_TEST("video-virtio-gpu-device", QEMU_CAPS_DEVICE_VIRTIO_GPU);
|
|
|
|
DO_TEST("video-virtio-gpu-virgl",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL);
|
|
|
|
DO_TEST("video-virtio-gpu-spice-gl",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
2019-12-09 23:15:27 +00:00
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_SPICE_GL,
|
|
|
|
QEMU_CAPS_SPICE_RENDERNODE);
|
2019-10-18 15:30:11 +00:00
|
|
|
DO_TEST("video-virtio-gpu-sdl-gl",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
2021-06-15 09:46:54 +00:00
|
|
|
QEMU_CAPS_VIRTIO_GPU_VIRGL,
|
|
|
|
QEMU_CAPS_SDL);
|
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
|
|
|
|
2021-05-21 11:01:07 +00:00
|
|
|
DO_TEST_CAPS_LATEST("input-linux");
|
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("memorybacking-set");
|
|
|
|
DO_TEST_NOCAPS("memorybacking-unset");
|
2018-09-05 15:51:24 +00:00
|
|
|
|
2020-04-23 13:15:06 +00:00
|
|
|
DO_TEST_CAPS_LATEST("virtio-options");
|
2017-02-02 13:27:32 +00:00
|
|
|
|
2019-03-29 15:58:23 +00:00
|
|
|
DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
|
|
|
QEMU_CAPS_KVM);
|
|
|
|
DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
|
|
|
QEMU_CAPS_KVM);
|
|
|
|
DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
|
|
|
QEMU_CAPS_KVM);
|
2021-09-15 14:05:49 +00:00
|
|
|
DO_TEST_CAPS_LATEST("fd-memory-numa-topology4");
|
2019-03-29 15:58:23 +00:00
|
|
|
|
|
|
|
DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE,
|
|
|
|
QEMU_CAPS_KVM);
|
|
|
|
|
2022-01-05 09:23:42 +00:00
|
|
|
DO_TEST_CAPS_LATEST("memfd-memory-numa");
|
|
|
|
DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage");
|
2019-03-29 15:58:23 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("acpi-table");
|
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_QXL);
|
2019-10-18 15:30:11 +00:00
|
|
|
DO_TEST("video-qxl-heads", QEMU_CAPS_DEVICE_QXL);
|
|
|
|
DO_TEST("video-qxl-noheads", QEMU_CAPS_DEVICE_QXL);
|
|
|
|
DO_TEST("video-qxl-resolution", QEMU_CAPS_DEVICE_QXL);
|
|
|
|
DO_TEST("video-virtio-gpu-secondary", QEMU_CAPS_DEVICE_VIRTIO_GPU);
|
2018-03-23 17:22:38 +00:00
|
|
|
DO_TEST("video-virtio-gpu-ccw",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
2018-03-23 17:22:40 +00:00
|
|
|
DO_TEST("video-virtio-gpu-ccw-auto",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
|
|
|
QEMU_CAPS_VNC,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
2019-12-09 23:15:26 +00:00
|
|
|
DO_TEST("video-none-device", QEMU_CAPS_VNC);
|
2021-06-09 08:32:27 +00:00
|
|
|
DO_TEST_CAPS_LATEST("video-virtio-vga-gpu-gl");
|
2015-12-11 13:43:10 +00:00
|
|
|
|
2019-05-17 12:45:36 +00:00
|
|
|
DO_TEST_CAPS_LATEST("intel-iommu");
|
|
|
|
DO_TEST_CAPS_LATEST("intel-iommu-caching-mode");
|
|
|
|
DO_TEST_CAPS_LATEST("intel-iommu-eim");
|
|
|
|
DO_TEST_CAPS_LATEST("intel-iommu-device-iotlb");
|
2020-06-04 07:42:42 +00:00
|
|
|
DO_TEST_CAPS_LATEST("intel-iommu-aw-bits");
|
2019-05-17 11:23:16 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64");
|
2021-09-23 12:46:23 +00:00
|
|
|
DO_TEST_CAPS_LATEST("virtio-iommu-x86_64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("virtio-iommu-aarch64", "aarch64");
|
2016-06-22 14:28:22 +00:00
|
|
|
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("cpu-check-none");
|
|
|
|
DO_TEST_NOCAPS("cpu-check-partial");
|
|
|
|
DO_TEST_NOCAPS("cpu-check-full");
|
|
|
|
DO_TEST_NOCAPS("cpu-check-default-none");
|
|
|
|
DO_TEST_NOCAPS("cpu-check-default-none2");
|
|
|
|
DO_TEST_NOCAPS("cpu-check-default-partial");
|
|
|
|
DO_TEST_NOCAPS("cpu-check-default-partial2");
|
2019-12-18 00:36:03 +00:00
|
|
|
DO_TEST("vmcoreinfo", QEMU_CAPS_DEVICE_VMCOREINFO);
|
2017-03-01 15:12:07 +00:00
|
|
|
|
2019-12-18 00:36:02 +00:00
|
|
|
DO_TEST("smartcard-host", QEMU_CAPS_CCID_EMULATED);
|
|
|
|
DO_TEST("smartcard-host-certificates", QEMU_CAPS_CCID_EMULATED);
|
|
|
|
DO_TEST("smartcard-host-certificates-database",
|
|
|
|
QEMU_CAPS_CCID_EMULATED);
|
|
|
|
DO_TEST("smartcard-passthrough-tcp", QEMU_CAPS_CCID_PASSTHRU);
|
2022-05-12 07:40:03 +00:00
|
|
|
DO_TEST("smartcard-passthrough-spicevmc",
|
|
|
|
QEMU_CAPS_CCID_PASSTHRU,
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2019-12-18 00:36:02 +00:00
|
|
|
DO_TEST("smartcard-controller", QEMU_CAPS_CCID_EMULATED);
|
2017-08-03 12:26:47 +00:00
|
|
|
|
2022-05-21 14:54:56 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-compat-power9", "ppc64");
|
2022-05-03 20:15:05 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-compat-power10", "ppc64");
|
2022-05-21 14:54:56 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-compat", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-exact", "ppc64");
|
2017-09-18 07:59:18 +00:00
|
|
|
|
2022-07-15 14:35:27 +00:00
|
|
|
DO_TEST_CAPS_LATEST("user-aliases");
|
2018-03-23 17:22:42 +00:00
|
|
|
DO_TEST("input-virtio-ccw",
|
|
|
|
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
|
|
|
|
2022-01-05 09:23:42 +00:00
|
|
|
DO_TEST_CAPS_LATEST("tseg-explicit-size");
|
2018-05-10 21:37:18 +00:00
|
|
|
|
2022-01-05 09:23:42 +00:00
|
|
|
DO_TEST_CAPS_LATEST("vhost-vsock");
|
|
|
|
DO_TEST_CAPS_LATEST("vhost-vsock-auto");
|
2022-09-30 12:01:44 +00:00
|
|
|
DO_TEST("vhost-vsock-ccw", QEMU_CAPS_DEVICE_VHOST_VSOCK);
|
|
|
|
DO_TEST("vhost-vsock-ccw-auto", QEMU_CAPS_DEVICE_VHOST_VSOCK);
|
2021-01-27 18:46:59 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("vhost-vsock-ccw-iommu", "s390x");
|
|
|
|
|
2018-08-06 15:41:07 +00:00
|
|
|
|
2019-07-16 05:01:30 +00:00
|
|
|
DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory");
|
|
|
|
DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages");
|
2020-09-07 20:07:35 +00:00
|
|
|
DO_TEST_CAPS_LATEST("vhost-user-fs-sock");
|
2019-07-16 05:01:30 +00:00
|
|
|
|
2018-08-22 09:15:27 +00:00
|
|
|
DO_TEST("riscv64-virt",
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_MMIO);
|
2019-01-31 13:54:11 +00:00
|
|
|
DO_TEST("riscv64-virt-pci",
|
|
|
|
QEMU_CAPS_OBJECT_GPEX);
|
2022-01-05 21:19:40 +00:00
|
|
|
|
|
|
|
DO_TEST_CAPS_LATEST("x86-kvm-32-on-64");
|
2018-05-22 09:21:15 +00:00
|
|
|
|
2019-04-15 22:46:44 +00:00
|
|
|
DO_TEST_CAPS_LATEST("virtio-transitional");
|
|
|
|
DO_TEST_CAPS_LATEST("virtio-non-transitional");
|
2019-01-11 20:06:05 +00:00
|
|
|
|
2019-06-12 10:25:28 +00:00
|
|
|
/* Simple headless guests for various architectures */
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-headless", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless", "riscv64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-headless", "s390x");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-headless", "x86_64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-headless", "x86_64");
|
|
|
|
|
|
|
|
/* Simple guests with graphics for various architectures */
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-graphics", "aarch64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-graphics", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-graphics", "riscv64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-graphics", "s390x");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-pc-graphics", "x86_64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-q35-graphics", "x86_64");
|
|
|
|
|
2019-10-18 14:14:23 +00:00
|
|
|
DO_TEST_CAPS_LATEST("cpu-Icelake-Server-pconfig");
|
|
|
|
|
2019-10-11 18:15:03 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-default-cpu-kvm-virt-4.2", "aarch64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("aarch64-default-cpu-tcg-virt-4.2", "aarch64");
|
2019-10-11 18:15:03 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-kvm-pseries-2.7", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-tcg-pseries-2.7", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-kvm-pseries-3.1", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-tcg-pseries-3.1", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-kvm-pseries-4.2", "ppc64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("ppc64-default-cpu-tcg-pseries-4.2", "ppc64");
|
2020-02-06 09:18:49 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-kvm-ccw-virtio-2.7", "s390x");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-tcg-ccw-virtio-2.7", "s390x");
|
2019-10-11 18:15:03 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-kvm-ccw-virtio-4.2", "s390x");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("s390-default-cpu-tcg-ccw-virtio-4.2", "s390x");
|
2019-10-11 18:15:03 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-kvm-pc-4.2", "x86_64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-tcg-pc-4.2", "x86_64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-kvm-q35-4.2", "x86_64");
|
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-tcg-q35-4.2", "x86_64");
|
2021-11-03 12:15:41 +00:00
|
|
|
DO_TEST_CAPS_ARCH_LATEST("x86_64-default-cpu-tcg-features", "x86_64");
|
2019-10-11 18:15:03 +00:00
|
|
|
|
2020-03-30 18:05:33 +00:00
|
|
|
DO_TEST_CAPS_LATEST("virtio-9p-multidevs");
|
2020-10-08 14:32:24 +00:00
|
|
|
DO_TEST_CAPS_LATEST("virtio-9p-createmode");
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("downscript");
|
2020-03-30 18:05:33 +00:00
|
|
|
|
2021-02-23 18:32:25 +00:00
|
|
|
/* Simplest possible <audio>, all supported with ENV */
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("audio-none-minimal");
|
|
|
|
DO_TEST_NOCAPS("audio-alsa-minimal");
|
|
|
|
DO_TEST_NOCAPS("audio-coreaudio-minimal");
|
|
|
|
DO_TEST_NOCAPS("audio-oss-minimal");
|
|
|
|
DO_TEST_NOCAPS("audio-pulseaudio-minimal");
|
|
|
|
DO_TEST_NOCAPS("audio-sdl-minimal");
|
2022-05-12 07:40:03 +00:00
|
|
|
DO_TEST("audio-spice-minimal",
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("audio-file-minimal");
|
2021-02-23 18:32:25 +00:00
|
|
|
|
|
|
|
/* Best <audio> still compat with old ENV */
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("audio-none-best");
|
|
|
|
DO_TEST_NOCAPS("audio-alsa-best");
|
|
|
|
DO_TEST_NOCAPS("audio-coreaudio-best");
|
|
|
|
DO_TEST_NOCAPS("audio-oss-best");
|
|
|
|
DO_TEST_NOCAPS("audio-pulseaudio-best");
|
|
|
|
DO_TEST_NOCAPS("audio-sdl-best");
|
2022-05-12 07:40:03 +00:00
|
|
|
DO_TEST("audio-spice-best",
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2021-08-17 08:35:53 +00:00
|
|
|
DO_TEST_NOCAPS("audio-file-best");
|
2021-03-02 17:22:47 +00:00
|
|
|
|
|
|
|
/* Full <audio> only compat with new QEMU -audiodev args */
|
2022-06-22 14:14:47 +00:00
|
|
|
DO_TEST_NOCAPS("audio-none-full");
|
|
|
|
DO_TEST_NOCAPS("audio-alsa-full");
|
|
|
|
DO_TEST_NOCAPS("audio-coreaudio-full");
|
|
|
|
DO_TEST_NOCAPS("audio-jack-full");
|
|
|
|
DO_TEST_NOCAPS("audio-oss-full");
|
|
|
|
DO_TEST_NOCAPS("audio-pulseaudio-full");
|
|
|
|
DO_TEST_NOCAPS("audio-sdl-full");
|
2022-05-12 07:40:03 +00:00
|
|
|
DO_TEST("audio-spice-full",
|
|
|
|
QEMU_CAPS_SPICE,
|
|
|
|
QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
2022-06-22 14:14:47 +00:00
|
|
|
DO_TEST_NOCAPS("audio-file-full");
|
2021-02-23 18:32:25 +00:00
|
|
|
|
2021-02-24 14:40:19 +00:00
|
|
|
DO_TEST_CAPS_LATEST("audio-many-backends");
|
2021-02-24 14:24:10 +00:00
|
|
|
|
|
|
|
/* Validate auto-creation of <audio> for legacy compat */
|
|
|
|
g_setenv("QEMU_AUDIO_DRV", "sdl", TRUE);
|
|
|
|
g_setenv("SDL_AUDIODRIVER", "esd", TRUE);
|
|
|
|
DO_TEST_CAPS_LATEST("audio-default-sdl");
|
|
|
|
g_unsetenv("QEMU_AUDIO_DRV");
|
|
|
|
g_unsetenv("SDL_AUDIODRIVER");
|
|
|
|
|
|
|
|
g_setenv("QEMU_AUDIO_DRV", "alsa", TRUE);
|
|
|
|
driver.config->vncAllowHostAudio = true;
|
|
|
|
DO_TEST_CAPS_LATEST("audio-default-vnc");
|
|
|
|
driver.config->vncAllowHostAudio = false;
|
|
|
|
g_unsetenv("QEMU_AUDIO_DRV");
|
|
|
|
|
|
|
|
DO_TEST_CAPS_LATEST("audio-default-spice");
|
|
|
|
|
|
|
|
g_setenv("QEMU_AUDIO_DRV", "alsa", TRUE);
|
|
|
|
driver.config->nogfxAllowHostAudio = true;
|
|
|
|
DO_TEST_CAPS_LATEST("audio-default-nographics");
|
|
|
|
driver.config->nogfxAllowHostAudio = false;
|
|
|
|
g_unsetenv("QEMU_AUDIO_DRV");
|
|
|
|
|
2021-04-06 14:01:20 +00:00
|
|
|
DO_TEST_CAPS_LATEST("devices-acpi-index");
|
|
|
|
|
2022-01-04 16:27:01 +00:00
|
|
|
DO_TEST_MACOS("hvf-x86_64-q35-headless",
|
2022-08-25 13:35:48 +00:00
|
|
|
QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL,
|
2022-01-04 16:27:01 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_ISA_SERIAL,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM);
|
|
|
|
DO_TEST_MACOS("hvf-aarch64-virt-headless",
|
|
|
|
QEMU_CAPS_OBJECT_GPEX,
|
2022-08-25 13:35:48 +00:00
|
|
|
QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL,
|
2022-01-04 16:27:01 +00:00
|
|
|
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_NET,
|
|
|
|
QEMU_CAPS_DEVICE_PL011,
|
|
|
|
QEMU_CAPS_DEVICE_VIRTIO_RNG,
|
|
|
|
QEMU_CAPS_OBJECT_RNG_RANDOM);
|
2022-03-18 22:04:05 +00:00
|
|
|
DO_TEST_CAPS_LATEST("channel-qemu-vdagent");
|
|
|
|
DO_TEST_CAPS_LATEST("channel-qemu-vdagent-features");
|
2022-01-04 16:27:01 +00:00
|
|
|
|
2020-06-25 14:34:30 +00:00
|
|
|
cleanup:
|
2020-05-07 20:31:04 +00:00
|
|
|
if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
|
|
|
|
virFileDeleteTree(fakerootdir);
|
|
|
|
|
2015-09-15 06:16:02 +00:00
|
|
|
qemuTestDriverFree(&driver);
|
2019-08-12 15:06:22 +00:00
|
|
|
virFileWrapperClearPrefixes();
|
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,
|
2019-08-21 16:13:16 +00:00
|
|
|
VIR_TEST_MOCK("virpci"),
|
|
|
|
VIR_TEST_MOCK("virrandom"),
|
2020-10-21 14:53:26 +00:00
|
|
|
VIR_TEST_MOCK("domaincaps"))
|