[PATCH v4] pci-bridge: avoid linking a single downstream port more than once

2024-07-25 Thread Yao Xingtao via
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com Signed-off-by: Yao Xingtao --- V3[3] -> V4: - make the error message more readable - fix the downstream port check error V2[2] -> V3: - Move this check into pcie_cap_init() V1[1] -> V2: - Move downstream port check fo

[PATCH] scripts/coccinelle: New range.cocci

2024-07-24 Thread Yao Xingtao via
This is the semantic patch from commit 7b3e371526 "cxl/mailbox: make range overlap check more readable" Signed-off-by: Yao Xingtao --- scripts/coccinelle/range.cocci | 49 ++ 1 file changed, 49 insertions(+) create mode 100644 scripts/coccinelle/r

[PATCH v3] pci-bridge: avoid linking a single downstream port more than once

2024-07-24 Thread Yao Xingtao via
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com Signed-off-by: Yao Xingtao --- V2[2] -> V3: - Move this check into pcie_cap_init() V1[1] -> V2: - Move downstream port check forward [1] https://lore.kernel.org/qemu-devel/20240704033834.3362-1-yaoxt.f...@fujitsu.com [2]

[PATCH 1/2] mips/loongson3_virt: remove useless type cast

2024-07-22 Thread Yao Xingtao via
The type of kernel_entry, kernel_low and kernel_high is uint64_t, cast the pointer of this type to uint64_t* is useless. Signed-off-by: Yao Xingtao --- hw/mips/loongson3_virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips

[PATCH 0/2] remove useless type cast

2024-07-22 Thread Yao Xingtao via
\ --keep-comments --in-place --use-gitgrep --dir . Yao Xingtao (2): mips/loongson3_virt: remove useless type cast nvme/ctrl: remove useless type cast hw/mips/loongson3_virt.c | 4 ++-- hw/nvme/ctrl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.41.0

[PATCH 2/2] nvme/ctrl: remove useless type cast

2024-07-22 Thread Yao Xingtao via
The type of req->cmd is NvmeCmd, cast the pointer of this type to NvmeCmd* is useless. Signed-off-by: Yao Xingtao --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 5b1b0cabcfc3..221818f551cd 100644 --- a/hw/nvme/ctr

[PATCH 06/13] aspeed_smc: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/ssi/aspeed_smc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 49205ab76d38

[PATCH 12/13] dump: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- dump/dump.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 84064d890d2c..45e84428aea5 100644

[PATCH 13/13] block/qcow2-cluster: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use range_overlaps_range() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- block/qcow2-cluster.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2

[PATCH 11/13] crypto/block-luks: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- crypto/block-luks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 5b777c15d3cd

[PATCH 09/13] system/memory_mapping: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- system/memory_mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/memory_mapping.c b/system/memory_mapping.c index

[PATCH 05/13] display/sm501: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/display/sm501.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 26dc8170d89b

[PATCH 10/13] block/vhdx: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use range_overlaps_range() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- block/vhdx.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 5aa1a1350626..c31661b946b6

[PATCH 08/13] sparc/ldst_helper: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- target/sparc/ldst_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index

[PATCH 07/13] qtest/fuzz: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- tests/qtest/fuzz/generic_fuzz.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz

[PATCH 04/13] cxl/mailbox: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/cxl/cxl-mailbox-utils.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c

[PATCH 02/13] arm/boot: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/arm/boot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..a004a90e87be 100644 --- a

[PATCH 03/13] core/loader: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 31593a117171..dac0df561b16

[PATCH 01/13] range: Make ranges_overlap() return bool

2024-07-21 Thread Yao Xingtao via
Just like range_overlaps_range(), use the returned bool value to check whether 2 given ranges overlap. Signed-off-by: Yao Xingtao --- include/qemu/range.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/range.h b/include/qemu/range.h index 4ce694a39831

[PATCH 00/13] make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
Currently, some components still open-coding the range overlap check. Sometimes this check may be fail because some patterns are missed. To avoid the above problems and improve the readability of the code, it is better to use the ranges_overlap() to do this check. Yao Xingtao (13): range: Make

[PATCH v2] mem/cxl_type3: Fix overlapping region validation error

2024-07-18 Thread Yao Xingtao via
added region, b is an existing region, and b is a subregion of a) Reviewed-by: Jonathan Cameron Suggested-by: Peter Maydell Signed-off-by: Yao Xingtao --- V1[1] -> V2: - Use ranges_overlap() to improve code readability - Replace the ASCII extended graph to ASCII basic in comment.

[PATCH] mem/cxl_type3: Fix overlapping region validation error

2024-07-18 Thread Yao Xingtao via
added region, b is an existing region, and b is a subregion of a) Signed-off-by: Yao Xingtao --- hw/mem/cxl_type3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 35ac59883a5b..8e32de327908 100644 --- a/hw/mem/cxl_type3.c

[PATCH v2] pci-bridge: avoid linking a single downstream port more than once

2024-07-17 Thread Yao Xingtao via
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com Signed-off-by: Yao Xingtao --- V1[1] -> V2: - Move downstream port check forward [1] https://lore.kernel.org/qemu-devel/20240704033834.3362-1-yaoxt.f...@fujitsu.com --- hw/pci-bridge/cxl_downstream.c | 5 + hw/pci-bri

[PATCH] pci-bridge: avoid linking a single downstream port more than once

2024-07-03 Thread Yao Xingtao via
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com Signed-off-by: Yao Xingtao --- hw/pci-bridge/cxl_downstream.c | 6 ++ hw/pci-bridge/pcie_root_port.c | 6 ++ hw/pci-bridge/xio3130_downstream.c | 6 ++ 3 files changed, 18 insertions(+) diff --git a/hw/pci-bridge

[PATCH v3] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways

2024-05-07 Thread Yao Xingtao via
/3e84b919-7631-d1db-3e1d-33000f3f3...@fujitsu.com/ Signed-off-by: Yao Xingtao --- hw/cxl/cxl-component-utils.c | 9 +++-- hw/mem/cxl_type3.c | 15 +++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c

[PATCH v2] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways

2024-04-06 Thread Yao Xingtao via
/3e84b919-7631-d1db-3e1d-33000f3f3...@fujitsu.com/ Signed-off-by: Yao Xingtao --- hw/mem/cxl_type3.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index b0a7e9f11b..d6ef784e96 100644 --- a/hw/mem/cxl_type3.c +++ b/hw/mem

[PATCH] mem/cxl_type3: fix hpa to dpa logic

2024-03-26 Thread Yao Xingtao via
[n].DPABase Links: https://lore.kernel.org/linux-cxl/3e84b919-7631-d1db-3e1d-33000f3f3...@fujitsu.com/ Signed-off-by: Yao Xingtao --- hw/mem/cxl_type3.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index b0a7e9f11b..2c12

[PATCH v3] contrib/plugins/execlog: Fix compiler warning

2024-03-25 Thread Yao Xingtao via
~~^~~~ Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2210 Signed-off-by: Yao Xingtao --- contrib/plugins/execlog.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index

[PATCH v2] contrib/plugins/execlog: Fix compiler warning

2024-03-24 Thread Yao Xingtao via
~~^~~~ Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2210 Signed-off-by: Yao Xingtao --- contrib/plugins/execlog.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index a1dfd59ab7..096549

[PATCH] contrib/plugins/execlog: Fix compiler warning

2024-03-19 Thread Yao Xingtao via
e included from /usr/include/glib-2.0/glib.h:33: /usr/include/glib-2.0/glib/garray.h:198:62: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’ 198 |gpointer data); |

Re: [Qemu-devel] Using virtio-mmio

2013-08-02 Thread Yao Xingtao
-- 发件人:Erlon Cruz 发送日期:2013-08-03 03:57:09 收件人:Richard W.M. Jones 抄送:Peter Maydell; qemu-devel 主题:Re: [Qemu-devel] Using virtio-mmio -- 发件人:Erlon Cruz 发送日期:2013-08-03 03:57:09 收件人:Richard W.M. Jones 抄送: