[libvirt][PATCH v10 4/5] conf: Introduce SGX EPC element into device memory xml

2022-01-28 Thread Haibin Huang
From: Lin Yang ... 512 ... Signed-off-by: Lin Yang --- docs/formatdomain.rst | 9 +++- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c| 6 +++ src/conf/domain_conf.h

[libvirt][PATCH v10 3/5] Add unit test for domaincapsdata sgx

2022-01-28 Thread Haibin Huang
Signed-off-by: Haibin Huang --- src/conf/domain_capabilities.c| 2 -- tests/domaincapsdata/bhyve_basic.x86_64.xml | 1 + tests/domaincapsdata/bhyve_fbuf.x86_64.xml| 1 + tests/domaincapsdata/bhyve_uefi.x86_64.xml| 1 + tests/domaincapsdata/empty.xml

[libvirt][PATCH v10 1/5] qemu: provide support to query the SGX capability

2022-01-28 Thread Haibin Huang
QEMU version >= 6.2.0 provides support for creating enclave on SGX x86 platform using Software Guard Extensions (SGX) feature. This patch adds support to query the SGX capability from the qemu. Signed-off-by: Haibin Huang --- src/conf/domain_capabilities.c| 10 ++

[libvirt][PATCH v10 5/5] Update default CPU location in qemu QOM tree

2022-01-28 Thread Haibin Huang
From: Lin Yang --- src/qemu/qemu_monitor_json.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 811db233c4..8c7f088775 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c

[libvirt][PATCH v10 2/5] conf: expose SGX feature in domain capabilities

2022-01-28 Thread Haibin Huang
Extend hypervisor capabilities to include sgx feature. When available, the hypervisor supports launching an VM with SGX on Intel platfrom. The SGX feature tag privides additional details like section size and sgx1 or sgx2. Signed-off-by: Haibin Huang --- docs/formatdomaincaps.html.in | 26

[libvirt][PATCH v10 0/5] Support query and use SGX

2022-01-28 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 had been merged. Intel SGX is a set of instructions that increases the security of application code and data, giving them more protection from disclosure or

[libvirt PATCH 4/4] maint: remove unnecessary virutil.h includes

2022-01-28 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/esx/esx_vi.c | 1 - src/nwfilter/nwfilter_ebiptables_driver.c | 1 - src/openvz/openvz_conf.c | 1 - src/util/virdnsmasq.c | 1 - src/util/virfirewalld.c | 1 -

[libvirt PATCH 3/4] virParseVersionString: rename to virStringParseVersion

2022-01-28 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/bhyve/bhyve_driver.c | 2 +- src/ch/ch_conf.c | 2 +- src/esx/esx_vi.c | 8 src/libvirt_private.syms | 2 +- src/lxc/lxc_driver.c | 2 +-

[libvirt PATCH 2/4] util: virParseVersionString: move to virstring.c

2022-01-28 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/libvirt_private.syms | 2 +- src/util/virstring.c | 47 src/util/virstring.h | 4 src/util/virutil.c | 46 --- src/util/virutil.h | 3 --- 5 files changed, 52

[libvirt PATCH 1/4] maint: add required includes

2022-01-28 Thread Ján Tomko
Some files do not include what they use and rely on virutil.h to pull in the necessary header files. Fix it. Signed-off-by: Ján Tomko --- src/nwfilter/nwfilter_ebiptables_driver.c | 1 + src/util/virfirewalld.c | 1 + 2 files changed, 2 insertions(+) diff --git

[libvirt PATCH 0/4] move virParseVersionString to virstring.c

2022-01-28 Thread Ján Tomko
And clean up some includes while doing it. Ján Tomko (4): maint: add required includes util: virParseVersionString: move to virstring.c virParseVersionString: rename to virStringParseVersion maint: remove unnecessary virutil.h includes src/bhyve/bhyve_driver.c | 2 +-

Re: The unix domain socket remains even after the VM is destroyed

2022-01-28 Thread Martin Kletzander
On Tue, Jan 25, 2022 at 02:18:29PM -0500, Masayoshi Mizuma wrote: Hello, I found an issue that libvirt isn't close an unix domain socket to connect to the qemu monitor even after the VM is destroyed. This issue happens since commit 695bdb3841 ("src: ensure GSource background unref happens in

[libvirt PATCH] syntax-check: https: list the HTTP-only sites

2022-01-28 Thread Ján Tomko
Instead of listing the sites that surely support HTTPS, list the ones that don't. Signed-off-by: Ján Tomko --- build-aux/syntax-check.mk | 66 --- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/build-aux/syntax-check.mk

[libvirt PATCH 3/4] libxl: assume LIBXL_HAVE_SRM_V2

2022-01-28 Thread Ján Tomko
Introduced in Xen 4.6.0 by: commit 3a9ace0147d48af49ffd34628f9510f248f2f588 tools/libxc+libxl+xl: Restore v2 streams Signed-off-by: Ján Tomko --- src/libxl/libxl_conf.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h

[libvirt PATCH 4/4] libxl: assume LIBXL_HAVE_PVUSB

2022-01-28 Thread Ján Tomko
Introduced in Xen 4.7 by commit: commit bf7628f087b212052a0e9f024044b2790c33f820 libxl: add pvusb API Signed-off-by: Ján Tomko --- src/libxl/libxl_conf.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index e0662d90b3..b74f455b69

[libvirt PATCH 1/4] libxl: assume LIBXL_HAVE_DEVICE_BACKEND_DOMNAME

2022-01-28 Thread Ján Tomko
Introduced in 4.3.0 by xen commit: commit ef496b81f0336f09968a318e7f81151dd4f5a0cc libxl: postpone backend name resolution Signed-off-by: Ján Tomko --- src/libxl/libxl_conf.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/libxl/libxl_conf.c

[libvirt PATCH 2/4] libxl: remove LIBXL_ATTR_UNUSED

2022-01-28 Thread Ján Tomko
Unused as of: commit 446d09149802677546449fa2dd253f3ebce377ac libxl: pass driver config to libxlMakeDomBuildInfo All other usage of LIBXL_HAVE_DEVICE_CHANNEL was removed by: commit e58004d70aceb560fba64803e566b8be3ef93940 Xen: Remove unneeded LIBXL_HAVE_* ifdefs Signed-off-by: Ján

[libvirt PATCH 0/4] libxl: clean up more LIBXL_HAVE constants

2022-01-28 Thread Ján Tomko
We still were checking for some that were introduced before Xen 4.9 Ján Tomko (4): libxl: assume LIBXL_HAVE_DEVICE_BACKEND_DOMNAME libxl: remove LIBXL_ATTR_UNUSED libxl: assume LIBXL_HAVE_SRM_V2 libxl: assume LIBXL_HAVE_PVUSB src/libxl/libxl_conf.c | 20 ++--

[libvirt PATCH] tests: refactor testSELinuxLoadDef

2022-01-28 Thread Ján Tomko
Since its introduction in commit 907a39e735d256b8428ed4c77009d1f713aea19b Add a test suite for validating SELinux labelling this function did not return NULL on OOM. Since we abort on OOM now, switch testSELinuxMungePath to void, return NULL explicitly on XML parsing failure and remove the

Re: [libvirt PATCH v5 3/7] ch_driver, ch_domain: vcpupin callback in ch driver

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_domain.c | 30 + > src/ch/ch_domain.h | 7 ++- > src/ch/ch_driver.c | 145 >

Re: [libvirt PATCH v5 6/7] ch_process: Setup emulator and iothread settings

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > using virCHProcessSetupPid > > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_monitor.c | 60 +++ > src/ch/ch_monitor.h | 2 ++ > src/ch/ch_process.c | 77 - > 3 files

Re: [libvirt PATCH v5 2/7] ch: methods for cgroup mgmt in ch driver

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_conf.c| 2 + > src/ch/ch_conf.h| 4 +- > src/ch/ch_domain.c | 34 + > src/ch/ch_domain.h | 11 +- >

Re: [libvirt PATCH v5 5/7] ch_driver: add numatune callbacks for CH driver

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > From: Vineeth Pillai > > Signed-off-by: Vineeth Pillai > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_driver.c | 260 + > 1 file changed, 260 insertions(+) > > diff --git a/src/ch/ch_driver.c

Re: [libvirt PATCH v5 1/7] qemu, hypervisor: refactor some cgroup mgmt methods

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > Refactor some cgroup management methods from qemu into hypervisor. > These methods will be shared with ch driver for cgroup management. > > Signed-off-by: Praveen K Paladugu > --- > src/hypervisor/domain_cgroup.c | 457

Re: [libvirt PATCH v5 0/7] cgroup and thread management in ch driver

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > This patchset adds support for cgroup management of ch threads. This version > correctly manages cgroups for vcpu and emulator threads created by ch. cgroup > management for iothreads is not yet supported. > > Along with cgroup management, this

Re: [libvirt PATCH v5 7/7] ch_driver: emulator threadinfo & pinning callbacks

2022-01-28 Thread Michal Prívozník
On 1/25/22 17:19, Praveen K Paladugu wrote: > Signed-off-by: Praveen K Paladugu > --- > src/ch/ch_driver.c | 154 + > 1 file changed, 154 insertions(+) > > diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c > index d257c025ef..d60ff468f0 100644 >

Re: [PATCH] domain_cgroup: Don't put semicolon at the end of VIR_GET_LIMIT_PARAMETER macro

2022-01-28 Thread Laine Stump
On 1/28/22 6:15 AM, Michal Privoznik wrote: In domain_cgroup.c there's VIR_GET_LIMIT_PARAMETER macro which has a semicolon at the end of its declaration. Well, remove it so that the places where macro is used have to put the semicolon explicitly. This helps with automatic reformatting (at least

Re: [libvirt PATCH v3 1/3] scripts: Check spelling

2022-01-28 Thread Peter Krempa
On Fri, Jan 21, 2022 at 10:41:48 +0100, Tim Wiederhake wrote: > This is a wrapper for codespell [1], a spell checker for source code. > Codespell does not compare words to a dictionary, but rather works by > checking words against a list of common typos, making it produce fewer > false positives

Re: [libvirt PATCH v5 0/7] cgroup and thread management in ch driver

2022-01-28 Thread Praveen K Paladugu
Ping.. If this patch set is ready to be merged, I'd like to get started on next set. Thank you, Praveen K Paladugu On 1/25/2022 10:19 AM, Praveen K Paladugu wrote: This patchset adds support for cgroup management of ch threads. This version correctly manages cgroups for vcpu and emulator

[PATCH] domain_cgroup: Don't put semicolon at the end of VIR_GET_LIMIT_PARAMETER macro

2022-01-28 Thread Michal Privoznik
In domain_cgroup.c there's VIR_GET_LIMIT_PARAMETER macro which has a semicolon at the end of its declaration. Well, remove it so that the places where macro is used have to put the semicolon explicitly. This helps with automatic reformatting (at least in vim). Signed-off-by: Michal Privoznik ---

Re: [libvirt PATCH v4 3/9] virthread: Introduce VIR_WITH_MUTEX_LOCK_GUARD

2022-01-28 Thread Daniel P . Berrangé
On Fri, Jan 28, 2022 at 10:59:16AM +0100, Tim Wiederhake wrote: > Modeled after "WITH_QEMU_LOCK_GUARD" (see qemu's include/qemu/lockable.h). > Uses "__LINE__" instead of "__COUNTER__", as the latter is a GNU extension. GNU extensions are fine to use, as we explicitly only support GCC or CLang

[libvirt PATCH v4 2/9] virthread: Introduce virLockGuard

2022-01-28 Thread Tim Wiederhake
Locks a virMutex on creation and unlocks it in its destructor. The VIR_LOCK_GUARD macro is used instead of "g_auto(virLockGuard)" to work around a clang issue (see https://bugs.llvm.org/show_bug.cgi?id=3888 and https://bugs.llvm.org/show_bug.cgi?id=43482). Typical usage: void

[libvirt PATCH v4 7/9] virChrdevFree: Use VIR_WITH_MUTEX_LOCK

2022-01-28 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virchrdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index c9b2134e3b..8610f0ac5c 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -291,10 +291,10 @@ void

[libvirt PATCH v4 5/9] virobject: Introduce VIR_WITH_OBJECT_LOCK_GUARD

2022-01-28 Thread Tim Wiederhake
Modeled after "WITH_QEMU_LOCK_GUARD" (see qemu's include/qemu/lockable.h). Uses "__LINE__" instead of "__COUNTER__", as the latter is a GNU extension. See comment for typical usage. Signed-off-by: Tim Wiederhake --- src/util/virobject.h | 20 1 file changed, 20

[libvirt PATCH v4 8/9] bhyveAutostartDomain: Use virObjectLockGuard

2022-01-28 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/bhyve/bhyve_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index f291f12e50..47ee98e650 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -87,7 +87,8

[libvirt PATCH v4 4/9] virobject: Introduce virObjectLockGuard

2022-01-28 Thread Tim Wiederhake
Typical usage: void foobar(virObjectLockable *obj) { VIR_LOCK_GUARD lock = virObjectLockGuard(obj); /* `obj` is locked, and released automatically on scope exit */ ... } Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virobject.c

[libvirt PATCH v4 9/9] lxcDomainDetachDeviceHostdevUSBLive: Use VIR_WITH_OBJECT_LOCK_GUARD

2022-01-28 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/lxc/lxc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 7bc39120ee..42053de9c3 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -4045,9 +4045,9 @@

[libvirt PATCH v4 6/9] virChrdevFDStreamCloseCb: Use virLockGuardLock

2022-01-28 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virchrdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index b5477b03d5..c9b2134e3b 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -237,12 +237,10 @@ static void

[libvirt PATCH v4 3/9] virthread: Introduce VIR_WITH_MUTEX_LOCK_GUARD

2022-01-28 Thread Tim Wiederhake
Modeled after "WITH_QEMU_LOCK_GUARD" (see qemu's include/qemu/lockable.h). Uses "__LINE__" instead of "__COUNTER__", as the latter is a GNU extension. See comment for typical usage. Signed-off-by: Tim Wiederhake --- src/util/virthread.h | 20 1 file changed, 20

[libvirt PATCH v4 1/9] internal: Add CONCAT macro

2022-01-28 Thread Tim Wiederhake
Using the two-step idiom to force resolution of other macros, e.g.: #define bar BAR CONCAT_(foo, bar) // foobar CONCAT(foo, bar) // fooBAR Signed-off-by: Tim Wiederhake --- src/internal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal.h b/src/internal.h

[libvirt PATCH v4 0/9] Automatic mutex management

2022-01-28 Thread Tim Wiederhake
V1: https://listman.redhat.com/archives/libvir-list/2021-August/msg00823.html V2: https://listman.redhat.com/archives/libvir-list/2021-September/msg00249.html V3: https://listman.redhat.com/archives/libvir-list/2021-September/msg00964.html Changes since V3: * Remove not strictly necessary heap

Re: [libvirt PATCHv2 0/2] virsh: domsetlaunchsecstate: report error if no options are passed

2022-01-28 Thread Michal Prívozník
On 1/27/22 19:44, Ján Tomko wrote: > Use a different approach that is hopefully more future-proof and also > add a check to the qemu driver, as suggested by Michal. > > Ján Tomko (2): > virsh: domsetlaunchsecstate: report error if no options are passed > qemu:

Re: [libvirt PATCH] cpu-data.py: Query hyperv enlightenments

2022-01-28 Thread Michal Prívozník
On 1/27/22 14:51, Tim Wiederhake wrote: > Reporting hv-* properties properly requires hv to be enabled, > see qemu commit 071ce4b03b. > > Signed-off-by: Tim Wiederhake > --- > tests/cputestdata/cpu-data.py | 7 +++ > 1 file changed, 7 insertions(+) > Reviewed-by: Michal Privoznik Michal

Re: [PATCH v2] virProcessGetStatInfo: add a comment describing why we can not report error

2022-01-28 Thread Ani Sinha
Pinging again in case there is any interest .. On Tue, Jan 25, 2022 at 4:34 PM Ani Sinha wrote: > > ping ... > > On Fri, 21 Jan 2022, Ani Sinha wrote: > > > virProcessGetStatInfo() currently is unable to report error conditions > > because > > that breaks libvirt's public best effort APIs. We