[PATCH v2 2/5] test-throttle: use enum ThrottleType

2023-06-27 Thread zhenwei pi
Use enum ThrottleType instead in the throttle test codes. Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index 7adb5e6652..a60b5fe22e 100644 --- a/tests

[PATCH v2 3/5] throttle: support read-only and write-only

2023-06-27 Thread zhenwei pi
direction in throttle, this reduces memory, and uplayer does not need a dummy callback any more. Signed-off-by: zhenwei pi --- util/throttle.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/util/throttle.c b/util/throttle.c index 5642e61763

[PATCH v2 1/5] throttle: introduce enum ThrottleType

2023-06-27 Thread zhenwei pi
Use enum ThrottleType instead of number index. Signed-off-by: zhenwei pi --- include/qemu/throttle.h | 11 --- util/throttle.c | 16 +--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index

[PATCH v2 0/5] Misc fixes for throttle

2023-06-27 Thread zhenwei pi
other subsystems in this series, do this work in a followup series after there patches apply. v1: - introduce enum ThrottleTimerType instead of timers[0], timer[1]... - support read-only and write-only for throttle - adapt related test codes - cryptodev uses a write-only throttle timer

[PATCH v2 4/5] test-throttle: test read only and write only

2023-06-27 Thread zhenwei pi
Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 66 ++ 1 file changed, 66 insertions(+) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index a60b5fe22e..5547837a58 100644 --- a/tests/unit/test-throttle.c +++ b/tests/unit/test

[PATCH v2 5/5] cryptodev: use NULL throttle timer cb for read direction

2023-06-27 Thread zhenwei pi
Operations on a crytpodev are considered as *write* only, the callback of read direction is never invoked. Use NULL instead of an unreachable path(cryptodev_backend_throttle_timer_cb on read direction). Signed-off-by: zhenwei pi --- backends/cryptodev.c | 3 +-- 1 file changed, 1 insertion

Re: Re: [PATCH v6 09/12] cryptodev: Account statistics

2023-03-02 Thread zhenwei pi
On 3/1/23 19:05, Daniel P. Berrangé wrote: On Wed, Mar 01, 2023 at 06:58:44PM +0800, zhenwei pi wrote: Account OPS/BPS for crypto device, this will be used for 'query-stats' QEMU monitor command and QoS in the next step. Note that a crypto device may support symmetric mode, asymm

Re: [PATCH-for-8.2 v2] backends/cryptodev: Do not ignore throttle/backends Errors

2023-11-20 Thread zhenwei pi
Looks good to me. Thanks! Reviewed-by: zhenwei pi On 11/20/23 23:04, Philippe Mathieu-Daudé wrote: Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Use the ERRP_GUARD() macro as suggested in

[PATCH 2/5] camera: v4l2: Introduce v4l2 camera driver

2021-12-27 Thread zhenwei pi
-> dqbuf ... -> stream off Signed-off-by: zhenwei pi --- camera/meson.build | 4 + camera/trace-events | 4 + camera/v4l2.c | 637 qapi/camera.json| 21 +- qemu-options.hx | 3 + 5 files changed, 667 insertions(+), 2 deletions(

[PATCH 1/5] camera: Introduce camera subsystem and builtin driver

2021-12-27 Thread zhenwei pi
mera +-+ ++---+ | +-+-+ | | | +---+---+ +-+-++-+ |builtin| |v4l2(ready)||other drivers| +---+ +---++-+ Signed-off-by: zhenwei pi --- camera/builtin.c|

qemu-devel@nongnu.org

2021-12-27 Thread zhenwei pi
Define USB class code for video&mescellaneous. Signed-off-by: zhenwei pi --- include/hw/usb.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/usb.h b/include/hw/usb.h index 33668dd0a9..8e3d30b9f4 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -77,9 +77,11 @@ #de

[PATCH 5/5] usb-video: Introduce USB video class

2021-12-27 Thread zhenwei pi
ightness, hue ... control settings. 5, support control status interrupt. Test guest Ubuntu-2004 desktop: 1, several applications: cheese, kamoso, guvcview, qcam(self-built from libcamera source code), all work fine. 2, both builtin and v4l2 driver work fine. Signed-off-by: zhenwei

[PATCH 4/5] usb: allow max 8192 bytes for desc

2021-12-27 Thread zhenwei pi
A device of USB video class usually uses larger desc structure, so use larger buffer to avoid failure. Signed-off-by: zhenwei pi --- hw/usb/desc.c | 15 --- hw/usb/desc.h | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/usb/desc.c b/hw/usb/desc.c index

[PATCH 0/5] Introduce camera subsystem and USB video device

2021-12-27 Thread zhenwei pi
live migration 3, several actions defined in UVC SPEC Zhenwei Pi (5): camera: Introduce camera subsystem and builtin driver camera: v4l2: Introduce v4l2 camera driver usb: Introduce video&mescellaneous usb: allow max 8192 bytes for desc usb-video: Introduce USB video class ca

[Qemu-devel] [PATCH] blockdev: report error on block latency histogram set error

2018-10-18 Thread zhenwei pi
","boundaries":[10,200,40]}}' In fact this command does not work, but we still get success result. qmp_x_block_latency_histogram_set is a batch setting API, report error ASAP. Signed-off-by: zhenwei pi --- blockdev.c | 19 --- 1 file changed, 16 insertions(

[Qemu-devel] [PATCH] blockdev: handle error on block latency histogram set error

2018-11-04 Thread zhenwei pi
","boundaries":[10,200,40]}}' In fact this command does not work, but we still get success result. qmp_x_block_latency_histogram_set is a batch setting API, report error ASAP. Signed-off-by: zhenwei pi --- blockdev.c | 19 --- 1 file changed, 16 insertions(

[Qemu-devel] [PATCH] file-posix: Check effective size in truncate operation

2018-11-25 Thread zhenwei pi
"arguments":{"device":"drive-virtio-disk1","size":10485760}}' The device file size actually grew, but the argument(10M) is less than the effective size(12M). This command should fail, but QEMU still report success. Signed-off-by: zhenwei pi --- block/fil

[Qemu-devel] [PATCH] cirrus: format code

2018-05-19 Thread zhenwei pi
replace tab with spaces and fix some comments Signed-off-by: zhenwei pi --- hw/display/cirrus_vga.c | 1662 +++ 1 file changed, 831 insertions(+), 831 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 138ae96..6319889

[Qemu-devel] [PATCH] qemu-progress: redirct qemu progress message to another file stream

2018-04-16 Thread zhenwei pi
currently qemu progress message only print into stdout, and other thread may print some log into stdout at the same time. add a new api qemu_progress_set_output to redirect progress message to another file stream. Signed-off-by: zhenwei pi --- include/qemu-common.h | 1 + util/qemu-progress.c

[PATCH v3 0/4] support NVMe smart critial warning injection

2021-01-13 Thread zhenwei pi
art_critical_warning by QMP. v1: - Add smart_critical_warning for nvme device which can be set by QEMU command line to emulate hardware error. Zhenwei Pi (4): block/nvme: introduce bit 5 for critical warning hw/block/nvme: fix overwritten bar.cap hw/block/nvme: add smart_critical_warning

[PATCH v3 1/4] block/nvme: introduce bit 5 for critical warning

2021-01-13 Thread zhenwei pi
According to NVMe spec 1.4 section , introduce bit 5 for "Persistent Memory Region has become read-only or unreliable". Signed-off-by: zhenwei pi --- include/block/nvme.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/nvme.h b/include/block/nvme.h index 3e02d9ca98..

[PATCH v3 2/4] hw/block/nvme: fix overwritten bar.cap

2021-01-13 Thread zhenwei pi
After PMR initialization, bar.cap should not be clear in function nvme_init_ctrl. Otherwise the PMR cap would be always disabled. Signed-off-by: zhenwei pi --- hw/block/nvme.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 27d2c72716..f361103bb4

[PATCH v3 3/4] hw/block/nvme: add smart_critical_warning property

2021-01-13 Thread zhenwei pi
ATA SECTION === SMART overall-health self-assessment test result: FAILED! - volatile memory backup device has failed Signed-off-by: zhenwei pi --- hw/block/nvme.c | 40 hw/block/nvme.h | 1 + 2 files changed, 41 insertions(+) diff --git a/hw/block/nv

[PATCH v3 4/4] hw/blocl/nvme: trigger async event during injecting smart warning

2021-01-13 Thread zhenwei pi
During smart critical warning injection by setting property from QMP command, also try to trigger asynchronous event. Signed-off-by: zhenwei pi --- hw/block/nvme.c | 47 --- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/hw/block

[PATCH v4 1/3] block/nvme: introduce bit 5 for critical warning

2021-01-14 Thread zhenwei pi
According to NVMe spec 1.4 section , introduce bit 5 for "Persistent Memory Region has become read-only or unreliable". Signed-off-by: zhenwei pi --- include/block/nvme.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/nvme.h b/include/block/nvme.h index 9494246f1f..

[PATCH v4 2/3] hw/block/nvme: add smart_critical_warning property

2021-01-14 Thread zhenwei pi
ATA SECTION === SMART overall-health self-assessment test result: FAILED! - volatile memory backup device has failed Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: zhenwei pi --- hw/block/nvme.c | 45 +--- hw/block/nvme.h | 1 + includ

[PATCH v4 0/3] support NVMe smart critial warning injection

2021-01-14 Thread zhenwei pi
ommand line to emulate hardware error. Zhenwei Pi (3): block/nvme: introduce bit 5 for critical warning hw/block/nvme: add smart_critical_warning property hw/blocl/nvme: trigger async event during injecting smart warning hw/block/nvme.c | 91 +++- hw/bl

[PATCH v4 3/3] hw/blocl/nvme: trigger async event during injecting smart warning

2021-01-14 Thread zhenwei pi
During smart critical warning injection by setting property from QMP command, also try to trigger asynchronous event. Suggested by Keith, if a event has already been raised, there is no need to enqueue the duplicate event any more. Signed-off-by: zhenwei pi --- hw/block/nvme.c | 48

Re: Re: [PATCH v4 0/3] support NVMe smart critial warning injection

2021-01-18 Thread zhenwei pi
On 1/18/21 5:34 PM, Klaus Jensen wrote: On Jan 15 11:26, zhenwei pi wrote: v3 -> v4: - Drop "Fix overwritten bar.cap". (Already fixed) - Avoid to enqueue the duplicate event. - Several minor changes for coding style & function/variable name. v2 -> v3: - Introduce "

[Qemu-devel] [PATCH 0/3] Add block size histogram qapi interface

2019-06-20 Thread zhenwei pi
: 0 ~ 8k: 58% ~ 62% 8k ~ 32k: 10% ~ 12% 32k ~ 128k: 2% ~ 3% 128K ~ 512K: 24% ~ 26% 512K ~ : ... And the histogram data help us to optimise backend distributed storage. zhenwei pi (3): block/accounting: rename struct BlockLatencyHistogram block/accounting

[Qemu-devel] [PATCH 2/3] block/accounting: introduce block size histogram

2019-06-20 Thread zhenwei pi
Introduce block size histogram statics for block devices. For read/write/flush operation type, the block size region [0, +inf) is divided into subregions by several points. It works like block latency histogram. Signed-off-by: zhenwei pi --- block/accounting.c | 24

[Qemu-devel] [PATCH 3/3] qapi: add block size histogram interface

2019-06-20 Thread zhenwei pi
Set/Clear block size histograms through new command x-block-size-histogram-set and show new statistics in query-blockstats results. Signed-off-by: zhenwei pi --- block/qapi.c | 24 blockdev.c | 56 +++ qapi/block-core.json | 105

[Qemu-devel] [PATCH 1/3] block/accounting: rename struct BlockLatencyHistogram

2019-06-20 Thread zhenwei pi
Rename struct BlockLatencyHistogram to BlockHistogram, and rename related functions name. make this struct and functions be common, they can be used widely. Signed-off-by: zhenwei pi --- block/accounting.c | 31 ++- block/qapi.c | 2 +- include

Re: [Qemu-devel] [External Email] Re: [PATCH 3/3] qapi: add block size histogram interface

2019-06-20 Thread zhenwei pi
On 6/20/19 10:03 PM, Eric Blake wrote: On 6/20/19 3:54 AM, zhenwei pi wrote: Set/Clear block size histograms through new command x-block-size-histogram-set and show new statistics in query-blockstats results. I'm guessing this is modeled after the existing block-latency-histogram-set co

[Qemu-devel] [PATCH V2 1/3] block/accounting: rename struct BlockLatencyHistogram

2019-06-23 Thread zhenwei pi
Rename struct BlockLatencyHistogram to BlockHistogram, and rename related functions. Make this struct and functions be common, they can be used widely. Signed-off-by: zhenwei pi Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/accounting.c | 44

[Qemu-devel] [PATCH V2 0/3] Add block size histogram qapi interface

2019-06-23 Thread zhenwei pi
rtual machines write 25GB/s totally, the block size histogram like following: 0 ~ 8k: 58% ~ 62% 8k ~ 32k: 10% ~ 12% 32k ~ 128k: 2% ~ 3% 128K ~ 512K: 24% ~ 26% 512K ~ : ... And the histogram data help us to optimise backend distributed storage. zhenwei p

[Qemu-devel] [PATCH V2 3/3] qapi: make block histogram interface common

2019-06-23 Thread zhenwei pi
27;latency', it works as same as the old command 'block-latency-histogram-set'. New enum 'size' allows QEMU to fill histogram by block I/O size in byte. Signed-off-by: zhenwei pi Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/qapi.c

[Qemu-devel] [PATCH V2 2/3] block/accounting: introduce block size histogram

2019-06-23 Thread zhenwei pi
Introduce block size histogram statics for block devices. For read/write/flush operation type, the block size region [0, +inf) is divided into subregions by several points. It works like block latency histogram. Signed-off-by: zhenwei pi Reviewed-by: Vladimir Sementsov-Ogievskiy --- block

discuss about pvpanic

2020-01-08 Thread zhenwei pi
hink about this solution? Or do you have any other suggestions? -- Thanks and Best Regards, zhenwei pi

Re: [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

[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

[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

[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 2/2] pvpanic: implement crashloaded event handling

2020-01-13 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 0/2] pvpanic: implement crashloaded event for pvpanic

2020-01-13 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

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

2020-01-13 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

[PATCH] hw/block/nvme: add smart_critical_warning property

2021-01-10 Thread zhenwei pi
is patch: 1, append 'smart_critical_warning=16' for nvme parameters. 2, run smartctl in guest #smartctl -H -l error /dev/nvme0n1 === START OF SMART DATA SECTION === SMART overall-health self-assessment test result: FAILED! - volatile memory backup device has failed Signed-off-by: zhenwei pi --- hw/bl

Re: [External] Re: [PATCH] hw/block/nvme: add smart_critical_warning property

2021-01-11 Thread zhenwei pi
On 1/11/21 5:21 PM, Klaus Jensen wrote: On Jan 11 10:14, Philippe Mathieu-Daudé wrote: On 1/11/21 8:50 AM, zhenwei pi wrote: There is a very low probability that hitting physical NVMe disk hardware critical warning case, it's hard to write & test a monitor agent service. For

[PATCH v2 1/1] hw/block/nvme: add smart_critical_warning property

2021-01-11 Thread zhenwei pi
ATA SECTION === SMART overall-health self-assessment test result: FAILED! - volatile memory backup device has failed Signed-off-by: zhenwei pi --- hw/block/nvme.c | 28 hw/block/nvme.h | 1 + 2 files changed, 29 insertions(+) diff --git a/hw/block/nvme.c b/h

[PATCH v2 0/1] add smart_critical_warning property for nvme

2021-01-11 Thread zhenwei pi
v1 -> v2: Suggested by Philippe & Klaus, set/get smart_critical_warning by QMP. v1: Add smart_critical_warning for nvme device which can be set by QEMU command line to emulate hardware error. Zhenwei Pi (1): hw/block/nvme: add smart_critical_warning property hw/block/nvme

[PATCH] target/i386: Fix cpuid level for AMD

2021-06-28 Thread zhenwei pi
A AMD server typically has cpuid level 0x10(test on Rome/Milan), it should not be changed to 0x1f in multi-dies case. Fixes: a94e1428991 (target/i386: Add CPUID.1F generation support for multi-dies PCMachine) Signed-off-by: zhenwei pi --- target/i386/cpu.c | 8 ++-- 1 file changed, 6

Re: [External] Re: [PATCH] target/i386: Fix cpuid level for AMD

2021-07-01 Thread zhenwei pi
On 7/2/21 4:35 AM, Michael Roth wrote: Quoting Igor Mammedov (2021-07-01 03:43:13) On Wed, 30 Jun 2021 14:18:09 -0500 Michael Roth wrote: Quoting Dr. David Alan Gilbert (2021-06-29 09:06:02) * zhenwei pi (pizhen...@bytedance.com) wrote: A AMD server typically has cpuid level 0x10(test on

[Qemu-devel] [PATCH v2 3/3] qapi: make block histogram interface common

2019-07-08 Thread zhenwei pi
27;latency', it works as same as the old command 'block-latency-histogram-set'. New enum 'size' allows QEMU to fill histogram by block I/O size in byte. Signed-off-by: zhenwei pi Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/qapi.c

[Qemu-devel] [PATCH v2 1/3] block/accounting: rename struct BlockLatencyHistogram

2019-07-08 Thread zhenwei pi
Rename struct BlockLatencyHistogram to BlockHistogram, and rename related functions. Make this struct and functions be common, they can be used widely. Signed-off-by: zhenwei pi Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/accounting.c | 44

[Qemu-devel] [PATCH v2 0/3] Add block size histogram qapi interface

2019-07-08 Thread zhenwei pi
- make 'block-latency-histogram-set' common. - remove duplicated functions. - fix uncommon indentation(reviewed by Vladimir Sementsov-Ogievskiy). zhenwei pi (3): block/accounting: rename struct BlockLatencyHistogram block/accounting: introduce block size histogram qapi: make b

[Qemu-devel] [PATCH v2 2/3] block/accounting: introduce block size histogram

2019-07-08 Thread zhenwei pi
Introduce block size histogram statics for block devices. For read/write/flush operation type, the block size region [0, +inf) is divided into subregions by several points. It works like block latency histogram. Signed-off-by: zhenwei pi Reviewed-by: Vladimir Sementsov-Ogievskiy --- block

[PATCH 0/3] add MEMORY_FAILURE event

2020-09-14 Thread zhenwei pi
d did. And further step we can do: if a host server hits a 'hypervisor-ignore' or 'guest-mce', scheduler could migrate VM to another host; if hitting 'hypervisor-stop' or 'guest-triple-fault', scheduler could select other healthy servers to launch VM. zhenwei pi

[PATCH 1/3] target-i386: seperate MCIP & MCE_MASK error reason

2020-09-14 Thread zhenwei pi
Previously we can only get a simple string "Triple fault" in qemu log. Add detailed message for the two reasons to describe why qemu has to reset the guest. Signed-off-by: zhenwei pi --- target/i386/helper.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletion

[PATCH 3/3] target-i386: post memory failure event to uplayer

2020-09-14 Thread zhenwei pi
Post memory failure event to uplayer to handle hardware memory corrupted event. Rather than simple QEMU log, QEMU could report more effective message to uplayer. For example, guest crashes by MCE, selecting another host server is a better choice. Signed-off-by: zhenwei pi --- target/i386

[PATCH 2/3] iqapi/run-state.json: introduce memory failure event

2020-09-14 Thread zhenwei pi
Introduce 4 memory failure events for a guest. Then uplayer could know when/why/what happened to a guest during hitting a hardware memory failure. Signed-off-by: zhenwei pi --- qapi/run-state.json | 46 ++ 1 file changed, 46 insertions(+) diff --git

Re: [External] Re: [PATCH v2 3/3] target-i386: post memory failure event to uplayer

2020-09-22 Thread zhenwei pi
On 9/22/20 6:30 PM, Philippe Mathieu-Daudé wrote: On 9/22/20 11:56 AM, zhenwei pi wrote: Post memory failure event to uplayer to handle hardware memory corrupted event. Rather than simple QEMU log, QEMU could report more effective message to uplayer. For example, guest crashes by MCE

PING: [PATCH v2 0/3] add MEMORY_FAILURE event

2020-09-28 Thread zhenwei pi
PING On 9/22/20 5:56 PM, zhenwei pi wrote: v1->v2: Suggested by Peter Maydell, rename events to make them architecture-neutral: 'PC-RAM' -> 'guest-memory' 'guest-triple-fault' -> 'guest-mce-fatal' Suggested by Paolo, add more fields in event:

ping: [PATCH 0/3] add MEMORY_FAILURE event

2020-09-20 Thread zhenwei pi
Hi, A patchset about handling 'MCE' might have been ignored, can anyone tell me whether the purpose is reasonable? https://patchwork.kernel.org/cover/11773795/ On 9/14/20 9:43 PM, zhenwei pi wrote: Although QEMU could catch signal BUS to handle hardware memory corrupted event, s

Re: [External] Re: [PATCH 2/3] iqapi/run-state.json: introduce memory failure event

2020-09-21 Thread zhenwei pi
On 9/21/20 8:48 PM, Peter Maydell wrote: On Mon, 14 Sep 2020 at 14:53, zhenwei pi wrote: Introduce 4 memory failure events for a guest. Then uplayer could know when/why/what happened to a guest during hitting a hardware memory failure. Signed-off-by: zhenwei pi

Re: [External] Re: ping: [PATCH 0/3] add MEMORY_FAILURE event

2020-09-21 Thread zhenwei pi
On 9/21/20 8:09 PM, Paolo Bonzini wrote: On 21/09/20 04:22, zhenwei pi wrote: Hi, A patchset about handling 'MCE' might have been ignored, can anyone tell me whether the purpose is reasonable? https://patchwork.kernel.org/cover/11773795/ Yes, it's very useful. Just one th

[PATCH v2 0/3] add MEMORY_FAILURE event

2020-09-22 Thread zhenwei pi
to another host; if hitting 'hypervisor-stop' or 'guest-triple-fault', scheduler could select other healthy servers to launch VM. Zhenwei Pi (3): target-i386: seperate MCIP & MCE_MASK error reason qapi/run-state.json: introduce memory failure event target-i386: post me

[PATCH v2 1/3] target-i386: seperate MCIP & MCE_MASK error reason

2020-09-22 Thread zhenwei pi
Previously we can only get a simple string "Triple fault" in qemu log. Add detailed message for the two reasons to describe why qemu has to reset the guest. Signed-off-by: zhenwei pi --- target/i386/helper.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletion

[PATCH v2 2/3] qapi/run-state.json: introduce memory failure event

2020-09-22 Thread zhenwei pi
sh a guest-mce is AR/AO. Signed-off-by: zhenwei pi --- qapi/run-state.json | 67 + 1 file changed, 67 insertions(+) diff --git a/qapi/run-state.json b/qapi/run-state.json index 7cc9f96a5b..f40111ac67 100644 --- a/qapi/run-state.json +++ b/qapi

[PATCH v2 3/3] target-i386: post memory failure event to uplayer

2020-09-22 Thread zhenwei pi
Post memory failure event to uplayer to handle hardware memory corrupted event. Rather than simple QEMU log, QEMU could report more effective message to uplayer. For example, guest crashes by MCE, selecting another host server is a better choice. Signed-off-by: zhenwei pi --- target/i386

[PATCH v3 1/3] target-i386: seperate MCIP & MCE_MASK error reason

2020-09-30 Thread zhenwei pi
Previously we can only get a simple string "Triple fault" in qemu log. Add detailed message for the two reasons to describe why qemu has to reset the guest. Signed-off-by: zhenwei pi --- target/i386/helper.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletion

[PATCH v3 2/3] qapi/run-state.json: introduce memory failure event

2020-09-30 Thread zhenwei pi
mce is AR/AO, previous mce is still processing in guest or not. Signed-off-by: zhenwei pi --- qapi/run-state.json | 85 + 1 file changed, 85 insertions(+) diff --git a/qapi/run-state.json b/qapi/run-state.json index 7cc9f96a5b..d795dc21fc 10

[PATCH v3 0/3] add MEMORY_FAILURE event

2020-09-30 Thread zhenwei pi
event with 4 detailed actions of QEMU, then uplayer could know what situaction QEMU hit and did. And further step we can do: if a host server hits a 'hypervisor-ignore' or 'guest-mce', scheduler could migrate VM to another host; if hitting 'hypervisor-stop' or 'guest

[PATCH v3 3/3] target-i386: post memory failure event to uplayer

2020-09-30 Thread zhenwei pi
Post memory failure event to uplayer to handle hardware memory corrupted event. Rather than simple QEMU log, QEMU could report more effective message to uplayer. For example, guest crashes by MCE, selecting another host server is a better choice. Signed-off-by: zhenwei pi --- target/i386

Re: [External] [PATCH 1/1] pvpanic: Advertise the PVPANIC_CRASHLOADED event support

2020-11-09 Thread zhenwei pi
Hi, Paolo This patch seems getting ignored. Because no maintainers found for hw/misc/pvpanic.c, I also send this to you(hope it doesn't disturb you). About this patch: Looks good. And also test it, works fine. Reviewed-by: zhenwei pi On 11/3/20 3:50 AM, Alejandro Jimenez wrote: Adve

[PATCH] target-i386: seperate MCIP & MCE_MASK error reason

2020-09-04 Thread zhenwei pi
Previously we can only get a simple string "Triple fault" in qemu log. Add detailed message for the two reasons to describe why qemu has to reset the guest. Signed-off-by: zhenwei pi --- target/i386/helper.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletion

Re: [PATCH] cryptodev/vhost: allocate CryptoDevBackendVhost using g_mem0()

2025-02-12 Thread zhenwei pi
Acked-by: zhenwei pi On 2/11/25 21:55, Stefano Garzarella wrote: The function `vhost_dev_init()` expects the `struct vhost_dev` (passed as a parameter) to be fully initialized. This is important because some parts of the code check whether `vhost_dev->config_ops` is NULL to determine if it

Re: Re: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks

2024-12-24 Thread zhenwei pi
On 12/24/24 16:59, Philippe Mathieu-Daudé wrote: Hi Gabriel, On 24/12/24 00:46, Gabriel Barrantes wrote:  From c808fa797942b9bd32221594b7eef690a7558b14 Mon Sep 17 00:00:00 2001 From: Gabriel Barrantes Date: Mon, 23 Dec 2024 14:58:12 -0600 Subject: [PATCH] backends/cryptodev-vhost-user: Fix

Re: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks

2024-12-24 Thread zhenwei pi
LGTM, thanks. Reviewed-by: zhenwei pi On 12/24/24 07:46, Gabriel Barrantes wrote: From c808fa797942b9bd32221594b7eef690a7558b14 Mon Sep 17 00:00:00 2001 From: Gabriel Barrantes Date: Mon, 23 Dec 2024 14:58:12 -0600 Subject: [PATCH] backends/cryptodev-vhost-user: Fix local_error leaks Do

Re: Re: [PATCH] cryptodev: Fix error handling in cryptodev_lkcf_execute_task()

2025-03-18 Thread zhenwei pi
On 3/18/25 21:21, Markus Armbruster wrote: zhenwei pi writes: Hi Markus, Current code style seems buggy, I think the main reason is that the Error *errp is not generated at right place. keyctl_pkey_XXX fails without new error, qcrypto_akcipher_XXX fails with new error, but they are in

Re: Re: [PATCH] cryptodev: Fix error handling in cryptodev_lkcf_execute_task()

2025-03-14 Thread zhenwei pi
;local_error); } if (ret < 0) { -if (!local_error) { -if (errno != EKEYREJECTED) { -error_report("Failed do operation with keyctl: %d", errno); -} -} else { -error_report_err(local_error); -} stat

Re: [PATCH] cryptodev: Fix error handling in cryptodev_lkcf_execute_task()

2025-03-18 Thread zhenwei pi
LGTM, thanks! Reviewed-by: zhenwei pi On 3/12/25 18:11, Markus Armbruster wrote: When cryptodev_lkcf_set_op_desc() fails, we report an error, but continue anyway. This is wrong. We then pass a non-null @local_error to various functions, which could easily fail error_setv()'s asserti

Re: Re: [RFC] Proposal for a QEMU video subsystem for cameras and webcams

2025-03-11 Thread zhenwei pi
On 3/11/25 00:57, Thomas Huth wrote: On 10/03/2025 17.51, Alex Bennée wrote: David Milosevic writes: Dear QEMU Developers, I would like to propose the development of a video subsystem in QEMU, with the initial implementation focusing on UVC video device emulation and support for multipl

Re: [PATCH] cryptodev: Fix error handling in cryptodev_lkcf_execute_task()

2025-03-12 Thread zhenwei pi
On 3/12/25 18:11, Markus Armbruster wrote: When cryptodev_lkcf_set_op_desc() fails, we report an error, but continue anyway. This is wrong. We then pass a non-null @local_error to various functions, which could easily fail error_setv()'s assertion on failure. Fail the function instead. Whe

Re: Bad error handling in cryptodev_lkcf_execute_task(), need advice

2025-03-12 Thread zhenwei pi
On 3/12/25 16:10, Markus Armbruster wrote: scripts/coccinelle/error-use-after-free.cocci led me to this function: static void cryptodev_lkcf_execute_task(CryptoDevLKCFTask *task) { CryptoDevBackendLKCFSession *session = task->sess; CryptoDevBackendAsymOpInfo *asym_

[PATCH] MAINTAINERS: update email of zhenwei pi

2025-05-27 Thread zhenwei pi
I will leave ByteDance in the next days. Update email to stay reachable. Signed-off-by: zhenwei pi --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7060cf49b9..2da7cf76b7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3278,7

<    1   2   3   4