[PATCH 0/7] Add missing CPU features and GraniteRapids-v2 model supported by QEMU 9.2.0
by Jiri Denemark
Jiri Denemark (7):
cpu_map: Add avx10* CPU features
cpu_map: Add GraniteRapids-v2 CPU model
cpu_map: Add sha512, sm3, and sm4 CPU features
cpu_map: Add fdp-excptn-only CPU feature
cpu_map: Add zero-fcs-fds CPU feature
cpu_map: Add ibpb-brtype CPU feature
cpu_map: Add missing CPU features
src/cpu_map/index.xml | 1 +
src/cpu_map/meson.build | 1 +
src/cpu_map/x86_GraniteRapids-v2.xml | 206 ++++++++++++++++++
src/cpu_map/x86_features.xml | 70 ++++++
.../x86_64-cpuid-Atom-P5362-disabled.xml | 2 +-
.../x86_64-cpuid-Atom-P5362-guest.xml | 2 +
.../x86_64-cpuid-Atom-P5362-host.xml | 2 +
.../x86_64-cpuid-Cooperlake-disabled.xml | 2 +-
.../x86_64-cpuid-Cooperlake-guest.xml | 2 +
.../x86_64-cpuid-Cooperlake-host.xml | 2 +
.../x86_64-cpuid-Core-i5-4670T-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i5-4670T-guest.xml | 1 +
.../x86_64-cpuid-Core-i5-4670T-host.xml | 1 +
.../x86_64-cpuid-Core-i5-6600-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i5-6600-guest.xml | 1 +
.../x86_64-cpuid-Core-i5-6600-host.xml | 1 +
.../x86_64-cpuid-Core-i7-4510U-disabled.xml | 1 +
.../x86_64-cpuid-Core-i7-4510U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-4510U-host.xml | 1 +
.../x86_64-cpuid-Core-i7-4600U-disabled.xml | 1 +
.../x86_64-cpuid-Core-i7-4600U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-4600U-host.xml | 1 +
...6_64-cpuid-Core-i7-5600U-arat-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-5600U-arat-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-5600U-arat-host.xml | 1 +
.../x86_64-cpuid-Core-i7-5600U-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-5600U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-5600U-host.xml | 1 +
...6_64-cpuid-Core-i7-5600U-ibrs-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-5600U-ibrs-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-5600U-ibrs-host.xml | 1 +
.../x86_64-cpuid-Core-i7-7600U-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-7600U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-7600U-host.xml | 1 +
.../x86_64-cpuid-Core-i7-7700-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-7700-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-7700-host.xml | 1 +
.../x86_64-cpuid-Core-i7-8550U-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-8550U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-8550U-host.xml | 1 +
.../x86_64-cpuid-Core-i7-8700-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-8700-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-8700-host.xml | 1 +
.../x86_64-cpuid-Ice-Lake-Server-disabled.xml | 2 +-
.../x86_64-cpuid-Ice-Lake-Server-guest.xml | 2 +
.../x86_64-cpuid-Ice-Lake-Server-host.xml | 2 +
.../x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E3-1225-v5-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E3-1225-v5-host.xml | 1 +
.../x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E3-1245-v5-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E3-1245-v5-host.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2609-v3-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E5-2609-v3-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2609-v3-host.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2623-v4-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E5-2623-v4-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2623-v4-host.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2630-v3-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E5-2630-v3-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2630-v3-host.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2630-v4-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E5-2630-v4-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2630-v4-host.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2650-v3-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E5-2650-v3-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2650-v3-host.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2650-v4-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E5-2650-v4-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E5-2650-v4-host.xml | 1 +
.../x86_64-cpuid-Xeon-E7-8890-v3-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E7-8890-v3-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E7-8890-v3-host.xml | 1 +
.../x86_64-cpuid-Xeon-Gold-5115-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-Gold-5115-guest.xml | 2 +
.../x86_64-cpuid-Xeon-Gold-5115-host.xml | 2 +
.../x86_64-cpuid-Xeon-Gold-6130-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-Gold-6130-guest.xml | 2 +
.../x86_64-cpuid-Xeon-Gold-6130-host.xml | 2 +
.../x86_64-cpuid-Xeon-Gold-6148-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-Gold-6148-guest.xml | 2 +
.../x86_64-cpuid-Xeon-Gold-6148-host.xml | 2 +
...6_64-cpuid-Xeon-Platinum-8268-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-Platinum-8268-guest.xml | 2 +
.../x86_64-cpuid-Xeon-Platinum-8268-host.xml | 2 +
...6_64-cpuid-Xeon-Platinum-9242-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-Platinum-9242-guest.xml | 2 +
.../x86_64-cpuid-Xeon-Platinum-9242-host.xml | 2 +
.../domaincapsdata/qemu_9.2.0-q35.x86_64.xml | 58 +++++
.../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml | 47 ++++
tests/domaincapsdata/qemu_9.2.0.x86_64.xml | 58 +++++
...host-model-fallback-kvm.x86_64-latest.args | 2 +-
...cpu-host-model-features.x86_64-latest.args | 2 +-
.../cpu-host-model-kvm.x86_64-latest.args | 2 +-
...st-model-nofallback-kvm.x86_64-latest.args | 2 +-
95 files changed, 545 insertions(+), 30 deletions(-)
create mode 100644 src/cpu_map/x86_GraniteRapids-v2.xml
--
2.47.1
4 months, 1 week
[PATCH 0/3] qemu: Call migrate-incoming with exit-on-error=false
by Jiri Denemark
See 3/3 for details.
Jiri Denemark (3):
qemu: Detect exit-on-error argument of migrate-incoming
qemu: Replace qemuDomainCheckMonitor with qemuMigrationJobCheckStatus
qemu: Call migrate-incoming with exit-on-error=false
src/qemu/qemu_capabilities.c | 4 ++++
src/qemu/qemu_capabilities.h | 3 +++
src/qemu/qemu_domain.c | 18 ------------------
src/qemu/qemu_domain.h | 3 ---
src/qemu/qemu_migration.c | 16 ++++++++++++----
src/qemu/qemu_monitor.c | 16 +++++-----------
src/qemu/qemu_monitor.h | 4 ++--
src/qemu/qemu_monitor_json.c | 4 +++-
src/qemu/qemu_monitor_json.h | 3 ++-
.../caps_9.1.0_riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_9.1.0_s390x.xml | 1 +
.../qemucapabilitiesdata/caps_9.1.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_9.2.0_s390x.xml | 1 +
.../qemucapabilitiesdata/caps_9.2.0_x86_64.xml | 1 +
14 files changed, 36 insertions(+), 40 deletions(-)
--
2.47.1
4 months, 1 week
[PATCH] src: drop obsolete checks for virDomainConfigFile failure
by Daniel P. Berrangé
This cannot ever return NULL
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/bhyve/bhyve_driver.c | 6 ++----
src/conf/domain_conf.c | 7 ++-----
src/conf/virdomainobjlist.c | 9 +++------
src/libxl/libxl_driver.c | 6 ++----
src/lxc/lxc_controller.c | 4 +---
src/lxc/lxc_driver.c | 10 ++--------
src/qemu/qemu_driver.c | 22 ++++++----------------
7 files changed, 18 insertions(+), 46 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 2bd1e4c387..8f97ac032c 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -364,10 +364,8 @@ bhyveDomainSetAutostart(virDomainPtr domain, int autostart)
autostart = (autostart != 0);
if (vm->autostart != autostart) {
- if ((configFile = virDomainConfigFile(BHYVE_CONFIG_DIR, vm->def->name)) == NULL)
- goto cleanup;
- if ((autostartLink = virDomainConfigFile(BHYVE_AUTOSTART_DIR, vm->def->name)) == NULL)
- goto cleanup;
+ configFile = virDomainConfigFile(BHYVE_CONFIG_DIR, vm->def->name);
+ autostartLink = virDomainConfigFile(BHYVE_AUTOSTART_DIR, vm->def->name);
if (autostart) {
if (g_mkdir_with_parents(BHYVE_AUTOSTART_DIR, 0777) < 0) {
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4ad8289b89..cae5ba9df1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -29060,11 +29060,8 @@ virDomainDeleteConfig(const char *configDir,
g_autofree char *configFile = NULL;
g_autofree char *autostartLink = NULL;
- if ((configFile = virDomainConfigFile(configDir, dom->def->name)) == NULL)
- return -1;
- if ((autostartLink = virDomainConfigFile(autostartDir,
- dom->def->name)) == NULL)
- return -1;
+ configFile = virDomainConfigFile(configDir, dom->def->name);
+ autostartLink = virDomainConfigFile(autostartDir, dom->def->name);
/* Not fatal if this doesn't work */
unlink(autostartLink);
diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index 166bbc5cfd..72207450c5 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -492,16 +492,14 @@ virDomainObjListLoadConfig(virDomainObjList *doms,
int autostart;
g_autoptr(virDomainDef) oldDef = NULL;
- if ((configFile = virDomainConfigFile(configDir, name)) == NULL)
- return NULL;
+ configFile = virDomainConfigFile(configDir, name);
if (!(def = virDomainDefParseFile(configFile, xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL)))
return NULL;
- if ((autostartLink = virDomainConfigFile(autostartDir, name)) == NULL)
- return NULL;
+ autostartLink = virDomainConfigFile(autostartDir, name);
autostart = virFileLinkPointsTo(autostartLink, configFile);
@@ -529,8 +527,7 @@ virDomainObjListLoadStatus(virDomainObjList *doms,
virDomainObj *obj = NULL;
char uuidstr[VIR_UUID_STRING_BUFLEN];
- if ((statusFile = virDomainConfigFile(statusDir, name)) == NULL)
- goto error;
+ statusFile = virDomainConfigFile(statusDir, name);
if (!(obj = virDomainObjParseFile(statusFile, xmlopt,
VIR_DOMAIN_DEF_PARSE_STATUS |
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index e72553603d..b8f721351c 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -4651,10 +4651,8 @@ libxlDomainSetAutostart(virDomainPtr dom, int autostart)
autostart = (autostart != 0);
if (vm->autostart != autostart) {
- if (!(configFile = virDomainConfigFile(cfg->configDir, vm->def->name)))
- goto endjob;
- if (!(autostartLink = virDomainConfigFile(cfg->autostartDir, vm->def->name)))
- goto endjob;
+ configFile = virDomainConfigFile(cfg->configDir, vm->def->name);
+ autostartLink = virDomainConfigFile(cfg->autostartDir, vm->def->name);
if (autostart) {
if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) {
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 7b432a1160..fb7f8e0bc2 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -196,9 +196,7 @@ static virLXCController *virLXCControllerNew(const char *name)
if (!(driver = virLXCControllerDriverNew()))
goto error;
- if ((configFile = virDomainConfigFile(LXC_STATE_DIR,
- ctrl->name)) == NULL)
- goto error;
+ configFile = virDomainConfigFile(LXC_STATE_DIR, ctrl->name);
if ((ctrl->vm = virDomainObjParseFile(configFile,
driver->xmlopt,
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 2488940feb..b1a355794c 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2430,14 +2430,8 @@ static int lxcDomainSetAutostart(virDomainPtr dom,
goto endjob;
}
- configFile = virDomainConfigFile(cfg->configDir,
- vm->def->name);
- if (configFile == NULL)
- goto endjob;
- autostartLink = virDomainConfigFile(cfg->autostartDir,
- vm->def->name);
- if (autostartLink == NULL)
- goto endjob;
+ configFile = virDomainConfigFile(cfg->configDir, vm->def->name);
+ autostartLink = virDomainConfigFile(cfg->autostartDir, vm->def->name);
if (autostart) {
if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) {
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 672b42b44e..72d6b627f9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7784,12 +7784,8 @@ static int qemuDomainSetAutostart(virDomainPtr dom,
if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
goto cleanup;
- if (!(configFile = virDomainConfigFile(cfg->configDir, vm->def->name)))
- goto endjob;
-
- if (!(autostartLink = virDomainConfigFile(cfg->autostartDir,
- vm->def->name)))
- goto endjob;
+ configFile = virDomainConfigFile(cfg->configDir, vm->def->name);
+ autostartLink = virDomainConfigFile(cfg->autostartDir, vm->def->name);
if (autostart) {
if (g_mkdir_with_parents(cfg->autostartDir, 0777) < 0) {
@@ -18339,21 +18335,15 @@ qemuDomainRenameCallback(virDomainObj *vm,
new_dom_name = g_strdup(new_name);
- if (!(new_dom_cfg_file = virDomainConfigFile(cfg->configDir,
- new_dom_name)) ||
- !(old_dom_cfg_file = virDomainConfigFile(cfg->configDir,
- vm->def->name)))
- return -1;
+ new_dom_cfg_file = virDomainConfigFile(cfg->configDir, new_dom_name);
+ old_dom_cfg_file = virDomainConfigFile(cfg->configDir, vm->def->name);
if (qemuDomainNamePathsCleanup(cfg, new_name, false) < 0)
goto cleanup;
if (vm->autostart) {
- if (!(new_dom_autostart_link = virDomainConfigFile(cfg->autostartDir,
- new_dom_name)) ||
- !(old_dom_autostart_link = virDomainConfigFile(cfg->autostartDir,
- vm->def->name)))
- return -1;
+ new_dom_autostart_link = virDomainConfigFile(cfg->autostartDir, new_dom_name);
+ old_dom_autostart_link = virDomainConfigFile(cfg->autostartDir, vm->def->name);
if (symlink(new_dom_cfg_file, new_dom_autostart_link) < 0) {
virReportSystemError(errno,
--
2.46.0
4 months, 1 week
[PATCH 0/3] Addng POWER11 cpu support
by Narayana Murty N
This patch series includes the changes needed to
support POWER11 cpu and POWER11 host on libvirt.
Patch also adds and updates the qemu caps with
the latest qemu for the caps tests to include POWER11.
Patch 0001: Add POWER11 cpu model support.
Patch 0002: Add POWER11 host model support.
Patch 0003: Add qemu and domain test capabilities test support.
The respective patches for linux kernel and qemu
already in upstream and links are provided below.
Linux kernel patches:
1. Linux P11 support: commit id c2ed087ed35c ("powerpc: Add Power11 architected and raw mode")
2. Linux P11 KVM support: commit id 96e266e3bcd6 ("KVM: PPC: Book3S HV: Add Power11 capability support for Nested PAPR guests")
Qemu patches:
3. Qemu P11 support: commit id 273db89bcaf4 ("ppc/pseries: Add Power11 cpu type)
4. Qemu P11 DD02.0 support: commit id c0d964076c3e (target/ppc: Add Power11 DD2.0 processor)
Signed-off-by: Narayana Murty N <nnmlinux(a)linux.vnet.ibm.com>
Narayana Murty N (3):
cpu_map: Add POWER11 cpu model support
cpu_ppc64: Add POWER11 host-model support
tests: Qemu and domain capabilities tests for Power11
src/cpu/cpu_ppc64.c | 8 +-
src/cpu_map/index.xml | 1 +
src/cpu_map/meson.build | 1 +
src/cpu_map/ppc64_POWER11.xml | 6 +
tests/domaincapsdata/qemu_9.2.0.ppc64.xml | 183 +
.../caps_9.2.0_ppc64.replies | 38704 ++++++++++++++++
.../qemucapabilitiesdata/caps_9.2.0_ppc64.xml | 1077 +
...eries-cpu-compat-power11.ppc64-latest.args | 31 +
...series-cpu-compat-power11.ppc64-latest.err | 1 +
...series-cpu-compat-power11.ppc64-latest.xml | 29 +
.../pseries-cpu-compat-power11.xml | 19 +
tests/qemuxmlconftest.c | 4 +
tests/testutilshostcpus.h | 11 +
tests/testutilsqemu.c | 4 +
tests/testutilsqemu.h | 1 +
15 files changed, 40076 insertions(+), 4 deletions(-)
create mode 100644 src/cpu_map/ppc64_POWER11.xml
create mode 100644 tests/domaincapsdata/qemu_9.2.0.ppc64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_9.2.0_ppc64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_9.2.0_ppc64.xml
create mode 100644 tests/qemuxmlconfdata/pseries-cpu-compat-power11.ppc64-latest.args
create mode 100644 tests/qemuxmlconfdata/pseries-cpu-compat-power11.ppc64-latest.err
create mode 100644 tests/qemuxmlconfdata/pseries-cpu-compat-power11.ppc64-latest.xml
create mode 100644 tests/qemuxmlconfdata/pseries-cpu-compat-power11.xml
--
2.47.1
4 months, 1 week
[PATCH v3 0/7] Allow Guest CPU Model with Deprecated Features Disabled
by Collin Walling
# Changelog
v3
- added reviewed-by's on appropriate patches
- split patch #4 into three:
- domain API (libvirt-domain: introduce VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES)
- qemu (qemu_capabilities: filter deprecated features if requested)
- virsh (virsh: add --disable-deprecated-features flag to domcapabilities)
- Note: no functional change, patches were split based on changes to certain files
- @Jiri, let me know if this is what you had in mind, I found it difficult to find a good reference
- fixed deprecated_props array missing +1 in qemuJSONMonitor* functions
- condensed cputypes schema for deprecated_features
- added validation in qemu_process to check if QEMU cap is present
- added qemuxmlconf tests
- updated version tags to 11.0.0
v2
- rebased on latest master changes
# Description
Add support for libvirt to query and cache an array of deprecated CPU features
(aka CPU properties) for the host-model. This data is queried via a full
query-cpu-model-expansion and cached in the QEMU capabilities file. This
model expansion will depend on the availability of the "deprecated-props" field
resulting from a query-cpu-model-expansion command. Currently, only s390x
supports this field.
The purpose of these patches is to make it easy for users to create guests with
a CPU model that will be compatible & migratable with future hardware.
An updated host CPU model with deprecated features paired with the policy "disable"
may be visable via an update to the virsh domcapabilities command with the
--disable-deprecated-features flag. An example is shown below.
Note: other CPU model queries (e.g. baseline and comparison) currently do not
consider deprecated features, as their outputs do not consider feature policy.
If implementation is desired, it will require a discussion on how these
commands should report policies.
Examples:
virsh domcapabilities --disable-deprecated-features
e.g. output (trimmed):
<mode name='host-model' supported='yes'>
<model fallback='forbid'>z14.2-base</model>
<feature policy='require' name='aen'/>
<feature policy='require' name='cmmnt'/>
<feature policy='require' name='aefsi'/>
<feature policy='require' name='diag318'/>
<feature policy='require' name='mepoch'/>
<feature policy='require' name='msa8'/>
<feature policy='require' name='msa7'/>
<feature policy='require' name='msa6'/>
<feature policy='require' name='msa5'/>
<feature policy='require' name='msa4'/>
<feature policy='require' name='msa3'/>
<feature policy='require' name='msa2'/>
<feature policy='require' name='msa1'/>
<feature policy='require' name='sthyi'/>
<feature policy='require' name='edat'/>
<feature policy='require' name='ri'/>
<feature policy='require' name='edat2'/>
<feature policy='require' name='etoken'/>
<feature policy='require' name='vx'/>
<feature policy='require' name='ipter'/>
<feature policy='require' name='mepochptff'/>
<feature policy='require' name='ap'/>
<feature policy='require' name='vxeh'/>
<feature policy='require' name='vxpd'/>
<feature policy='require' name='esop'/>
<feature policy='require' name='apqi'/>
<feature policy='require' name='apft'/>
<feature policy='require' name='els'/>
<feature policy='require' name='iep'/>
<feature policy='require' name='apqci'/>
<feature policy='disable' name='cte'/>
<feature policy='require' name='ais'/>
<feature policy='disable' name='bpb'/>
<feature policy='require' name='ctop'/>
<feature policy='require' name='gs'/>
<feature policy='require' name='ppa15'/>
<feature policy='require' name='zpci'/>
<feature policy='require' name='sea_esop2'/>
<feature policy='disable' name='te'/>
<feature policy='require' name='cmm'/>
<feature policy='disable' name='csske'/>
</mode>
A domain may be defined with a new <cpu> XML attribute, deprecated_features='on|off':
<cpu mode='host-model' check='partial' deprecated_features='off'/>
e.g. after guest has started (trimmed):
<cpu mode='custom' match='exact' check='partial' deprecated_features='off'>
<model fallback='forbid'>z14.2-base</model>
<feature policy='require' name='aen'/>
<feature policy='require' name='cmmnt'/>
<feature policy='require' name='aefsi'/>
<feature policy='require' name='diag318'/>
<feature policy='require' name='mepoch'/>
<feature policy='require' name='msa8'/>
<feature policy='require' name='msa7'/>
<feature policy='require' name='msa6'/>
<feature policy='require' name='msa5'/>
<feature policy='require' name='msa4'/>
<feature policy='require' name='msa3'/>
<feature policy='require' name='msa2'/>
<feature policy='require' name='msa1'/>
<feature policy='require' name='sthyi'/>
<feature policy='require' name='edat'/>
<feature policy='require' name='ri'/>
<feature policy='require' name='edat2'/>
<feature policy='require' name='etoken'/>
<feature policy='require' name='vx'/>
<feature policy='require' name='ipter'/>
<feature policy='require' name='mepochptff'/>
<feature policy='require' name='ap'/>
<feature policy='require' name='vxeh'/>
<feature policy='require' name='vxpd'/>
<feature policy='require' name='esop'/>
<feature policy='require' name='apqi'/>
<feature policy='require' name='apft'/>
<feature policy='require' name='els'/>
<feature policy='require' name='iep'/>
<feature policy='require' name='apqci'/>
<feature policy='disable' name='cte'/>
<feature policy='require' name='ais'/>
<feature policy='disable' name='bpb'/>
<feature policy='require' name='ctop'/>
<feature policy='require' name='gs'/>
<feature policy='require' name='ppa15'/>
<feature policy='require' name='zpci'/>
<feature policy='require' name='sea_esop2'/>
<feature policy='disable' name='te'/>
<feature policy='require' name='cmm'/>
<feature policy='disable' name='csske'/>
</cpu>
Collin Walling (7):
qemuMonitorJSONGetCPUModelExpansion: refactor parsing functions
qemu: parse deprecated-props from query-cpu-model-expansion response
qemu_capabilities: query deprecated features for host-model
libvirt-domain: introduce
VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES
qemu_capabilities: filter deprecated features if requested
virsh: add --disable-deprecated-features flag to domcapabilities
conf: add deprecated_features attribute
docs/manpages/virsh.rst | 6 +
include/libvirt/libvirt-domain.h | 12 +
src/conf/cpu_conf.c | 11 +
src/conf/cpu_conf.h | 1 +
src/conf/schemas/cputypes.rng | 5 +
src/libvirt-domain.c | 2 +-
src/qemu/qemu_capabilities.c | 89 +++++
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_driver.c | 8 +-
src/qemu/qemu_monitor.c | 7 +
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 64 +++-
src/qemu/qemu_process.c | 11 +
.../caps_9.1.0_s390x.replies | 348 +++++++++++++++++-
.../qemucapabilitiesdata/caps_9.1.0_s390x.xml | 13 +
.../caps_9.2.0_s390x.replies | 348 +++++++++++++++++-
.../qemucapabilitiesdata/caps_9.2.0_s390x.xml | 13 +
...el-deprecated-features-off.s390x-8.2.0.err | 1 +
...el-deprecated-features-off.s390x-8.2.0.xml | 25 ++
...-deprecated-features-off.s390x-latest.args | 32 ++
...l-deprecated-features-off.s390x-latest.xml | 25 ++
.../cpu-model-deprecated-features-off.xml | 15 +
tests/qemuxmlconftest.c | 3 +
tools/virsh-host.c | 9 +-
24 files changed, 1039 insertions(+), 14 deletions(-)
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.xml
--
2.47.1
4 months, 1 week
[PATCH] Fix a few typos in error messages
by Jiri Denemark
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/722
Reported-by: Göran Uddeborg <goeran(a)uddeborg.se>
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/esx/esx_vi.c | 2 +-
src/network/bridge_driver_conf.c | 2 +-
src/qemu/qemu_postparse.c | 2 +-
src/security/security_apparmor.c | 2 +-
src/vz/vz_sdk.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 3ecd406e1d..e2589aa69a 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -370,7 +370,7 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content,
*/
if (*length > INT32_MAX / 2) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Download length it too large"));
+ _("Download length is too large"));
return -1;
}
diff --git a/src/network/bridge_driver_conf.c b/src/network/bridge_driver_conf.c
index 4e40286ee3..738652390f 100644
--- a/src/network/bridge_driver_conf.c
+++ b/src/network/bridge_driver_conf.c
@@ -97,7 +97,7 @@ virNetworkLoadDriverConfig(virNetworkDriverConfig *cfg G_GNUC_UNUSED,
if (fwBackends[0] < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unrecognized 'firewall_backend = '%1$s' set in network driver config file %2$s"),
+ _("unrecognized firewall_backend = '%1$s' set in network driver config file %2$s"),
fwBackendStr, filename);
return -1;
}
diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
index f48f172c37..4fbd849ebf 100644
--- a/src/qemu/qemu_postparse.c
+++ b/src/qemu/qemu_postparse.c
@@ -1643,7 +1643,7 @@ qemuDomainDefVcpusPostParse(virDomainDef *def)
/* they can be ordered only at the beginning */
if (prevvcpu->hotpluggable == VIR_TRISTATE_BOOL_YES) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("online non-hotpluggable vcpus need to be ordered prior to hotplugable vcpus"));
+ _("online non-hotpluggable vcpus need to be ordered prior to hotpluggable vcpus"));
return -1;
}
diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
index 07e95ec81d..c8e77c6cd2 100644
--- a/src/security/security_apparmor.c
+++ b/src/security/security_apparmor.c
@@ -374,7 +374,7 @@ AppArmorGenSecurityLabel(virSecurityManager *mgr G_GNUC_UNUSED,
if (secdef->baselabel) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- "%s", _("Cannot set a base label with AppArmour"));
+ "%s", _("Cannot set a base label with AppArmor"));
return -1;
}
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index ce4586a3f5..b20d454fb8 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -2703,7 +2703,7 @@ static int prlsdkCheckVideoUnsupportedParams(virDomainDef *def)
return 0;
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Video adapters are not supported int containers."));
+ _("Video adapters are not supported in containers."));
return -1;
}
} else {
--
2.47.1
4 months, 1 week
[PATCH] rpm: ensure we own directories we might create
by Daniel P. Berrangé
An RPM must own any directories its creates, unless it can guarantee a
dependancy has ownership. Two packages owning the same directory is fine
if permissions are consistent.
We don't require augeas as a dep in most packages, so we must own the
augeas lens directories. Likewise for systemtap tapset dirs.
Our own cpu map dir also needs ownership.
A few files are re-sorted, so that the files are listed immediately
adjacent to the %dir that contains them.
https://bugzilla.redhat.com/show_bug.cgi?id=2280979
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt.spec.in | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 9c1d0a423d..3d5164b534 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -2027,7 +2027,9 @@ exit 0
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
+%dir %{_datadir}/augeas/lenses
%{_datadir}/augeas/lenses/libvirtd.aug
+%dir %{_datadir}/augeas/lenses/tests
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
%attr(0755, root, root) %{_sbindir}/libvirtd
%{_mandir}/man8/libvirtd.8*
@@ -2433,15 +2435,17 @@ exit 0
%{_libdir}/libvirt-lxc.so.*
%{_libdir}/libvirt-admin.so.*
%dir %{_datadir}/libvirt/
+%{_datadir}/libvirt/test-screenshot.png
%dir %{_datadir}/libvirt/schemas/
+%{_datadir}/libvirt/schemas/*.rng
+%dir %{_datadir}/systemtap/tapset/
%{_datadir}/systemtap/tapset/libvirt_probes*.stp
%{_datadir}/systemtap/tapset/libvirt_functions.stp
%if %{with_qemu}
%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
%endif
-%{_datadir}/libvirt/schemas/*.rng
+%dir %{_datadir}/libvirt/cpu_map
%{_datadir}/libvirt/cpu_map/*.xml
-%{_datadir}/libvirt/test-screenshot.png
%if %{with_wireshark}
%files wireshark
--
2.46.0
4 months, 1 week
[PATCH] qemu: Enable I/O APIC if needed
by Michal Privoznik
This is a follow up of my previous commits. If the number of
vCPUs exceeds some arbitrary value (255) then QEMU requires IOMMU
with EIM and interemap enabled. But in turn, intremap IOMMU
requires split I/O APIC (per virDomainDefIOMMUValidate()). Since
after my previous commits (e.g. v10.10.0-rc1~183) IOMMU is added
automagically, the I/O APIC can be also enabled automagically.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_postparse.c | 7 +++++++
tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml | 3 ---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
index 03b5ef825a..f48f172c37 100644
--- a/src/qemu/qemu_postparse.c
+++ b/src/qemu/qemu_postparse.c
@@ -1547,6 +1547,13 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def,
* capabilities, we still want to enable this */
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
}
+
+ /* IOMMU with intremap requires split I/O APIC */
+ if (def->iommu &&
+ def->iommu->intremap == VIR_TRISTATE_SWITCH_ON &&
+ def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_DOMAIN_IOAPIC_NONE) {
+ def->features[VIR_DOMAIN_FEATURE_IOAPIC] = VIR_DOMAIN_IOAPIC_QEMU;
+ }
}
diff --git a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
index fa3aaf0d44..5abc40e566 100644
--- a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
+++ b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
@@ -8,9 +8,6 @@
<type arch='x86_64' machine='q35'>hvm</type>
<boot dev='hd'/>
</os>
- <features>
- <ioapic driver='qemu'/>
- </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
--
2.45.2
4 months, 1 week
[PATCH] util: Change return type of functions that never fail to void
by Alexander Kuznetsov
These functions return value is invariant since 18f3771, so change
its type and remove all dependent checks.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Reported-by: Pavel Nekrasov <p.nekrasov(a)fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam(a)altlinux.org>
---
src/hypervisor/virhostdev.c | 21 +++++++--------------
src/logging/log_daemon.c | 8 ++------
src/logging/log_daemon_config.c | 4 +---
src/logging/log_daemon_config.h | 2 +-
src/util/virpci.c | 4 +---
src/util/virpci.h | 2 +-
src/util/virscsi.c | 4 +---
src/util/virscsi.h | 2 +-
src/util/virscsivhost.c | 6 ++----
src/util/virscsivhost.h | 2 +-
tests/virscsitest.c | 6 ++----
11 files changed, 20 insertions(+), 41 deletions(-)
diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c
index db94a2e056..037842c8a1 100644
--- a/src/hypervisor/virhostdev.c
+++ b/src/hypervisor/virhostdev.c
@@ -1131,8 +1131,7 @@ virHostdevUpdateActivePCIDevices(virHostdevManager *mgr,
if (!actual)
continue;
- if (virPCIDeviceSetUsedBy(actual, drv_name, dom_name) < 0)
- goto cleanup;
+ virPCIDeviceSetUsedBy(actual, drv_name, dom_name);
/* Setup the original states for the PCI device */
virPCIDeviceSetUnbindFromStub(actual, virBitmapIsBitSet(orig, VIR_DOMAIN_HOSTDEV_PCI_ORIGSTATE_UNBIND));
@@ -1213,11 +1212,9 @@ virHostdevUpdateActiveSCSIHostDevices(virHostdevManager *mgr,
return -1;
if ((tmp = virSCSIDeviceListFind(mgr->activeSCSIHostdevs, scsi))) {
- if (virSCSIDeviceSetUsedBy(tmp, drv_name, dom_name) < 0)
- return -1;
+ virSCSIDeviceSetUsedBy(tmp, drv_name, dom_name);
} else {
- if (virSCSIDeviceSetUsedBy(scsi, drv_name, dom_name) < 0 ||
- virSCSIDeviceListAdd(mgr->activeSCSIHostdevs, scsi) < 0)
+ if (virSCSIDeviceListAdd(mgr->activeSCSIHostdevs, scsi) < 0)
return -1;
scsi = NULL;
}
@@ -1598,11 +1595,9 @@ virHostdevPrepareSCSIDevices(virHostdevManager *mgr,
goto error;
}
- if (virSCSIDeviceSetUsedBy(tmp, drv_name, dom_name) < 0)
- goto error;
+ virSCSIDeviceSetUsedBy(tmp, drv_name, dom_name);
} else {
- if (virSCSIDeviceSetUsedBy(scsi, drv_name, dom_name) < 0)
- goto error;
+ virSCSIDeviceSetUsedBy(scsi, drv_name, dom_name);
VIR_DEBUG("Adding %s to activeSCSIHostdevs", virSCSIDeviceGetName(scsi));
@@ -1671,8 +1666,7 @@ virHostdevPrepareSCSIVHostDevices(virHostdevManager *mgr,
if (!(host = virSCSIVHostDeviceNew(hostsrc->wwpn)))
return -1;
- if (virSCSIVHostDeviceSetUsedBy(host, drv_name, dom_name) < 0)
- return -1;
+ virSCSIVHostDeviceSetUsedBy(host, drv_name, dom_name);
if (virSCSIVHostDeviceListAdd(list, host) < 0)
return -1;
@@ -2480,8 +2474,7 @@ virHostdevUpdateActiveNVMeDevices(virHostdevManager *hostdev_mgr,
/* We must restore some attributes that were lost on daemon restart. */
virPCIDeviceSetUnbindFromStub(actual, true);
- if (virPCIDeviceSetUsedBy(actual, drv_name, dom_name) < 0)
- goto rollback;
+ virPCIDeviceSetUsedBy(actual, drv_name, dom_name);
if (virPCIDeviceListAddCopy(hostdev_mgr->activePCIHostdevs, actual) < 0)
goto rollback;
diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c
index daf7ef4b2f..5a9be4a44e 100644
--- a/src/logging/log_daemon.c
+++ b/src/logging/log_daemon.c
@@ -692,14 +692,10 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
- /* No explicit config, so try and find a default one */
+ /* No explicit config, so find a default one */
if (remote_config_file == NULL) {
implicit_conf = true;
- if (virLogDaemonConfigFilePath(privileged,
- &remote_config_file) < 0) {
- VIR_ERROR(_("Can't determine config path"));
- exit(EXIT_FAILURE);
- }
+ virLogDaemonConfigFilePath(privileged, &remote_config_file);
}
/* Read the config file if it exists */
diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_config.c
index 248bd927d3..60c424ad84 100644
--- a/src/logging/log_daemon_config.c
+++ b/src/logging/log_daemon_config.c
@@ -33,7 +33,7 @@
VIR_LOG_INIT("logging.log_daemon_config");
-int
+void
virLogDaemonConfigFilePath(bool privileged, char **configfile)
{
if (privileged) {
@@ -45,8 +45,6 @@ virLogDaemonConfigFilePath(bool privileged, char **configfile)
*configfile = g_strdup_printf("%s/virtlogd.conf", configdir);
}
-
- return 0;
}
diff --git a/src/logging/log_daemon_config.h b/src/logging/log_daemon_config.h
index 43922feedf..5c10cc50d7 100644
--- a/src/logging/log_daemon_config.h
+++ b/src/logging/log_daemon_config.h
@@ -39,7 +39,7 @@ struct _virLogDaemonConfig {
};
-int virLogDaemonConfigFilePath(bool privileged, char **configfile);
+void virLogDaemonConfigFilePath(bool privileged, char **configfile);
virLogDaemonConfig *virLogDaemonConfigNew(bool privileged);
void virLogDaemonConfigFree(virLogDaemonConfig *data);
int virLogDaemonConfigLoadFile(virLogDaemonConfig *data,
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 289c0b330b..90617e69c6 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2049,7 +2049,7 @@ virPCIDeviceSetReprobe(virPCIDevice *dev, bool reprobe)
dev->reprobe = reprobe;
}
-int
+void
virPCIDeviceSetUsedBy(virPCIDevice *dev,
const char *drv_name,
const char *dom_name)
@@ -2058,8 +2058,6 @@ virPCIDeviceSetUsedBy(virPCIDevice *dev,
VIR_FREE(dev->used_by_domname);
dev->used_by_drvname = g_strdup(drv_name);
dev->used_by_domname = g_strdup(dom_name);
-
- return 0;
}
void
diff --git a/src/util/virpci.h b/src/util/virpci.h
index ba5e0ae6f1..c5dcf9d37f 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -136,7 +136,7 @@ void virPCIDeviceSetStubDriverName(virPCIDevice *dev,
const char *driverName);
const char *virPCIDeviceGetStubDriverName(virPCIDevice *dev);
virPCIDeviceAddress *virPCIDeviceGetAddress(virPCIDevice *dev);
-int virPCIDeviceSetUsedBy(virPCIDevice *dev,
+void virPCIDeviceSetUsedBy(virPCIDevice *dev,
const char *drv_name,
const char *dom_name);
void virPCIDeviceGetUsedBy(virPCIDevice *dev,
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
index 3d2c77e3b8..6899958e21 100644
--- a/src/util/virscsi.c
+++ b/src/util/virscsi.c
@@ -243,7 +243,7 @@ virSCSIDeviceFree(virSCSIDevice *dev)
g_free(dev);
}
-int
+void
virSCSIDeviceSetUsedBy(virSCSIDevice *dev,
const char *drvname,
const char *domname)
@@ -255,8 +255,6 @@ virSCSIDeviceSetUsedBy(virSCSIDevice *dev,
copy->domname = g_strdup(domname);
VIR_APPEND_ELEMENT(dev->used_by, dev->n_used_by, copy);
-
- return 0;
}
bool
diff --git a/src/util/virscsi.h b/src/util/virscsi.h
index ec34303bdc..d76ee13bcc 100644
--- a/src/util/virscsi.h
+++ b/src/util/virscsi.h
@@ -50,7 +50,7 @@ virSCSIDevice *virSCSIDeviceNew(const char *sysfs_prefix,
bool shareable);
void virSCSIDeviceFree(virSCSIDevice *dev);
-int virSCSIDeviceSetUsedBy(virSCSIDevice *dev,
+void virSCSIDeviceSetUsedBy(virSCSIDevice *dev,
const char *drvname,
const char *domname);
bool virSCSIDeviceIsAvailable(virSCSIDevice *dev);
diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c
index 15024d7106..05b89e58d6 100644
--- a/src/util/virscsivhost.c
+++ b/src/util/virscsivhost.c
@@ -193,7 +193,7 @@ virSCSIVHostDeviceListNew(void)
}
-int
+void
virSCSIVHostDeviceSetUsedBy(virSCSIVHostDevice *dev,
const char *drvname,
const char *domname)
@@ -202,8 +202,6 @@ virSCSIVHostDeviceSetUsedBy(virSCSIVHostDevice *dev,
VIR_FREE(dev->used_by_domname);
dev->used_by_drvname = g_strdup(drvname);
dev->used_by_domname = g_strdup(domname);
-
- return 0;
}
@@ -214,7 +212,7 @@ virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevice *dev,
{
*drv_name = dev->used_by_drvname;
*dom_name = dev->used_by_domname;
- }
+}
int
diff --git a/src/util/virscsivhost.h b/src/util/virscsivhost.h
index a7299382db..caaac26328 100644
--- a/src/util/virscsivhost.h
+++ b/src/util/virscsivhost.h
@@ -50,7 +50,7 @@ void virSCSIVHostDeviceListDel(virSCSIVHostDeviceList *list,
virSCSIVHostDevice *dev);
virSCSIVHostDeviceList *virSCSIVHostDeviceListNew(void);
virSCSIVHostDevice *virSCSIVHostDeviceNew(const char *name);
-int virSCSIVHostDeviceSetUsedBy(virSCSIVHostDevice *dev,
+void virSCSIVHostDeviceSetUsedBy(virSCSIVHostDevice *dev,
const char *drvname,
const char *domname);
void virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevice *dev,
diff --git a/tests/virscsitest.c b/tests/virscsitest.c
index c96699e157..2c3b599c7a 100644
--- a/tests/virscsitest.c
+++ b/tests/virscsitest.c
@@ -87,14 +87,12 @@ test2(const void *data G_GNUC_UNUSED)
if (!virSCSIDeviceIsAvailable(dev))
goto cleanup;
- if (virSCSIDeviceSetUsedBy(dev, "QEMU", "fc18") < 0)
- goto cleanup;
+ virSCSIDeviceSetUsedBy(dev, "QEMU", "fc18");
if (virSCSIDeviceIsAvailable(dev))
goto cleanup;
- if (virSCSIDeviceSetUsedBy(dev, "QEMU", "fc20") < 0)
- goto cleanup;
+ virSCSIDeviceSetUsedBy(dev, "QEMU", "fc20");
if (virSCSIDeviceIsAvailable(dev))
goto cleanup;
--
2.42.2
4 months, 1 week
[PATCH v4 00/11] swtpm: Add support for profiles
by Stefan Berger
Upcoming libtpms v0.10 and swtpm v0.10 will have TPM profile support that
allows to restrict a TPM's provided set of crypto algorithms and commands
and through which backwards compatibility and migration from newer versions
of libtpms to older ones (up to libtpms v0.9) is supported. For the latter
to work it is necessary that the user chooses the right ('null') profile.
This series adds support for passing a profile choice to swtpm_setup by
setting it in the domain XML using the <profile/> XML node. An optional
attribute 'remove_disabled' can be set in this node and accepts two values:
"check": test a few crypto algorithms (tdes, camellia, unpadded encryption,
and others) for whether they are currently disabled due to FIPS
mode on the host and remove these algorithms in the 'custom'
profile if they are disabled;
"fips-host": do not test but remove all the possibly disabled crypto
algorithms (from list above)
Also extend the documentation but point the user to swtpm and libtpms
documentation for further details.
Follow Deniel's suggestions there's now a PR for swtpm_setup to support
searching for profiles though a configurable local directory, distro
directory and if no profile could be found there (with appended
".json" suffix) it will fall back to try to use a built-in profile by
the provided name: https://github.com/stefanberger/swtpm/pull/918
Stefan
v4:
- Renamed previous 'name' attribute in profile XML node to 'source'
to indicate that the profile was created from some sort of 'source'.
The 'name' is now set from the name of the profile read from the
swtpm instance's state once it has been created.
v3:
- 2/10: Adjustments to due rebase
- Applied Marc-André's R-b tags
- 10/10: Read back profile name from swtpm and adjust it in emulator defs
Stefan Berger (11):
conf: Move TPM emulator parameters into own struct
qemu: Pass virQEMUDriverConfig rather than some of its fields
util: Add parsing support for swtpm_setup's cmdarg-profile capability
conf: Define enum virDomainTPMProfileRemoveDisabled
schema: Extend schema for TPM emulator profile node
conf: Add support for profile parameter on TPM emulator in domain XML
docs: Add documentation for the TPM backend profile node
qemu: Extend swtpm_setup command line to set a profile by its name
qemu: Move adding of keys to swtpm command line into own function
qemu: Move adding --tpmstate to swtpm command line into own function
qemu: Read back the profile name after creation of a TPM instance
docs/formatdomain.rst | 32 +++
src/conf/domain_conf.c | 47 ++++
src/conf/domain_conf.h | 38 ++--
src/conf/domain_validate.c | 7 +
src/conf/schemas/domaincommon.rng | 32 +++
src/conf/virconftypes.h | 2 +
src/qemu/qemu_extdevice.c | 5 +-
src/qemu/qemu_tpm.c | 344 ++++++++++++++++++++----------
src/qemu/qemu_tpm.h | 3 +-
src/util/virtpm.c | 2 +
src/util/virtpm.h | 2 +
tests/testutilsqemu.c | 1 +
12 files changed, 386 insertions(+), 129 deletions(-)
--
2.47.0
4 months, 1 week