[libvirt PATCH 0/4] qemu: replace -device sga with -M graphics=off
by Daniel P. Berrangé
SeaBIOS >= 1.11 / QEMU >= 2.11 no longer requires the 'sga'
device for serial console output from the BIOS. It can be
done directly with graphics=off machine option.
This appears to be live migration compatible, despite
changing the number of option ROMS loaded, though I need a
little more testing to fully confirm this.
Daniel P. Berrangé (4):
qemu: prevent use of <bios useserial='yes'> on non-x86 arches
qemu: tweak error message to be more general purpose
qemu: switch to use -M graphics=off instead of -device sga
qemu: stop probing for '-device sga' support
src/qemu/qemu_capabilities.c | 3 +--
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 25 ++++++++-----------
src/qemu/qemu_validate.c | 15 ++++++++---
.../caps_2.11.0.x86_64.xml | 1 -
.../caps_2.12.0.x86_64.xml | 1 -
.../caps_3.0.0.x86_64.xml | 1 -
.../caps_3.1.0.x86_64.xml | 1 -
.../caps_4.0.0.x86_64.xml | 1 -
.../caps_4.1.0.x86_64.xml | 1 -
.../caps_4.2.0.x86_64.xml | 1 -
.../caps_5.0.0.x86_64.xml | 1 -
.../caps_5.1.0.x86_64.xml | 1 -
.../caps_5.2.0.x86_64.xml | 1 -
.../caps_6.0.0.x86_64.xml | 1 -
.../caps_6.1.0.x86_64.xml | 1 -
tests/qemuxml2argvdata/bios.args | 3 +--
tests/qemuxml2argvtest.c | 3 +--
18 files changed, 25 insertions(+), 38 deletions(-)
--
2.31.1
3 years, 2 months
[PATCH 0/2] qemu: don't change ownership of cache directory
by Peng Liang
See path 2 for detail.
Peng Liang (2):
qemu: move temp file of screenshot and memorypeek to autoDumpPath
qemu: don't change ownership of cache directory
src/qemu/qemu_driver.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
--
2.31.1
3 years, 2 months
Libvirt with Firecracker
by Puscasu, Felix
Hello Libvirt team,
For the last couple of months, as an AWS intern I have been reading and learning how to use libvirt. I have been working on integrating Firecracker<https://github.com/firecracker-microvm/firecracker>, an open source virtual machine monitor into libvirt as a hypervisor driver, believing its design would be a great addition to the fleet of already existing drivers.
One question I have is regarding testing, I couldn’t properly use the libvirt-test-API repository, and neither the libvirt-TCK one. I am now looking at the testing done In the libvirt repository itself and wanted to ask if integration-like tests would be achievable here, and if it is in line with the project’s direction. We would like to have tests to be as “end to end” as they can.
Another mention is this contribution is more of a proof of concept than a production ready patch/series of patches as it doesn’t have (yet) tests in any way. It can be a starting point for future contributions (that can also be from the open source community).
I wanted to check with you if this integration collides with any of your ongoing work and what would be some of your initial thoughts.
Kind regards,
Felix Puscasu
Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
3 years, 2 months
[PATCH v2 0/4] Add support for two i386 pm options which control acpi hotplug
by Ani Sinha
Hi:
I added some negative xml2argv tests as well as new xml2xml tests. In the process,
I also fixed a bug where I had not added appropriate code to generate the output
xml correctly.
The patch series is sent again as v2. Kindly, please provide inputs and review them.
[PATCH v2 1/4] pm/i386: add support for two options that controls
[PATCH v2 2/4] tests: add positive xml2argv tests to exercize pm acpi
[PATCH v2 3/4] tests: add negative xml2argv tests to exercize pm acpi
[PATCH v2 4/4] tests: add xml2xml tests to exercize pm acpi hotplug
3 years, 2 months
[PATCH] src: network_conf: propagate only bool to virNetworkDefParseString()
by Kristina Hanicova
We don't need to propagate all public flags, only the information
about the presence of the validation one, which can differ from
function to function. This patch makes it easier and more
readable in case of a future additions of validation flags.
This change was suggested by Daniel.
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/conf/domain_conf.c | 2 +-
src/conf/network_conf.c | 12 ++++++------
src/conf/network_conf.h | 2 +-
src/esx/esx_network_driver.c | 2 +-
src/network/bridge_driver.c | 5 +++--
src/qemu/qemu_process.c | 2 +-
src/test/test_driver.c | 5 +++--
src/vbox/vbox_network.c | 3 ++-
8 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cb9e7218ff..858f6f923a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -30523,7 +30523,7 @@ virDomainNetResolveActualType(virDomainNetDef *iface)
if (!(xml = virNetworkGetXMLDesc(net, 0)))
goto cleanup;
- if (!(def = virNetworkDefParseString(xml, NULL, 0)))
+ if (!(def = virNetworkDefParseString(xml, NULL, false)))
goto cleanup;
switch ((virNetworkForwardType) def->forward.type) {
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index f23599abac..7a0f6f02c3 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -318,7 +318,7 @@ virNetworkDefCopy(virNetworkDef *def,
if (!(xml = virNetworkDefFormat(def, xmlopt, flags)))
return NULL;
- return virNetworkDefParseString(xml, xmlopt, 0);
+ return virNetworkDefParseString(xml, xmlopt, false);
}
@@ -2086,14 +2086,14 @@ static virNetworkDef *
virNetworkDefParse(const char *xmlStr,
const char *filename,
virNetworkXMLOption *xmlopt,
- unsigned int flags)
+ bool validate_flag)
{
g_autoptr(xmlDoc) xml = NULL;
virNetworkDef *def = NULL;
int keepBlanksDefault = xmlKeepBlanksDefault(0);
if ((xml = virXMLParse(filename, xmlStr, _("(network_definition)"),
- "network.rng", flags & VIR_NETWORK_DEFINE_VALIDATE)))
+ "network.rng", validate_flag)))
def = virNetworkDefParseNode(xml, xmlDocGetRootElement(xml), xmlopt);
xmlKeepBlanksDefault(keepBlanksDefault);
@@ -2104,9 +2104,9 @@ virNetworkDefParse(const char *xmlStr,
virNetworkDef *
virNetworkDefParseString(const char *xmlStr,
virNetworkXMLOption *xmlopt,
- unsigned int flags)
+ bool validate_flag)
{
- return virNetworkDefParse(xmlStr, NULL, xmlopt, flags);
+ return virNetworkDefParse(xmlStr, NULL, xmlopt, validate_flag);
}
@@ -2114,7 +2114,7 @@ virNetworkDef *
virNetworkDefParseFile(const char *filename,
virNetworkXMLOption *xmlopt)
{
- return virNetworkDefParse(NULL, filename, xmlopt, 0);
+ return virNetworkDefParse(NULL, filename, xmlopt, false);
}
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index 30958eff64..1dda45b25c 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -329,7 +329,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
virNetworkDef *
virNetworkDefParseString(const char *xmlStr,
virNetworkXMLOption *xmlopt,
- unsigned int flags);
+ bool validate_flag);
virNetworkDef *
virNetworkDefParseFile(const char *filename,
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index 673ed5421f..8acf7591cf 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -298,7 +298,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
return NULL;
/* Parse network XML */
- def = virNetworkDefParseString(xml, NULL, flags);
+ def = virNetworkDefParseString(xml, NULL, flags & VIR_NETWORK_DEFINE_VALIDATE);
if (!def)
return NULL;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 06822fb3a0..4b6daf19a8 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3474,7 +3474,7 @@ networkCreateXML(virConnectPtr conn,
virNetworkPtr net = NULL;
virObjectEvent *event = NULL;
- if (!(newDef = virNetworkDefParseString(xml, network_driver->xmlopt, 0)))
+ if (!(newDef = virNetworkDefParseString(xml, network_driver->xmlopt, false)))
goto cleanup;
if (virNetworkCreateXMLEnsureACL(conn, newDef) < 0)
@@ -3529,7 +3529,8 @@ networkDefineXMLFlags(virConnectPtr conn,
virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
- if (!(def = virNetworkDefParseString(xml, network_driver->xmlopt, flags)))
+ if (!(def = virNetworkDefParseString(xml, network_driver->xmlopt,
+ flags & VIR_NETWORK_DEFINE_VALIDATE)))
goto cleanup;
if (virNetworkDefineXMLFlagsEnsureACL(conn, def) < 0)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 207129a556..51d02e9fb6 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4778,7 +4778,7 @@ qemuProcessGetNetworkAddress(const char *netname,
if (!xml)
goto cleanup;
- netdef = virNetworkDefParseString(xml, NULL, 0);
+ netdef = virNetworkDefParseString(xml, NULL, false);
if (!netdef)
goto cleanup;
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 2f19b7c520..33f611081c 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5581,7 +5581,7 @@ testNetworkCreateXML(virConnectPtr conn, const char *xml)
virNetworkPtr net = NULL;
virObjectEvent *event = NULL;
- if ((newDef = virNetworkDefParseString(xml, NULL, 0)) == NULL)
+ if ((newDef = virNetworkDefParseString(xml, NULL, false)) == NULL)
goto cleanup;
if (!(obj = virNetworkObjAssignDef(privconn->networks, newDef,
@@ -5620,7 +5620,8 @@ testNetworkDefineXMLFlags(virConnectPtr conn,
virCheckFlags(VIR_NETWORK_DEFINE_VALIDATE, NULL);
- if ((newDef = virNetworkDefParseString(xml, NULL, flags)) == NULL)
+ if (!(newDef = virNetworkDefParseString(xml, NULL,
+ flags & VIR_NETWORK_DEFINE_VALIDATE)))
goto cleanup;
if (!(obj = virNetworkObjAssignDef(privconn->networks, newDef, 0)))
diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c
index c554b052c9..c0694d42d5 100644
--- a/src/vbox/vbox_network.c
+++ b/src/vbox/vbox_network.c
@@ -397,7 +397,8 @@ vboxNetworkDefineCreateXML(virConnectPtr conn, const char *xml, bool start,
VBOX_IID_INITIALIZE(&vboxnetiid);
- if (!(def = virNetworkDefParseString(xml, NULL, flags)) ||
+ if (!(def = virNetworkDefParseString(xml, NULL,
+ flags & VIR_NETWORK_DEFINE_VALIDATE)) ||
(def->forward.type != VIR_NETWORK_FORWARD_NONE) ||
(def->nips == 0 || !def->ips))
goto cleanup;
--
2.31.1
3 years, 2 months
[PATCH] qemuProcessQMPInit: Use long options for '-qmp' when probing qemu.
by Peter Krempa
'-qmp' in this case behaves the same as '-chardev' so it should have
been converted the same way as others were in 43c9c0859f2d53321 since
short options are deprecated.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 207129a556..df1f481433 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -9045,7 +9045,7 @@ qemuProcessQMPInit(qemuProcessQMP *proc)
proc->monpath = g_strdup_printf("%s/%s", proc->uniqDir, "qmp.monitor");
- proc->monarg = g_strdup_printf("unix:%s,server,nowait", proc->monpath);
+ proc->monarg = g_strdup_printf("unix:%s,server=on,wait=off", proc->monpath);
/*
* Normally we'd use runDir for pid files, but because we're using
--
2.31.1
3 years, 2 months
[libvirt PATCH 0/7] gitlab: convert to use the lcitool manifest feature
by Daniel P. Berrangé
This switches our CI rules to be largely auto-generated by the lcitool
manifest command, so that they share a consistent design with all other
projects and are simpler to modify in future.
Daniel P. Berrangé (7):
gitlab: move codestyle job to the sanity_checks stage
gitlab: refresh containers / cirrus files with latest content
gitlab: fold sanitizer jobs into regular ubuntu jobs
gitlab: define a manifest file to express the CI config
ci: re-generate containers/gitlab config from manifest
ci: remove obsolete refresh documentation
ci: remove obsolete logic for refreshing containers/cirrus
.gitlab-ci.yml | 539 +---------------
ci/cirrus/freebsd-12.vars | 8 +-
ci/cirrus/freebsd-13.vars | 8 +-
ci/cirrus/freebsd-current.vars | 8 +-
ci/cirrus/macos-11.vars | 4 +-
ci/containers/README.rst | 36 --
ci/containers/centos-8.Dockerfile | 5 +-
ci/containers/centos-stream-8.Dockerfile | 5 +-
.../debian-10-cross-aarch64.Dockerfile | 8 +-
.../debian-10-cross-armv6l.Dockerfile | 8 +-
.../debian-10-cross-armv7l.Dockerfile | 8 +-
ci/containers/debian-10-cross-i686.Dockerfile | 8 +-
ci/containers/debian-10-cross-mips.Dockerfile | 8 +-
.../debian-10-cross-mips64el.Dockerfile | 8 +-
.../debian-10-cross-mipsel.Dockerfile | 8 +-
.../debian-10-cross-ppc64le.Dockerfile | 8 +-
.../debian-10-cross-s390x.Dockerfile | 8 +-
ci/containers/debian-10.Dockerfile | 8 +-
.../debian-sid-cross-aarch64.Dockerfile | 5 +-
.../debian-sid-cross-armv6l.Dockerfile | 5 +-
.../debian-sid-cross-armv7l.Dockerfile | 5 +-
.../debian-sid-cross-i686.Dockerfile | 5 +-
.../debian-sid-cross-mips64el.Dockerfile | 5 +-
.../debian-sid-cross-mipsel.Dockerfile | 5 +-
.../debian-sid-cross-ppc64le.Dockerfile | 5 +-
.../debian-sid-cross-s390x.Dockerfile | 5 +-
ci/containers/debian-sid.Dockerfile | 5 +-
ci/containers/fedora-33.Dockerfile | 5 +-
ci/containers/fedora-34.Dockerfile | 5 +-
.../fedora-rawhide-cross-mingw32.Dockerfile | 4 +-
.../fedora-rawhide-cross-mingw64.Dockerfile | 4 +-
ci/containers/fedora-rawhide.Dockerfile | 5 +-
ci/containers/opensuse-leap-152.Dockerfile | 5 +-
ci/containers/opensuse-tumbleweed.Dockerfile | 5 +-
ci/containers/ubuntu-1804.Dockerfile | 5 +-
ci/containers/ubuntu-2004.Dockerfile | 5 +-
ci/gitlab.yml | 602 ++++++++++++++++++
ci/helper | 121 +---
ci/manifest.yml | 153 +++++
ci/util.py | 32 +-
40 files changed, 871 insertions(+), 818 deletions(-)
delete mode 100644 ci/containers/README.rst
create mode 100644 ci/gitlab.yml
create mode 100644 ci/manifest.yml
--
2.31.1
3 years, 2 months
[PATCH] libvirt-domain.c: Fix typo in virDomainAttachDevice doc
by Michal Privoznik
In the documentation to virDomainAttachDevice() we refer to a
non-existent virDomainUpdateDeviceFlag() function. The correct
name is virDomainUpdateDeviceFlags().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed as trivial.
src/libvirt-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index a8a386e839..57baef6889 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -8309,7 +8309,7 @@ virDomainGetMetadata(virDomainPtr domain,
*
* For compatibility, this method can also be used to change the media
* in an existing CDROM/Floppy device, however, applications are
- * recommended to use the virDomainUpdateDeviceFlag method instead.
+ * recommended to use the virDomainUpdateDeviceFlags method instead.
*
* Be aware that hotplug changes might not persist across a domain going
* into S4 state (also known as hibernation) unless you also modify the
--
2.32.0
3 years, 2 months
[PATCH] hw/misc: deprecate the 'sga' device
by Daniel P. Berrangé
This is obsolete since SeaBIOS 1.11.0 introduced native support for
sending messages to the serial console. The new support can be
activated using -machine graphics=off on x86 targets.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/about/deprecated.rst | 10 ++++++++++
hw/misc/sga.c | 2 ++
2 files changed, 12 insertions(+)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 9ee355ec0b..cafca05826 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -280,6 +280,16 @@ full SCSI support. Use virtio-scsi instead when SCSI passthrough is required.
Note this also applies to ``-device virtio-blk-pci,scsi=on|off``, which is an
alias.
+``-device sga`` (since 6.2)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``sga`` device loads an option ROM for x86 targets which enables
+SeaBIOS to send messages to the serial console. SeaBIOS 1.11.0 onwards
+contains native support for this feature and thus use of the option
+ROM approach is obsolete. The native SeaBIOS support can be activated
+by using ``-machine graphics=off``.
+
+
Block device options
''''''''''''''''''''
diff --git a/hw/misc/sga.c b/hw/misc/sga.c
index 4dbe6d78f9..1d04672b01 100644
--- a/hw/misc/sga.c
+++ b/hw/misc/sga.c
@@ -30,6 +30,7 @@
#include "hw/loader.h"
#include "qemu/module.h"
#include "qom/object.h"
+#include "qemu/error-report.h"
#define SGABIOS_FILENAME "sgabios.bin"
@@ -42,6 +43,7 @@ struct ISASGAState {
static void sga_realizefn(DeviceState *dev, Error **errp)
{
+ warn_report("-device sga is deprecated, use -machine graphics=off");
rom_add_vga(SGABIOS_FILENAME);
}
--
2.31.1
3 years, 2 months
[PATCH 0/9] Fix image labels lost after migration with shared fs
by Peng Liang
When migrating using shared fs, the dst host will remember the image
labels again before launching the VM and the src host will remove the
image labels after migration. It leads to that the image labels lost
after migration.
Patch 7-9 are the real fix patches.
Peng Liang (9):
security: add virSecurityUpdateTimestampIfexists
security: add virSecurityManagerUpdateImageLabel
security: implement domainUpdateSecurityImageLabel for stack
security: implement domainUpdateSecurityImageLabel for DAC
qemu: add qemuSecurityUpdateImageLabel
security: rename virSecurityDACSetImageLabelInternal to
virSecurityDACSetImageLabelSingle
migration: don't remember image labels when migrating with shared fs
migration: don't remove image labels after migration
migration: update image labels in dst after migration
src/libvirt_private.syms | 1 +
src/qemu/qemu_migration.c | 12 +++++++
src/qemu/qemu_process.c | 5 ++-
src/qemu/qemu_security.c | 10 ++++++
src/qemu/qemu_security.h | 5 +++
src/security/security_dac.c | 58 +++++++++++++++++++++++++--------
src/security/security_driver.h | 5 +++
src/security/security_manager.c | 29 +++++++++++++++++
src/security/security_manager.h | 5 +++
src/security/security_stack.c | 20 ++++++++++++
src/security/security_util.c | 32 ++++++++++++++++++
src/security/security_util.h | 4 +++
12 files changed, 172 insertions(+), 14 deletions(-)
--
2.31.1
3 years, 2 months