[PATCH 4/4] arm: Create the cpufreq device

2020-02-12 Thread Ying Fang
Add the cpufreq device to arm64 virt machine Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- default-configs/aarch64-softmmu.mak | 1 + hw/acpi/Kconfig | 4 hw/arm/virt.c | 13 + 3 files changed, 18 insertions(+) diff --git a

[PATCH 1/4] acpi: Add aml_generic_register

2020-02-12 Thread Ying Fang
The generic register descriptor describes the localtion of a fixed width register within any of the ACPI-defined address space. This is needed to declare the ACPI CPPC registers. Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- hw/acpi/aml-build.c | 22

[PATCH 0/4] arm64: Add the cpufreq device to show cpufreq info to guest

2020-02-12 Thread Ying Fang
work. Ying Fang (4): acpi: add aml_generic_register acpi/cppc: add ACPI CPPC registers arm_virt: add the cpufreq device model arm_virt: create the cpufreq device default-configs/aarch64-softmmu.mak | 1 + hw/acpi/Kconfig | 4 + hw/acpi/Makefile.objs

[PATCH 3/4] arm: Add the cpufreq device model

2020-02-12 Thread Ying Fang
same value, since we don't support guest performance scaling. Performance counters are also not emulated and they simply return 1 if readed, and guest should fallback to use the desired performance value as the current performance. Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- hw

[PATCH 2/4] acpi/cppc: Add ACPI CPPC registers

2020-02-12 Thread Ying Fang
The Continuous Performance Control Package is used to describe the ACPI CPPC registers. Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c| 74 - hw/arm/virt.c | 1 + include/hw/acpi/acpi-defs.h | 32

[PATCH v2 1/4] acpi: Add aml_generic_register

2020-02-12 Thread Ying Fang
The generic register descriptor describes the localtion of a fixed width register within any of the ACPI-defined address space. This is needed to declare the ACPI CPPC registers. Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- hw/acpi/aml-build.c | 22

[PATCH v2 0/4] arm64: Add the cpufreq device to show cpufreq info to guest

2020-02-12 Thread Ying Fang
work. Ying Fang (4): acpi: Add aml_generic_register acpi/cppc: Add ACPI CPPC registers arm: Add the cpufreq device model arm: Create the cpufreq device default-configs/aarch64-softmmu.mak | 1 + hw/acpi/Kconfig | 4 + hw/acpi/Makefile.objs | 1 + hw

[PATCH v2 4/4] arm: Create the cpufreq device

2020-02-12 Thread Ying Fang
Add the cpufreq device to arm64 virt machine Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- default-configs/aarch64-softmmu.mak | 1 + hw/acpi/Kconfig | 4 hw/arm/virt.c | 13 + 3 files changed, 18 insertions(+) diff --git a

[PATCH v2 3/4] arm: Add the cpufreq device model

2020-02-12 Thread Ying Fang
same value, since we don't support guest performance scaling. Performance counters are also not emulated and they simply return 1 if readed, and guest should fallback to use the desired performance value as the current performance. Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- hw

[PATCH v2 2/4] acpi/cppc: Add ACPI CPPC registers

2020-02-12 Thread Ying Fang
The Continuous Performance Control Package is used to describe the ACPI CPPC registers. Signed-off-by: Heyi Guo Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c| 74 - hw/arm/virt.c | 1 + include/hw/acpi/acpi-defs.h | 32

Re: [Qemu-devel] [PATCH v3] vhost: Cancel migration when vhost-user process restarted during migration

2017-11-29 Thread Ying Fang
On 2017/11/29 17:42, Dr. David Alan Gilbert wrote: > * Ying Fang (fangyi...@huawei.com) wrote: >> >> On 2017/11/28 18:18, Dr. David Alan Gilbert wrote: >>> * fangying (fangyi...@huawei.com) wrote: >>>> QEMU will abort when vhost-user process is

Re: [Qemu-devel] [PATCH v4] vhost: Don't abort when vhost-user connection is lost during migration

2017-12-06 Thread Ying Fang
On 2017/12/1 22:39, Michael S. Tsirkin wrote: > On Fri, Dec 01, 2017 at 01:58:32PM +0800, fangying wrote: >> QEMU will abort when vhost-user process is restarted during migration >> when vhost_log_global_start/stop is called. The reason is clear that >> vhost_dev_set_log returns -1 because network

Re: [Qemu-devel] [PATCH v4] vhost: Don't abort when vhost-user connection is lost during migration

2017-12-07 Thread Ying Fang
On 2017/12/7 0:34, Michael S. Tsirkin wrote: > On Wed, Dec 06, 2017 at 09:30:27PM +0800, Ying Fang wrote: >> >> On 2017/12/1 22:39, Michael S. Tsirkin wrote: >>> On Fri, Dec 01, 2017 at 01:58:32PM +0800, fangying wrote: >>>> QEMU will abort when vhost-user p

Re: [Qemu-devel] QEMU abort when network serivce is restarted during live migration with vhost-user as the network backend

2017-11-15 Thread Ying Fang
在 2017/11/16 3:39, Dr. David Alan Gilbert 写道: > * Yori Fang (fangyi...@huawei.com) wrote: >> >> >> 在 2017/11/14 19:40, Marc-André Lureau 写道: >>> Hi >>> >>> On Tue, Nov 14, 2017 at 8:09 AM, fangying wrote: Hi all, We have a vm running migration with vhost-user as network backend, we

Re: [Qemu-devel] [PATCH v3] vhost: Cancel migration when vhost-user process restarted during migration

2017-11-28 Thread Ying Fang
se network connection is temporarily >> lost. To handle this situation, let's cancel migration here. >> >> Signed-off-by: Ying Fang > > I thought we had agreed not to use migrate_fd_cancel here - that's for > cancelling not erroring. > > Dave We can no

Re: [Qemu-devel] [RFC] Questions on the I/O performance of emulated host cdrom device

2019-01-15 Thread Ying Fang
On 2019/1/16 4:15, John Snow wrote: > > > On 1/8/19 10:20 PM, Ying Fang wrote: >> >> >> On 2019/1/8 20:46, Kevin Wolf wrote: >>> Am 29.12.2018 um 07:33 hat Ying Fang geschrieben: >>>> Hi. >>>> Recently one of our customer complained

Re: [Qemu-devel] [RFC] Questions on the I/O performance of emulated host cdrom device

2019-01-06 Thread Ying Fang
ping On 2018/12/29 14:33, Ying Fang wrote: > Hi. > Recently one of our customer complained about the I/O performance of QEMU > emulated host cdrom device. > I did some investigation on it and there was still some point I could not > figure out. So I had to ask for your help. &

Re: [Qemu-devel] [RFC] Questions on the I/O performance of emulated host cdrom device

2019-01-08 Thread Ying Fang
On 2019/1/8 20:46, Kevin Wolf wrote: > Am 29.12.2018 um 07:33 hat Ying Fang geschrieben: >> Hi. >> Recently one of our customer complained about the I/O performance of QEMU >> emulated host cdrom device. >> I did some investigation on it and there was still some p

[PATCH] util/async: Add memory barrier to aio_ctx_prepare

2020-04-01 Thread Ying Fang
tx_prepare and it is proved to have the hang fixed in our test. This hang is not observed on the x86 platform however it can be easily reproduced on the aarch64 platform, thus it is architecture related. Not sure if this is revelant to Commit eabc977973103527bbb8fed69c91cfaa6691f8ab Signed-off-b

[PATCH v2] util/async: Add memory barrier to aio_ctx_prepare

2020-04-01 Thread Ying Fang
tx_prepare and it is proved to have the hang fixed in our test. This hang is not observed on the x86 platform however it can be easily reproduced on the aarch64 platform, thus it is architecture related. Not sure if this is revelant to Commit eabc977973103527bbb8fed69c91cfaa6691f8ab Signed-off-b

Re: [PATCH v2] util/async: Add memory barrier to aio_ctx_prepare

2020-04-02 Thread Ying Fang
On 2020/4/2 16:47, Paolo Bonzini wrote: On 02/04/20 04:44, Ying Fang wrote: Normal VM runtime is not affected by this hang since there is always some timer timeout or subsequent io worker come and notify the main thead. To fix this problem, a memory barrier is added to aio_ctx_prepare and it

Re: [PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-13 Thread Ying Fang
On 8/7/2020 4:13 PM, Kevin Wolf wrote: Am 07.08.2020 um 09:42 hat Ying Fang geschrieben: On 8/6/2020 5:13 PM, Kevin Wolf wrote: Am 05.08.2020 um 04:38 hat Ying Fang geschrieben: From: fangying When qemu or qemu-nbd process uses a qcow2 image and configured with 'cache = none'

[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2020-05-04 Thread Ying Fang
Hi, Ike. I think this tricky bug was fixed by Paolo last month. Please try patch https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5710a3e09f9b85801e5ce70797a4a511e5fc9e2c. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs

[PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-04 Thread Ying Fang
allocated cluster. Signed-off-by: Ying Fang diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 7444b9c..ab6e812 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -266,6 +266,22 @@ int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c) return result; }

[PATCH v5 2/2] tests/bios-tables-test: add smbios cpu speed test

2020-08-05 Thread Ying Fang
oesn't really run on aarch64 platform for smbios test can't run on uefi only platform yet. Signed-off-by: Ying Fang Signed-off-by: Heyi Guo --- tests/bios-tables-test.c | 42 1 file changed, 42 insertions(+) diff --git a/tests/bios-tables-test.c b/

[PATCH v5 0/2] add new options to set smbios type 4 fields

2020-08-05 Thread Ying Fang
quot; in option names to "-" - check if option value is too large to fit in SMBIOS type 4 speed fields. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Ying Fang (2): hw/smbios: add options for type 4 max-speed and current-speed tests/bios-tables-test: add smbios cpu speed

[PATCH v5 1/2] hw/smbios: add options for type 4 max-speed and current-speed

2020-08-05 Thread Ying Fang
or the max speed and current speed of processor, for "max speed" identifies a capability of the system, and "current speed" identifies the processor's speed at boot (see smbios spec), but some applications do not tell the differences. Reviewed-by: Igor Mammedov Signed-off-by

Re: [PATCH v5 0/2] add new options to set smbios type 4 fields

2020-08-06 Thread Ying Fang
On 8/6/2020 2:01 PM, Michael S. Tsirkin wrote: On Thu, Aug 06, 2020 at 11:56:32AM +0800, Ying Fang wrote: From: fangying Hi, this patchset was previously posted by my teamate Heyi Guo several months ago, however we missed the merge window. It is reposted here to make it an end. Thanks

Re: [PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-06 Thread Ying Fang
On 8/5/2020 10:43 AM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200805023826.184-1-fangyi...@huawei.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can pro

Re: [PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-07 Thread Ying Fang
On 8/6/2020 5:13 PM, Kevin Wolf wrote: Am 05.08.2020 um 04:38 hat Ying Fang geschrieben: From: fangying When qemu or qemu-nbd process uses a qcow2 image and configured with 'cache = none', it will write to the qcow2 image with a cache to cache L2 tables, however the process will

Re: [RFC PATCH 4/5] hw/acpi/aml-build: add processor hierarchy node structure

2021-03-03 Thread Ying Fang
On 3/1/2021 11:50 PM, Michael S. Tsirkin wrote: On Mon, Mar 01, 2021 at 10:39:19AM +0100, Andrew Jones wrote: On Fri, Feb 26, 2021 at 10:23:03AM +0800, Ying Fang wrote: On 2/25/2021 7:47 PM, Andrew Jones wrote: On Thu, Feb 25, 2021 at 04:56:26PM +0800, Ying Fang wrote: Add the processor

Re: [RFC PATCH 0/5] hw/arm/virt: Introduce cpu topology support

2021-03-04 Thread Ying Fang
On 3/1/2021 5:48 PM, Andrew Jones wrote: On Fri, Feb 26, 2021 at 04:41:45PM +0800, Ying Fang wrote: On 2/25/2021 8:02 PM, Andrew Jones wrote: On Thu, Feb 25, 2021 at 04:56:22PM +0800, Ying Fang wrote: An accurate cpu topology may help improve the cpu scheduler's decision making

[RFC PATCH 0/5] hw/arm/virt: Introduce cpu topology support

2021-02-25 Thread Ying Fang
virtual-topology-for-virtual-machines-friend-or-foe-dario-faggioli-suse [1] https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg02166.html [2] https://patchwork.ozlabs.org/project/qemu-devel/cover/20180704124923.32483-1-drjo...@redhat.com Ying Fang (5): device_tree: Add qemu_fdt_add_path

[RFC PATCH 5/5] hw/arm/virt-acpi-build: add PPTT table

2021-02-25 Thread Ying Fang
Add the Processor Properties Topology Table (PPTT) to present CPU topology information to the guest. A three-level cpu topology is built in accord with the linux kernel currently does. Tested-by: Jiajie Li Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c | 50

[RFC PATCH 4/5] hw/acpi/aml-build: add processor hierarchy node structure

2021-02-25 Thread Ying Fang
socket description (2) build_processor_hierarchy for processor description (3) build_smt_hierarchy for thread (logic processor) description Signed-off-by: Ying Fang Signed-off-by: Henglong Fan --- hw/acpi/aml-build.c | 40 + include/hw/acpi/acpi-defs.h

[RFC PATCH 1/5] device_tree: Add qemu_fdt_add_path

2021-02-25 Thread Ying Fang
qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except it also adds any missing parent nodes. We also tweak an error message of qemu_fdt_add_subnode(). Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- include/sysemu/device_tree.h | 1 + softmmu/device_tree.c| 45

[RFC PATCH 3/5] hw/arm/virt-acpi-build: distinguish possible and present cpus

2021-02-25 Thread Ying Fang
rework based on Andrew Jones's contribution at https://lists.gnu.org/archive/html/qemu-arm/2018-07/msg00076.html Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c | 14 ++ hw/arm/virt.c| 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/arm

[RFC PATCH 2/5] hw/arm/virt: Add cpu-map to device tree

2021-02-25 Thread Ying Fang
Support device tree CPU topology descriptions. Signed-off-by: Ying Fang --- hw/arm/virt.c | 38 +- include/hw/arm/virt.h | 1 + 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 371147f3ae..c133b342b8

Re: [RFC PATCH 1/5] device_tree: Add qemu_fdt_add_path

2021-02-25 Thread Ying Fang
On 2/25/2021 7:03 PM, Andrew Jones wrote: Hi Ying Fang, I don't see any change in this patch from what I have in my tree, so this should be From: Andrew Jones Thanks, drew Yes, I picked it from your qemu branch: https://github.com/rhdrjones/qemu/c

Re: [RFC PATCH 2/5] hw/arm/virt: Add cpu-map to device tree

2021-02-25 Thread Ying Fang
On 2/25/2021 7:16 PM, Andrew Jones wrote: Hi Ying Fang, The only difference between this and what I have in my tree[*] is the removal of the socket node (which has been in the Linux docs since June 2019). Any reason why you removed that node? In any case, I think I deserve a bit more credit

Re: [RFC PATCH 1/5] device_tree: Add qemu_fdt_add_path

2021-02-25 Thread Ying Fang
On 2/25/2021 9:25 PM, Andrew Jones wrote: On Thu, Feb 25, 2021 at 08:54:40PM +0800, Ying Fang wrote: On 2/25/2021 7:03 PM, Andrew Jones wrote: Hi Ying Fang, I don't see any change in this patch from what I have in my tree, so this should be From: Andrew Jones Thanks, drew Y

Re: [RFC PATCH 4/5] hw/acpi/aml-build: add processor hierarchy node structure

2021-02-25 Thread Ying Fang
On 2/25/2021 7:47 PM, Andrew Jones wrote: On Thu, Feb 25, 2021 at 04:56:26PM +0800, Ying Fang wrote: Add the processor hierarchy node structures to build ACPI information for CPU topology. Since the private resources may be used to describe cache hierarchy and it is variable among different

Re: [RFC PATCH 5/5] hw/arm/virt-acpi-build: add PPTT table

2021-02-25 Thread Ying Fang
ACPI differences has been dropped from the commit message of [*]. I'm not sure why. Will fix that. I will add SOB of you then you can help to comment on it. Thanks, drew On Thu, Feb 25, 2021 at 04:56:27PM +0800, Ying Fang wrote: Add the Processor Properties Topology Table (PPTT) to present CP

Re: [RFC PATCH 0/5] hw/arm/virt: Introduce cpu topology support

2021-02-26 Thread Ying Fang
On 2/25/2021 8:02 PM, Andrew Jones wrote: On Thu, Feb 25, 2021 at 04:56:22PM +0800, Ying Fang wrote: An accurate cpu topology may help improve the cpu scheduler's decision making when dealing with multi-core system. So cpu topology description is helpful to provide guest with the right

Re: [RFC PATCH 00/12] hw/arm/virt: Introduce cpu and cache topology support

2020-10-14 Thread Ying Fang
On 10/14/2020 2:08 AM, Andrew Jones wrote: On Tue, Oct 13, 2020 at 12:11:20PM +, Zengtao (B) wrote: Cc valentin -Original Message- From: Qemu-devel [mailto:qemu-devel-bounces+prime.zeng=hisilicon@nongnu.org] On Behalf Of Ying Fang Sent: Thursday, September 17, 2020 11:20 AM

Re: [RFC PATCH v2 0/8] block-backend: Introduce I/O hang

2020-10-15 Thread Ying Fang
On 10/10/2020 10:27 AM, cenjiahui wrote: Hi Kevin, Could you please spend some time reviewing and commenting on this patch series. Thanks, Jiahui Cen This feature is confirmed effective in a cloud storage environment since it can help to improve the availability without pausing the entire

Re: [RFC PATCH 00/12] hw/arm/virt: Introduce cpu and cache topology support

2020-10-16 Thread Ying Fang
On 10/15/2020 3:59 PM, Andrew Jones wrote: On Thu, Oct 15, 2020 at 10:07:16AM +0800, Ying Fang wrote: On 10/14/2020 2:08 AM, Andrew Jones wrote: On Tue, Oct 13, 2020 at 12:11:20PM +, Zengtao (B) wrote: Cc valentin -Original Message- From: Qemu-devel [mailto:qemu-devel

Re: [RFC PATCH 00/12] hw/arm/virt: Introduce cpu and cache topology support

2020-10-19 Thread Ying Fang
On 10/16/2020 6:07 PM, Andrew Jones wrote: On Fri, Oct 16, 2020 at 05:40:02PM +0800, Ying Fang wrote: On 10/15/2020 3:59 PM, Andrew Jones wrote: On Thu, Oct 15, 2020 at 10:07:16AM +0800, Ying Fang wrote: On 10/14/2020 2:08 AM, Andrew Jones wrote: On Tue, Oct 13, 2020 at 12:11:20PM

[RFC PATCH v2 00/13] hw/arm/virt: Introduce cpu and cache topology support

2020-10-20 Thread Ying Fang
ve unused variable hw/arm/virt: Replace smp_parse with one that prefers cores device_tree: Add qemu_fdt_add_path hw/arm/virt: DT: add cpu-map Ying Fang (8): hw: add compat machines for 5.3 hw/arm/virt-acpi-build: distinguish possible and present cpus Message hw/acpi/aml-build: add proces

[RFC PATCH v2 02/13] hw/arm/virt: Remove unused variable

2020-10-20 Thread Ying Fang
From: Andrew Jones We no longer use the smp_cpus virtual machine state variable. Remove it. Signed-off-by: Andrew Jones --- hw/arm/virt.c | 2 -- include/hw/arm/virt.h | 1 - 2 files changed, 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 0069fa1298..ea24b576c6 100644

[RFC PATCH v2 01/13] hw/arm/virt: Spell out smp.cpus and smp.max_cpus

2020-10-20 Thread Ying Fang
From: Andrew Jones Prefer to spell out the smp.cpus and smp.max_cpus machine state variables in order to make grepping easier and to avoid any confusion as to what cpu count is being used where. Signed-off-by: Andrew Jones --- hw/arm/virt-acpi-build.c | 8 +++ hw/arm/virt.c| 5

[RFC PATCH v2 10/13] target/arm/cpu: Add CPU cache description for arm

2020-10-20 Thread Ying Fang
Add the CPUCacheInfo structure to hold CPU cache information for ARM cpus. A classic three level cache topology is used here. The default cache capacity is given and userspace can overwrite these values. Signed-off-by: Ying Fang --- target/arm/cpu.c | 42

[RFC PATCH v2 11/13] hw/arm/virt: add fdt cache information

2020-10-20 Thread Ying Fang
Support devicetree CPU cache information descriptions Signed-off-by: Ying Fang --- hw/arm/virt.c | 92 +++ 1 file changed, 92 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d23b941020..adcfa52854 100644 --- a/hw/arm/virt.c +++ b

[RFC PATCH v2 06/13] hw/arm/virt: DT: add cpu-map

2020-10-20 Thread Ying Fang
From: Andrew Jones Support devicetree CPU topology descriptions. Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- hw/arm/virt.c | 40 +++- include/hw/arm/virt.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/arm

[RFC PATCH v2 08/13] hw/acpi/aml-build: add processor hierarchy node structure

2020-10-20 Thread Ying Fang
) description structure Signed-off-by: Ying Fang Signed-off-by: Henglong Fan --- hw/acpi/aml-build.c | 37 + include/hw/acpi/aml-build.h | 7 +++ 2 files changed, 44 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index

[RFC PATCH v2 12/13] hw/acpi/aml-build: build ACPI CPU cache hierarchy information

2020-10-20 Thread Ying Fang
To build cache information, An AcpiCacheInfo structure is defined to hold the Type 1 cache structure according to ACPI spec v6.3 5.2.29.2. A helper function build_cache_hierarchy is introduced to encode the cache information. Signed-off-by: Ying Fang --- hw/acpi/aml-build.c | 26

[RFC PATCH v2 09/13] hw/arm/virt-acpi-build: add PPTT table

2020-10-20 Thread Ying Fang
Add the Processor Properties Topology Table (PPTT) to present CPU topology information to the guest. Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c | 42 1 file changed, 42 insertions(+) diff --git a/hw/arm/virt-acpi

[RFC PATCH v2 05/13] hw: add compat machines for 5.3

2020-10-20 Thread Ying Fang
Add 5.2 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Ying Fang --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 15 ++- hw/i386/pc_q35.c | 14

[RFC PATCH v2 07/13] hw/arm/virt-acpi-build: distinguish possible and present cpus Message

2020-10-20 Thread Ying Fang
When building ACPI tables regarding CPUs we should always build them for the number of possible CPUs, not the number of present CPUs. We then ensure only the present CPUs are enabled. Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c | 17 - 1

[RFC PATCH v2 03/13] hw/arm/virt: Replace smp_parse with one that prefers cores

2020-10-20 Thread Ying Fang
From: Andrew Jones The virt machine type has never used the CPU topology parameters, other than number of online CPUs and max CPUs. When choosing how to allocate those CPUs the default has been to assume cores. In preparation for using the other CPU topology parameters let's use an smp_parse that

[RFC PATCH v2 04/13] device_tree: Add qemu_fdt_add_path

2020-10-20 Thread Ying Fang
From: Andrew Jones qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except it also adds any missing parent nodes. We also tweak an error message of qemu_fdt_add_subnode(). We'll make use of the new function in a coming patch. Signed-off-by: Andrew Jones --- device_tree.c

[RFC PATCH v2 13/13] hw/arm/virt-acpi-build: Enable CPU cache topology

2020-10-20 Thread Ying Fang
A helper struct AcpiCacheOffset is introduced to describe the offset of three level caches. The cache hierarchy is built according to ACPI spec v6.3 5.2.29.2. Let's enable CPU cache topology now. Signed-off-by: Ying Fang --- hw/acpi/aml-build.c | 19 +- hw/arm/virt

Re: [PATCH v4 0/7] block: Add retry for werror=/rerror= mechanism

2021-01-24 Thread Ying Fang
Kindly ping for it. Thanks for Stefan's suggestion, we have re-implement the concept by introducing the 'retry' feature base on the werror=/rerror= mechanism. Hope this thread won't be missed. Any comments and reviews are wellcome. Thanks. Ying Fang. On 12/15/2020 8:30

Re: [PATCH] hw/arm/virt: Remove virt machine state 'smp_cpus'

2020-12-16 Thread Ying Fang
smp is the true source for "smp_cpus" and "max_cpus", avoid passing them in function parameters, preferring instead to get them from the state. No functional change intended. Signed-off-by: Andrew Jones Reviewed-by: Ying Fang --- hw/arm/virt-acpi-build.c

[Qemu-devel] [BUG] VNC: client won't send FramebufferUpdateRequest if job in flight is aborted

2019-03-04 Thread Ying Fang
Hi Gerd, Daniel. We noticed that if VncSharePolicy was configured with VNC_SHARE_POLICY_FORCE_SHARED mode and multiple vnc clients opened vnc connections, some clients could go blank screen at high probability. This problem can be reproduced when we regularly reboot suse12sp3 in graphic mode bo

Re: [Qemu-devel] [PATCH] vnc: fix update stalls

2019-03-05 Thread Ying Fang
his more much likely to happen. > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1662260 > Reported-by: Ying Fang > Signed-off-by: Gerd Hoffmann Reviewed-by: Ying Fang > --- > ui/vnc.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/ui/vnc.c b/ui/vnc.c &

[Qemu-devel] [PATCH] xhci: Fix memory leak in xhci_address_slot

2019-08-27 Thread Ying Fang
) Cc: zhanghailiang Signed-off-by: Ying Fang --- hw/usb/hcd-xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index f578264948..471759cd4c 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -2161,6 +2161,7 @@ static TRBCCode xhci_address_slot

[Qemu-devel] [PATCH] qmp: Fix memory leak in migrate_params_test_apply

2019-08-27 Thread Ying Fang
0xdfd278d7 in os_host_main_loop_wait util/main-loop.c:241 #20 0xdfd278d7 in main_loop_wait util/main-loop.c:517 #21 0xdf67b5e7 in main_loop vl.c:1806 #22 0xdf15d453 in main vl.c:4488 Cc: zhanghailiang Signed-off-by: Ying Fang --- migration/migration.c | 6 ++ 1 file

[Qemu-devel] [PATCH] qmp: Fix memory leak in migrate_params_test_apply

2019-08-27 Thread Ying Fang
0xdfd278d7 in os_host_main_loop_wait util/main-loop.c:241 #20 0xdfd278d7 in main_loop_wait util/main-loop.c:517 #21 0xdf67b5e7 in main_loop vl.c:1806 #22 0xdf15d453 in main vl.c:4488 Cc: zhanghailiang Signed-off-by: Ying Fang --- migration/migration.c | 2 ++ 1 file

[Qemu-devel] [PATCH] xhci: Fix memory leak in xhci_kick_epctx

2019-08-27 Thread Ying Fang
qemu_clock_run_all_timers util/qemu-timer.c:692 #10 0xbbdab9a3 in main_loop_wait util/main-loop.c:524 #11 0xbb6ff5e7 in main_loop vl.c:1806 #12 0xbb1e1453 in main vl.c:4488 Signed-off-by: Ying Fang --- hw/usb/hcd-xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw

Re: [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures

2020-04-08 Thread Ying Fang
On 2020/4/7 22:07, Paolo Bonzini wrote: ARM machines and other weakly-ordered architectures have been suffering for a long time from hangs in qemu-img and qemu-io. For QEMU binaries these are mitigated by the timers that sooner or later fire in the main loop, but these will not happen for the

Re: [PATCH 5/5] async: use explicit memory barriers

2020-04-08 Thread Ying Fang
and therefore it is even weaker than C11 ATOMIC_RELAXED; on x86, ATOMIC_RELAXED compiles to a locked operation. Analyzed-by: Ying Fang Signed-off-by: Paolo Bonzini --- util/aio-posix.c | 16 ++-- util/aio-win32.c | 17 ++--- util/async.c | 16 --

Re: [RFC PATCH 0/4] async: fix hangs on weakly-ordered architectures

2020-04-08 Thread Ying Fang
On 2020/4/8 23:05, Paolo Bonzini wrote: On 08/04/20 11:12, Ying Fang wrote: On 2020/4/7 22:07, Paolo Bonzini wrote: ARM machines and other weakly-ordered architectures have been suffering for a long time from hangs in qemu-img and qemu-io.  For QEMU binaries these are mitigated by the

Re: About the kvm-no-adjvtime CPU property

2020-06-02 Thread Ying Fang
On 2020/6/1 20:29, Andrew Jones wrote: On Mon, Jun 01, 2020 at 08:07:31PM +0800, Ying Fang wrote: On 2020/6/1 16:07, Andrew Jones wrote: On Sat, May 30, 2020 at 04:56:26PM +0800, Ying Fang wrote: About the kvm-no-adjvtime CPU property Hi Andrew, To adjust virutal time, a new kvm cpu

Re: [PATCH] target/arm/cpu: adjust virtual time for cortex series cpu

2020-06-02 Thread Ying Fang
On 2020/6/1 20:41, Peter Maydell wrote: On Sat, 30 May 2020 at 10:22, Ying Fang wrote: Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cortex series cpu which ha

[PATCH v2] target/arm/cpu: adjust virtual time for arm cpu

2020-06-02 Thread Ying Fang
Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cpu which has the gernic timer feature enabled. Signed-off-by: Ying Fang --- v2: - move kvm_arm_add_vcpu_properties

Re: [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu

2020-06-04 Thread Ying Fang
On 6/3/2020 4:26 PM, Andrew Jones wrote: On Wed, Jun 03, 2020 at 10:02:08AM +0800, Ying Fang wrote: Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cpu which has the g

Forward migration broken down since virt-4.2 machine type

2020-06-04 Thread Ying Fang
Hi Richard, Recently we are doing some tests on forward migration based on arm virt machine. And we found the patch below breaks forward migration compatibility from virt-4.2 to virt-5.0 above machine type. The patch which breaks this down given by git bisect is commit f9506e162c33e87b609549157d

Re: About the kvm-no-adjvtime CPU property

2020-06-04 Thread Ying Fang
On 6/3/2020 4:53 PM, Andrew Jones wrote: On Tue, Jun 02, 2020 at 03:47:22PM +0800, Ying Fang wrote: On 2020/6/1 20:29, Andrew Jones wrote: On Mon, Jun 01, 2020 at 08:07:31PM +0800, Ying Fang wrote: On 2020/6/1 16:07, Andrew Jones wrote: On Sat, May 30, 2020 at 04:56:26PM +0800, Ying

Re: Forward migration broken down since virt-4.2 machine type

2020-06-07 Thread Ying Fang
ping On 6/4/2020 4:51 PM, Ying Fang wrote: Hi Richard, Recently we are doing some tests on forward migration based on arm virt machine. And we found the patch below breaks forward migration compatibility from virt-4.2 to virt-5.0 above machine type. The patch which breaks this down given by

[PATCH v3] target/arm/cpu: adjust virtual time for arm cpu

2020-06-08 Thread Ying Fang
From: fangying Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cpu which has the generic timer feature enabled. Suggested-by: Andrew Jones Signed-off-by: Ying Fang -

Re: [PATCH v3] target/arm/cpu: adjust virtual time for arm cpu

2020-06-09 Thread Ying Fang
On 6/8/2020 8:49 PM, Andrew Jones wrote: On Mon, Jun 08, 2020 at 08:12:43PM +0800, Ying Fang wrote: From: fangying Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cpu

About the kvm-no-adjvtime CPU property

2020-05-30 Thread Ying Fang
About the kvm-no-adjvtime CPU property Hi Andrew, To adjust virutal time, a new kvm cpu property kvm-no-adjvtime was introduced to 5.0 virt machine types. However the cpu property was enabled only for host-passthrough and max cpu model. As for other cpu model like cortex-a57, cortex-a53, cortex-a

[PATCH] target/arm/cpu: adjust virtual time for cortex series cpu

2020-05-30 Thread Ying Fang
Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cortex series cpu which has the gernic timer feature enabled. Signed-off-by: Ying Fang diff --git a/target/arm/cpu.c b/targe

Re: About the kvm-no-adjvtime CPU property

2020-06-01 Thread Ying Fang
On 2020/6/1 16:07, Andrew Jones wrote: On Sat, May 30, 2020 at 04:56:26PM +0800, Ying Fang wrote: About the kvm-no-adjvtime CPU property Hi Andrew, To adjust virutal time, a new kvm cpu property kvm-no-adjvtime was introduced to 5.0 virt machine types. However the cpu property was enabled

Re: [RFC PATCH v3 10/13] target/arm/cpu: Add cpu cache description for arm

2021-01-12 Thread Ying Fang
On 11/30/2020 9:00 PM, Peter Maydell wrote: On Mon, 9 Nov 2020 at 03:05, Ying Fang wrote: Add the CPUCacheInfo structure to hold cpu cache information for ARM cpus. A classic three level cache topology is used here. The default cache capacity is given and userspace can overwrite these

[RFC PATCH 4/7] block-backend: add I/O hang drain when disbale

2020-09-27 Thread Ying Fang
To disable I/O hang, all hanging AIOs need to be drained. A rehandle status field is introduced to notify rehandle mechanism not to rehandle failed AIOs when I/O hang is disabled. Signed-off-by: Ying Fang Signed-off-by: Jiahui Cen --- block/block-backend.c | 85

[RFC PATCH 6/7] qemu-option: add I/O hang timeout option

2020-09-27 Thread Ying Fang
I/O hang timeout should be different under different situations. So it is better to provide an option for user to determine I/O hang timeout for each block device. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- blockdev.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[RFC PATCH 0/7] block-backend: Introduce I/O hang

2020-09-27 Thread Ying Fang
nning smoothly when I/O is recovred with this feature enabled. Ying Fang (7): block-backend: introduce I/O rehandle info block-backend: rehandle block aios when EIO block-backend: add I/O hang timeout block-backend: add I/O hang drain when disbale virtio-blk: disable I/O hang when rese

[RFC PATCH 3/7] block-backend: add I/O hang timeout

2020-09-27 Thread Ying Fang
Not all errors would be fixed, so it is better to add a rehandle timeout for I/O hang. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- block/block-backend.c | 99 +- include/sysemu/block-backend.h | 2 + 2 files changed, 100 insertions(+), 1

[RFC PATCH 1/7] block-backend: introduce I/O rehandle info

2020-09-27 Thread Ying Fang
-off-by: Ying Fang --- block/block-backend.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 24dd0670d1..bf104a7cf5 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -35,6 +35,18 @@ static AioContext

[RFC PATCH 5/7] virtio-blk: disable I/O hang when resetting

2020-09-27 Thread Ying Fang
All AIOs including the hanging AIOs need to be drained when resetting virtio-blk. So it is necessary to disable I/O hang before resetting and enable I/O hang again after resetting if I/O hang is enabled. Signed-off-by: Ying Fang Signed-off-by: Jiahui Cen --- hw/block/virtio-blk.c | 8

[RFC PATCH 2/7] block-backend: rehandle block aios when EIO

2020-09-27 Thread Ying Fang
situations, the returned error is often an EIO. To avoid this unavailablity, we can store the failed AIOs, and resend them later. If the error is temporary, the retries can succeed and the AIOs can be successfully completed. Signed-off-by: Ying Fang Signed-off-by: Jiahui Cen --- block/block

[RFC PATCH 7/7] qapi: add I/O hang and I/O hang timeout qapi event

2020-09-27 Thread Ying Fang
Sometimes hypervisor management tools like libvirt may need to monitor I/O hang events. Let's report I/O hang and I/O hang timeout event via qapi. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- block/block-backend.c | 3 +++ qapi/block-core.json | 26

[RFC PATCH 02/12] target/arm/kvm64: make MPIDR consistent with CPU Topology

2020-09-16 Thread Ying Fang
MPIDR helps to provide an additional PE identification in a multiprocessor system. This patch adds support for setting MPIDR from userspace, so that MPIDR is consistent with CPU topology configured. Signed-off-by: Ying Fang --- target/arm/kvm64.c | 46

[RFC PATCH 03/12] target/arm/kvm32: make MPIDR consistent with CPU Topology

2020-09-16 Thread Ying Fang
MPIDR helps to provide an additional PE identification in a multiprocessor system. This patch adds support for setting MPIDR from userspace, so that MPIDR is consistent with CPU topology configured. Signed-off-by: Ying Fang --- target/arm/kvm32.c | 46

[RFC PATCH 04/12] device_tree: add qemu_fdt_add_path

2020-09-16 Thread Ying Fang
From: Andrew Jones qemu_fdt_add_path works like qemu_fdt_add_subnode, except it also recursively adds any missing parent nodes. Cc: Peter Crosthwaite Cc: Alexander Graf Signed-off-by: Andrew Jones --- device_tree.c| 24 include/sysemu/device_tree.h |

[RFC PATCH 05/12] hw/arm/virt: DT: add cpu-map

2020-09-16 Thread Ying Fang
From: Andrew Jones Support devicetree CPU topology descriptions. Signed-off-by: Andrew Jones --- hw/arm/virt.c | 37 - include/hw/arm/virt.h | 1 + 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index ac

[RFC PATCH 01/12] linux headers: Update linux header with KVM_ARM_SET_MP_AFFINITY

2020-09-16 Thread Ying Fang
Signed-off-by: Ying Fang --- linux-headers/linux/kvm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index a28c366737..461a2302e7 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1031,6 +1031,7 @@ struct

[RFC PATCH 09/12] target/arm/cpu: Add CPU cache description for arm

2020-09-16 Thread Ying Fang
Add the CPUCacheInfo structure to hold CPU cache information for ARM cpus. A classic three level cache topology is used here. The default cache capacity is given and userspace can overwrite these values. Signed-off-by: Ying Fang --- target/arm/cpu.c | 42

  1   2   >