Re: [PATCH v2 1/6] manpages: Document 'restrictive' mode for numatune

2021-12-16 Thread Michal Prívozník
On 12/17/21 02:35, Jing Qi wrote: > Hi Michal, > Seems there is a typo of 'restrictive' instead of 'strict'  in the last > line of updated content. Right? Actually, no. What this patch does is document the current state of things. With current master, 'restrictive' is not allowed and only

Re: [PATCH v2 1/6] manpages: Document 'restrictive' mode for numatune

2021-12-16 Thread Jing Qi
Hi Michal, Seems there is a typo of 'restrictive' instead of 'strict' in the last line of updated content. Right? Best Regards, Jing Qi On Fri, Dec 17, 2021 at 12:02 AM Michal Privoznik wrote: > While we document possibility of passing an integer from > virDomainNumatuneMemMode enum, we list

Re: [PATCH] qemuGetSEVInfoToParams: Reformat to standard coding style

2021-12-16 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 06:28:44PM +0100, Peter Krempa wrote: > The function was formatted weirdly which prompted additions to conform > to the unusual style. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_driver.c | 18 +- > 1 file changed, 9 insertions(+), 9

[PATCH] qemuGetSEVInfoToParams: Reformat to standard coding style

2021-12-16 Thread Peter Krempa
The function was formatted weirdly which prompted additions to conform to the unusual style. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[PATCH v2 6/6] NEWS: Document recent numatune change

2021-12-16 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4d1a1501ef..e7d5316721 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,14 @@ v8.0.0 (unreleased) * **Removed features** + * qemu: Explicitly forbid live

[PATCH v2 1/6] manpages: Document 'restrictive' mode for numatune

2021-12-16 Thread Michal Privoznik
While we document possibility of passing an integer from virDomainNumatuneMemMode enum, we list string variants to only the first three enum members. The fourth (and so far the last) member is called 'restrictive' and thus should be documented. Signed-off-by: Michal Privoznik ---

[PATCH v2 5/6] qemu_command: do use host-nodes for system memory

2021-12-16 Thread Michal Privoznik
After previous commit, it's no longer possible to change nodeset for strict numatune. Therefore, we can start generating host-nodes onto command line again. This partially reverts d73265af6ec41104c20633b5c0a23688a62105e6. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c

[PATCH v2 0/6] qemu: Explicitly forbid live changing nodeset for strict numatune

2021-12-16 Thread Michal Privoznik
v2 of: https://listman.redhat.com/archives/libvir-list/2021-December/msg00708.html diff to v1: - Wrote documentation, per Pavel's request - Wrote a completer Michal Prívozník (6): manpages: Document 'restrictive' mode for numatune virsh-completer: Provide completer for numatune --mode

[PATCH v2 4/6] qemu: Explicitly forbid live changing nodeset for strict numatune

2021-12-16 Thread Michal Privoznik
Let's imagine a guest that's configured with strict numatune: For guests with NUMA: Depending on machine type used (see commit v6.4.0-rc1~75) we generate either: 1) -object '{"qom-type":"memory-backend-ram","id":"ram-node0",\

[PATCH v2 2/6] virsh-completer: Provide completer for numatune --mode

2021-12-16 Thread Michal Privoznik
The completer is trivial, just iterate over virDomainNumatuneMemMode enum and convert each integer into its string comrade. Signed-off-by: Michal Privoznik --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 5 + tools/virsh-domain.c |

[PATCH v2 3/6] qemu: Allow VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE in qemuDomainSetNumaParamsLive()

2021-12-16 Thread Michal Privoznik
The whole idea of VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE is that the memory location is restricted only via CGroups and thus can be changed on the fly (which is exactly what qemuDomainSetNumaParamsLive() does. Allow this mode there then. Signed-off-by: Michal Privoznik --- docs/formatdomain.rst

[PATCH v5 0/3] remove sysconfig files

2021-12-16 Thread Olaf Hering
fix path to sysconfig file in NEWS.rst (jfehlig) rebased to 85574319952af2cf538d185bd58e4ed3edc7a3e8 Olaf Hering (3): libvirt.spec: relocate pre script of daemon-driver-qemu remove sysconfig files NEWS: mention removal of sysconfig NEWS.rst| 10 +++

[PATCH v5 2/3] remove sysconfig files

2021-12-16 Thread Olaf Hering
sysconfig files are owned by the admin of the host. They have the liberty to put anything they want into these files. This makes it difficult to provide different built-in defaults. Remove the sysconfig file and place the current desired default into the service file. Local customizations can

[PATCH v5 1/3] libvirt.spec: relocate pre script of daemon-driver-qemu

2021-12-16 Thread Olaf Hering
Reduce the delta in an upcoming change. No change in behavior intended. Signed-off-by: Olaf Hering --- libvirt.spec.in | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index f6c705564a..4675e67d15 100644 ---

[PATCH v5 3/3] NEWS: mention removal of sysconfig

2021-12-16 Thread Olaf Hering
Signed-off-by: Olaf Hering --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4d1a1501ef..c9d1f6fb96 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -36,6 +36,16 @@ v8.0.0 (unreleased) * **Improvements** + * packaging: sysconfig files no longer

Re: [PATCH V3 4/4] tools: Add domsetlaunchsecstate virsh command

2021-12-16 Thread Daniel P . Berrangé
On Tue, Dec 14, 2021 at 09:46:06PM -0700, Jim Fehlig wrote: > After attesting a domain with the help of domlaunchsecinfo, > domsetlaunchsecstate can be used to set a secret in the guest > domain's memory prior to running the vcpus. > > Signed-off-by: Jim Fehlig > --- > > Some questions and RFC

Re: [PATCH V3 3/4] qemu: Implement the virDomainSetLaunchSecurityState API

2021-12-16 Thread Daniel P . Berrangé
On Tue, Dec 14, 2021 at 09:46:05PM -0700, Jim Fehlig wrote: > Set a launch secret in guest memory using the sev-inject-launch-secret > QMP API. Only supported for SEV-enabled guests in a paused state. > > Signed-off-by: Jim Fehlig > --- > src/qemu/qemu_driver.c | 88

Re: [PATCH 0/3] qemu: Explicitly forbid changing nodeset for strict numatune

2021-12-16 Thread Michal Prívozník
On 12/16/21 14:49, Pavel Hrdina wrote: > On Wed, Dec 15, 2021 at 04:52:11PM +0100, Michal Privoznik wrote: >> See 2/3 for explanation. >> >> Michal Prívozník (3): >> qemu: Allow VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE in >> qemuDomainSetNumaParamsLive() >> qemu: Explicitly forbid changing

Re: [PATCH 0/3] qemu: Explicitly forbid changing nodeset for strict numatune

2021-12-16 Thread Pavel Hrdina
On Wed, Dec 15, 2021 at 04:52:11PM +0100, Michal Privoznik wrote: > See 2/3 for explanation. > > Michal Prívozník (3): > qemu: Allow VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE in > qemuDomainSetNumaParamsLive() > qemu: Explicitly forbid changing nodeset for strict numatune > qemu_command: do

Re: [PATCH 0/2] conf: Don't crash when one of disks is missing

2021-12-16 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Peter Krempa (2): virDomainDiskInsert: Don't access NULL disk target qemuxml2argvtest: disk-missing-target: Add two disks with same bus src/conf/domain_conf.c | 1 +

[PATCH 1/2] virDomainDiskInsert: Don't access NULL disk target

2021-12-16 Thread Peter Krempa
'virDomainDiskInsert' orders the inserted disks by target. If the target is not provided though it would try to parse it anyways. This lead to a crash when parsing a definition where there are multiple disks and of two disks sharing the bus at least one also misses the target. Since we want to

[PATCH 0/2] conf: Don't crash when one of disks is missing

2021-12-16 Thread Peter Krempa
Peter Krempa (2): virDomainDiskInsert: Don't access NULL disk target qemuxml2argvtest: disk-missing-target: Add two disks with same bus src/conf/domain_conf.c | 1 + tests/qemuxml2argvdata/disk-missing-target-invalid.xml | 3 +++ 2 files changed, 4

[PATCH 2/2] qemuxml2argvtest: disk-missing-target: Add two disks with same bus

2021-12-16 Thread Peter Krempa
A recent code movement introduced a bug which reproduces only when there are two disks on the same bus missing the target. Improve the test case for the missing target test. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/disk-missing-target-invalid.xml | 3 +++ 1 file changed, 3

Re: [libvirt PATCH] qemu: validate VNC password length

2021-12-16 Thread Pavel Hrdina
On Thu, Dec 16, 2021 at 10:48:53AM +, Daniel P. Berrangé wrote: > The VNC password authentication scheme is quite horrendous in that it > takes the user password and directly uses it as a DES case. DES is a > byte 8 keyed cipher, so the VNC password can never be more than 8 > characters long.

[libvirt PATCH] qemu: validate VNC password length

2021-12-16 Thread Daniel P . Berrangé
The VNC password authentication scheme is quite horrendous in that it takes the user password and directly uses it as a DES case. DES is a byte 8 keyed cipher, so the VNC password can never be more than 8 characters long. Anything over that length will be silently dropped. We should validate this

Re: [libvirt PATCH] qemu: qemu_command: clean up includes

2021-12-16 Thread Ani Sinha
On Wed, Dec 15, 2021 at 8:47 PM Ján Tomko wrote: > > Over time, the code using them got split into other files. > (Mostly qemu_interface.c and qemu_process.c) > > Signed-off-by: Ján Tomko Reviewed-by: Ani Sinha > --- > src/qemu/qemu_command.c | 10 -- > 1 file changed, 10 deletions(-)

Re: [PATCH] qemu: fix missing cleanup on error in qemuSaveImageStartVM

2021-12-16 Thread Jiri Denemark
On Wed, Dec 15, 2021 at 16:14:34 +0100, Jiri Denemark wrote: > On Wed, Dec 15, 2021 at 18:37:21 +0530, Ani Sinha wrote: > > Commit 52521de8332c2323bd ("qemu: Use qemuDomainSaveStatus") replaced a call > > to virDomainObjSave() with qemuDomainSaveStatus() as a part of cleanup. > > Since > >

Re: [libvirt PATCH v4 3/3] qemu: format sev-guest.kernel-hashes property

2021-12-16 Thread Peter Krempa
On Tue, Dec 14, 2021 at 16:07:06 +, Daniel P. Berrangé wrote: > Set the kernel-hashes property on the sev-guest object if the config > asked for it explicitly. While QEMU machine types currently default to > having this setting off, it is not guaranteed to remain this way. > > We can't assume

Re: [libvirt PATCH v4 2/3] qemu: probe for sev-guest.kernel-hashes property

2021-12-16 Thread Peter Krempa
On Tue, Dec 14, 2021 at 16:07:05 +, Daniel P. Berrangé wrote: > This sev-guest object property indicates whether QEMU should > expose the kernel, ramdisk, cmdline hashes to the firmware > for measurement. > > The 6.2.0 capabilities are selectively refreshed to pull in > the kernel-hashes