答复: [PATCH v1 2/2] system/cpus: Fix resume_all_vcpus() under vCPU hotplug condition

2024-03-18 Thread zhukeqian via
Hi David, On 17.03.24 09:37, Keqian Zhu via wrote: >> For vCPU being hotplugged, qemu_init_vcpu() is called. In this >> function, we set vcpu state as stopped, and then wait vcpu thread to >> be created. >> >> As the vcpu state is stopped, it will inform us it has been created >> and then wait

答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-18 Thread zhukeqian via
Hi David, Thanks for reviewing. On 17.03.24 09:37, Keqian Zhu via wrote: >> Both main loop thread and vCPU thread are allowed to call >> pause_all_vcpus(), and in general resume_all_vcpus() is called after >> it. Two issues live in pause_all_vcpus(): > >In general, calling pause_all_vcpus() fro

[RFC] Is there a bug in pause_all_vcpus()

2024-03-15 Thread zhukeqian via
During we waited on qemu_pause_cond the bql was unlocked, the vcpu's state may has been changed by other thread, so we must request the pause state on all vcpus again. For example: Both main loop thread and vCPU thread are allowed to call pause_all_vcpus(), and in general resume_all_vcpus() is

答复: [PATCH V8 6/8] physmem: Add helper function to destroy CPU AddressSpace

2024-03-14 Thread zhukeqian via
Hi Salil, [...] +void cpu_address_space_destroy(CPUState *cpu, int asidx) { +CPUAddressSpace *cpuas; + +assert(cpu->cpu_ases); +assert(asidx >= 0 && asidx < cpu->num_ases); +/* KVM cannot currently support multiple address spaces. */ +assert(asidx == 0 || !kvm_enabled()); + +

RE: [QUESTION] About virtio and eventloop

2023-01-18 Thread zhukeqian via
Hi Stefan, this indeed helps, thank you. Keqian On Mon, 16 Jan 2023 at 03:20, zhukeqian via mailto:qemu-devel@nongnu.org>> wrote: > And if IO operation is blocked, is vCPU thread will blocked when do > deactivate? Yes, blk_drain() is a synchronous function. It blocks until in-fl

答复: [QUESTION] About virtio and eventloop

2023-01-16 Thread zhukeqian via
I found blk_drain() is invoked by virtio_blk_reset(), so only the second question remains :). 发件人: zhukeqian <> 发送时间: 2023年1月16日 16:18 收件人: 'Michael S. Tsirkin' ; 'Stefan Hajnoczi' ; 'Peter Maydell' 抄送: qemu-devel@nongnu.org; Wubin (H) ; Chentao (Boby) ; Wanghaibin (D) ; Zhangbo (Oscar) ; lim

[QUESTION] About virtio and eventloop

2023-01-16 Thread zhukeqian via
Hi all maintainers and community friends, Recently I am reviewing and learning the virtio and eventloop implementation of latest QEMU, and now I have a questions for help: In general, the IO requests of virtio is popped in iothread/mainloop and may submitted to "async IO Engine" (io_uring/linu

Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-09-23 Thread zhukeqian via
>> > I notice this doesn't seem to have gone in yet -- whose tree is it >> > going to go via? >> >> I'd guess ARM tree (due to almost sole user virt-arm). >> (there are toy users like microvm and new loongarch) > >OK; applied to target-arm.next, thanks. Thanks, Peter. Keqian.

答复: [PATCH] acpi_ged: Add ospm_status hook implementation

2022-08-16 Thread zhukeqian via
OK, I'll send v2 soon. -邮件原件- 发件人: Peter Maydell [mailto:peter.mayd...@linaro.org] 发送时间: 2022年8月16日 17:42 收件人: zhukeqian 抄送: qemu-devel@nongnu.org; qemu-...@nongnu.org; qemu-triv...@nongnu.org; Philippe Mathieu-Daudé ; Eric Auger ; Peter Xu ; Igor Mammedov ; Wanghaibin (D) 主题: Re: [P

答复: [PATCH] acpi_ged: Add ospm_status hook implementation

2022-08-16 Thread zhukeqian via
Hi Peter, Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status" can trigger this bug. Thanks. -邮件原件- 发件人: Qemu-devel [mailto:qemu-devel-bounces+zhukeqian1=huawei@nongnu.org] 代表 Peter Maydell 发送时间: 2022年8月16日 17:30 收件人: zhukeqian 抄送: qemu-devel@nongn