RE: [libvirt][PATCH v11 1/4] qemu: provide support to query the SGX capability

2022-05-16 Thread Huang, Haibin
Hi Peter, I add error case like below. Is this error case same to you said. Thank you very much! diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.replies index 8444825cb7..c52b7917e2 100644 --- a/tests/qemucapabilitiesdata/caps_7.1

Re: [libvirt PATCH 01/80] qemu: Add debug messages to job recovery code

2022-05-16 Thread Fangge Jin
Hi I'm testing this patch series, but it has conflict with latest code. Could you please rebase to latest code and provide a V2? Thanks. BR, Fangge Jin On Tue, May 10, 2022 at 11:22 PM Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 13 + > 1

RE: [libvirt][PATCH v11 1/4] qemu: provide support to query the SGX capability

2022-05-16 Thread Huang, Haibin
> -Original Message- > From: Peter Krempa > Sent: Monday, May 16, 2022 3:12 PM > To: Huang, Haibin > Cc: Yang, Lin A ; libvir-list@redhat.com; Ding, Jian- > feng ; Zhong, Yang > Subject: Re: [libvirt][PATCH v11 1/4] qemu: provide support to query the SGX > capability > > On Mon, May

Re: [PATCH 00/11] Clean up arguments for qemuBuildCommandLine

2022-05-16 Thread Pavel Hrdina
On Mon, May 16, 2022 at 05:12:30PM +0200, Peter Krempa wrote: > This series cleans up the arguments. > > Note that patches 10,11 can be dropped if we decide that we want to keep > the '-S' argument off the command line bulit for 'virsh > domxml-to-native' for qemu definitions. > > Peter Krempa (1

[PATCH 0/3] qemu: Promote internals descriptions to kbase articles

2022-05-16 Thread Peter Krempa
Inside of the qemu driver source tree we had 3 text files describing internals. We can promote them to kbase articles to make them more accessible. You can browse the converted files at: https://pipo.sk.gitlab.io/-/libvirt/-/jobs/2462903538/artifacts/website/kbase/internals/qemu-threads.html

[PATCH 3/3] qemu: EVENTHANDLERS.txt: Move to kbase and rSTisze

2022-05-16 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/kbase/index.rst | 3 ++ docs/kbase/internals/meson.build | 1 + .../kbase/internals/qemu-event-handlers.rst | 44 ++- 3 files changed, 28 insertions(+), 20 deletions(-) rename src/qemu/EVENTHANDLERS.tx

[PATCH 1/3] qemu: THREADS.txt: rSTize and move to knowledge-base

2022-05-16 Thread Peter Krempa
Move the internal documentation about qemu threading to the knowledge base. The conversion included rstizing of the text document, mainly just fixing of the headline and enclosing function names and code examples into code block sections. Signed-off-by: Peter Krempa --- docs/kbase/index.rst

[PATCH 2/3] qemu: MIGRATION.txt: Move to kbase and rSTisze

2022-05-16 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/kbase/index.rst | 3 + docs/kbase/internals/meson.build | 1 + .../kbase/internals/qemu-migration.rst| 67 ++- 3 files changed, 40 insertions(+), 31 deletions(-) rename src/qemu/MIGRATION.txt =>

[PATCH 11/11] qemuBuildCommandLine: Remove 'flags' argument

2022-05-16 Thread Peter Krempa
The flags are not used for anything. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 7 +++ src/qemu/qemu_command.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 8 +++- src/qemu/qemu_process.h | 3 +-- tests/qemuxml2argvtest.c | 2 +- 6 files changed,

[PATCH 05/11] qemu: Store state of FIPS in virQEMUDriver

2022-05-16 Thread Peter Krempa
Rather than re-query all the time we can cache the state of FIPS of the host as it will not change during the runtime of the guest. Introduce a 'hostFips' flag to 'virQEMUDriver' and move the code checking the state from 'qemuCheckFips' to 'qemuStateInitialize' and also populate 'hostFips' in qemu

[PATCH 10/11] qemuBuildCommandLine: Don't avoid '-S' flag for 'domxml-to-native' conversion

2022-05-16 Thread Peter Krempa
The commandline generated from our XML->native convertor is the majority of cases not usable without libvirt anyways and the situation will not improve any more. As of such there's no much utility of avoiding the use of stopped CPUs flag in such case. Remove the QEMU_BUILD_COMMAND_LINE_CPUS_RUNNI

[PATCH 09/11] qemuBuildCommandLine: Inline qemuCheckFips

2022-05-16 Thread Peter Krempa
Now that we store the state of the host FIPS mode setting in the qemu driver object, we don't need to outsource the logic into 'qemuCheckFips'. Additionally since we no longer support very old qemu's which would not yet have --enable-fips we can drop the part of the comment about very old qemus.

[PATCH 08/11] qemuBuildCommandLine: Remove 'driver' argument

2022-05-16 Thread Peter Krempa
We pass 'vm' which already contains it. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 6 +++--- src/qemu/qemu_command.h | 17 - src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 9 +++-- src/qemu/qemu_process.h | 3 +-- tests/qemuxml2argvtest.c |

[PATCH 07/11] qemuConnectDomainXMLToNative: Refactor cleanup

2022-05-16 Thread Peter Krempa
Automatically free the 'vm' temporary domain object and remove the 'cleanup' label and 'ret' helper variable. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/q

[PATCH 04/11] qemuBuildCommandLine: Convert 'standalone' flag to use 'flags'

2022-05-16 Thread Peter Krempa
Introduce 'qemuBuildCommandLineFlags' and use it instead of specific flag booleans. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 3 +-- src/qemu/qemu_command.h | 5 - src/qemu/qemu_driver.c | 4 +++- src/qemu/qemu_process.c | 6 ++ src/qemu/qemu_process.h | 8

[PATCH 06/11] qemuBuildCommandLine: Sanitize debug logging

2022-05-16 Thread Peter Krempa
Improve the debug log inside 'qemuBuildCommandLine' to include the name from the definition and remove useless data such as the pointer to the qemuDriver object or qemuCaps. Additionally remove the non-specific debug statements: VIR_DEBUG("Building emulator command line"); from the two callers

[PATCH 03/11] qemu: command: Don't hide 'vhost' fds from 'standalone' command line

2022-05-16 Thread Peter Krempa
We already format a commandline using FD passing for the tap devices so formatting the 'vhost' file descriptors won't make it any less usable directly. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 15 +-- src/qemu/qemu_command.h | 3 +-- src/qemu/qemu_hotplug.c | 2 +-

[PATCH 01/11] virConnectDomainXMLToNative: Add note about dynamically configured features

2022-05-16 Thread Peter Krempa
In the qemu driver certain configs such as disk throttling or CPU hotplug is configured by interacting with the monitor at the startup phase of the hypervisor and thus is not part of the "native config" as returned by 'virConnectDomainXMLToNative'. Similarly at least the commandline for qemu conta

[PATCH 02/11] docs: drvqemu: Decrease expectations about command line from 'virsh domxml-to-native'

2022-05-16 Thread Peter Krempa
In the qemu driver certain configs such as disk throttling or CPU hotplug is configured by interacting with the monitor at the startup phase of the hypervisor and thus is not part of the "native config". Add a paragraph into the documentation outlining that the native configuration might not be co

[PATCH 00/11] Clean up arguments for qemuBuildCommandLine

2022-05-16 Thread Peter Krempa
This series cleans up the arguments. Note that patches 10,11 can be dropped if we decide that we want to keep the '-S' argument off the command line bulit for 'virsh domxml-to-native' for qemu definitions. Peter Krempa (11): virConnectDomainXMLToNative: Add note about dynamically configured

Re: [PATCH v3 0/5] Introduce network backed NVRAM

2022-05-16 Thread Rohit Kumar
Ping. Hi Peter, can you please take a look on this v3 patchset ? Thanks, Rohit On 09/05/22 12:38 pm, Rohit Kumar wrote: Ping. Hi, requesting review on this patchset. Thanks! On 04/05/22 10:21 pm, Rohit Kumar wrote: Libvirt domain XML currently allows only local filepaths that can be used to

Re: [libvirt PATCH 2/2] util: Remove virCommandPassFDIndex()

2022-05-16 Thread Peter Krempa
On Fri, May 13, 2022 at 14:32:42 -0500, Jonathon Jongsma wrote: > The last use of this function was removed in commit 6d161bcc, so the > function is no longer used except as an internal implementation for > virCommandPassFD(). > > Signed-off-by: Jonathon Jongsma > --- > src/libvirt_private.syms

Re: [libvirt PATCH 1/2] util: remove virCommandPassFDGetFDIndex()

2022-05-16 Thread Peter Krempa
On Fri, May 13, 2022 at 14:32:41 -0500, Jonathon Jongsma wrote: > commit f9236200 removed the last use of this function, so it can be > dropped. > > Signed-off-by: Jonathon Jongsma > --- > src/libvirt_private.syms | 1 - > src/util/vircommand.c| 27 --- > src/util/vi

Re: [libvirt][PATCH v11 1/4] qemu: provide support to query the SGX capability

2022-05-16 Thread Peter Krempa
On Mon, May 16, 2022 at 01:47:35 +, Huang, Haibin wrote: > > > > -Original Message- > > From: Peter Krempa > > Sent: Thursday, May 12, 2022 12:05 AM > > To: Yang, Lin A > > Cc: libvir-list@redhat.com; Huang, Haibin ; Ding, > > Jian-feng ; Zhong, Yang > > Subject: Re: [libvirt][PATC