[PATCH] domstats:add haltpolling time statistic interface

2021-07-01 Thread Yang Fei
This patch add the ability to statistic the halt polling time when VM execute HLT(arm is WFI). In actual services, the execution of the HLT instruction by the guest is an important cause of virtualization overhead. The halt polling feature is introduced to solve this problem. When a guest idle VM

Re: [libvirt PATCH 0/4] RFC: tests: introduce lavocado

2021-07-01 Thread Beraldo Leal
On Thu, Jul 01, 2021 at 07:04:32PM +0100, Daniel P. Berrangé wrote: > On Wed, Jun 30, 2021 at 01:36:30PM -0300, Beraldo Leal wrote: > > If I look at Avocado, I think (correct me if i'm wrong) > > 1. The harness is essentially the standard Python harness > with a thin CLI wrapper. Thus needs

Re: [libvirt PATCH 0/4] RFC: tests: introduce lavocado

2021-07-01 Thread Daniel P . Berrangé
On Wed, Jun 30, 2021 at 01:36:30PM -0300, Beraldo Leal wrote: > lavocado aims to be an alternative test framework for the libvirt > project using Python, python-libvirt and Avocado. This can be used to > write unit, functional and integration tests and it is inspired by the > libvirt-tck

[libvirt][PATCH v4 3/4] qemu: Add command-line to enable SGX

2021-07-01 Thread Haibin Huang
From: Lin Yang If SGX is defined in domain, add the argument to enable SGX in -cpu : -cpu ,+sgx,+sgx-debug,+sgx1,+sgx-encls-c, +sgx-enclv,+sgx-exinfo,+sgx-kss,+sgx-mode64, +sgx-provisionkey,+sgx-tokenkey,+sgx2,+sgxlc --- src/qemu/qemu_command.c | 6 ++ 1 file changed, 6

[libvirt][PATCH v4 4/4] Support to query SGX capability

2021-07-01 Thread Haibin Huang
1.Add SGX feature in domain capabilities 2.Get sgx capabilities by query-sgx-capabilities 3.Transfer the B to KB for epc_size 4.Delete sgx1 and sgx2 5.add unit test for get capabilities Signed-off-by: Haibin Huang --- src/conf/domain_capabilities.c| 29

[libvirt][PATCH v4 0/4] Support query and use SGX

2021-07-01 Thread Haibin Huang
This patch series provides support for enabling Intel's Software Guard Extensions (SGX) feature in guest VM. Giving the SGX support in QEMU is still pending for reviewing, this patch series is not submmited for code review, but only describe the SGX enabling solution design that contains

[libvirt][PATCH v4 2/4] qemu: Add command-line to generate SGX EPC memory backend

2021-07-01 Thread Haibin Huang
From: Lin Yang According to the result parsing from xml, add the argument of SGX EPC memory backend into QEMU command line: -object memory-backend-epc,id=mem1,size=K,prealloc \ -sgx-epc id=epc1,memdev=mem1 --- src/qemu/qemu_command.c | 24 1 file changed, 24

[libvirt][PATCH v4 1/4] conf: Introduce SGX related element into domain xml

2021-07-01 Thread Haibin Huang
From: Lin Yang    1024 --- src/conf/domain_conf.c | 106 +--- src/conf/domain_conf.h | 10 src/conf/virconftypes.h | 3 ++ 3 files changed, 91 insertions(+), 28 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

Re: [libvirt PATCH] nodedev: handle mdevs from multiple parents

2021-07-01 Thread Michal Prívozník
On 6/30/21 4:16 PM, Michal Prívozník wrote: > On 6/10/21 8:15 PM, Jonathon Jongsma wrote: >> Due to a rather unfortunate misunderstanding, we were parsing the list >> of defined devices from mdevctl incorrectly. Since my primary >> development machine only has a single device capable of mdevs, I

Re: [PATCH libvirt v1] conf: verify for duplicate hostdevs

2021-07-01 Thread Michal Prívozník
On 7/1/21 10:31 AM, Shalini Chellathurai Saroja wrote: > > On 6/30/21 4:49 PM, Michal Prívozník wrote: >> On 6/18/21 12:46 PM, Shalini Chellathurai Saroja wrote: >>> It is possible to define/edit(in shut off state) a domain XML with >>> same hostdev device repeated more than once, as shown below.

Re: [libvirt PATCH v2 0/5] mdev tweaks

2021-07-01 Thread Michal Prívozník
On 6/30/21 3:56 PM, Jonathon Jongsma wrote: > On Wed, Jun 30, 2021 at 3:18 AM Michal Prívozník wrote: >> >> On 6/22/21 9:53 PM, Jonathon Jongsma wrote: >>> A few minor fixes to mdev support in the nodedev driver >>> >>> Changes in v2: >>> - split out the error-reporting macro into a separate

Re: [libvirt PATCH] NEWS: Fix spacing between releases

2021-07-01 Thread Andrea Bolognani
On Thu, Jul 01, 2021 at 04:12:45PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > NEWS.rst | 2 ++ > 1 file changed, 2 insertions(+) I forgot to mention that I was going to push this as trivial. -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH] NEWS: Fix spacing between releases

2021-07-01 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- NEWS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 552f845211..2536955a4a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -90,6 +90,7 @@ v7.4.0 (2021-06-01) Having a 0 offset so that the size of the image can be limited is a

[PATCH 2/3] qemu: Prevent two threshold events when it was registered with index

2021-07-01 Thread Peter Krempa
Remember whether the user passed an explicit index when registering the event so that we can avoid the top level event when it isn't needed. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 4 src/qemu/qemu_process.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff

[PATCH 3/3] virDomainSetBlockThreshold: Document that two events are fired when index isn't used

2021-07-01 Thread Peter Krempa
Libvirt started emitting two threshold events, once with index and once withouth when the index isn't registered. Document this caveat. Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index

[PATCH 0/3] Threshold event improvements

2021-07-01 Thread Peter Krempa
Peter Krempa (3): storage_source: Add flag storing whether threshold event was registered with index qemu: Prevent two threshold events when it was registered with index virDomainSetBlockThreshold: Document that two events are fired when index isn't used

[PATCH 1/3] storage_source: Add flag storing whether threshold event was registered with index

2021-07-01 Thread Peter Krempa
When users register the threshold event for the top level image with an explicit index (e.g. vda[3]) they are clearly expecting the index in the event. This flag will help avoiding emission of the second event without the index when the client clearly requested one with the index. Signed-off-by:

Release of libvirt-7.5.0

2021-07-01 Thread Jiri Denemark
The 7.5.0 release of both libvirt and libvirt-python is tagged and signed tarballs and source RPMs are available at https://libvirt.org/sources/ https://libvirt.org/sources/python/ Thanks everybody who helped with this release by sending patches, reviewing, testing, or providing any

Re: [PATCH] Add news item for sVirt CVE fix

2021-07-01 Thread Andrea Bolognani
On Thu, Jul 01, 2021 at 12:39:08PM +0100, Daniel P. Berrangé wrote: > v7.5.0 (unreleased) > === > > +* **Security fixes** Looking at old releases, this section is usually called just "Security". With that changed, Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red

Re: [PATCH] qemu: code protection for qemuBlockJobEventProcessLegacy

2021-07-01 Thread Peter Krempa
On Thu, Jul 01, 2021 at 16:37:29 +0800, Chongyun Wu wrote: > > > On 2021/7/1 15:24, Peter Krempa wrote: > > On Thu, Jul 01, 2021 at 14:55:56 +0800, huang...@chinatelecom.cn wrote: > > > From: Chongyun Wu > > > > > > pointer disk might be null in some special cases or new > > > usage scenarios,

[PATCH] Add news item for sVirt CVE fix

2021-07-01 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 935b0d0aad..3297560941 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -11,6 +11,14 @@ For a more fine-grained view, use the `git log`_. v7.5.0 (unreleased)

[PATCHv2 4/4] qemu: interface: check and use ovs command to set qos of ovs managed port

2021-07-01 Thread zhangjl02
From: zhangjl02 When qos is set or delete, we have to check if the port is an ovs managed port. If true, call the virNetDevOpenvswitchInterfaceSetQos function when qos is set, and call the virNetDevOpenvswitchInterfaceClearQos function when the interface is to be destroyed. ---

[PATCHv2 1/4] virDomain: interface: add virDomainNetDefIsOvsport

2021-07-01 Thread zhangjl02
From: zhangjl02 Tell whether a port definition is an ovs managed virtual port --- src/conf/domain_conf.c | 8 src/conf/domain_conf.h | 2 ++ src/libvirt_private.syms | 1 + 3 files changed, 11 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

Re: [PATCH] qemu: code protection for qemuBlockJobEventProcessLegacy

2021-07-01 Thread Chongyun Wu
On 2021/7/1 15:24, Peter Krempa wrote: On Thu, Jul 01, 2021 at 14:55:56 +0800, huang...@chinatelecom.cn wrote: From: Chongyun Wu pointer disk might be null in some special cases or new usage scenarios, therefore code protection is needed to prevent segment faults. Please elaborate on

[PATCHv2 3/4] qemu: interface: remove setting noqueue for ovs port

2021-07-01 Thread zhangjl02
From: zhangjl02 Return 0 directly if the port is ovs managed. When the ovs port is set noqueue, qos config on this port will not work. --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[PATCHv2 2/4] virDomain: interface: add virNetDevOpenvswitchInterfaceSetQos and virNetDevOpenvswitchInterfaceClearQos

2021-07-01 Thread zhangjl02
From: zhangjl02 Introduce qos setting and cleaning method. Use ovs command to set qos parameters on specific interface of qemu virtual machine. When an ovs port is created, we add 'ifname' to external-ids. When setting qos on an ovs port, query its qos and queue. If found, change qos on queried

[PATCHv2 0/4] Add qemu support setting qos via ovs on ovs interface

2021-07-01 Thread zhangjl02
--- diff to v1: - move qemuDomainDefIsOvsport from src/qemu/qemu_domain.c to src/conf/domain_conf.c - call virCommandFree(cmd)free cmd before reusing it. - add g_autofree to variables. - reduce usage of virReportError(), and coupled it with return -1. - fix remove port qos error. -

Re: [PATCH libvirt v1] conf: verify for duplicate hostdevs

2021-07-01 Thread Shalini Chellathurai Saroja
On 6/30/21 4:49 PM, Michal Prívozník wrote: On 6/18/21 12:46 PM, Shalini Chellathurai Saroja wrote: It is possible to define/edit(in shut off state) a domain XML with same hostdev device repeated more than once, as shown below. This behavior is not expected. So, this patch fixes it. vser1:

Re: [PATCH] qemu: code protection for qemuBlockJobEventProcessLegacy

2021-07-01 Thread Peter Krempa
On Thu, Jul 01, 2021 at 14:55:56 +0800, huang...@chinatelecom.cn wrote: > From: Chongyun Wu > > pointer disk might be null in some special cases or new > usage scenarios, therefore code protection is needed to > prevent segment faults. Please elaborate on when that happens. Generally the legacy

[PATCH] qemu: code protection for qemuBlockJobEventProcessLegacy

2021-07-01 Thread huangy81
From: Chongyun Wu pointer disk might be null in some special cases or new usage scenarios, therefore code protection is needed to prevent segment faults. Signed-off-by: Chongyun Wu --- src/qemu/qemu_blockjob.c | 43 --- 1 file changed, 24 insertions(+),