[PATCH v2 0/3] qemu: Use -numa memdev= if -numa mem= is unavailable
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2020-May/msg00490.html
diff to v1:
- different approach used. I completely forgot about the discussion we
had, but after Dan pointed it out to me, it clicked.
Michal Prívozník (3):
qemu: Track numa-mem-supported machine attribute
qemuBuildNumaArgStr: Switch order of if() and for()
qemuBuildNumaArgStr: Use modern -numa memdev= if old -numa mem= is
unsupported
src/qemu/qemu_capabilities.c | 44 ++-
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_capspriv.h | 3 +-
src/qemu/qemu_command.c | 17 +-
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 11 +
.../caps_1.5.3.x86_64.xml | 60 ++--
.../caps_1.6.0.x86_64.xml | 68 ++---
.../caps_1.7.0.x86_64.xml | 76 ++---
.../caps_2.1.1.x86_64.xml | 92 +++---
.../caps_2.10.0.aarch64.xml | 204 +++++++-------
.../caps_2.10.0.ppc64.xml | 84 +++---
.../caps_2.10.0.s390x.xml | 28 +-
.../caps_2.10.0.x86_64.xml | 140 +++++-----
.../caps_2.11.0.s390x.xml | 32 +--
.../caps_2.11.0.x86_64.xml | 140 +++++-----
.../caps_2.12.0.aarch64.xml | 228 +++++++--------
.../caps_2.12.0.ppc64.xml | 100 +++----
.../caps_2.12.0.s390x.xml | 36 +--
.../caps_2.12.0.x86_64.xml | 148 +++++-----
.../caps_2.4.0.x86_64.xml | 116 ++++----
.../caps_2.5.0.x86_64.xml | 124 ++++----
.../caps_2.6.0.aarch64.xml | 164 +++++------
.../qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 60 ++--
.../caps_2.6.0.x86_64.xml | 100 +++----
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml | 16 +-
.../caps_2.7.0.x86_64.xml | 108 +++----
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 20 +-
.../caps_2.8.0.x86_64.xml | 124 ++++----
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 80 +++---
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 24 +-
.../caps_2.9.0.x86_64.xml | 132 ++++-----
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 104 +++----
.../caps_3.0.0.riscv32.xml | 10 +-
.../caps_3.0.0.riscv64.xml | 10 +-
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 40 +--
.../caps_3.0.0.x86_64.xml | 156 +++++------
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 108 +++----
.../caps_3.1.0.x86_64.xml | 164 +++++------
.../caps_4.0.0.aarch64.xml | 264 +++++++++---------
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 112 ++++----
.../caps_4.0.0.riscv32.xml | 10 +-
.../caps_4.0.0.riscv64.xml | 10 +-
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 48 ++--
.../caps_4.0.0.x86_64.xml | 164 +++++------
.../caps_4.1.0.x86_64.xml | 176 ++++++------
.../caps_4.2.0.aarch64.xml | 52 ++--
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 72 ++---
.../caps_4.2.0.x86_64.xml | 184 ++++++------
.../caps_5.0.0.aarch64.xml | 52 ++--
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 76 ++---
.../caps_5.0.0.x86_64.xml | 176 ++++++------
.../caps_5.1.0.x86_64.xml | 176 ++++++------
tests/testutilsqemu.c | 6 +-
54 files changed, 2408 insertions(+), 2345 deletions(-)
--
2.26.2
4 years, 6 months
[libvirt-ruby PATCH v2 0/4] Introduce GitLab CI and merge requests
by Daniel P. Berrangé
In v2:
- Renamed repo
- Change way we conditionalize build rules
Daniel P. Berrangé (4):
doc: update for new git repo name and hosting
gitlab: introduce CI jobs testing git master & distro libvirt
gitlab: add CONTRIBUTING.rst file to indicate use of merge requests
Remove obsolete mercurial ignore file
.gitlab-ci.yml | 169 +++++++++++++++++++++++++++
.gitpublish | 4 -
.hgignore | 7 --
CONTRIBUTING.rst | 28 +++++
ci/README.rst | 14 +++
ci/libvirt-centos-7.Dockerfile | 86 ++++++++++++++
ci/libvirt-centos-8.Dockerfile | 64 ++++++++++
ci/libvirt-debian-10.Dockerfile | 56 +++++++++
ci/libvirt-debian-9.Dockerfile | 59 ++++++++++
ci/libvirt-debian-sid.Dockerfile | 56 +++++++++
ci/libvirt-fedora-31.Dockerfile | 53 +++++++++
ci/libvirt-fedora-32.Dockerfile | 53 +++++++++
ci/libvirt-fedora-rawhide.Dockerfile | 54 +++++++++
ci/libvirt-opensuse-151.Dockerfile | 55 +++++++++
ci/libvirt-ubuntu-1804.Dockerfile | 59 ++++++++++
ci/libvirt-ubuntu-2004.Dockerfile | 56 +++++++++
ci/refresh | 27 +++++
doc/site/downloads.html | 12 +-
doc/site/index.html | 2 +-
19 files changed, 892 insertions(+), 22 deletions(-)
delete mode 100644 .gitpublish
delete mode 100644 .hgignore
create mode 100644 CONTRIBUTING.rst
create mode 100644 ci/README.rst
create mode 100644 ci/libvirt-centos-7.Dockerfile
create mode 100644 ci/libvirt-centos-8.Dockerfile
create mode 100644 ci/libvirt-debian-10.Dockerfile
create mode 100644 ci/libvirt-debian-9.Dockerfile
create mode 100644 ci/libvirt-debian-sid.Dockerfile
create mode 100644 ci/libvirt-fedora-31.Dockerfile
create mode 100644 ci/libvirt-fedora-32.Dockerfile
create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile
create mode 100644 ci/libvirt-opensuse-151.Dockerfile
create mode 100644 ci/libvirt-ubuntu-1804.Dockerfile
create mode 100644 ci/libvirt-ubuntu-2004.Dockerfile
create mode 100755 ci/refresh
--
2.26.2
4 years, 6 months
[libvirt-java PATCH v2 0/2] Introduce GitLab CI and merge requests
by Daniel P. Berrangé
In v2:
- Use different approach for conditional job rules
- Use ubuntu for long term git job
Daniel P. Berrangé (2):
gitlab: introduce CI jobs testing git master & distro libvirt
gitlab: add CONTRIBUTING.rst file to indicate use of merge requests
.gitlab-ci.yml | 171 +++++++++++++++++++++++++++
.gitpublish | 4 -
CONTRIBUTING.rst | 28 +++++
ci/README.rst | 14 +++
ci/libvirt-centos-7.Dockerfile | 88 ++++++++++++++
ci/libvirt-centos-8.Dockerfile | 55 +++++++++
ci/libvirt-debian-10.Dockerfile | 58 +++++++++
ci/libvirt-debian-9.Dockerfile | 61 ++++++++++
ci/libvirt-debian-sid.Dockerfile | 58 +++++++++
ci/libvirt-fedora-31.Dockerfile | 55 +++++++++
ci/libvirt-fedora-32.Dockerfile | 55 +++++++++
ci/libvirt-fedora-rawhide.Dockerfile | 56 +++++++++
ci/libvirt-opensuse-151.Dockerfile | 57 +++++++++
ci/libvirt-ubuntu-1804.Dockerfile | 61 ++++++++++
ci/libvirt-ubuntu-2004.Dockerfile | 68 +++++++++++
ci/refresh | 27 +++++
16 files changed, 912 insertions(+), 4 deletions(-)
delete mode 100644 .gitpublish
create mode 100644 CONTRIBUTING.rst
create mode 100644 ci/README.rst
create mode 100644 ci/libvirt-centos-7.Dockerfile
create mode 100644 ci/libvirt-centos-8.Dockerfile
create mode 100644 ci/libvirt-debian-10.Dockerfile
create mode 100644 ci/libvirt-debian-9.Dockerfile
create mode 100644 ci/libvirt-debian-sid.Dockerfile
create mode 100644 ci/libvirt-fedora-31.Dockerfile
create mode 100644 ci/libvirt-fedora-32.Dockerfile
create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile
create mode 100644 ci/libvirt-opensuse-151.Dockerfile
create mode 100644 ci/libvirt-ubuntu-1804.Dockerfile
create mode 100644 ci/libvirt-ubuntu-2004.Dockerfile
create mode 100755 ci/refresh
--
2.26.2
4 years, 6 months
[libvirt-ci PATCH] guests: don't force user to create a config.yaml file
by Daniel P. Berrangé
Only the "install" command requires a per-user config.yaml with a
password set. We should not require this for the other commands
to be run.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/lcitool | 51 +++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/guests/lcitool b/guests/lcitool
index 27aee7b..1f093d0 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -138,11 +138,15 @@ class Config:
with open(os.path.join(base, "config.yaml"), "r") as fp:
self.values = yaml.safe_load(fp)
+ user_config_path = self._get_config_file("config.yaml")
+ if not os.path.exists(user_config_path):
+ return
+
try:
- with open(self._get_config_file("config.yaml"), "r") as fp:
+ with open(user_config_path, "r") as fp:
user_config = yaml.safe_load(fp)
except Exception as e:
- raise Exception("Missing or invalid config.yaml file: {}".format(e))
+ raise Exception("Invalid config.yaml file: {}".format(e))
if user_config is None:
raise Exception("Missing or invalid config.yaml file")
@@ -181,20 +185,13 @@ class Config:
if k not in known_keys:
del _dict[k]
- def _validate_section(self, config, section, mandatory_keys):
+ def _validate_section(self, config, section):
# remove keys we don't recognize
self._remove_unknown_keys(config[section], self.values[section].keys())
- # check that the mandatory keys are present and non-empty
- for key in mandatory_keys:
- if config.get(section).get(key) is None:
- raise Exception(("Missing or empty value for mandatory key"
- "'{}.{}'").format(section, key))
-
# check that all keys have values assigned and of the right type
for key in config[section].keys():
- # mandatory keys were already checked, so this covers optional keys
if config[section][key] is None:
raise Exception(
"Missing value for '{}.{}'".format(section, key)
@@ -209,22 +206,6 @@ class Config:
# delete sections we don't recognize
self._remove_unknown_keys(config, self.values.keys())
- if "install" not in config:
- raise Exception("Missing mandatory section 'install'")
-
- self._validate_section(config, "install", ["root_password"])
-
- # we only need this for the gitlab check below, if 'flavor' is missing
- # that's okay, we'll provide a default later
- flavor = config["install"].get("flavor")
- if flavor is not None and flavor not in ["test", "jenkins", "gitlab"]:
- raise Exception(
- "Invalid value '{}' for 'install.flavor'".format(flavor)
- )
-
- if flavor == "gitlab":
- self._validate_section(config, "gitlab", ["runner_secret"])
-
def _update(self, values):
self.values["install"].update(values["install"])
@@ -561,10 +542,28 @@ class Application:
for project in self._projects.expand_pattern("all"):
print(project)
+ def _validate_install_config(self, config):
+ if config.values["install"].get("root_password") is None:
+ raise Exception("Missing mandatory install.root_password config.yaml parameter")
+
+ # we only need this for the gitlab check below, if 'flavor' is missing
+ # that's okay, we'll provide a default later
+ flavor = config.values["install"].get("flavor")
+ if flavor is not None and flavor not in ["test", "jenkins", "gitlab"]:
+ raise Exception(
+ "Invalid value '{}' for 'install.flavor'".format(flavor)
+ )
+
+ if flavor == "gitlab":
+ if config.values["gitlab"].get("runner_secret") is None:
+ raise Exception("Missing mandatory gitlab.runner_secret config.yaml parameter")
+
def _action_install(self, args):
base = Util.get_base()
config = self._config
+ self._validate_install_config(config)
+
for host in self._inventory.expand_pattern(args.hosts):
facts = self._inventory.get_facts(host)
--
2.26.2
4 years, 6 months
[PATCH] README: Replace "configure" with "autogen.sh" for correct installation
by Yi Wang
From: LiaoPingfang <liao.pingfang(a)zte.com.cn>
First of all, there is no "configure" file.
We need use autogen.sh at first to create "configure" file.
Then in autogen.sh "configure" will be executed according to
user as root or non-root.
Signed-off-by: Liao Pingfang <liao.pingfang(a)zte.com.cn>
---
README.rst | 4 ++--
autogen.sh | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/README.rst b/README.rst
index cdcc97b..82b4b31 100644
--- a/README.rst
+++ b/README.rst
@@ -53,7 +53,7 @@ in a manner that is suitable for installing as root, use:
::
$ mkdir build && cd build
- $ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ $ ../autogen.sh
$ make
$ sudo make install
@@ -62,7 +62,7 @@ While to build & install as an unprivileged user
::
$ mkdir build && cd build
- $ ../configure --prefix=$HOME/usr
+ $ ../autogen.sh
$ make
$ make install
diff --git a/autogen.sh b/autogen.sh
index 4e1bbce..3c119e1 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -27,6 +27,10 @@ if test "x$1" = "x--system"; then
libdir=$prefix/lib64
fi
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
+ if [ "$HOME" != "/root" ]; then
+ prefix=$HOME/usr
+ EXTRA_ARGS="--prefix=$prefix"
+ fi
fi
cd "$olddir"
--
2.9.5
4 years, 6 months
[libvirt PATCH] cpu_arm: Drop unused variable
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Pushed. It is trivial and should fix the build on FreeBSD.
src/cpu/cpu_arm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c
index 66f6942ab9..6f6c6a1479 100644
--- a/src/cpu/cpu_arm.c
+++ b/src/cpu/cpu_arm.c
@@ -325,7 +325,6 @@ virCPUarmModelParse(xmlXPathContextPtr ctxt,
{
virCPUarmMapPtr map = data;
g_autoptr(virCPUarmModel) model = NULL;
- g_autofree xmlNodePtr *nodes = NULL;
g_autofree char *vendor = NULL;
model = g_new0(virCPUarmModel, 1);
--
2.26.2
4 years, 6 months
[libvirt PATCH] docs: document proper enum for guest agent timeout
by Tomáš Golembiovský
The documented enum and its values do not exits. The real enum has
slightly different name.
Signed-off-by: Tomáš Golembiovský <tgolembi(a)redhat.com>
---
src/libvirt-domain.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index a12809c2d5..37f864b7b0 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -12550,13 +12550,13 @@ int virDomainGetLaunchSecurityInfo(virDomainPtr domain,
* Set how long to wait for a response from guest agent commands. By default,
* agent commands block forever waiting for a response.
*
- * @timeout must be a value from virDomainAgentCommandTimeoutValues or
+ * @timeout must be a value from virDomainAgentResponseTimeoutValues or
* positive:
*
- * VIR_DOMAIN_AGENT_COMMAND_TIMEOUT_BLOCK(-2): meaning to block forever
+ * VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK(-2): meaning to block forever
* waiting for a result.
- * VIR_DOMAIN_AGENT_COMMAND_TIMEOUT_DEFAULT(-1): use default timeout value.
- * VIR_DOMAIN_AGENT_COMMAND_TIMEOUT_NOWAIT(0): does not wait.
+ * VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_DEFAULT(-1): use default timeout value.
+ * VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_NOWAIT(0): does not wait.
* positive value: wait for @timeout seconds
*
* Returns 0 on success, -1 on failure
--
2.25.0
4 years, 6 months
[libvirt PATCH] qemu: reject readonly attribute for virtiofs
by Ján Tomko
This is not yet supported by virtiofsd.
Fixes #23
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_validate.c | 5 +++
.../vhost-user-fs-readonly.xml | 44 +++++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
3 files changed, 50 insertions(+)
create mode 100644 tests/qemuxml2argvdata/vhost-user-fs-readonly.xml
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index fde1892d42..ac22270104 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -3418,6 +3418,11 @@ qemuValidateDomainDeviceDefFS(virDomainFSDefPtr fs,
return -1;
case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS:
+ if (fs->readonly) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("virtiofs does not yet supported read-only mode"));
+ return -1;
+ }
if (!driver->privileged) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("virtiofs is not yet supported in session mode"));
diff --git a/tests/qemuxml2argvdata/vhost-user-fs-readonly.xml b/tests/qemuxml2argvdata/vhost-user-fs-readonly.xml
new file mode 100644
index 0000000000..003ed41eb3
--- /dev/null
+++ b/tests/qemuxml2argvdata/vhost-user-fs-readonly.xml
@@ -0,0 +1,44 @@
+<domain type='kvm'>
+ <name>guest</name>
+ <uuid>126f2720-6f8e-45ab-a886-ec9277079a67</uuid>
+ <memory unit='KiB'>14680064</memory>
+ <currentMemory unit='KiB'>14680064</currentMemory>
+ <memoryBacking>
+ <source type='file'/>
+ <access mode='shared'/>
+ </memoryBacking>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ <numa>
+ <cell id='0' cpus='0-1' memory='14680064' unit='KiB' memAccess='shared'/>
+ </numa>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb' index='0' model='none'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <filesystem type='mount' accessmode='passthrough'>
+ <driver type='virtiofs' queue='1024'/>
+ <binary path='/usr/libexec/virtiofsd' xattr='on'>
+ <cache mode='always'/>
+ <lock posix='off' flock='off'/>
+ </binary>
+ <source dir='/path'/>
+ <target dir='mount_tag'/>
+ <readonly/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </filesystem>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4ab664a846..8cbf3f8daf 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -3171,6 +3171,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory");
DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages");
+ DO_TEsT_CAPS_LATEST_PARSE_ERROR("vhost-user-fs-readonly");
DO_TEST("riscv64-virt",
QEMU_CAPS_DEVICE_VIRTIO_MMIO);
--
2.25.4
4 years, 6 months
[PATCH V5 0/4] Introduce getHost support for ARM CPU driver
by Zhenyu Zheng
Introduce getHost support for ARM CPU driver. First add
some data about commonly used ARM CPU models, and their
vendors into cpu_map, then added some helper methods as
callbacks to load them. Read and parse vendor_id, part_id
and CPU flags of local CPU from corresponding registers.
Signed-off-by: Zhenyu Zheng <zheng.zhenyu(a)outlook.com>
Zhenyu Zheng (4):
cpu: Introduce virCPUarmData and related struts
cpu: Add helper functions to parse vendor and model
cpu: Introduce getHost support for ARM CPU driver
cpu_map: Introduce ARM cpu models
src/cpu/Makefile.inc.am | 1 +
src/cpu/cpu.h | 2 +
src/cpu/cpu_arm.c | 399 +++++++++++++++++++++++++++++-
src/cpu/cpu_arm_data.h | 32 +++
src/cpu_map/Makefile.inc.am | 7 +
src/cpu_map/arm_Falkor.xml | 6 +
src/cpu_map/arm_Kunpeng-920.xml | 6 +
src/cpu_map/arm_ThunderX299xx.xml | 6 +
src/cpu_map/arm_cortex-a53.xml | 6 +
src/cpu_map/arm_cortex-a57.xml | 6 +
src/cpu_map/arm_cortex-a72.xml | 6 +
src/cpu_map/arm_vendors.xml | 14 ++
src/cpu_map/index.xml | 15 ++
13 files changed, 505 insertions(+), 1 deletion(-)
create mode 100644 src/cpu/cpu_arm_data.h
create mode 100644 src/cpu_map/arm_Falkor.xml
create mode 100644 src/cpu_map/arm_Kunpeng-920.xml
create mode 100644 src/cpu_map/arm_ThunderX299xx.xml
create mode 100644 src/cpu_map/arm_cortex-a53.xml
create mode 100644 src/cpu_map/arm_cortex-a57.xml
create mode 100644 src/cpu_map/arm_cortex-a72.xml
create mode 100644 src/cpu_map/arm_vendors.xml
--
2.20.1
4 years, 6 months