[PATCH v3 08/12] cpu_map: Add versioned Intel Icelake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 4 + src/cpu_map/meson.build | 4 + src/cpu_map/x86_Icelake-Server-v3.xml | 103 + src/cpu_map/x86_Icelake-Server-v4.xml | 108 +

[PATCH v3 10/12] cpu_map: Add versioned Intel Snowridge CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Snowridge-v2.xml | 78 ++ src/cpu_map/x86_Snowridge-v3.xml | 80 +++

[PATCH v3 12/12] cpu_map: Add versioned Dhyana CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_Dhyana-v2.xml | 81 +++ ..._64-cpuid-Hygon-C86-7185-32-core-guest.xml | 5 +-

[PATCH v3 04/12] qemu: use canonical name for CPU models

2023-12-15 Thread Jonathon Jongsma
As described in detail in the commit "cpu_map: add canonical names to existing CPU models", the unversioned CPU model names are not migration-safe. If qemu makes the anticipated changes to CPU alias mapping, an unversioned CPU model may be represented by different underlying CPU models on

[PATCH v3 07/12] cpu_map: Add versioned Intel Cascadelake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Cascadelake-Server-v2.xml | 93 +++ src/cpu_map/x86_Cascadelake-Server-v4.xml | 91 ++

[PATCH v3 05/12] cpu_map: Add versioned EPYC CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 6 + src/cpu_map/meson.build | 6 + src/cpu_map/x86_EPYC-Milan-v2.xml | 108 ++ src/cpu_map/x86_EPYC-Rome-v2.xml | 93 +++

[PATCH v3 06/12] cpu_map: Add versioned Intel Skylake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Skylake-Client-v4.xml | 77 + src/cpu_map/x86_Skylake-Server-v4.xml | 83 ++

[PATCH v3 09/12] cpu_map: Add versioned Intel Cooperlake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_Cooperlake-v2.xml | 98 +++ .../x86_64-cpuid-Cooperlake-host.xml | 3 +-

[PATCH v3 11/12] cpu_map: Add versioned Intel SapphireRapids CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_SapphireRapids-v2.xml | 125 ++ .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml | 1 +

[PATCH v3 02/12] cpu_map: add canonical names to existing CPU models

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/x86_Broadwell-IBRS.xml| 1 + src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 1 + src/cpu_map/x86_Broadwell-noTSX.xml | 1 + src/cpu_map/x86_Broadwell.xml | 1 + src/cpu_map/x86_Cascadelake-Server-noTSX.xml |

[PATCH v3 03/12] cpu: parse the canonical name from the cpu model

2023-12-15 Thread Jonathon Jongsma
Recent changes have added a 'canonical_name' field to the xml definitions for our CPU models. Parse this field into the C structure and pass it around where necessary. --- src/conf/cpu_conf.c | 3 +++ src/conf/cpu_conf.h | 1 + src/cpu/cpu_x86.c | 24 3 files changed,

[PATCH v3 00/12] Improve versioned CPU support in libvirt

2023-12-15 Thread Jonathon Jongsma
For SEV-SNP support we will need to be able to specify versioned CPU models that are not yet available in libvirt. Rather than just adding a versioned CPU or two that would satisfy that immediate need, I decided to try to add versioned CPUs in a more standard way. This series generates CPU

[PATCH v3 01/12] cpu_map: update script to handle versioned CPUs

2023-12-15 Thread Jonathon Jongsma
Previously, the script only generated the parent CPU and any versions that had a defined alias. The script now generates all CPU versions. Any version that had a defined alias will continue to use that alias, but those without aliases will use the generated name $BASECPUNAME-vN. The reason for

Re: [libvirt PATCH 0/5] add loongarch support for libvirt

2023-12-15 Thread Andrea Bolognani
On Thu, Dec 14, 2023 at 02:08:44PM +0800, xianglai li wrote: > Hello, Everyone: > This patch series adds libvirt support for loongarch.Although the bios > path and name has not been officially integrated into qemu and we think > there are still many shortcomings, we try to push a version of

Re: [PATCH 1/2] ci: integration: Switch upstream integration tests to Fedora 39

2023-12-15 Thread Andrea Bolognani
On Fri, Dec 15, 2023 at 06:06:54PM +0100, Erik Skultety wrote: > On Fri, Dec 15, 2023 at 02:26:11AM -0800, Andrea Bolognani wrote: > > On Thu, Dec 14, 2023 at 09:28:16AM +0100, Michal Privoznik wrote: > > > Currently, Fedora 37 and 38 is used. The former is now EOL since > > > there's new release.

Re: [libvirt PATCH 5/5] Add bios path for loongarch

2023-12-15 Thread Andrea Bolognani
On Thu, Dec 14, 2023 at 02:08:49PM +0800, xianglai li wrote: > +++ b/src/qemu/qemu_conf.c > @@ -93,7 +93,8 @@ VIR_ONCE_GLOBAL_INIT(virQEMUConfig); > "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd:" \ > "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd:" \ >

Re: [libvirt PATCH 4/5] Implement the method of getting host info for loongarch

2023-12-15 Thread Andrea Bolognani
On Thu, Dec 14, 2023 at 02:08:48PM +0800, xianglai li wrote: > +++ b/src/util/virhostcpu.c > @@ -579,7 +579,7 @@ virHostCPUParsePhysAddrSize(FILE *cpuinfo, unsigned int > *addrsz) > char *str; > char *endptr; > > -if (!(str = STRSKIP(line, "address sizes"))) > +

Re: [libvirt PATCH 3/5] Config some capabilities for loongarch virt machine

2023-12-15 Thread Andrea Bolognani
On Thu, Dec 14, 2023 at 02:08:47PM +0800, xianglai li wrote: > +++ b/src/qemu/qemu_domain.c > @@ -5635,6 +5635,11 @@ > qemuDomainControllerDefPostParse(virDomainControllerDef *cont, > cont->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI; > else if

Re: [libvirt PATCH 1/5] Add loongarch cpu support

2023-12-15 Thread Andrea Bolognani
On Thu, Dec 14, 2023 at 02:08:45PM +0800, xianglai li wrote: > From: lixianglai > > Add loongarch cpu support, Define new cpu type 'loongarch64' > and implement it's driver functions. > > Signed-off-by: lixianglai We usually prefer the full name to be used both for git authorship and DCO

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Denis V. Lunev
On 12/15/23 16:07, Daniel P. Berrangé wrote: On Fri, Dec 15, 2023 at 01:48:09PM +, Efim Shevrin wrote: Hello, here are call traces with two threads generated by python script // == [root@dandreev-vz-6-0-0-243-master libvirt]# gdb -p 288985 (gdb) t a a bt Thread

Re: [PATCH 1/2] ci: integration: Switch upstream integration tests to Fedora 39

2023-12-15 Thread Erik Skultety
On Fri, Dec 15, 2023 at 02:26:11AM -0800, Andrea Bolognani wrote: > On Thu, Dec 14, 2023 at 09:28:16AM +0100, Michal Privoznik wrote: > > Currently, Fedora 37 and 38 is used. The former is now EOL since > > there's new release. Switch 37 to 39 then. > > > > Signed-off-by: Michal Privoznik > > ---

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Denis V. Lunev
On 12/15/23 16:47, Daniel P. Berrangé wrote: On Fri, Dec 15, 2023 at 03:51:19PM +0100, Denis V. Lunev wrote: On 12/15/23 14:48, Efim Shevrin wrote: *From:* Daniel P. Berrangé *Sent:* Friday, December 15, 2023 19:09 *To:* Efim Shevrin *Cc:* devel@lists.libvirt.org ; d...@openvz.org

Re: [PATCH 04/19] qemuxml2argvdata: Move 'smbios-multiple-type2' case to genericxml2xmltest

2023-12-15 Thread Peter Krempa
On Fri, Dec 15, 2023 at 13:33:14 +0100, Peter Krempa wrote: > The qemu driver explicitly rejects such configuration, thus this is just > a generic XML2XML test case. Move it. > > Signed-off-by: Peter Krempa > --- > .../smbios-multiple-type2.xml | 0 >

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Daniel P . Berrangé
On Fri, Dec 15, 2023 at 03:51:19PM +0100, Denis V. Lunev wrote: > On 12/15/23 14:48, Efim Shevrin wrote: > > *From:* Daniel P. Berrangé > > *Sent:* Friday, December 15, 2023 19:09 > > *To:* Efim Shevrin > > *Cc:* devel@lists.libvirt.org ; d...@openvz.org > > > > *Subject:* Re: [PATCH 3/3] rpc:

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Daniel P . Berrangé
On Fri, Dec 15, 2023 at 01:48:09PM +, Efim Shevrin wrote: > Hello, > > here are call traces with two threads generated by python script > // == > [root@dandreev-vz-6-0-0-243-master libvirt]# gdb -p 288985 > (gdb) t a a bt > > Thread 2 (Thread 0x7f2112862640 (LWP

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Denis V. Lunev
On 12/15/23 14:48, Efim Shevrin wrote: Hello, here are call traces with two threads generated by python script // == [root@dandreev-vz-6-0-0-243-master libvirt]# gdb -p 288985 (gdb) t a a bt Thread 2 (Thread 0x7f2112862640 (LWP 288986) "python3"): #0  

[PATCH 4/4] vmx: Ensure unique disk targets when parsing

2023-12-15 Thread Michal Privoznik
When parsing disks from a vmx file, the target name is generated based on disk bus, controller the disk is attached to, and its unit. But in case of SCSI and SATA attached disks this does not guarantee the target name uniqueness. If there are two disks, one attached to scsi.0 and the other to

[PATCH 2/4] vmx2xmltest: Add another test case

2023-12-15 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/vmx2xmldata/esx-in-the-wild-12.vmx | 86 tests/vmx2xmldata/esx-in-the-wild-12.xml | 39 +++ tests/vmx2xmltest.c | 1 + 3 files changed, 126 insertions(+) create mode 100644

[PATCH 3/4] vmx: Separate disk target name generation into a function

2023-12-15 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/vmx/vmx.c | 175 +++--- 1 file changed, 110 insertions(+), 65 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index af1c1640ae..399f03b419 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2136,6

[PATCH 1/4] vmx: Accept empty fileName for cdrom-image

2023-12-15 Thread Michal Privoznik
Turns out, there are two ways to specify an empty CD-ROM drive in a .vmx file: 1) .fileName = "emptyBackingString" 2) .fileName = "" While we do parse 1) successfully, the code does not accept 2) and an error is reported. Modify the code to treat both cases the same. Resolves:

[PATCH 0/4] vmx: A couple of disk related fixes

2023-12-15 Thread Michal Privoznik
The first patch fixes an issue. The last one - I am not sure if it's not going to break something and thus it's optional. Michal Prívozník (4): vmx: Accept empty fileName for cdrom-image vmx2xmltest: Add another test case vmx: Separate disk target name generation into a function vmx:

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Efim Shevrin
Hello, here are call traces with two threads generated by python script // == [root@dandreev-vz-6-0-0-243-master libvirt]# gdb -p 288985 (gdb) t a a bt Thread 2 (Thread 0x7f2112862640 (LWP 288986) "python3"): #0 0x7f2121d4296f in poll () at /lib64/libc.so.6 #1

[PATCH 18/19] qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 2

2023-12-15 Thread Peter Krempa
Add the rest of test cases which were tested only by qemuxml2xmltest. All test cases added here have a ' --- .../net-bandwidth.x86_64-latest.args | 47 ++ tests/qemuxml2argvdata/net-bandwidth.xml | 2 +- .../net-bandwidth2.x86_64-latest.args | 44

[PATCH 19/19] qemuxml2argvtest: Add checker that all input files are used

2023-12-15 Thread Peter Krempa
To prevent regressions when refactoring tests and accidentally forgotten input files make sure that qemuxml2argvtest is invoked for all input files in tests/qemuxml2argvdata Signed-off-by: Peter Krempa --- tests/qemustatusxml2xmltest.c | 2 +- tests/qemuxml2argvtest.c | 63

[PATCH 16/19] qemuxml2argvtest: Enable 'graphics-listen-network' case

2023-12-15 Thread Peter Krempa
Use the data from 'nat-network' network definition to enable the test case also for xml2argvtest. Since the network listen bit doesn't need any plug definition just use an empty string. Signed-off-by: Peter Krempa --- ...graphics-listen-network.x86_64-latest.args | 37 +++

[PATCH 17/19] virnetworkportxml2xmltest: Add simple versions of bridge/network tests

2023-12-15 Thread Peter Krempa
Add versions stripping vlans and bandwidth setup so that they can be used in qemuxml2argvtest for interfaces which don't support the above. Signed-off-by: Peter Krempa --- tests/virnetworkportxml2xmldata/plug-bridge-basic.xml | 11 +++

[PATCH 15/19] qemuxml2xmltest: Introduce fake network driver

2023-12-15 Thread Peter Krempa
In order to be able to use ' --- tests/qemuxml2argvtest.c | 98 1 file changed, 98 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 13d279b301..7197fd35db 100644 --- a/tests/qemuxml2argvtest.c +++

[PATCH 14/19] qemuxml2argvmock: Mock virNetDevSetMTU

2023-12-15 Thread Peter Krempa
Unfortunately the network backend commandline formatter attempts to also setup the backend itself, which it really should not. For now make sure qemuxml2argvtest can call virNetDevSetMTU. Signed-off-by: Peter Krempa --- src/util/virnetdev.h | 2 +- tests/qemuxml2argvmock.c | 8 2

[PATCH 13/19] qemu: process: Separate setup of network device objects

2023-12-15 Thread Peter Krempa
Separate the SLIRP bits from 'qemuProcessNetworkPrepareDevices' and do the setup of the internal data when setting up domain data. This will allow tests to use the same code path to lookup data for a network. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 45

[PATCH 12/19] qemuxml2xmltest: Delete 'interface-driver' case

2023-12-15 Thread Peter Krempa
Everything this XML tests is already explicitly covered in other tests. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/interface-driver.xml | 54 --- .../interface-driver.x86_64-latest.xml| 67 --- tests/qemuxml2xmltest.c | 1

[PATCH 08/19] qemuxml2argvtest: Add test cases covered only by qemuxml2xmltest - part 1

2023-12-15 Thread Peter Krempa
There were plenty of test cases invoked only from qemuxml2xmltest but not from qemuxml2argvtest, either by accident or it was deemed unneeded. Bulk-add all test cases which fit the above description which don't require faking the network driver. Use same invocation as present in qemuxml2xmltest.

[PATCH 10/19] qemuxml2*test: Add specific test case for interface link state

2023-12-15 Thread Peter Krempa
Test both linkstates in an explicit test case. Note that link state is setup via monitor, thus not visible on the commandline. Signed-off-by: Peter Krempa --- .../net-linkstate.x86_64-latest.args | 36 +++ tests/qemuxml2argvdata/net-linkstate.xml | 34 ++

[PATCH 09/19] qemuxml2xmltest: Move 'graphics-listen-network2' case go genericxml2xmltest

2023-12-15 Thread Peter Krempa
The tested configuration is not valid for a qemu VM. Move it to the generic test. Signed-off-by: Peter Krempa --- .../graphics-listen-network2.xml | 0 .../graphics-listen-network2.xml} | 19 +++ tests/genericxml2xmltest.c| 1 +

[PATCH 06/19] qemuxml2argvtest: Check for duplicate invocation of tests

2023-12-15 Thread Peter Krempa
Prevent duplicated invocation of tests by tracking use of output files. Some cases need to be exempt from this for now. Signed-off-by: Peter Krempa --- tests/qemustatusxml2xmltest.c | 2 +- tests/qemuxml2argvtest.c | 37 +++ tests/testutilsqemu.h |

[PATCH 07/19] qemuxml2argvmock: Mock qemuInterfaceBridgeConnect

2023-12-15 Thread Peter Krempa
Prepare for test cases which would want to call that function. Signed-off-by: Peter Krempa --- src/qemu/qemu_interface.h | 2 +- tests/qemuxml2argvmock.c | 17 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_interface.h

[PATCH 04/19] qemuxml2argvdata: Move 'smbios-multiple-type2' case to genericxml2xmltest

2023-12-15 Thread Peter Krempa
The qemu driver explicitly rejects such configuration, thus this is just a generic XML2XML test case. Move it. Signed-off-by: Peter Krempa --- .../smbios-multiple-type2.xml | 0 tests/genericxml2xmltest.c | 2 ++

[PATCH 05/19] qemuxml2argvtest: Remove duplicated invocations of tests

2023-12-15 Thread Peter Krempa
'parallel-tcp-chardev', 'parallel-parport-chardev' are invoked twice with exactly the same parameters, remove the duplicity. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[PATCH 03/19] qemuxml2argvtest: Reinstate 'pseries-vio-address-clash' case

2023-12-15 Thread Peter Krempa
The case was removed in commit 8ff73d22c7405049452e2bf7f281f7460a6b9d10 which modernized the cases without an explicit reason. Reinstate it. Fixes: 8ff73d22c7405049452e2bf7f281f7460a6b9d10 Signed-off-by: Peter Krempa --- .../qemuxml2argvdata/pseries-vio-address-clash.ppc64-latest.err | 1 +

[PATCH 02/19] qemuxml2argvtest: Fix and use 'disk-network-ssh-key' case

2023-12-15 Thread Peter Krempa
The test case was introduced by commit 68599168ea8185689bd227e6d142e3d933558f84 but is only used in the qemunbdkittest. Fix it and make use of it also in qemuxml2argvtest. Fixes: 68599168ea8185689bd227e6d142e3d933558f84 Signed-off-by: Peter Krempa --- .../disk-network-ssh-key.x86_64-latest.args

[PATCH 00/19] qemu XML testing improvements, part 1 - forgotten test files and network driver

2023-12-15 Thread Peter Krempa
This patch saga aims to improve and simplify testing of qemu XML configs. Part 1 deals with input test files which are not used in qemuxml2argvtest, introduces a mock network driver and adds a checker that all input files are in fact used. Peter Krempa (19): qemuxml2argvtest: Reinstate

[PATCH 01/19] qemuxml2argvtest: Reinstate 'console-compat-chardev' and 'pci-serial-dev-chardev'

2023-12-15 Thread Peter Krempa
The tests invocations were accidentaly removed in commit 54257ed51b5132032cedb7e1e7b8c34b9ae52115 Fixes: 54257ed51b5132032cedb7e1e7b8c34b9ae52115 Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemuxml2argvtest.c

Re: [PATCH 0/4] virsh/virt-admin: Don't use virErrorRestore

2023-12-15 Thread Michal Prívozník
On 12/14/23 17:56, Peter Krempa wrote: > Client application shouldn't need to reset the error. > > Peter Krempa (4): > virshReconnect: Preserve current URI if not explicitly set in > ctl->connname > virshCatchDisconnect: Don't probe connection URI > vshAdmConnect: Preserve connection

[PATCH 4/4] vshAdmCatchDisconnect: Don't probe connection URI

2023-12-15 Thread Peter Krempa
virsh already stores the connection URI in 'ctl->connname', use that instead. Signed-off-by: Peter Krempa --- tools/virt-admin.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 02cf421cee..fa9304c772 100644 ---

Re: [PATCH] CIM: Include in libxkutil for malloc functions

2023-12-15 Thread Michal Prívozník
On 12/15/23 11:16, Florian Weimer wrote: > * Peter Krempa: > >> On Fri, Dec 15, 2023 at 11:04:51 +0100, Florian Weimer wrote: >>> This avoids implicit function declarations and build failures with >>> future compilers. >>> >>> Not sure where to submit this. Our Fedora package references >>>

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread John Levon
On Fri, Dec 15, 2023 at 11:20:10AM +, Daniel P. Berrangé wrote: > Libvirt is executing the error callback and work done in the error callback > is breaking our API guarantee. > > This broken API guarantee is not the app's fault, it is libvirt's fault for > not protecting itself against

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread Daniel P . Berrangé
On Wed, Dec 13, 2023 at 11:04:54AM +, John Levon wrote: > > These two functions are currently private to libvirt, hence not available to > consumers. Would it be possible to make them public? Without them, there's no > way to do any libvirt call without stomping on an existing error that you

[PATCH v2 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Fima Shevrin
RPC client implementation uses the following paradigm. The critical section is organized via virObjectLock(client)/virObjectUnlock(client) braces. Though this is potentially problematic as main thread:side thread: virObjectUnlock(client);

[PATCH v2 2/3] utils: Module extension for using locable object in GSourceFuncs

2023-12-15 Thread Fima Shevrin
The ability to use virObjectLockable allows to unlock an object at the prepare stage inside the Main Event Loop. Co-authored-by: Denis V. Lunev Co-authored-by: Nikolai Barybin Signed-off-by: Fima Shevrin --- src/rpc/virnetclient.c | 6 +++--- src/util/vireventglib.c | 4 ++--

[PATCH v2 0/3] Rework main and side threads interaction in rpc

2023-12-15 Thread Fima Shevrin
From: "Fima Shevrin" RPC client implementation uses the following paradigm. The critical section is organized via virObjectLock(client)/virObjectUnlock(client) braces. Though this is potentially problematic as main thread:side thread: virObjectUnlock(client);

Re: [PATCH] Extend libvirt-guests to shutdown only persistent VMs

2023-12-15 Thread Benjamin Taubmann
ping > On 13. Nov 2023, at 11:22, Benjamin Taubmann > wrote: > > At the moment, there is no configuration option for the libvirt-guests > service that allows users to define that only persistent virtual machines > should be shutdown on host shutdown. > > Currently, the service config allows

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-15 Thread Daniel P . Berrangé
On Fri, Dec 15, 2023 at 02:32:19AM +0800, Fima Shevrin wrote: > RPC client implementation uses the following paradigm. The critical > section is organized via virObjectLock(client)/virObjectUnlock(client) > braces. Though this is potentially problematic as > main thread:

close callback and multiple threads

2023-12-15 Thread John Levon
On Fri, Dec 15, 2023 at 10:58:29AM +, Daniel P. Berrangé wrote: > If you use the virConnectRegisterCloseCallback() method, you should get > notified of the connection drop at precisely the right time, every time, > regardless of whether you happen to be making an API call at the time. That

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread Daniel P . Berrangé
On Wed, Dec 13, 2023 at 11:04:54AM +, John Levon wrote: > > These two functions are currently private to libvirt, hence not available to > consumers. Would it be possible to make them public? Without them, there's no > way to do any libvirt call without stomping on an existing error that you

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread Daniel P . Berrangé
On Thu, Dec 14, 2023 at 05:55:41PM +0100, Peter Krempa wrote: > On Thu, Dec 14, 2023 at 12:03:55 +, John Levon wrote: > Using the global error handler function is not a very good idea in > multithreaded applications, so I'd really suggest to have a generic > handler function that you'll call

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread Peter Krempa
On Fri, Dec 15, 2023 at 10:28:18 +, John Levon wrote: > On Fri, Dec 15, 2023 at 10:32:36AM +0100, Peter Krempa wrote: > > > > Although, it sounds like you know of a counter-example piece of code: is > > > it > > > something you could share? > > > > See above for the pointers to virsh. > >

Re: [PATCH 1/2] ci: integration: Switch upstream integration tests to Fedora 39

2023-12-15 Thread Andrea Bolognani
On Thu, Dec 14, 2023 at 09:28:16AM +0100, Michal Privoznik wrote: > Currently, Fedora 37 and 38 is used. The former is now EOL since > there's new release. Switch 37 to 39 then. > > Signed-off-by: Michal Privoznik > --- > ci/integration.yml | 80 +++--- >

Re: [PATCH] CIM: Include in libxkutil for malloc functions

2023-12-15 Thread Florian Weimer
* Peter Krempa: > On Fri, Dec 15, 2023 at 11:04:51 +0100, Florian Weimer wrote: >> This avoids implicit function declarations and build failures with >> future compilers. >> >> Not sure where to submit this. Our Fedora package references >> , but it's 404, and I can't

Re: [PATCH] CIM: Include in libxkutil for malloc functions

2023-12-15 Thread Peter Krempa
On Fri, Dec 15, 2023 at 11:04:51 +0100, Florian Weimer wrote: > This avoids implicit function declarations and build failures with > future compilers. > > Not sure where to submit this. Our Fedora package references > , but it's 404, and I can't find a CIM > component in

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread Peter Krempa
On Thu, Dec 14, 2023 at 19:02:56 +, John Levon wrote: > On Thu, Dec 14, 2023 at 05:55:41PM +0100, Peter Krempa wrote: > > > If you need any form of more complex logic in your application for error > > reporting (ab)using libvirt's thread local variable to store the error > > I'm a bit lost

[PATCH v3 13/13] rpc: turn virNetClientAddProgram() to void

2023-12-15 Thread Dmitry Frolov
virNetClientAddProgram() always returns 0. Signed-off-by: Dmitry Frolov --- src/admin/admin_remote.c| 3 +-- src/locking/lock_driver_lockd.c | 3 +-- src/logging/log_manager.c | 3 +-- src/lxc/lxc_monitor.c | 4 +--- src/remote/remote_driver.c | 7 +++

[PATCH v3 06/13] libxl: turn libxlMakeDomainOSCaps() to void

2023-12-15 Thread Dmitry Frolov
libxlMakeDomainOSCaps() always returns 0. Signed-off-by: Dmitry Frolov --- src/libxl/libxl_capabilities.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 8853ba9d88..defbf9d223 100644 ---

[PATCH v3 07/13] libxl: turn libxlMakeDomainDeviceDiskCaps() to void

2023-12-15 Thread Dmitry Frolov
libxlMakeDomainDeviceDiskCaps() always returns 0. Signed-off-by: Dmitry Frolov --- src/libxl/libxl_capabilities.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index defbf9d223..7663790649 100644 ---

[PATCH v3 10/13] conf: turn virDomainGraphicsListenAppendAddress() to void

2023-12-15 Thread Dmitry Frolov
virDomainGraphicsListenAppendAddress() always returns 0. Signed-off-by: Dmitry Frolov --- src/conf/domain_conf.c | 4 +--- src/conf/domain_conf.h | 4 ++-- src/libxl/xen_common.c | 7 ++- src/libxl/xen_xl.c | 3 +-- src/vbox/vbox_common.c | 4 +--- src/vmx/vmx.c | 3 +-- 6

[PATCH v3 05/13] conf: turn virCapabilitiesSetNetPrefix() to void

2023-12-15 Thread Dmitry Frolov
virCapabilitiesSetNetPrefix() always returns 0. Signed-off-by: Dmitry Frolov --- src/conf/capabilities.c| 4 +--- src/conf/capabilities.h| 2 +- src/libxl/libxl_capabilities.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/conf/capabilities.c

[PATCH v3 01/13] cpu: turn virCPUx86DataAddItem() to void

2023-12-15 Thread Dmitry Frolov
virCPUx86DataAddItem() always returns 0. Signed-off-by: Dmitry Frolov --- src/cpu/cpu_x86.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 8d0e3947ce..f32770b8a3 100644 --- a/src/cpu/cpu_x86.c +++

[PATCH v3 12/13] libxl: turn xenParseXLNamespaceData() to void

2023-12-15 Thread Dmitry Frolov
xenParseXLNamespaceData() always returns 0. Signed-off-by: Dmitry Frolov --- src/libxl/xen_xl.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index 553aa77896..ea825e85bd 100644 --- a/src/libxl/xen_xl.c +++

fixed patch

2023-12-15 Thread Dmitry Frolov
Oops... my fault. libxen-dev package was not installed, so xenParseXLNamespaceData was not compiled, thus i missed the error. Also i missed, that libxl_get_physinfo comes with libxen-dev. So, I excluded it from the patch. Many thanks! Dmitry. ___

[PATCH v3 00/13] Unreacheble code cleanup

2023-12-15 Thread Dmitry Frolov
A lot of unreacheble code was caused by int functions, which return nothing except zero. Unreacheble code was removed. Corresponding functions type was changed to void. --- v2: Changing functions return type to void v3: fixed errors in v2 Dmitry Frolov (13): cpu: turn virCPUx86DataAddItem() to