[libvirt PATCH] virt-host-validate: fix detection with cgroups v2
by Pavel Hrdina
Using virtCgroupNewSelf() is not correct with cgroups v2 because the
the virt-host-validate process is executed from from the same cgroup
context as the terminal and usually not all controllers are enabled
by default.
To do a proper check we need to use the root cgroup to see what
controllers are actually available. Libvirt or systemd ensures that
all controllers are available for VMs as well.
This still doesn't solve the devices controller with cgroups v2 where
there is no controller as it was replaced by eBPF. Currently libvirt
tries to query eBPF programs which usually works only for root as
regular users will get permission denied for that operation.
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/94
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/vircgroup.h | 4 ++++
src/util/vircgrouppriv.h | 4 ----
tools/virt-host-validate-common.c | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 1d98f01334..79a23f34cb 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1796,6 +1796,7 @@ virCgroupHasController;
virCgroupHasEmptyTasks;
virCgroupKillPainfully;
virCgroupKillRecursive;
+virCgroupNew;
virCgroupNewDetect;
virCgroupNewDetectMachine;
virCgroupNewDomainPartition;
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index 78770f5d3b..f7eed983cc 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -60,6 +60,10 @@ typedef enum {
bool virCgroupAvailable(void);
+int virCgroupNew(const char *path,
+ int controllers,
+ virCgroupPtr *group);
+
int virCgroupNewSelf(virCgroupPtr *group)
ATTRIBUTE_NONNULL(1);
diff --git a/src/util/vircgrouppriv.h b/src/util/vircgrouppriv.h
index baa84550f4..85ba5393e0 100644
--- a/src/util/vircgrouppriv.h
+++ b/src/util/vircgrouppriv.h
@@ -110,10 +110,6 @@ int virCgroupGetValueForBlkDev(const char *str,
const char *devPath,
char **value);
-int virCgroupNew(const char *path,
- int controllers,
- virCgroupPtr *group);
-
int virCgroupNewPartition(const char *path,
bool create,
int controllers,
diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
index a10ac03293..fc43b2ddc8 100644
--- a/tools/virt-host-validate-common.c
+++ b/tools/virt-host-validate-common.c
@@ -293,7 +293,7 @@ int virHostValidateCGroupControllers(const char *hvname,
int ret = 0;
size_t i;
- if (virCgroupNewSelf(&group) < 0)
+ if (virCgroupNew("/", -1, &group) < 0)
return -1;
for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) {
--
2.26.2
4 years
[PATCH] virsh: Added attach-disk support for network disk
by Ryan Gahagan
Related issue: https://gitlab.com/libvirt/libvirt/-/issues/16
Added in support for the following parameters in attach-disk:
--source-protocol
--source-host-name
--source-host-socket
--source-host-transport
Added documentation to virsh.rst specifying usage.
Signed-off-by: Ryan Gahagan <rgahagan(a)cs.utexas.edu>
---
docs/manpages/virsh.rst | 31 ++++++---
tools/virsh-domain.c | 135 +++++++++++++++++++++++++++++++++++-----
2 files changed, 145 insertions(+), 21 deletions(-)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index 1ae6d1a0d4..36c868a3e6 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -4538,14 +4538,18 @@ attach-disk
[--current]] | [--persistent]] [--targetbus bus]
[--driver driver] [--subdriver subdriver] [--iothread iothread]
[--cache cache] [--io io] [--type type] [--alias alias]
- [--mode mode] [--sourcetype sourcetype] [--serial serial]
- [--wwn wwn] [--rawio] [--address address] [--multifunction]
- [--print-xml]
+ [--mode mode] [--sourcetype sourcetype]
+ [--source-protocol protocol] [--source-host-name hostname:port]
+ [--source-host-transport transport] [--source-host-socket socket]
+ [--serial serial] [--wwn wwn] [--rawio] [--address address]
+ [--multifunction] [--print-xml]
Attach a new disk device to the domain.
-*source* is path for the files and devices. *target* controls the bus or
-device under which the disk is exposed to the guest OS. It indicates the
-"logical" device name; the optional *targetbus* attribute specifies the type
+*source* is path for the files and devices unless *--source-protocol*
+is specified, in which case *source* is the name of a network disk.
+*target* controls the bus or device under which the disk is exposed
+to the guest OS. It indicates the "logical" device name;
+the optional *targetbus* attribute specifies the type
of disk device to emulate; possible values are driver specific, with typical
values being *ide*, *scsi*, *virtio*, *xen*, *usb*, *sata*, or *sd*, if
omitted, the bus type is inferred from the style of the device name (e.g. a
@@ -4563,7 +4567,7 @@ within the existing virtual cdrom or floppy device; consider using
``update-device`` for this usage instead.
*alias* can set user supplied alias.
*mode* can specify the two specific mode *readonly* or *shareable*.
-*sourcetype* can indicate the type of source (block|file)
+*sourcetype* can indicate the type of source (block|file|network)
*cache* can be one of "default", "none", "writethrough", "writeback",
"directsync" or "unsafe".
*io* controls specific policies on I/O; QEMU guests support "threads",
@@ -4579,6 +4583,19 @@ ccw:cssid.ssid.devno. Virtio-ccw devices must have their cssid set to 0xfe.
*multifunction* indicates specified pci address is a multifunction pci device
address.
+There is also support for using a network disk. As specified, the user can
+provide a *--source-protocol* in which case the *source* parameter will
+be interpreted as the source name. *--source-protocol* must be provided
+if the user intends to provide a network disk or host information.
+Host information can be provided using the tags
+*--source-host-name*, *--source-host-transport*, and *--source-host-socket*,
+which respectively denote the name of the host, the host's transport method,
+and the socket that the host uses. *--source-host-socket* and
+*--source-host-name* cannot both be provided, and the user must provide a
+*--source-host-transport* if they want to provide a *--source-host-socket*.
+The *--source-host-name* parameter supports host:port syntax
+if the user wants to provide a port as well.
+
If *--print-xml* is specified, then the XML of the disk that would be attached
is printed instead.
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index c999458d72..1303676c33 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -222,7 +222,7 @@ static const vshCmdOptDef opts_attach_disk[] = {
{.name = "source",
.type = VSH_OT_DATA,
.flags = VSH_OFLAG_REQ | VSH_OFLAG_EMPTY_OK,
- .help = N_("source of disk device")
+ .help = N_("source of disk device or name of network disk")
},
{.name = "target",
.type = VSH_OT_DATA,
@@ -268,7 +268,7 @@ static const vshCmdOptDef opts_attach_disk[] = {
},
{.name = "sourcetype",
.type = VSH_OT_STRING,
- .help = N_("type of source (block|file)")
+ .help = N_("type of source (block|file|network)")
},
{.name = "serial",
.type = VSH_OT_STRING,
@@ -298,6 +298,22 @@ static const vshCmdOptDef opts_attach_disk[] = {
.type = VSH_OT_BOOL,
.help = N_("print XML document rather than attach the disk")
},
+ {.name = "source-protocol",
+ .type = VSH_OT_STRING,
+ .help = N_("protocol used by disk device source")
+ },
+ {.name = "source-host-name",
+ .type = VSH_OT_STRING,
+ .help = N_("host name for source of disk device")
+ },
+ {.name = "source-host-transport",
+ .type = VSH_OT_STRING,
+ .help = N_("host transport for source of disk device")
+ },
+ {.name = "source-host-socket",
+ .type = VSH_OT_STRING,
+ .help = N_("host socket for source of disk device")
+ },
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
@@ -558,6 +574,13 @@ static int str2DiskAddress(const char *str, struct DiskAddress *diskAddr)
return -1;
}
+typedef enum {
+ VIRSH_SOURCE_TYPE_FILE,
+ VIRSH_SOURCE_TYPE_BLOCK,
+ VIRSH_SOURCE_TYPE_NETWORK,
+ VIRSH_SOURCE_TYPE_UNKNOWN,
+} virshAttachDiskSourceType;
+
static bool
cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
{
@@ -567,8 +590,14 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
*iothread = NULL, *cache = NULL, *io = NULL,
*serial = NULL, *straddr = NULL, *wwn = NULL,
*targetbus = NULL, *alias = NULL;
+ const char *source_protocol = NULL;
+ const char *host_name = NULL;
+ const char *host_transport = NULL;
+ const char *host_socket = NULL;
+ char *host_port = NULL;
struct DiskAddress diskAddr;
- bool isFile = false, functionReturn = false;
+ virshAttachDiskSourceType disk_type = VIRSH_SOURCE_TYPE_UNKNOWN;
+ bool functionReturn = false;
int ret;
unsigned int flags = VIR_DOMAIN_AFFECT_CURRENT;
const char *stype = NULL;
@@ -585,6 +614,13 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
VSH_EXCLUSIVE_OPTIONS_VAR(current, live);
VSH_EXCLUSIVE_OPTIONS_VAR(current, config);
+ VSH_REQUIRE_OPTION("source-host-name", "source-protocol");
+ VSH_REQUIRE_OPTION("source-host-transport", "source-protocol");
+ VSH_REQUIRE_OPTION("source-host-socket", "source-protocol");
+ VSH_REQUIRE_OPTION("source-host-socket", "source-host-transport");
+
+ VSH_EXCLUSIVE_OPTIONS("source-host-name", "source-host-socket");
+
if (config || persistent)
flags |= VIR_DOMAIN_AFFECT_CONFIG;
if (live)
@@ -604,23 +640,45 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
vshCommandOptStringReq(ctl, cmd, "address", &straddr) < 0 ||
vshCommandOptStringReq(ctl, cmd, "targetbus", &targetbus) < 0 ||
vshCommandOptStringReq(ctl, cmd, "alias", &alias) < 0 ||
- vshCommandOptStringReq(ctl, cmd, "sourcetype", &stype) < 0)
+ vshCommandOptStringReq(ctl, cmd, "sourcetype", &stype) < 0 ||
+ vshCommandOptStringReq(ctl, cmd, "source-protocol", &source_protocol) < 0 ||
+ vshCommandOptStringReq(ctl, cmd, "source-host-name", &host_name) < 0 ||
+ vshCommandOptStringReq(ctl, cmd, "source-host-transport", &host_transport) < 0 ||
+ vshCommandOptStringReq(ctl, cmd, "source-host-socket", &host_socket) < 0)
goto cleanup;
if (!stype) {
if (driver && (STREQ(driver, "file") || STREQ(driver, "tap"))) {
- isFile = true;
+ disk_type = VIRSH_SOURCE_TYPE_FILE;
} else {
- if (source && !stat(source, &st))
- isFile = S_ISREG(st.st_mode) ? true : false;
+ if (source && !stat(source, &st)) {
+ if (S_ISREG(st.st_mode))
+ disk_type = VIRSH_SOURCE_TYPE_FILE;
+ else
+ disk_type = VIRSH_SOURCE_TYPE_BLOCK;
+ }
}
} else if (STREQ(stype, "file")) {
- isFile = true;
- } else if (STRNEQ(stype, "block")) {
+ disk_type = VIRSH_SOURCE_TYPE_FILE;
+ } else if (STREQ(stype, "block")) {
+ disk_type = VIRSH_SOURCE_TYPE_BLOCK;
+ } else if (STREQ(stype, "network")) {
+ /* The user must provide a protocol for a network disk */
+ if (!source_protocol) {
+ vshError(ctl, _("A source-protocol must be provided for a network disk"));
+ goto cleanup;
+ }
+ } else {
vshError(ctl, _("Unknown source type: '%s'"), stype);
goto cleanup;
}
+ /* If a protocol is provided, the disk is assumed to be a network disk.
+ * This overwrites other disk types, such as an explicit
+ * 'sourcetype=file' or comparable parameter. */
+ if (source_protocol)
+ disk_type = VIRSH_SOURCE_TYPE_NETWORK;
+
if (mode) {
if (STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) {
vshError(ctl, _("No support for %s in command 'attach-disk'"),
@@ -633,8 +691,13 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
/* Make XML of disk */
- virBufferAsprintf(&buf, "<disk type='%s'",
- isFile ? "file" : "block");
+ if (disk_type == VIRSH_SOURCE_TYPE_FILE)
+ virBufferAddLit(&buf, "<disk type='file'");
+ else if (disk_type == VIRSH_SOURCE_TYPE_BLOCK)
+ virBufferAddLit(&buf, "<disk type='block'");
+ else if (disk_type == VIRSH_SOURCE_TYPE_NETWORK)
+ virBufferAddLit(&buf, "<disk type='network'");
+
if (type)
virBufferAsprintf(&buf, " device='%s'", type);
if (vshCommandOptBool(cmd, "rawio"))
@@ -659,9 +722,53 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
virBufferAddLit(&buf, "/>\n");
}
- if (source)
- virBufferAsprintf(&buf, "<source %s='%s'/>\n",
- isFile ? "file" : "dev", source);
+ if (source || source_protocol) {
+ virBufferAddLit(&buf, "<source");
+ if (source_protocol) {
+ /* Using a network disk; source is --source-name */
+ virBufferAsprintf(&buf, " protocol='%s'", source_protocol);
+ if (source)
+ virBufferAsprintf(&buf, " name='%s'", source);
+
+ if (host_name || host_socket || host_transport) {
+ /* Host information provided, add a <host> tag */
+ virBufferAddLit(&buf, ">\n");
+ virBufferAdjustIndent(&buf, 2);
+ virBufferAddLit(&buf, "<host");
+
+ if (host_name) {
+ /* Logic for host:port syntax */
+ g_autofree char *host_name_copy = g_strdup(host_name);
+ host_port = strchr(host_name_copy, ':');
+
+ if (host_port) {
+ *host_port = '\0';
+ virBufferAsprintf(&buf,
+ " name='%s' port='%s'",
+ host_name_copy, host_port + 1);
+ } else {
+ virBufferAsprintf(&buf, " name='%s'", host_name);
+ }
+ }
+
+ if (host_transport)
+ virBufferAsprintf(&buf, " transport='%s'", host_transport);
+ if (host_socket)
+ virBufferAsprintf(&buf, " socket='%s'", host_socket);
+ virBufferAddLit(&buf, "/>\n");
+ virBufferAdjustIndent(&buf, -2);
+ virBufferAddLit(&buf, "</source>\n");
+ }
+ } else {
+ /* Using a local disk; source is file or dev */
+ if (disk_type == VIRSH_SOURCE_TYPE_FILE)
+ virBufferAsprintf(&buf, " file='%s'", source);
+ else
+ virBufferAsprintf(&buf, " dev='%s'", source);
+ virBufferAddLit(&buf, "/>\n");
+ }
+ }
+
virBufferAsprintf(&buf, "<target dev='%s'", target);
if (targetbus)
virBufferAsprintf(&buf, " bus='%s'", targetbus);
--
2.29.0
4 years
[PATCH 00/23] hyperv: storage volume XML changes
by Matt Coleman
Here's a GitLab MR if you'd prefer to review it there:
https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/12/commits
Matt Coleman (23):
hyperv: XML parsing of storage volumes
schema: add support for Windows file paths and device names
hyperv: ambiguous VM names will throw an error
hyperv: implement domainUndefine and domainUndefineFlags
hyperv: implement domainCreateXML and domainDefineXML
hyperv: add hypervMsvmVSMSAddResourceSettings
hyperv: create SCSI controllers when defining domains
hyperv: attach virtual disks when defining domains
hyperv: attach physical disks when defining domains
hyperv: attach virtual optical disks when defining domains
hyperv: attach floppy disks when defining domains
hyperv: implement domainAttachDevice and domainAttachDeviceFlags
hyperv: store the Hyper-V version when connecting
hyperv: add inheritance to the WMI generator
XML parsing of serial ports
hyperv: add support for creating serial devices
hyperv: XML parsing of Ethernet adapters
hyperv: add support for creating network adapters
hyperv: implement connectListAllNetworks and connectNumOfNetworks
hyperv: implement networkLookupByName and networkLookupByUUID
hyperv: implement connectNumOfDefinedNetworks and
connectListDefinedNetworks
hyperv: implement networkGetAutostart, networkIsActive, and
networkIsPersistent
hyperv: implement networkGetXMLDesc
docs/schemas/basictypes.rng | 2 +-
docs/schemas/domaincommon.rng | 5 +-
include/libvirt/virterror.h | 1 +
po/POTFILES.in | 1 +
scripts/hyperv_wmi_generator.py | 12 +-
src/hyperv/hyperv_driver.c | 1812 ++++++++++++++++-
src/hyperv/hyperv_driver.h | 3 +
src/hyperv/hyperv_network_driver.c | 250 +++
src/hyperv/hyperv_network_driver.h | 26 +
src/hyperv/hyperv_private.h | 3 +
src/hyperv/hyperv_wmi.c | 156 ++
src/hyperv/hyperv_wmi.h | 25 +
src/hyperv/hyperv_wmi_classes.h | 35 +
src/hyperv/hyperv_wmi_generator.input | 280 +++
src/hyperv/meson.build | 1 +
src/util/virerror.c | 6 +-
.../disk-hyperv-physical.xml | 17 +
.../disk-hyperv-virtual.xml | 17 +
.../disk-hyperv-physical.xml | 23 +
.../disk-hyperv-virtual.xml | 23 +
tests/genericxml2xmltest.c | 2 +
21 files changed, 2655 insertions(+), 45 deletions(-)
create mode 100644 src/hyperv/hyperv_network_driver.c
create mode 100644 src/hyperv/hyperv_network_driver.h
create mode 100644 tests/genericxml2xmlindata/disk-hyperv-physical.xml
create mode 100644 tests/genericxml2xmlindata/disk-hyperv-virtual.xml
create mode 100644 tests/genericxml2xmloutdata/disk-hyperv-physical.xml
create mode 100644 tests/genericxml2xmloutdata/disk-hyperv-virtual.xml
--
2.27.0
4 years
[libvirt PATCH] NEWS: restore backtick balance
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Reported-by: Michal Prívozník <mprivozn(a)redhat.com>
Fixes: db98d17709eeb13603730352a70f3817becd7372
---
Pushed.
NEWS.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NEWS.rst b/NEWS.rst
index 8cccc07f52..aa8a217eb6 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -33,7 +33,7 @@ v6.10.0 (unreleased)
* hyperv: implement new APIs
- The `virDomainGetMaxMemory()``, ``virDomainSetMaxMemory()``,
+ The ``virDomainGetMaxMemory()``, ``virDomainSetMaxMemory()``,
``virDomainGetSchedulerType()``, ``virDomainGetSchedulerParameters()``,
``virDomainGetSchedulerParametersFlags()``, ``virDomainGetVcpus()``,
``virDomainGetVcpusFlags()``, ``virDomainGetMaxVcpus()``,
--
2.26.2
4 years
[libvirt PATCH v2 0/9] Add missing feature detection to sync tool in cpu_map
by Tim Wiederhake
sync_qemu_i386.py in src/cpu_map is a tool to sync CPU models from qemu
with libvirt. It currently has no provisions for detecting new features
that are not implemented in libvirt yet. This series changes that.
Currently missing x86 CPU models:
* "Denverton"
* "KnightsMill"
* "Snowridge"
Currently missing x86 CPU features:
* "core-capability"
* "fsrm"
* "split-lock-detect"
"fsrm" is added in this series. For the "Snowridge" CPU model and the
"core-capability" and "split-lock-detect" features, see
https://www.redhat.com/archives/libvir-list/2020-November/msg00924.html.
V1: https://www.redhat.com/archives/libvir-list/2020-November/msg01002.html
Tim Wiederhake (9):
cpu_map: sync_qemu_cpu_i386: Translate features in model versions
cpu_map: sync_qemu_cpu_i386: Factor out translation of vendors
cpu_map: sync_qemu_cpu_i386: Factor out translation of features
cpu_map: sync_qemu_cpu_i386: Do not ignore CPUID_EXT_MONITOR
cpu_map: sync_qemu_cpu_i386: Simplify ignore features
cpu_map: sync_qemu_cpu_i386: Translate qemu feature pretty names
cpu_map: sync_qemu_cpu_i386: Add missing features
cpu_map: sync_qemu_cpu_i386: Detect features missing in libvirt
cpu_map: Add missing feature fsrm
src/cpu_map/sync_qemu_i386.py | 340 ++++++++++--------
src/cpu_map/x86_features.xml | 3 +
.../x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 +
.../x86_64-cpuid-Ice-Lake-Server-host.xml | 1 +
4 files changed, 198 insertions(+), 147 deletions(-)
--
2.26.2
4 years
[libvirt PATCH] qemu_conf: fix a typo in comment
by Ján Tomko
Ceci n'est pas un objet.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Fixes: 7db61843b05a6e4295b1d2e27a3d86f162ef04a0
---
Pushed under the surreal rule.
src/qemu/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 80ff18204e..83de26ab56 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1391,7 +1391,7 @@ virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
* driver. If @refresh is true, the capabilities will be
* rebuilt first
*
- * The caller must release the reference with virObjetUnref
+ * The caller must release the reference with virObjectUnref
*
* Returns: a reference to a virCapsPtr instance or NULL
*/
--
2.26.2
4 years
[PATCH] news: Mention Cooperlake cpu model in v6.4.0
by Han Han
Signed-off-by: Han Han <hhan(a)redhat.com>
---
NEWS.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 2fef3f706c..5dac805390 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -463,6 +463,8 @@ v6.4.0 (2020-06-02)
already does in these cases. Users are encouraged to provide complete NUMA
topologies to avoid unexpected changes in the domain XML.
+ * Cooperlake x86 CPU model is added
+
* **Bug fixes**
* qemu: fixed regression in network device hotplug with new qemu versions
--
2.28.0
4 years
[PATCH v1 00/10] move memory module align to PostParse time
by Daniel Henrique Barboza
Hi,
This is a work that I intended to do after pSeries NVDIMM changes
I made in commit v6.7.0-302-gd3f3c2c97f. The reasoning is that
if ppc64 NVDIMM alignment can be done in PostParse time, regular
ppc64 DIMMs alignment can also be done the same way. After that
I realized that the same logic can be applied to x86 as well,
and then I started to see where we could eliminate explicit
align calls.
The end result is that a bug that affects pSeries the most
was found and fixed in patch 02, and now we're able to reflect
the exact memory being used by the guest in the live XML since
the alignment is now done in parse time. The series can be
fetched from:
https://gitlab.com/danielhb/libvirt/-/tree/memory_modules_postparse_v1
NOTE: I worked with the x86 logic based on what I could assert
from the code itself, i.e. the aligment mechanics (2MiB align for
mem modules, 1MiB align for total memory) are related to QEMU
internals, not being hypervisor-agnostic. If someone with authority can
guarantee that the alignment restrictions for x86 are applicable
to all hypervisors (like in the pSeries case), let me know and
I'll respin the series putting the x86 code in
virDomainMemoryDefPostParse().
Daniel Henrique Barboza (10):
domain_conf.c: handle all ppc64 dimms in
virDomainNVDimmAlignSizePseries
qemu_domain.c: align memory modules before calculating 'initialmem'
domain_conf.c: align pSeries mem modules in
virDomainMemoryDefPostParse()
qemu_domain.c: simplify qemuDomainGetMemoryModuleSizeAlignment()
qemu_domain.c: align x86 memory module in post parse time
qemu_domain.c: move size check for mem modules after alignment
qemu_hotplug.c: avoid aligning the mem obj in
qemuDomainDetachPrepMemory()
qemu_hotplug.c: avoid aligning the mem obj in qemuDomainAttachMemory()
qemu_domain.c: remove qemuDomainMemoryDeviceAlignSize()
NEWS.rs: document memory alignment improvements
NEWS.rst | 14 +++
src/conf/domain_conf.c | 25 ++++-
src/conf/domain_conf.h | 2 +-
src/libvirt_private.syms | 2 +-
src/qemu/qemu_domain.c | 106 +++++++-----------
src/qemu/qemu_domain.h | 2 -
src/qemu/qemu_hotplug.c | 9 +-
tests/qemuxml2argvdata/hugepages-nvdimm.xml | 2 +-
.../memory-hotplug-nvdimm-access.xml | 2 +-
.../memory-hotplug-nvdimm-align.xml | 2 +-
.../memory-hotplug-nvdimm-label.xml | 2 +-
.../memory-hotplug-nvdimm-pmem.xml | 2 +-
.../memory-hotplug-nvdimm-readonly.xml | 2 +-
.../memory-hotplug-nvdimm.xml | 2 +-
.../memory-hotplug-ppc64-nonuma.args | 2 +-
tests/qemuxml2argvdata/pages-dimm-discard.xml | 2 +-
.../memory-hotplug-dimm.xml | 4 +-
17 files changed, 92 insertions(+), 90 deletions(-)
--
2.26.2
4 years
[libvirt PATCH 00/16] docs: add manpages for all the modular daemons
by Daniel P. Berrangé
Most of the modular daemon stuff has been done from a single template,
but for the man pages that is more trouble than it is worth, so we
create a separate man page source for each daemon, which makes it easy
to extend with driver specific information.
Daniel P. Berrangé (16):
docs: consistently mark libvirtd as preformatted text
docs: don't hardcode an ancient version in manpage examples
docs: tweak heading for daemon manual pages
docs: add manpage for virtproxyd
docs: add manpage for virtbhyved
docs: add manpage for virtinterfaced
docs: add manpage for virtlxcd
docs: add manpage for virtnetworkd
docs: add manpage for virtnodedevd
docs: add manpage for virtnwfilterd
docs: add manpage for virtqemud
docs: add manpage for virtsecretd
docs: add manpage for virtstoraged
docs: add manpage for virtvboxd
docs: add manpage for virtvzd
docs: add manpage for virtxend
docs/manpages/index.rst | 25 ++-
docs/manpages/libvirtd.rst | 50 +++---
docs/manpages/meson.build | 14 ++
docs/manpages/virtbhyved.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtinterfaced.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtlockd.rst | 2 +-
docs/manpages/virtlogd.rst | 2 +-
docs/manpages/virtlxcd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtnetworkd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtnodedevd.rst | 214 ++++++++++++++++++++++++++
docs/manpages/virtnwfilterd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtproxyd.rst | 256 +++++++++++++++++++++++++++++++
docs/manpages/virtqemud.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtsecretd.rst | 214 ++++++++++++++++++++++++++
docs/manpages/virtstoraged.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtvboxd.rst | 213 +++++++++++++++++++++++++
docs/manpages/virtvzd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtxend.rst | 215 ++++++++++++++++++++++++++
18 files changed, 2896 insertions(+), 29 deletions(-)
create mode 100644 docs/manpages/virtbhyved.rst
create mode 100644 docs/manpages/virtinterfaced.rst
create mode 100644 docs/manpages/virtlxcd.rst
create mode 100644 docs/manpages/virtnetworkd.rst
create mode 100644 docs/manpages/virtnodedevd.rst
create mode 100644 docs/manpages/virtnwfilterd.rst
create mode 100644 docs/manpages/virtproxyd.rst
create mode 100644 docs/manpages/virtqemud.rst
create mode 100644 docs/manpages/virtsecretd.rst
create mode 100644 docs/manpages/virtstoraged.rst
create mode 100644 docs/manpages/virtvboxd.rst
create mode 100644 docs/manpages/virtvzd.rst
create mode 100644 docs/manpages/virtxend.rst
--
2.28.0
4 years
[PATCH] cpu_map: Support phytium processor
by yangshaojun19@163.com
From: Shaojun Yang <yangshaojun(a)phytium.com.cn>
FT-2000+ and Tengyun-S2500 are two chips by produced Phytium Technology Co., Ltd., which based on ARMv8 architecure.
Shaojun Yang (1):
add phytium FT-2000+ and Tengyun-S2500 support on arm architecture.
src/cpu_map/arm_Phytium.xml | 10 ++++++++++
src/cpu_map/arm_vendors.xml | 1 +
src/cpu_map/index.xml | 3 +++
3 files changed, 14 insertions(+)
create mode 100644 src/cpu_map/arm_Phytium.xml
--
2.7.4
4 years