[libvirt] [PATCH] report invalid x86 cpu map error

2019-01-14 Thread zhenwei pi
ts invalid cpu map. With this patch, libvirtd reports error : error: unsupported configuration: invalid x86 cpu map Signed-off-by: zhenwei pi --- src/cpu/cpu_x86.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index d3a88da21d..

[libvirt] [PATCH] set default seccompSandbox as 0 for qemu

2018-05-18 Thread zhenwei pi
. if user wants to enable seccomp, he should check qemu firstly, then use the right qemu.conf. Signed-off-by: zhenwei pi --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 277ab83..d17b4b1 100644 --- a/src

Re: [External] Re: [PATCH v2 1/4] API: introduce memory failure

2020-10-13 Thread zhenwei pi
pi/libvirt/-/tree/memory-failure-v2), CI worked fine. On 10/12/20 9:31 AM, zhenwei pi wrote: Introduce memory failure event. Libvirt should monitor domain's event, then posts it to uplayer. According to the hardware memory corrupted message, the cloud scheduler could migrate domain to

[PATCH v3 1/2] libvirt: support memory failure event

2020-10-14 Thread zhenwei pi
/conf/* src/remote/* src/remote_protocol-structs client: examples/c/misc/event-test.c tools/virsh-domain.c With this patch, each driver could implement its own method to run this new event. Signed-off-by: zhenwei pi --- include/libvirt/libvirt-domain.h

[PATCH v3 2/2] qemu: implement memory failure event

2020-10-14 Thread zhenwei pi
vent 'memory-failure' for domain l2: recipient: hypervisor action: ignore flags: action required: 0 recursive: 0 Test result in l1(recipient guest case): event 'memory-failure' for domain l2: recipient: guest action: inject flags: action required: 0

[PATCH v3 0/2]support memory failure

2020-10-14 Thread zhenwei pi
t directly without internal job. Add full test method in commit. v1: Since QEMU 5.2 (commit-77b285f7f6), QEMU supports 'memory failure' event, posts event to monitor if hitting a hardware memory error. zhenwei pi (2): libvirt: support memory failure event qemu: implement mem

[PATCH v5 2/2] util: rename virNetDevParseVfConfig to virNetDevParseVfInfo

2020-10-15 Thread zhenwei pi
Suggested by Laine: virNetDevParseVfConfig has became a multifunctional helper function, rename it to virNetDevParseVfInfo. Signed-off-by: zhenwei pi --- src/util/virnetdev.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdev.c b/src/util

[PATCH v5 1/2] util: support PCI passthrough net device stats collection

2020-10-15 Thread zhenwei pi
only get 0. (ip-link command get the same result). IFLA_VF_STATS is supported since Linux-4.2, suggested by Laine, just using defined(__linux__) && WITH_LIBNL is enough. Thanks to Laine, Daniel & DHB for suggestions. Signed-off-by: zhenwei pi --- src/libvirt_private.syms | 1 + sr

PING: [PATCH v3 0/2]support memory failure

2020-10-21 Thread zhenwei pi
PING! On 10/14/20 6:37 PM, zhenwei pi wrote: v2->v3: Rework patches to make each patch could be compiled, v1->v2: Seperate a 'all in one' patch into 4 patches. Use a 'flags' with bit definition instead of 'action_required' & &#x

Re: [External] Re: [PATCH v3 0/2]support memory failure

2020-10-22 Thread zhenwei pi
On 10/23/20 1:00 AM, Michal Privoznik wrote: On 10/14/20 12:37 PM, zhenwei pi wrote: v2->v3: Rework patches to make each patch could be compiled, v1->v2: Seperate a 'all in one' patch into 4 patches. Use a 'flags' with bit definition i

Re: [External] Re: [PATCH v3 0/2]support memory failure

2020-10-23 Thread zhenwei pi
On 10/23/20 3:46 PM, Michal Privoznik wrote: On 10/23/20 3:38 AM, zhenwei pi wrote: On 10/23/20 1:00 AM, Michal Privoznik wrote: On 10/14/20 12:37 PM, zhenwei pi wrote: v2->v3: Rework patches to make each patch could be compiled, v1->v2: Seperate a 'all in one&#x

[PATCH] news: introduce memory failure event

2020-10-23 Thread zhenwei pi
Signed-off-by: zhenwei pi --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index d0454b7840..a01481801e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,11 @@ v6.9.0 (unreleased) * **New features** + * Introduce memory failure event + +Libvirt

[PATCH v2] news: introduce memory failure event

2020-10-23 Thread zhenwei pi
Signed-off-by: zhenwei pi --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index d0454b7840..428928e80b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,16 @@ v6.9.0 (unreleased) * **New features** + * Introduce memory failure event

[PATCH] util: support PCI passthrough net device stats collection

2020-09-21 Thread zhenwei pi
of PF. Test on Mellanox ConnectX-4 Lx, it works well. Also test on Intel Corporation 82599ES, it works, but only get 0. (ip-link command get the same result). Signed-off-by: zhenwei pi --- meson.build | 4 ++ src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 3 + src/u

Re: [External] Re: [PATCH] util: support PCI passthrough net device stats collection

2020-09-22 Thread zhenwei pi
On 9/22/20 9:48 AM, Laine Stump wrote: (Please don't Cc individual developers in patch submissions unless they've specifically asked you to do so) On 9/21/20 8:25 AM, zhenwei pi wrote: Collect PCI passthrough net device stats from kernel by netlink API. Currently, libvirt can n

[PATCH v2] util: support PCI passthrough net device stats collection

2020-09-22 Thread zhenwei pi
of PF. Test on Mellanox ConnectX-4 Lx, it works well. Also test on Intel Corporation 82599ES, it works, but only get 0. (ip-link command get the same result). Signed-off-by: zhenwei pi --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 3 ++ src/util/virnet

[PATCH v3] util: support PCI passthrough net device stats collection

2020-09-24 Thread zhenwei pi
of PF. Test on Mellanox ConnectX-4 Lx, it works well. Also test on Intel Corporation 82599ES, it works, but only get 0. (ip-link command get the same result). IFLA_VF_STATS is supported since Linux-4.2, suggested by Laine, just using defined(__linux__) && WITH_LIBNL is enough. Signed-off-b

[PATCH] libvirt: add memory failure event

2020-10-09 Thread zhenwei pi
MP. Also implement virsh command callback functions. Test case: ~# virsh event stretch --event memory-failure event 'memory-failure' for domain stretch: recipient: guest action: inject flags: action required: 0 recursive: 0 events received: 1 Signed-off-by: zhenwei

[PATCH v2 2/4] qemu: process: implement domainMemoryFailure

2020-10-12 Thread zhenwei pi
). Signed-off-by: zhenwei pi --- src/qemu/qemu_process.c | 59 + 1 file changed, 59 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6b5de29fdb..7c24677ecb 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[PATCH v2 1/4] API: introduce memory failure

2020-10-12 Thread zhenwei pi
Introduce memory failure event. Libvirt should monitor domain's event, then posts it to uplayer. According to the hardware memory corrupted message, the cloud scheduler could migrate domain to another health physical server. Signed-off-by: zhenwei pi --- include/libvirt/libvirt-domain.h

[PATCH v2 0/4] support memory failure

2020-10-12 Thread zhenwei pi
. v1: Since QEMU 5.2 (commit-77b285f7f6), QEMU supports 'memory failure' event, posts event to monitor if hitting a hardware memory error. zhenwei pi (4): API: introduce memory failure qemu: process: implement domainMemoryFailure qemu: monitor: handle memory failure event virsh: impl

[PATCH v2 4/4] virsh: implement memory failure event

2020-10-12 Thread zhenwei pi
ient guest case): event 'memory-failure' for domain l2: recipient: guest action: inject flags: action required: 0 recursive: 0 Signed-off-by: zhenwei pi --- examples/c/misc/event-test.c | 16 tools/virsh-domain.c | 40 +

[PATCH v2 3/4] qemu: monitor: handle memory failure event

2020-10-12 Thread zhenwei pi
Handle memory failure by json string from QEMU, then process by domainMemoryFailure callback function. Signed-off-by: zhenwei pi --- src/qemu/qemu_monitor.c | 21 ++- src/qemu/qemu_monitor.h | 39 +++ src/qemu/qemu_monitor_json.c | 49

Re: [libvirt] [External] Re: discuss about pvpanic

2020-01-08 Thread zhenwei pi
ASH_LOADED for guest crash loaded event. And suggested by KH Greg, I moved the bit definition to an uapi header file. Then QEMU could include the header file from linux header and handle the new event. -- Thanks and Best Regards, zhenwei pi -- libvir-list mailing list libvir-list@redhat

[libvirt] [PATCH 1/2] pvpanic: introduce crashloaded for pvpanic

2020-01-10 Thread zhenwei pi
Add bit 1 for pvpanic. This bit means that guest hits a panic, but guest wants to handle error by itself. Typical case: Linux guest runs kdump in panic. It will help us to separate the abnormal reboot from normal operation. Signed-off-by: zhenwei pi --- docs/specs/pvpanic.txt | 8 ++-- 1

[libvirt] [PATCH 0/2] implement crashloaded event for pvpanic

2020-01-10 Thread zhenwei pi
kexec, guest could wirte this bit to notify host side. Host side handles crashloaded event, posts event to upper layer. Then guest side continues to run kexec. Test with libvirt, libvirt could recieve the new event. The patch of libvirt will be sent soon. Zhenwei Pi (2): pvpanic: intr

[libvirt] [PATCH 2/2] pvpanic: implement crashloaded event handling

2020-01-10 Thread zhenwei pi
Handle bit 1 write, then post event to monitor. Suggested by Paolo, declear a new event, using GUEST_PANICKED could cause upper layers to react by shutting down or rebooting the guest. In advance for extention, add GuestPanicInformation in event message. Signed-off-by: zhenwei pi --- hw/misc

[PATCH] qemu: support Panic Crashloaded event handling

2020-02-03 Thread zhenwei pi
rsh event stretch --event lifecycle event 'lifecycle' for domain stretch: Crashed Crashloaded events received: 1 Signed-off-by: zhenwei pi --- examples/c/misc/event-test.c | 3 +++ include/libvirt/libvirt-domain.h | 1 + src/qemu/qemu_domain.c | 1 + src

[PATCH] qemu: support kvm-pv-ipi off

2021-10-27 Thread zhenwei pi
added to the guest's domain description: Signed-off-by: zhenwei pi --- docs/formatdomain.rst | 2 ++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 3 +++ src/conf/domain_conf.h| 1 + src/qemu/qemu_command.c | 5 + 5 fil

PING: [PATCH] qemu: support kvm-pv-ipi off

2021-10-31 Thread zhenwei pi
PING On 10/27/21 3:04 PM, zhenwei pi wrote: QEMU version 3.1 introduced PV_SEND_IPI CPUID feature bit under commit 7f710c32bb8 (target-i386: adds PV_SEND_IPI CPUID feature bit). This patch adds a new KVM feature 'pv-ipi' to disable this feature (enabled by default). Newer CPU platfor

[PATCH 1/2] tests: qemu: use domain type 'kvm' for kvm-features-off

2021-11-01 Thread zhenwei pi
KVM features off test cases should be tested for a KVM domain, so keep align kvm-features-off test with kvm-features except KVM features on/off. Signed-off-by: zhenwei pi --- tests/qemuxml2argvdata/kvm-features-off.args | 4 ++-- tests/qemuxml2argvdata/kvm-features-off.xml | 5 +++-- tests

[PATCH 2/2] tests: qemu: add kvm-pv-ipi off test

2021-11-01 Thread zhenwei pi
Since b2757b697e29fa86972a4638a5879dccc8add2ad (qemu: support kvm-pv-ipi off), libvirt supports xml definition like: Add test case for this feature. Signed-off-by: zhenwei pi --- tests/qemuxml2argvdata/kvm-features-off.args | 2 +- tests

[PATCH 1/7] docs: introduce crypto device

2023-01-03 Thread zhenwei pi
Introduce crypto device like: Currently, crypto model supports virtio only, type supports qemu only (vhost-user in the plan). For the qemu type, backend supports modle builtin/lkcf, and the queues is optional. Signed-off-by: zhenwei pi --- docs

[PATCH 2/7] conf: support crypto device

2023-01-03 Thread zhenwei pi
Support a new device type 'crypto'. Signed-off-by: zhenwei pi --- src/conf/domain_conf.c | 191 + src/conf/domain_conf.h | 40 +++ src/conf/domain_postparse.c| 1 + src/conf/domain_validate.c | 18 src/conf/virc

[PATCH 3/7] domain_capabilities: define capabilities for crypto

2023-01-03 Thread zhenwei pi
Signed-off-by: zhenwei pi --- src/conf/domain_capabilities.c | 15 +++ src/conf/domain_capabilities.h | 12 2 files changed, 27 insertions(+) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 247cfa49de..aacd590601 100644 --- a/src/conf

[PATCH 5/7] qemu: alias: support crypto device

2023-01-03 Thread zhenwei pi
Support 'cryptoX' alias for a crypto device. Signed-off-by: zhenwei pi --- src/qemu/qemu_alias.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index ef8e87ab58..de62f57737 100644 --- a/src/qemu/qemu_alias.c

[PATCH 6/7] qemu: command: support crypto device

2023-01-03 Thread zhenwei pi
Support virtio-crypto device, also support cryptodev types: - builtin - lkcf Finally, we can launch a VM(QEMU) with one or more crypto devices by libvirt. Signed-off-by: zhenwei pi --- src/qemu/qemu_command.c | 110 +++- 1 file changed, 109 insertions(+), 1

[PATCH 4/7] qemu_capabilities: support crypto

2023-01-03 Thread zhenwei pi
Detect virtio crypto/crypto backend capabilities from QEMU, then we have a domain(QEMU) like this: virtio qemu builtin lkcf Signed-off-by: zhenwei pi --- src/conf/schemas/domaincaps.rng | 10

[PATCH 7/7] NEWS: Document 'crypto' device

2023-01-03 Thread zhenwei pi
Signed-off-by: zhenwei pi --- NEWS.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 39f508a6ce..7d1943472e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,9 @@ v9.0.0 (unreleased) * **New features** + * Support crypto device(virtio crypto only), also

[PATCH 0/7] Support crypto device

2023-01-03 Thread zhenwei pi
Hi, This series supports crypto device, also add support for QEMU. The basic xml schema looks like: Each patch has been tested by 'ninja -C build test', and launch a QEMU with crypto devices, it works fine. zhenwei pi (

Re: Re: [PATCH 0/7] Support crypto device

2023-01-06 Thread zhenwei pi
On 1/6/23 19:37, Michal Prívozník wrote: On 1/4/23 04:29, zhenwei pi wrote: Hi, This series supports crypto device, also add support for QEMU. The basic xml schema looks like: Each patch has been tested by 'nin

[PATCH v2 0/5] Support crypto device

2023-01-16 Thread zhenwei pi
oks like: Each patch has been tested by 'ninja -C build test', and launch a QEMU with crypto devices, it works fine. zhenwei pi (5): conf: introduce crypto device capabilities: introduce crypto qemu: alias: support crypto device qemu: command: sup

[PATCH v2 3/5] qemu: alias: support crypto device

2023-01-16 Thread zhenwei pi
Support 'cryptoX' alias for a crypto device. Signed-off-by: zhenwei pi --- src/qemu/qemu_alias.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index ef8e87ab58..de62f57737 100644 --- a/src/qemu/qemu_alias.c

[PATCH v2 4/5] qemu: command: support crypto device

2023-01-16 Thread zhenwei pi
Support virtio-crypto device, also support cryptodev types: - builtin - lkcf Finally, we can launch a VM(QEMU) with one or more crypto devices by libvirt. Signed-off-by: zhenwei pi --- src/qemu/qemu_command.c | 110 +++- 1 file changed, 109 insertions(+), 1

[PATCH v2 1/5] conf: introduce crypto device

2023-01-16 Thread zhenwei pi
- schemas: domaincommon.rng - conf: crypto related domain conf - qemu: crypto related - tests: crypto related test Signed-off-by: zhenwei pi --- docs/formatdomain.rst | 21 +++ src/ch/ch_domain.c| 1 + src/conf/domain_conf.c

[PATCH v2 2/5] capabilities: introduce crypto

2023-01-16 Thread zhenwei pi
Changes in this commit: - docs: formatdomaincaps.rst - conf: crypto related domain caps - qemu: crypto related - tests: crypto related test Signed-off-by: zhenwei pi --- docs/formatdomaincaps.rst | 33 +++ src/conf/domain_capabilities.c| 15

[PATCH v2 5/5] NEWS: Document 'crypto' device

2023-01-16 Thread zhenwei pi
Signed-off-by: zhenwei pi --- NEWS.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 9baf10b8e9..7bb8b77816 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -44,6 +44,9 @@ v9.0.0 (unreleased) to libvirt and then use them when starting a VM. Currently the FDs can

Re: Re: [PATCH v2 4/5] qemu: command: support crypto device

2023-01-24 Thread zhenwei pi
On 1/25/23 01:08, Michal Prívozník wrote: On 1/17/23 02:46, zhenwei pi wrote: Support virtio-crypto device, also support cryptodev types: - builtin - lkcf Finally, we can launch a VM(QEMU) with one or more crypto devices by libvirt. Signed-off-by: zhenwei pi --- src/qemu/qemu_command.c

Re: Re: [PATCH v2 0/5] Support crypto device

2023-01-24 Thread zhenwei pi
On 1/25/23 01:08, Michal Prívozník wrote: On 1/17/23 02:46, zhenwei pi wrote: v1 -> v2: - Rebase code against the latest commit: 46aee2a9255adf842ab44a9292acb46189a726f7 - Merge previous 1/7 and 2/7 into a single patch: conf: introduce crypto device - Add missing qemuxml2xmlt

Re: Re: [PATCH v2 4/5] qemu: command: support crypto device

2023-01-25 Thread zhenwei pi
On 1/25/23 16:09, Michal Prívozník wrote: On 1/25/23 02:54, zhenwei pi wrote: On 1/25/23 01:08, Michal Prívozník wrote: On 1/17/23 02:46, zhenwei pi wrote: Support virtio-crypto device, also support cryptodev types: - builtin - lkcf Finally, we can launch a VM(QEMU) with one or more crypto

Re: Re: [PATCH v2 0/5] Support crypto device

2023-01-25 Thread zhenwei pi
On 1/25/23 23:22, Michal Prívozník wrote: On 1/25/23 02:57, zhenwei pi wrote: On 1/25/23 01:08, Michal Prívozník wrote: On 1/17/23 02:46, zhenwei pi wrote: v1 -> v2: - Rebase code against the latest commit:    46aee2a9255adf842ab44a9292acb46189a726f7 - Merge previous 1/7 and 2/7 int