[PATCHv2 1/6] virnetdevovs: Add vmuuid notes on virNetDevOpenvswitchInterfaceSetQos

2021-08-16 Thread jx8zjs
From: Jinsheng Zhang Add vmuuid notes on virNetDevOpenvswitchInterfaceSetQos, and change vmid to vmuuid. Signed-off-by: Jinsheng Zhang --- src/util/virnetdevopenvswitch.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c

[PATCHv2 3/6] virnetdevovs: Extract common code block to a single function

2021-08-16 Thread jx8zjs
From: Jinsheng Zhang Signed-off-by: zhangjl02 s Signed-off-by: zhangjl02 s Signed-off-by: zhangjl02 --- src/util/virnetdevopenvswitch.c | 60 ++--- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c

[PATCHv2 5/6] virnetdevovs: Fix qos cleaning residual on multi interfaces

2021-08-16 Thread jx8zjs
From: Jinsheng Zhang Warn these error instead of return when removing qos or queues. This will avoid residual qos clearance on multiple interfaces. Signed-off-by: zhangjl02 --- src/util/virnetdevopenvswitch.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git

[PATCHv2 4/6] virnetdevovs: Introduce virNetDevOpenvswitchInterfaceClearTxQos and virNetDevOpenvswitchInterfaceClearRxQos

2021-08-16 Thread jx8zjs
From: Jinsheng Zhang Separate virNetDevOpenvswitchInterfaceClearQos into two steps. When setting qos, we can set only rx or tx and the other one should be cleared. Signed-off-by: zhangjl02 --- src/libvirt_private.syms| 2 ++ src/util/virnetdevopenvswitch.c | 50

[PATCHv2 6/6] tests: add test on virNetDevOpenvswitchInterfaceSetQos and virNetDevOpenvswitchInterfaceClearQos

2021-08-16 Thread jx8zjs
From: Jinsheng Zhang Test virNetDevOpenvswitchInterfaceSetQos and virNetDevOpenvswitchInterfaceClearQos with dryrun method. Signed-off-by: zhangjl02 --- tests/virnetdevopenvswitchtest.c | 196 ++- 1 file changed, 195 insertions(+), 1 deletion(-) diff --git

[PATCHv2 0/6] virDomain: fix problems when setting qos on ovs managed

2021-08-16 Thread jx8zjs
--- diff to v1: - Modify commit message to no longer then 80 characters. - Split patch into several commits - Add notes on some function and defination - Extract common code block to a single function Thanks to Pavel Hrdina for helping to review these patches. Two problems are found

[PATCHv2 2/6] virnetdevovs: Extract conversion parameters between virNetDevBandwidth and ovs

2021-08-16 Thread jx8zjs
From: Jinsheng Zhang Signed-off-by: zhangjl02 --- src/util/virnetdevopenvswitch.c | 12 +++- src/util/virnetdevopenvswitch.h | 7 +++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index

[PATCH RFC v6 01/12] linux-header: Update linux/kvm.h

2021-08-16 Thread Yifei Jiang
Update linux-headers/linux/kvm.h from https://github.com/avpatel/linux/tree/riscv_kvm_v19. Only use this header file, so here do not update all linux headers by update-linux-headers.sh until above KVM series is accepted. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li ---

[PATCH RFC v6 12/12] target/riscv: Support virtual time context synchronization

2021-08-16 Thread Yifei Jiang
Add virtual time context description to vmstate_riscv_cpu. After cpu being loaded, virtual time context is updated to KVM. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li --- target/riscv/machine.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target/riscv/machine.c

[PATCH RFC v6 03/12] target/riscv: Implement function kvm_arch_init_vcpu

2021-08-16 Thread Yifei Jiang
Get isa info from kvm while kvm init. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/kvm.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index

[PATCH RFC v6 07/12] target/riscv: Support setting external interrupt by KVM

2021-08-16 Thread Yifei Jiang
Extend riscv_cpu_update_mip() to support setting external interrupt by KVM. It will call kvm_riscv_set_irq() to change the IRQ state in the KVM module When kvm is enabled and the MIP_SEIP bit is set in "mask" In addition, bacause target/riscv/cpu_helper.c is used to TCG, so move

[PATCH RFC v6 05/12] target/riscv: Implement kvm_arch_put_registers

2021-08-16 Thread Yifei Jiang
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/kvm.c | 141 - 1 file changed, 140 insertions(+), 1 deletion(-) diff --git

[PATCH RFC v6 04/12] target/riscv: Implement kvm_arch_get_registers

2021-08-16 Thread Yifei Jiang
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/kvm.c | 150 - 1 file changed, 149 insertions(+), 1 deletion(-) diff --git

[PATCH RFC v6 11/12] target/riscv: Implement virtual time adjusting with vm state changing

2021-08-16 Thread Yifei Jiang
We hope that virtual time adjusts with vm state changing. When a vm is stopped, guest virtual time should stop counting and kvm_timer should be stopped. When the vm is resumed, guest virtual time should continue to count and kvm_timer should be restored. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH RFC v6 00/12] Add riscv kvm accel support

2021-08-16 Thread Yifei Jiang
This series adds both riscv32 and riscv64 kvm support, and implements migration based on riscv. It is based on temporarily unaccepted kvm: https://github.com/kvm-riscv/linux (lastest version v19). This series depends on above pending changes which haven't yet been accepted, so this QEMU patch

[PATCH RFC v6 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2021-08-16 Thread Yifei Jiang
Use char-fe to handle console sbi call, which implement early console io while apply 'earlycon=sbi' into kernel parameters. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li --- target/riscv/kvm.c | 42 - target/riscv/sbi_ecall_interface.h | 72

[PATCH RFC v6 02/12] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2021-08-16 Thread Yifei Jiang
Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- meson.build | 2 + target/riscv/kvm.c | 133

[PATCH RFC v6 09/12] target/riscv: Add host cpu type

2021-08-16 Thread Yifei Jiang
'host' type cpu is set isa to RV32 or RV64 simply, more isa info will obtain from KVM in kvm_arch_init_vcpu() Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 15 +++ target/riscv/cpu.h | 1 + 2 files changed, 16

[PATCH RFC v6 06/12] target/riscv: Support start kernel directly by KVM

2021-08-16 Thread Yifei Jiang
Get kernel and fdt start address in virt.c, and pass them to KVM when cpu reset. In addition, add kvm_riscv.h to place riscv specific interface. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- hw/riscv/boot.c | 11 +++ hw/riscv/virt.c

[PATCH RFC v6 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-08-16 Thread Yifei Jiang
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context from KVM. To set register of RISCV_TIMER_REG(state) will occur a error from KVM on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter that adaping in QEMU. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH] security: fix use-after-free in virSecuritySELinuxReserveLabel

2021-08-16 Thread Zhenyu Ye
commit 2e668a61d5ae4("Fix error handling when adding MCS labels") uses the 'pctx' in virReportError after it has been freed. Fix it. Fixes: 2e668a61d5ae4cbd6f79e096d0c394f186e132bd Signed-off-by: eillon --- src/security/security_selinux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH 00/22] qemu: Capability probing from 'query-command-line-options' (part 1?)

2021-08-16 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Hi, this series started as an exploration in how we use 'query-command-line-options' and the way to possibly step away from using it. The main problem is that query-command-line-options is using old-style command line parsing infra in qemu and thus

Re: [PATCH 09/22] qemu: capabilities: Probe QEMU_CAPS_SMP_DIES from the QMP schema

2021-08-16 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: The configurability of the number of dies in a CPU can be infered from inferred the presence of the 'die-id' field in 'query-hotpluggable-cpus'. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 04/22] scripts: group-qemu-caps: Add capability name as comment to capability string

2021-08-16 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: Add a cross reference of the enum value name with the string representation. This allows a quick cross-reference of the values without having to open the header and implementation files separately. To achieve this the python checker code at first

Re: build broken!

2021-08-16 Thread Ani Sinha
On Mon, 16 Aug 2021, Peter Krempa wrote: > On Mon, Aug 16, 2021 at 19:01:27 +0530, Ani Sinha wrote: > > > > > > On Mon, 16 Aug 2021, Peter Krempa wrote: > > > > > On Mon, Aug 16, 2021 at 18:35:48 +0530, Ani Sinha wrote: > > > > Hi : > > > > > > > > getting this strange build error here.

[RFC PATCH] add support for two global pm options that controls acpi hotplug on q35/i440fx

2021-08-16 Thread Ani Sinha
'acpi-pci-hotplug-with-bridge-support' and 'acpi-root-pci-hotplug' are two pm options in qemu that governs acpi hotplug support. This is a WIP patch that tries to implement support for both these two global qemu options. 'acpi-pci-hotplug-with-bridge-support' applies both for q35 as well as i440fx

Re: build broken!

2021-08-16 Thread Ani Sinha
On Mon, 16 Aug 2021, Peter Krempa wrote: > On Mon, Aug 16, 2021 at 18:35:48 +0530, Ani Sinha wrote: > > Hi : > > > > getting this strange build error here. Googling did not help. Anyone has > > any ideas as to what I am missing? I am on Ubuntu 20.04 LTS. > > [...] > > > function

Re: build broken!

2021-08-16 Thread Ani Sinha
How can I disable building docs? On Mon, 16 Aug 2021, Ani Sinha wrote: > > > On Mon, 16 Aug 2021, Peter Krempa wrote: > > > On Mon, Aug 16, 2021 at 18:35:48 +0530, Ani Sinha wrote: > > > Hi : > > > > > > getting this strange build error here. Googling did not help. Anyone has > > > any ideas as

Re: build broken!

2021-08-16 Thread Peter Krempa
On Mon, Aug 16, 2021 at 19:01:27 +0530, Ani Sinha wrote: > > > On Mon, 16 Aug 2021, Peter Krempa wrote: > > > On Mon, Aug 16, 2021 at 18:35:48 +0530, Ani Sinha wrote: > > > Hi : > > > > > > getting this strange build error here. Googling did not help. Anyone has > > > any ideas as to what I am

Re: [PATCH 00/22] qemu: Capability probing from 'query-command-line-options' (part 1?)

2021-08-16 Thread Martin Kletzander
On Thu, Aug 12, 2021 at 04:48:53PM +0200, Peter Krempa wrote: Hi, this series started as an exploration in how we use 'query-command-line-options' and the way to possibly step away from using it. The main problem is that query-command-line-options is using old-style command line parsing infra in

Re: [PATCH 15/22] qemu: capabilities: Add alternative detection of QEMU_CAPS_NUMA

2021-08-16 Thread Martin Kletzander
On Mon, Aug 16, 2021 at 03:15:20PM +0200, Peter Krempa wrote: On Mon, Aug 16, 2021 at 15:09:39 +0200, Martin Kletzander wrote: On Thu, Aug 12, 2021 at 04:49:08PM +0200, Peter Krempa wrote: > 'set-numa-node' is the command which can set the equivalent parameters > to '-numa' in preconfig mode,

Re: build broken!

2021-08-16 Thread Peter Krempa
On Mon, Aug 16, 2021 at 18:35:48 +0530, Ani Sinha wrote: > Hi : > > getting this strange build error here. Googling did not help. Anyone has > any ideas as to what I am missing? I am on Ubuntu 20.04 LTS. [...] > function `virAdmConnectIsAlive': >

Re: [PATCH 15/22] qemu: capabilities: Add alternative detection of QEMU_CAPS_NUMA

2021-08-16 Thread Peter Krempa
On Mon, Aug 16, 2021 at 15:09:39 +0200, Martin Kletzander wrote: > On Thu, Aug 12, 2021 at 04:49:08PM +0200, Peter Krempa wrote: > > 'set-numa-node' is the command which can set the equivalent parameters > > to '-numa' in preconfig mode, so we can use it as witness to see that > > -numa is

build broken!

2021-08-16 Thread Ani Sinha
Hi : getting this strange build error here. Googling did not help. Anyone has any ideas as to what I am missing? I am on Ubuntu 20.04 LTS. FAILED: src/libvirt-admin.so.0.7006.0 cc -o src/libvirt-admin.so.0.7006.0 src/libvirt-admin.so.0.7006.0.p/meson-generated_.._admin_admin_protocol.c.o

Re: [PATCH 15/22] qemu: capabilities: Add alternative detection of QEMU_CAPS_NUMA

2021-08-16 Thread Martin Kletzander
On Thu, Aug 12, 2021 at 04:49:08PM +0200, Peter Krempa wrote: 'set-numa-node' is the command which can set the equivalent parameters to '-numa' in preconfig mode, so we can use it as witness to see that -numa is supported. To ensure that the old detection method is removed once we'll be bumping

Re: [PATCH 04/22] scripts: group-qemu-caps: Add capability name as comment to capability string

2021-08-16 Thread Martin Kletzander
On Thu, Aug 12, 2021 at 04:48:57PM +0200, Peter Krempa wrote: Add a cross reference of the enum value name with the string representation. This allows a quick cross-reference of the values without having to open the header and implementation files separately. To achieve this the python checker

Re: [RFC PATCH 00/10] VirtioNet RSS support

2021-08-16 Thread Andrew Melnichenko
Ping On Wed, Jul 28, 2021 at 11:17 AM Andrew Melnychenko wrote: > This series of patches add RSS property support for virtio-net-pci. > > Virtio RSS effectively works with TAP devices, it requires additional > vectors for VirtioNet, queues for TAP device, and vCPU cores. > Example of device

[PATCH 5/5] tests: Test detach-device and detach-device-alias for test driver

2021-08-16 Thread Luke Yue
Signed-off-by: Luke Yue --- tests/virshtest.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/virshtest.c b/tests/virshtest.c index 53db2aa19a..273596d636 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -291,6 +291,22 @@ static int

[PATCH 4/5] examples: xml: test: add xml for testing devices related APIs

2021-08-16 Thread Luke Yue
Signed-off-by: Luke Yue --- examples/xml/test/testdevcontroller.xml | 1 + examples/xml/test/testdevdiskcdrom.xml | 5 +++ examples/xml/test/testdevfs.xml | 6 examples/xml/test/testdevhostdev.xml| 5 +++ examples/xml/test/testdevif.xml | 6

[PATCH 3/5] test_driver: Implement virDomainDetachDevice

2021-08-16 Thread Luke Yue
Signed-off-by: Luke Yue --- src/test/test_driver.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index e2463876fa..21e813db8f 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9731,6 +9731,14 @@

[PATCH 1/5] test_driver: Implement virDomainDetachDeviceFlags

2021-08-16 Thread Luke Yue
Introduce testDomainChgDevice for further development (just like what we did for IOThread). And introduce testDomainDetachDeviceLiveAndConfig for detaching devices. Signed-off-by: Luke Yue --- src/test/test_driver.c | 270 + 1 file changed, 270

[PATCH 0/5] Implement detach device related APIs for test driver

2021-08-16 Thread Luke Yue
Luke Yue (5): test_driver: Implement virDomainDetachDeviceFlags test_driver: Implement virDomainDetachDeviceAlias test_driver: Implement virDomainDetachDevice examples: xml: test: add xml for testing devices related APIs tests: Test detach-device and detach-device-alias for test driver

[PATCH 2/5] test_driver: Implement virDomainDetachDeviceAlias

2021-08-16 Thread Luke Yue
Signed-off-by: Luke Yue --- src/test/test_driver.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2ebdbaa604..e2463876fa 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9721,6 +9721,16 @@

[PATCH v2 3/4] test_driver: Implement virDomainAbortJob

2021-08-16 Thread Luke Yue
As we are using jobState to store dummy job type, so just change it to VIR_DOMAIN_JOB_CANCELLED when try to abort a job. Signed-off-by: Luke Yue --- src/test/test_driver.c | 29 + 1 file changed, 29 insertions(+) diff --git a/src/test/test_driver.c

[PATCH v2 4/4] virshtest: add test for domjobinfo

2021-08-16 Thread Luke Yue
Signed-off-by: Luke Yue --- tests/virshtest.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/virshtest.c b/tests/virshtest.c index 53db2aa19a..0c46496c74 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -291,6 +291,13 @@ static int

[PATCH v2 1/4] test_driver: Implement virDomainGetJobInfo

2021-08-16 Thread Luke Yue
priv-jobState is used to store dummy job type, and priv->jobOperation is used to store dummy job operation, they are initialized to VIR_DOMAIN_JOB_NONE and VIR_DOMAIN_JOB_OPERATION_UNKNOWN, we can just change them in other job related APIs as there is no real job in test driver. Signed-off-by:

[PATCH v2 2/4] test_driver: Implement virDomainGetJobStats

2021-08-16 Thread Luke Yue
Signed-off-by: Luke Yue --- src/test/test_driver.c | 105 + 1 file changed, 105 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 9306f0e104..93aeec7105 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@

[PATCH v2 0/4] Implement some job related APIs for test driver

2021-08-16 Thread Luke Yue
v2: - Change to priv->jobState to store job type directly instead of using time - Use priv->jobOperation to store job operation for virDomainGetJobStats Luke Yue (4): test_driver: Implement virDomainGetJobInfo test_driver: Implement virDomainGetJobStats test_driver: Implement

Re: Re: Issue report: Snapshot-create-as block while the vm's process is killed out.

2021-08-16 Thread 13520781...@189.cn
Hello, Peter, I submitted one issue as the link: https://gitlab.com/libvirt/libvirt/-/issues/201 Create memory snapshot while kill -9 the pid of the vm, snapshot-create-as command failed and the vm can not started again for blocked . (#201) · Issues · libvirt / libvirt · GitLab With

Re: Issue report: Snapshot-create-as block while the vm's process is killed out.

2021-08-16 Thread Peter Krempa
On Mon, Aug 16, 2021 at 11:04:12 +0800, 13520781...@189.cn wrote: > > Hello, > > I have meet one issues while using snapshot-create-as with external file. > > Centos 8, > Libivirt 7.0.0 > Qemu: 5.2.0 > > While making one snapshot with memory and disk extaernal file, and killing > the

Re: [PATCH] tests: qemu: Don't crash when capability file can't be parsed

2021-08-16 Thread Martin Kletzander
On Mon, Aug 16, 2021 at 10:29:39AM +0200, Peter Krempa wrote: On Mon, Aug 16, 2021 at 10:17:26 +0200, Martin Kletzander wrote: On Thu, Aug 12, 2021 at 04:55:04PM +0200, Peter Krempa wrote: > In case the test directory contains invalid XML (this doesn't happen > upstream, but can when

Issue report: Snapshot-create-as block while the vm's process is killed out.

2021-08-16 Thread 13520781...@189.cn
Hello, I have meet one issues while using snapshot-create-as with external file. Centos 8, Libivirt 7.0.0 Qemu: 5.2.0 While making one snapshot with memory and disk extaernal file, and killing the process of the vm qemu same time mostly, the snapshot-create-as command blocked. So it

Re: [PATCH] tests: qemu: Don't crash when capability file can't be parsed

2021-08-16 Thread Peter Krempa
On Mon, Aug 16, 2021 at 10:17:26 +0200, Martin Kletzander wrote: > On Thu, Aug 12, 2021 at 04:55:04PM +0200, Peter Krempa wrote: > > In case the test directory contains invalid XML (this doesn't happen > > upstream, but can when developing, e.g. by forgetting git conflict > > markers) the tests

Re: [PATCH] tests: qemu: Don't crash when capability file can't be parsed

2021-08-16 Thread Martin Kletzander
On Thu, Aug 12, 2021 at 04:55:04PM +0200, Peter Krempa wrote: In case the test directory contains invalid XML (this doesn't happen upstream, but can when developing, e.g. by forgetting git conflict markers) the tests would crash as in case when 'testQemuInfoSetArgs' fails we'd still invoke the

Re: [libvirt PATCH] util: Fix memory leak when clearing Open vSwitch QoS

2021-08-16 Thread Jano Tomko
On a %A in %Y, Jiri Denemark wrote: > No need to overwrite vmid_ex_id with a pointer to another copy of the > same string when the original is still alive. > > Signed-off-by: Jiri Denemark > --- > src/util/virnetdevopenvswitch.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git