qemu:///embed and isolation from global components
by Andrea Bolognani
Recently I've been working on integrating qemu:///embed into an
application. It's been reasonably smooth so far :)
There's one thing, however, that has caused a bit of confusion, and
I would like to clarify whether my expectations are incorrect, there
are genuine bugs in the implementation that need to be addressed, or
maybe the experimental nature of embedded driver support results in
not all scenarios having yet been considered and catered for.
Using virt-qemu-run as an example, when I run it as root I see that
* the domain doesn't show up in the output of 'virsh list' for
qemu:///system;
* it does, however, show up in the output of 'machinectl', with
class=vm and service=libvirt-qemu;
* virtlogd is automatically spawned, if not already active, to
take care of the domain's log file.
The first one is expected, but the other two were a surprise, at
least to me. Basically, what I would expect is that qemu:///embed
would work in a completely isolated way, only interacting with
system-wide components when that's explicitly requested.
In other words, I would expect virtlogd not to be spawned, and the
domain not to be registered with machinectl; at the same time, if
the domain configuration is such that it contains for example
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
</interface>
then I would expect to see a failure unless a connection to
network:///system had been explicitly and pre-emptively opened, and
not the current behavior which apparently is to automatically open
that connection and spawning virtnetworkd as a result.
As a corollary to this, I would expect that two qemu:///embed
connections using different roots to be able to define domains with
the same name without any problem, but as it stands this is not
possible because machinectl will refuse to register the second one.
There might be other components that freak out as well, that's just
the first one that blocked me.
Are my expectations unreasonable? Or should we work towards making
sure uses of qemu:///embed don't touch global resources and don't
clash with each other?
--
Andrea Bolognani / Red Hat / Virtualization
4 years, 8 months
[PATCH 0/5] qemu: Don't log spurious errors on qemuMonitorDelObject
by Peter Krempa
qemuMonitorDelObject is often used in cleanup cases so we need to
control whether to log errors.
First patch actually prevents one of the spurious calls in cases we know
it would be pointless.
Peter Krempa (5):
qemuDomainChangeEjectableMedia: Don't always remove managed PR daemon
qemuMonitorJSON(Add|Del)Object: Refactor cleanup
qemuMonitorJSONCheckError: Use g_autofree
qemuMonitorJSONCheckError: Allow suppressing of error reporting
qemu: Suppress error reporting from qemuMonitorDelObject in cleanup
paths
src/qemu/qemu_block.c | 10 ++---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 34 +++++++++-------
src/qemu/qemu_monitor.c | 5 ++-
src/qemu/qemu_monitor.h | 3 +-
src/qemu/qemu_monitor_json.c | 77 ++++++++++++++++++------------------
src/qemu/qemu_monitor_json.h | 3 +-
7 files changed, 71 insertions(+), 63 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH 0/2] conf: Don't generate clashing machine names for embed driver
by Michal Privoznik
Inspired by the talk here:
https://www.redhat.com/archives/libvir-list/2020-March/msg00232.html
Instead of using md5() and the first 6 letters of it, I've decided to go
with SHA256 and 8 letters as this offers 16^8 = 4294967296 = 2^32
possibilities, which is the limit of inodes for ext4. If we ever hit a
conflict, we can just use 9 letters of the hash.
Michal Prívozník (2):
qemu_conf: Track embed root dir
conf: Don't generate clashing machine names for embed driver
src/conf/domain_conf.c | 18 +++++++++++++++---
src/conf/domain_conf.h | 1 +
src/lxc/lxc_domain.c | 2 +-
src/qemu/qemu_conf.c | 2 ++
src/qemu/qemu_conf.h | 2 ++
src/qemu/qemu_domain.c | 4 +++-
tests/virsystemdtest.c | 35 ++++++++++++++++++++---------------
7 files changed, 44 insertions(+), 20 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH] vmx: make 'fileName' optional for CD-ROMs
by Pino Toscano
It seems like CD-ROMs may have no 'fileName' property specified in case
there is nothing configured as attachment for the drive. Hence, make
sure that virVMXParseDisk() do not consider it mandatory anymore,
considering it an empty block cdrom device. Sadly virVMXParseDisk() is
used also to parse disk and floppies, so make sure that a NULL fileName
is handled in cdrom-related paths.
https://bugzilla.redhat.com/show_bug.cgi?id=1808610
Signed-off-by: Pino Toscano <ptoscano(a)redhat.com>
---
src/vmx/vmx.c | 22 ++++++++++--------
.../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx | 4 ++++
.../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml | 23 +++++++++++++++++++
tests/vmx2xmltest.c | 1 +
4 files changed, 40 insertions(+), 10 deletions(-)
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index f0140129a2..58ae966fd4 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2207,7 +2207,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
goto cleanup;
/* vmx:fileName -> def:src, def:type */
- if (virVMXGetConfigString(conf, fileName_name, &fileName, false) < 0)
+ if (virVMXGetConfigString(conf, fileName_name, &fileName, true) < 0)
goto cleanup;
/* vmx:writeThrough -> def:cachemode */
@@ -2218,7 +2218,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
/* Setup virDomainDiskDef */
if (device == VIR_DOMAIN_DISK_DEVICE_DISK) {
- if (virStringHasCaseSuffix(fileName, ".vmdk")) {
+ if (fileName && virStringHasCaseSuffix(fileName, ".vmdk")) {
char *tmp;
if (deviceType != NULL) {
@@ -2254,7 +2254,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
if (mode)
(*def)->transient = STRCASEEQ(mode,
"independent-nonpersistent");
- } else if (virStringHasCaseSuffix(fileName, ".iso") ||
+ } else if (fileName == NULL ||
+ virStringHasCaseSuffix(fileName, ".iso") ||
STREQ(fileName, "emptyBackingString") ||
(deviceType &&
(STRCASEEQ(deviceType, "atapi-cdrom") ||
@@ -2277,7 +2278,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
goto cleanup;
}
} else if (device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
- if (virStringHasCaseSuffix(fileName, ".iso")) {
+ if (fileName && virStringHasCaseSuffix(fileName, ".iso")) {
char *tmp;
if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) {
@@ -2295,7 +2296,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
goto cleanup;
}
VIR_FREE(tmp);
- } else if (virStringHasCaseSuffix(fileName, ".vmdk")) {
+ } else if (fileName && virStringHasCaseSuffix(fileName, ".vmdk")) {
/*
* This function was called in order to parse a CDROM device, but
* .vmdk files are for harddisk devices only. Just ignore it,
@@ -2306,7 +2307,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
} else if (deviceType && STRCASEEQ(deviceType, "atapi-cdrom")) {
virDomainDiskSetType(*def, VIR_STORAGE_TYPE_BLOCK);
- if (STRCASEEQ(fileName, "auto detect")) {
+ if (fileName && STRCASEEQ(fileName, "auto detect")) {
ignore_value(virDomainDiskSetSource(*def, NULL));
(*def)->startupPolicy = VIR_DOMAIN_STARTUP_POLICY_OPTIONAL;
} else if (virDomainDiskSetSource(*def, fileName) < 0) {
@@ -2317,7 +2318,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
(*def)->device = VIR_DOMAIN_DISK_DEVICE_LUN;
virDomainDiskSetType(*def, VIR_STORAGE_TYPE_BLOCK);
- if (STRCASEEQ(fileName, "auto detect")) {
+ if (fileName && STRCASEEQ(fileName, "auto detect")) {
ignore_value(virDomainDiskSetSource(*def, NULL));
(*def)->startupPolicy = VIR_DOMAIN_STARTUP_POLICY_OPTIONAL;
} else if (virDomainDiskSetSource(*def, fileName) < 0) {
@@ -2325,7 +2326,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
}
} else if (busType == VIR_DOMAIN_DISK_BUS_SCSI &&
deviceType && STRCASEEQ(deviceType, "scsi-passthru")) {
- if (STRPREFIX(fileName, "/vmfs/devices/cdrom/")) {
+ if (fileName && STRPREFIX(fileName, "/vmfs/devices/cdrom/")) {
/* SCSI-passthru CD-ROMs actually are device='lun' */
(*def)->device = VIR_DOMAIN_DISK_DEVICE_LUN;
virDomainDiskSetType(*def, VIR_STORAGE_TYPE_BLOCK);
@@ -2341,7 +2342,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
*/
goto ignore;
}
- } else if (STREQ(fileName, "emptyBackingString")) {
+ } else if (fileName && STREQ(fileName, "emptyBackingString")) {
if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Expecting VMX entry '%s' to be 'cdrom-image' "
@@ -2355,7 +2356,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid or not yet handled value '%s' "
"for VMX entry '%s' for device type '%s'"),
- fileName, fileName_name,
+ fileName ? fileName : "(not present)",
+ fileName_name,
deviceType ? deviceType : "unknown");
goto cleanup;
}
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx
new file mode 100644
index 0000000000..36286cb20f
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx
@@ -0,0 +1,4 @@
+config.version = "8"
+virtualHW.version = "4"
+ide0:0.present = "true"
+ide0:0.deviceType = "atapi-cdrom"
diff --git a/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml
new file mode 100644
index 0000000000..af4a5ff9f6
--- /dev/null
+++ b/tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml
@@ -0,0 +1,23 @@
+<domain type='vmware'>
+ <uuid>00000000-0000-0000-0000-000000000000</uuid>
+ <memory unit='KiB'>32768</memory>
+ <currentMemory unit='KiB'>32768</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='block' device='cdrom'>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <video>
+ <model type='vmvga' vram='4096' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 8d7b8ba2a4..1966aed6fe 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -218,6 +218,7 @@ mymain(void)
DO_TEST("cdrom-scsi-passthru", "cdrom-scsi-passthru");
DO_TEST("cdrom-ide-file", "cdrom-ide-file");
DO_TEST("cdrom-ide-empty", "cdrom-ide-empty");
+ DO_TEST("cdrom-ide-empty-2", "cdrom-ide-empty-2");
DO_TEST("cdrom-ide-device", "cdrom-ide-device");
DO_TEST("cdrom-ide-raw-device", "cdrom-ide-raw-device");
DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect");
--
2.25.1
4 years, 8 months
[PATCH] qemuDomainVcpuValidateConfig: Properly initialize 'firstcpu' variable
by Peter Krempa
The loop which checks whether the vcpus are in proper configuration for
the requested hot(un)plug skips the first modified vcpu. This means
that 'firstvcpu' which is used to print the error message in case the
configuration is not suitable would never point to the first modified
vcpu.
In cases such as:
<vcpu placement='auto' current='5'>8</vcpu>
<vcpus>
<vcpu id='0' enabled='yes' hotpluggable='no'/>
<vcpu id='1' enabled='yes' hotpluggable='no'/>
<vcpu id='2' enabled='yes' hotpluggable='no'/>
<vcpu id='3' enabled='yes' hotpluggable='no'/>
<vcpu id='4' enabled='yes' hotpluggable='no'/>
<vcpu id='5' enabled='no' hotpluggable='yes'/>
<vcpu id='6' enabled='no' hotpluggable='yes'/>
<vcpu id='7' enabled='no' hotpluggable='yes'/>
</vcpus>
# virsh setvcpu --config --disable upstream 1
error: invalid argument: vcpu '-1' can't be modified as it is followed by non-hotpluggable online vcpus
After this fix the proper vcpu is reported in the error message:
# virsh setvcpu --config --disable upstream 1
error: invalid argument: vcpu '1' can't be modified as it is followed by non-hotpluggable online vcpu
https://bugzilla.redhat.com/show_bug.cgi?id=1611061
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 47069be900..a76df64a7b 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -6478,18 +6478,16 @@ qemuDomainVcpuValidateConfig(virDomainDefPtr def,
return -1;
}
+ firstvcpu = virBitmapNextSetBit(map, -1);
+
/* non-hotpluggable vcpus need to stay clustered starting from vcpu 0 */
- for (next = virBitmapNextSetBit(map, -1) + 1; next < maxvcpus; next++) {
+ for (next = firstvcpu + 1; next < maxvcpus; next++) {
if (!(vcpu = virDomainDefGetVcpu(def, next)))
continue;
/* skip vcpus being modified */
- if (virBitmapIsBitSet(map, next)) {
- if (firstvcpu < 0)
- firstvcpu = next;
-
+ if (virBitmapIsBitSet(map, next))
continue;
- }
if (vcpu->online && vcpu->hotpluggable == VIR_TRISTATE_BOOL_NO) {
virReportError(VIR_ERR_INVALID_ARG,
--
2.24.1
4 years, 8 months
[PULL 00/10] Bitmaps patches
by John Snow
The following changes since commit 6e8a73e911f066527e775e04b98f31ebd19db600:
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-03-11 14:41:27 +0000)
are available in the Git repository at:
https://github.com/jnsnow/qemu.git tags/bitmaps-pull-request
for you to fetch changes up to 34b456d485a4df3a88116fb5ef0c418f2f12990d:
block/qcow2-bitmap: use bdrv_dirty_bitmap_next_dirty (2020-03-12 16:36:46 -0400)
----------------------------------------------------------------
Pull request
----------------------------------------------------------------
Vladimir Sementsov-Ogievskiy (10):
hbitmap: assert that we don't create bitmap larger than INT64_MAX
hbitmap: move hbitmap_iter_next_word to hbitmap.c
hbitmap: unpublish hbitmap_iter_skip_words
hbitmap: drop meta bitmaps as they are unused
block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t
block/dirty-bitmap: add _next_dirty API
block/dirty-bitmap: improve _next_dirty_area API
nbd/server: introduce NBDExtentArray
nbd/server: use bdrv_dirty_bitmap_next_dirty_area
block/qcow2-bitmap: use bdrv_dirty_bitmap_next_dirty
include/block/dirty-bitmap.h | 9 +-
include/qemu/hbitmap.h | 95 +++--------
block/dirty-bitmap.c | 16 +-
block/qcow2-bitmap.c | 15 +-
nbd/server.c | 251 ++++++++++++++--------------
tests/test-hbitmap.c | 316 +++++++++++++----------------------
util/hbitmap.c | 134 +++++++++------
7 files changed, 375 insertions(+), 461 deletions(-)
--
2.21.1
4 years, 8 months
[PATCH v2 0/2] vmx: make 'fileName' optional for CD-ROMs
by Pino Toscano
v1 is:
https://www.redhat.com/archives/libvir-list/2020-March/msg00616.html
Changes from v1:
- added a patch to shortcut few checks
- use NULLSTR
- handle floppies (poor guys)
Pino Toscano (2):
vmx: shortcut earlier few 'ignore' cases in virVMXParseDisk()
vmx: make 'fileName' optional for CD-ROMs
src/vmx/vmx.c | 67 ++++++++++---------
.../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx | 4 ++
.../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml | 23 +++++++
tests/vmx2xmltest.c | 1 +
4 files changed, 62 insertions(+), 33 deletions(-)
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.vmx
create mode 100644 tests/vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml
--
2.25.1
4 years, 8 months
[PATCH] cpu_map: Add more -noTSX x86 CPU models
by Christian Ehrhardt
One of the mitigation methods for TAA[1] is to disable TSX
support on the host system. Linux added a mechanism to disable
TSX globally through the kernel command line, and many Linux
distributions now default to tsx=off. This makes existing CPU
models that have HLE and RTM enabled not usable anymore.
Add new versions of all CPU models that have the HLE and RTM
features enabled, that can be used when TSX is disabled in the
host system.
On systems disabling the features without those types defined
in cpu-maps users end up without modern CPU types in the list
of usable CPUs to use in the likes of virsh domcapabilities
or tools higher in the stack like virt-manager.
This adds:
-Cascadelake-Server-noTSX
-Icelake-Client-noTSX
-Icelake-Server-noTSX
-Skylake-Server-noTSX-IBRS
-Skylake-Client-noTSX-IBRS
Introduced in QEMU by commit v4.2.0-rc2-3-g9ab2237f19 (function)
and commit v4.2.0-rc2-4-g02fa60d101 (names)
References:
[1] TAA, TSX asynchronous Abort:
https://software.intel.com/security-software-guidance/insights/deep-dive-...
https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abor...
Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1853200
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
---
src/cpu_map/Makefile.inc.am | 5 ++
src/cpu_map/index.xml | 5 ++
src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 78 ++++++++++++++++
src/cpu_map/x86_Icelake-Client-noTSX.xml | 81 +++++++++++++++++
src/cpu_map/x86_Icelake-Server-noTSX.xml | 90 +++++++++++++++++++
src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 73 +++++++++++++++
src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 75 ++++++++++++++++
7 files changed, 407 insertions(+)
create mode 100644 src/cpu_map/x86_Cascadelake-Server-noTSX.xml
create mode 100644 src/cpu_map/x86_Icelake-Client-noTSX.xml
create mode 100644 src/cpu_map/x86_Icelake-Server-noTSX.xml
create mode 100644 src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
create mode 100644 src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am
index e935178304..be64c9a0d4 100644
--- a/src/cpu_map/Makefile.inc.am
+++ b/src/cpu_map/Makefile.inc.am
@@ -20,6 +20,7 @@ cpumap_DATA = \
cpu_map/x86_Broadwell-noTSX.xml \
cpu_map/x86_Broadwell-noTSX-IBRS.xml \
cpu_map/x86_Cascadelake-Server.xml \
+ cpu_map/x86_Cascadelake-Server-noTSX.xml \
cpu_map/x86_Conroe.xml \
cpu_map/x86_core2duo.xml \
cpu_map/x86_coreduo.xml \
@@ -33,7 +34,9 @@ cpumap_DATA = \
cpu_map/x86_Haswell-noTSX.xml \
cpu_map/x86_Haswell-noTSX-IBRS.xml \
cpu_map/x86_Icelake-Client.xml \
+ cpu_map/x86_Icelake-Client-noTSX.xml \
cpu_map/x86_Icelake-Server.xml \
+ cpu_map/x86_Icelake-Server-noTSX.xml \
cpu_map/x86_IvyBridge.xml \
cpu_map/x86_IvyBridge-IBRS.xml \
cpu_map/x86_kvm32.xml \
@@ -58,8 +61,10 @@ cpumap_DATA = \
cpu_map/x86_SandyBridge-IBRS.xml \
cpu_map/x86_Skylake-Client.xml \
cpu_map/x86_Skylake-Client-IBRS.xml \
+ cpu_map/x86_Skylake-Client-noTSX-IBRS.xml \
cpu_map/x86_Skylake-Server.xml \
cpu_map/x86_Skylake-Server-IBRS.xml \
+ cpu_map/x86_Skylake-Server-noTSX-IBRS.xml \
cpu_map/x86_Westmere.xml \
cpu_map/x86_Westmere-IBRS.xml \
$(NULL)
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
index ffb2f6fe1b..50b030de29 100644
--- a/src/cpu_map/index.xml
+++ b/src/cpu_map/index.xml
@@ -44,11 +44,16 @@
<include filename="x86_Broadwell-IBRS.xml"/>
<include filename="x86_Skylake-Client.xml"/>
<include filename="x86_Skylake-Client-IBRS.xml"/>
+ <include filename="x86_Skylake-Client-noTSX-IBRS.xml"/>
<include filename="x86_Skylake-Server.xml"/>
<include filename="x86_Skylake-Server-IBRS.xml"/>
+ <include filename="x86_Skylake-Server-noTSX-IBRS.xml"/>
<include filename="x86_Cascadelake-Server.xml"/>
+ <include filename="x86_Cascadelake-Server-noTSX.xml"/>
<include filename="x86_Icelake-Client.xml"/>
+ <include filename="x86_Icelake-Client-noTSX.xml"/>
<include filename="x86_Icelake-Server.xml"/>
+ <include filename="x86_Icelake-Server-noTSX.xml"/>
<!-- AMD CPUs -->
<include filename="x86_athlon.xml"/>
diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
new file mode 100644
index 0000000000..4a979739e2
--- /dev/null
+++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
@@ -0,0 +1,78 @@
+<cpus>
+ <model name='Cascadelake-Server'>
+ <signature family='6' model='85'/> <!-- 050654 -->
+ <vendor name='Intel'/>
+ <feature name='3dnowprefetch'/>
+ <feature name='abm'/>
+ <feature name='adx'/>
+ <feature name='aes'/>
+ <feature name='apic'/>
+ <feature name='arat'/>
+ <feature name='avx'/>
+ <feature name='avx2'/>
+ <feature name='avx512bw'/>
+ <feature name='avx512cd'/>
+ <feature name='avx512dq'/>
+ <feature name='avx512f'/>
+ <feature name='avx512vl'/>
+ <feature name='avx512vnni'/>
+ <feature name='bmi1'/>
+ <feature name='bmi2'/>
+ <feature name='clflush'/>
+ <feature name='clflushopt'/>
+ <feature name='clwb'/>
+ <feature name='cmov'/>
+ <feature name='cx16'/>
+ <feature name='cx8'/>
+ <feature name='de'/>
+ <feature name='erms'/>
+ <feature name='f16c'/>
+ <feature name='fma'/>
+ <feature name='fpu'/>
+ <feature name='fsgsbase'/>
+ <feature name='fxsr'/>
+ <feature name='invpcid'/>
+ <feature name='lahf_lm'/>
+ <feature name='lm'/>
+ <feature name='mca'/>
+ <feature name='mce'/>
+ <feature name='mmx'/>
+ <feature name='movbe'/>
+ <feature name='mpx'/>
+ <feature name='msr'/>
+ <feature name='mtrr'/>
+ <feature name='nx'/>
+ <feature name='pae'/>
+ <feature name='pat'/>
+ <feature name='pcid'/>
+ <feature name='pclmuldq'/>
+ <feature name='pdpe1gb'/>
+ <feature name='pge'/>
+ <feature name='pni'/>
+ <feature name='popcnt'/>
+ <feature name='pse'/>
+ <feature name='pse36'/>
+ <feature name='rdrand'/>
+ <feature name='rdseed'/>
+ <feature name='rdtscp'/>
+ <feature name='sep'/>
+ <feature name='smap'/>
+ <feature name='smep'/>
+ <feature name='spec-ctrl'/>
+ <feature name='ssbd'/>
+ <feature name='sse'/>
+ <feature name='sse2'/>
+ <feature name='sse4.1'/>
+ <feature name='sse4.2'/>
+ <feature name='ssse3'/>
+ <feature name='syscall'/>
+ <feature name='tsc'/>
+ <feature name='tsc-deadline'/>
+ <feature name='vme'/>
+ <feature name='x2apic'/>
+ <feature name='xgetbv1'/>
+ <feature name='xsave'/>
+ <feature name='xsavec'/>
+ <feature name='xsaveopt'/>
+ </model>
+</cpus>
diff --git a/src/cpu_map/x86_Icelake-Client-noTSX.xml b/src/cpu_map/x86_Icelake-Client-noTSX.xml
new file mode 100644
index 0000000000..4feb9cef2d
--- /dev/null
+++ b/src/cpu_map/x86_Icelake-Client-noTSX.xml
@@ -0,0 +1,81 @@
+<cpus>
+ <model name='Icelake-Client'>
+ <signature family='6' model='126'/> <!-- 0706e0 -->
+ <vendor name='Intel'/>
+ <feature name='3dnowprefetch'/>
+ <feature name='abm'/>
+ <feature name='adx'/>
+ <feature name='aes'/>
+ <feature name='apic'/>
+ <feature name='arat'/>
+ <feature name='avx'/>
+ <feature name='avx2'/>
+ <feature name='avx512-vpopcntdq'/>
+ <feature name='avx512bitalg'/>
+ <feature name='avx512vbmi'/>
+ <feature name='avx512vbmi2'/>
+ <feature name='avx512vnni'/>
+ <feature name='bmi1'/>
+ <feature name='bmi2'/>
+ <feature name='clflush'/>
+ <feature name='cmov'/>
+ <feature name='cx16'/>
+ <feature name='cx8'/>
+ <feature name='de'/>
+ <feature name='erms'/>
+ <feature name='f16c'/>
+ <feature name='fma'/>
+ <feature name='fpu'/>
+ <feature name='fsgsbase'/>
+ <feature name='fxsr'/>
+ <feature name='gfni'/>
+ <feature name='intel-pt'/>
+ <feature name='invpcid'/>
+ <feature name='lahf_lm'/>
+ <feature name='lm'/>
+ <feature name='mca'/>
+ <feature name='mce'/>
+ <feature name='mmx'/>
+ <feature name='movbe'/>
+ <feature name='mpx'/>
+ <feature name='msr'/>
+ <feature name='mtrr'/>
+ <feature name='nx'/>
+ <feature name='pae'/>
+ <feature name='pat'/>
+ <feature name='pcid'/>
+ <feature name='pclmuldq'/>
+ <feature name='pge'/>
+ <feature name='pku'/>
+ <feature name='pni'/>
+ <feature name='popcnt'/>
+ <feature name='pse'/>
+ <feature name='pse36'/>
+ <feature name='rdrand'/>
+ <feature name='rdseed'/>
+ <feature name='rdtscp'/>
+ <feature name='sep'/>
+ <feature name='smap'/>
+ <feature name='smep'/>
+ <feature name='spec-ctrl'/>
+ <feature name='ssbd'/>
+ <feature name='sse'/>
+ <feature name='sse2'/>
+ <feature name='sse4.1'/>
+ <feature name='sse4.2'/>
+ <feature name='ssse3'/>
+ <feature name='syscall'/>
+ <feature name='tsc'/>
+ <feature name='tsc-deadline'/>
+ <feature name='umip'/>
+ <feature name='vaes'/>
+ <feature name='vme'/>
+ <feature name='vpclmulqdq'/>
+ <feature name='wbnoinvd'/>
+ <feature name='x2apic'/>
+ <feature name='xgetbv1'/>
+ <feature name='xsave'/>
+ <feature name='xsavec'/>
+ <feature name='xsaveopt'/>
+ </model>
+</cpus>
diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Icelake-Server-noTSX.xml
new file mode 100644
index 0000000000..76ae713a4d
--- /dev/null
+++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml
@@ -0,0 +1,90 @@
+<cpus>
+ <model name='Icelake-Server'>
+ <signature family='6' model='134'/> <!-- 080660 -->
+ <vendor name='Intel'/>
+ <feature name='3dnowprefetch'/>
+ <feature name='abm'/>
+ <feature name='adx'/>
+ <feature name='aes'/>
+ <feature name='apic'/>
+ <feature name='arat'/>
+ <feature name='avx'/>
+ <feature name='avx2'/>
+ <feature name='avx512-vpopcntdq'/>
+ <feature name='avx512bitalg'/>
+ <feature name='avx512bw'/>
+ <feature name='avx512cd'/>
+ <feature name='avx512dq'/>
+ <feature name='avx512f'/>
+ <feature name='avx512vbmi'/>
+ <feature name='avx512vbmi2'/>
+ <feature name='avx512vl'/>
+ <feature name='avx512vnni'/>
+ <feature name='bmi1'/>
+ <feature name='bmi2'/>
+ <feature name='clflush'/>
+ <feature name='clflushopt'/>
+ <feature name='clwb'/>
+ <feature name='cmov'/>
+ <feature name='cx16'/>
+ <feature name='cx8'/>
+ <feature name='de'/>
+ <feature name='erms'/>
+ <feature name='f16c'/>
+ <feature name='fma'/>
+ <feature name='fpu'/>
+ <feature name='fsgsbase'/>
+ <feature name='fxsr'/>
+ <feature name='gfni'/>
+ <feature name='intel-pt'/>
+ <feature name='invpcid'/>
+ <feature name='la57'/>
+ <feature name='lahf_lm'/>
+ <feature name='lm'/>
+ <feature name='mca'/>
+ <feature name='mce'/>
+ <feature name='mmx'/>
+ <feature name='movbe'/>
+ <feature name='mpx'/>
+ <feature name='msr'/>
+ <feature name='mtrr'/>
+ <feature name='nx'/>
+ <feature name='pae'/>
+ <feature name='pat'/>
+ <feature name='pcid'/>
+ <feature name='pclmuldq'/>
+ <feature name='pdpe1gb'/>
+ <feature name='pge'/>
+ <feature name='pku'/>
+ <feature name='pni'/>
+ <feature name='popcnt'/>
+ <feature name='pse'/>
+ <feature name='pse36'/>
+ <feature name='rdrand'/>
+ <feature name='rdseed'/>
+ <feature name='rdtscp'/>
+ <feature name='sep'/>
+ <feature name='smap'/>
+ <feature name='smep'/>
+ <feature name='spec-ctrl'/>
+ <feature name='ssbd'/>
+ <feature name='sse'/>
+ <feature name='sse2'/>
+ <feature name='sse4.1'/>
+ <feature name='sse4.2'/>
+ <feature name='ssse3'/>
+ <feature name='syscall'/>
+ <feature name='tsc'/>
+ <feature name='tsc-deadline'/>
+ <feature name='umip'/>
+ <feature name='vaes'/>
+ <feature name='vme'/>
+ <feature name='vpclmulqdq'/>
+ <feature name='wbnoinvd'/>
+ <feature name='x2apic'/>
+ <feature name='xgetbv1'/>
+ <feature name='xsave'/>
+ <feature name='xsavec'/>
+ <feature name='xsaveopt'/>
+ </model>
+</cpus>
diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
new file mode 100644
index 0000000000..5fa4a733c6
--- /dev/null
+++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
@@ -0,0 +1,73 @@
+<cpus>
+ <model name='Skylake-Client-IBRS'>
+ <signature family='6' model='94'/> <!-- 0506e0 -->
+ <signature family='6' model='78'/> <!-- 0406e0 -->
+ <!-- These are Kaby Lake and Coffee Lake successors to Skylake,
+ but we don't have specific models for them. -->
+ <signature family='6' model='142'/> <!-- 0806e0 -->
+ <signature family='6' model='158'/> <!-- 0906e0 -->
+ <vendor name='Intel'/>
+ <feature name='3dnowprefetch'/>
+ <feature name='abm'/>
+ <feature name='adx'/>
+ <feature name='aes'/>
+ <feature name='apic'/>
+ <feature name='arat'/>
+ <feature name='avx'/>
+ <feature name='avx2'/>
+ <feature name='bmi1'/>
+ <feature name='bmi2'/>
+ <feature name='clflush'/>
+ <feature name='cmov'/>
+ <feature name='cx16'/>
+ <feature name='cx8'/>
+ <feature name='de'/>
+ <feature name='erms'/>
+ <feature name='f16c'/>
+ <feature name='fma'/>
+ <feature name='fpu'/>
+ <feature name='fsgsbase'/>
+ <feature name='fxsr'/>
+ <feature name='invpcid'/>
+ <feature name='lahf_lm'/>
+ <feature name='lm'/>
+ <feature name='mca'/>
+ <feature name='mce'/>
+ <feature name='mmx'/>
+ <feature name='movbe'/>
+ <feature name='mpx'/>
+ <feature name='msr'/>
+ <feature name='mtrr'/>
+ <feature name='nx'/>
+ <feature name='pae'/>
+ <feature name='pat'/>
+ <feature name='pcid'/>
+ <feature name='pclmuldq'/>
+ <feature name='pge'/>
+ <feature name='pni'/>
+ <feature name='popcnt'/>
+ <feature name='pse'/>
+ <feature name='pse36'/>
+ <feature name='rdrand'/>
+ <feature name='rdseed'/>
+ <feature name='rdtscp'/>
+ <feature name='sep'/>
+ <feature name='smap'/>
+ <feature name='smep'/>
+ <feature name='spec-ctrl'/>
+ <feature name='sse'/>
+ <feature name='sse2'/>
+ <feature name='sse4.1'/>
+ <feature name='sse4.2'/>
+ <feature name='ssse3'/>
+ <feature name='syscall'/>
+ <feature name='tsc'/>
+ <feature name='tsc-deadline'/>
+ <feature name='vme'/>
+ <feature name='x2apic'/>
+ <feature name='xgetbv1'/>
+ <feature name='xsave'/>
+ <feature name='xsavec'/>
+ <feature name='xsaveopt'/>
+ </model>
+</cpus>
diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
new file mode 100644
index 0000000000..cb65474767
--- /dev/null
+++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
@@ -0,0 +1,75 @@
+<cpus>
+ <model name='Skylake-Server-IBRS'>
+ <signature family='6' model='85'/> <!-- 050654 -->
+ <vendor name='Intel'/>
+ <feature name='3dnowprefetch'/>
+ <feature name='abm'/>
+ <feature name='adx'/>
+ <feature name='aes'/>
+ <feature name='apic'/>
+ <feature name='arat'/>
+ <feature name='avx'/>
+ <feature name='avx2'/>
+ <feature name='avx512bw'/>
+ <feature name='avx512cd'/>
+ <feature name='avx512dq'/>
+ <feature name='avx512f'/>
+ <feature name='avx512vl'/>
+ <feature name='bmi1'/>
+ <feature name='bmi2'/>
+ <feature name='clflush'/>
+ <feature name='clwb'/>
+ <feature name='cmov'/>
+ <feature name='cx16'/>
+ <feature name='cx8'/>
+ <feature name='de'/>
+ <feature name='erms'/>
+ <feature name='f16c'/>
+ <feature name='fma'/>
+ <feature name='fpu'/>
+ <feature name='fsgsbase'/>
+ <feature name='fxsr'/>
+ <feature name='invpcid'/>
+ <feature name='lahf_lm'/>
+ <feature name='lm'/>
+ <feature name='mca'/>
+ <feature name='mce'/>
+ <feature name='mmx'/>
+ <feature name='movbe'/>
+ <feature name='mpx'/>
+ <feature name='msr'/>
+ <feature name='mtrr'/>
+ <feature name='nx'/>
+ <feature name='pae'/>
+ <feature name='pat'/>
+ <feature name='pcid'/>
+ <feature name='pclmuldq'/>
+ <feature name='pdpe1gb'/>
+ <feature name='pge'/>
+ <feature name='pni'/>
+ <feature name='popcnt'/>
+ <feature name='pse'/>
+ <feature name='pse36'/>
+ <feature name='rdrand'/>
+ <feature name='rdseed'/>
+ <feature name='rdtscp'/>
+ <feature name='sep'/>
+ <feature name='smap'/>
+ <feature name='smep'/>
+ <feature name='spec-ctrl'/>
+ <feature name='sse'/>
+ <feature name='sse2'/>
+ <feature name='sse4.1'/>
+ <feature name='sse4.2'/>
+ <feature name='ssse3'/>
+ <feature name='syscall'/>
+ <feature name='tsc'/>
+ <feature name='tsc-deadline'/>
+ <feature name='vme'/>
+ <feature name='x2apic'/>
+ <feature name='xgetbv1'/>
+ <feature name='xsave'/>
+ <feature name='xsavec'/>
+ <feature name='xsaveopt'/>
+ </model>
+</cpus>
--
2.25.1
4 years, 8 months
[PATCH v5 0/2] Add support to RTC and HPET timer to LXC containers
by Julio Faracco
This series add support for two timers in LXC containers. It enables
sharing some timer devices between host and LXC guest using `timer`
settings in XML definition. This series add RTC and HPET timers.
Julio Faracco (2):
lxc: Add Real Time Clock device into allowed devices
lxc: Add HPET device into allowed devices
docs/formatdomain.html.in | 4 +-
src/lxc/lxc_cgroup.c | 42 +++++++++++++++++++
src/lxc/lxc_controller.c | 88 +++++++++++++++++++++++++++++++++++++++
3 files changed, 132 insertions(+), 2 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH 0/1] add support for QEMU 9pfs 'multidevs' option
by Christian Schoenebeck
QEMU 4.2 added a new option 'multidevs' for 9pfs. The following patch adds
support for this new option to libvirt.
In short, what is this about: to distinguish files uniquely from each other
in general, numeric file IDs are typically used for comparison, which in
practice is the combination of a file's device ID and the file's inode
number. Unfortunately 9p protocol's QID field used for this purpose,
currently is too small to fit both the device ID and inode number in, which
hence is a problem if one 9pfs export contains multiple devices and may
thus lead to misbheaviours on guest (e.g. with SAMBA file servers) in that
case due to potential file ID collisions.
To mitigate this problem with 9pfs a 'multidevs' option was introduced in
QEMU 4.2 for defining how to deal with this, e.g. multidevs=remap will cause
QEMU's 9pfs implementation to remap all inodes from host side to different
inode numbers on guest side in a way that prevents file ID collisions.
NOTE: In the libvirt docs changes of this libvirt patch I simply assumed
"since 6.2.0". So the final libvirt version number would need to be adjusted
in that text if necessary.
See QEMU discussion with following Message-ID for details:
8a2ffe17fda3a86b9a5a437e1245276881f1e235.1567680121.git.qemu_oss(a)crudebyte.com
Christian Schoenebeck (1):
conf: qemu 9pfs: add 'multidevs' option
docs/formatdomain.html.in | 47 ++++++++++++++++++++++++++++++++++-
docs/schemas/domaincommon.rng | 10 ++++++++
src/conf/domain_conf.c | 30 ++++++++++++++++++++++
src/conf/domain_conf.h | 13 ++++++++++
src/qemu/qemu_command.c | 7 ++++++
5 files changed, 106 insertions(+), 1 deletion(-)
--
2.20.1
4 years, 8 months