Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-13 Thread Gavin Shan
Hi Marcin, On 7/13/23 22:44, Marcin Juszkiewicz wrote: W dniu 13.07.2023 o 14:34, Gavin Shan pisze: On 7/13/23 21:52, Marcin Juszkiewicz wrote: W dniu 13.07.2023 o 13:44, Peter Maydell pisze: I see this isn't a change in this patch, but given that what the user specifies is not "

Re: [PATCH 3/3] hw/arm/virt: Support host CPU type only when KVM or HVF is configured

2023-07-13 Thread Gavin Shan
Hi Connie, On 7/13/23 22:46, Cornelia Huck wrote: On Thu, Jul 13 2023, Gavin Shan wrote: The CPU type 'host-arm-cpu' class won't be registered until KVM or HVF is configured in target/arm/cpu64.c. Support the corresponding CPU type only when KVM or HVF is configured. Signe

Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-13 Thread Gavin Shan
Hi Philippe, On 7/14/23 02:29, Philippe Mathieu-Daudé wrote: On 13/7/23 14:34, Gavin Shan wrote: On 7/13/23 21:52, Marcin Juszkiewicz wrote: W dniu 13.07.2023 o 13:44, Peter Maydell pisze: I see this isn't a change in this patch, but given that what the user specifies is not "cor

Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-13 Thread Gavin Shan
Hi Richard, On 7/14/23 05:27, Richard Henderson wrote: On 7/13/23 13:34, Gavin Shan wrote: On 7/13/23 21:52, Marcin Juszkiewicz wrote: W dniu 13.07.2023 o 13:44, Peter Maydell pisze: I see this isn't a change in this patch, but given that what the user specifies is not "cortex-

Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-14 Thread Gavin Shan
On 7/14/23 10:51, Gavin Shan wrote: On 7/14/23 02:29, Philippe Mathieu-Daudé wrote: On 13/7/23 14:34, Gavin Shan wrote: On 7/13/23 21:52, Marcin Juszkiewicz wrote: W dniu 13.07.2023 o 13:44, Peter Maydell pisze: I see this isn't a change in this patch, but given that what the user spec

Re: [PATCH 1/3] machine: Factor CPU type invalidation out into helper

2023-07-17 Thread Gavin Shan
Hi Igor, On 7/14/23 22:07, Igor Mammedov wrote: On Thu, 13 Jul 2023 15:45:00 +1000 Gavin Shan wrote: The CPU type invalidation logic in machine_run_board_init() is independent enough. Lets factor it out into helper validate_cpu_type(). Since we're here, the relevant comments are impro

Re: [PATCH 2/3] hw/arm/virt: Use generic CPU type invalidation

2023-07-17 Thread Gavin Shan
Hi Igor, On 7/14/23 21:59, Igor Mammedov wrote: On Thu, 13 Jul 2023 15:45:01 +1000 Gavin Shan wrote: There is a generic CPU type invalidation in machine_run_board_init() ^ using that throughout the series is confusing to me. Perhaps use original phrase

Re: [PATCH 0/3] hw/arm/virt: Use generic CPU invalidation

2023-07-18 Thread Gavin Shan
Hi Igor, On 7/17/23 22:44, Igor Mammedov wrote: On Fri, 14 Jul 2023 13:56:00 +0100 Peter Maydell wrote: On Fri, 14 Jul 2023 at 12:50, Igor Mammedov wrote: On Thu, 13 Jul 2023 12:59:55 +0100 Peter Maydell wrote: On Thu, 13 Jul 2023 at 12:52, Marcin Juszkiewicz wrote: W dniu 13.07.20

Re: QEMU virt (arm64) does not honor reserved-memory set in device tree

2023-06-09 Thread Gavin Shan
Hi Mohd, On 6/10/23 10:01 AM, Mohd Yusuf Abdul Hamid wrote: I am trying to reserve a portion of the system memory in QEMU (arm64 virt), v7.2.1 - but the kernel never honors the reserved memory area and keeps using the area. Say, I dumped out DTB and added: reserved-memory {   #address-cells

[PATCH v3 00/32] Unified CPU type check

2023-09-06 Thread Gavin Shan
hleper to do the check(Igor) * More patches to move the check (Marcin) Gavin Shan (32): cpu: Add helper cpu_model_from_type() target/alpha: Use generic helper to show CPU model names target/arm: Use generic helper to show CPU model names target/avr: Use gene

[PATCH v3 01/32] cpu: Add helper cpu_model_from_type()

2023-09-06 Thread Gavin Shan
the CPU type name to the CPU model name. Suggested-by: Igor Mammedov Signed-off-by: Gavin Shan --- cpu.c | 16 include/hw/core/cpu.h | 12 2 files changed, 28 insertions(+) diff --git a/cpu.c b/cpu.c index 1c948d1161..a19e33ff96 100644 --- a/cpu.c

[PATCH v3 03/32] target/arm: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
ng (1). Use generic helper cpu_model_from_type() to show the CPU model names. The variable @name is renamed to @model in arm_cpu_list_entry() since it points to the CPU model name instead of the CPU type name. Signed-off-by: Gavin Shan --- target/arm/arm-qmp-cmds.c | 6 ++ target/arm

[PATCH v3 04/32] target/avr: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
avr_cpu_class_by_name(), and use the generic helper cpu_model_from_type() to show CPU model names in cpu_list(), with adjusted format to match with other targets. Signed-off-by: Gavin Shan --- target/avr/cpu.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/target

[PATCH v3 05/32] target/cris: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
e CPU model names in arm_cpu_list_entry(), and rename @name to @model since it's points to the CPU model name instead of the CPU type name. Signed-off-by: Gavin Shan --- target/cris/cpu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c ind

[PATCH v3 02/32] target/alpha: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
ed by alpha_cpu_class_by_name() successfully. Lets follow (1) to show the CPU model names, with the suffix stripped. With this, the output is compabitle with all of most cases. Signed-off-by: Gavin Shan --- target/alpha/cpu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/

[PATCH v3 06/32] target/hexagon: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
since it points to the CPU model name instead of the CPU type name. Signed-off-by: Gavin Shan --- target/hexagon/cpu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index f155936289..3d0174e6f1 100644 --- a/target

[PATCH v3 07/32] target/i386: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
rename @name to @model in x86_cpu_list_entry() since it points to the CPU model name instead of the CPU type name. Signed-off-by: Gavin Shan --- target/i386/cpu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 00f913b638

[PATCH v3 08/32] target/loongarch: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
cpu_model_from_type() in above two functions to show the CPU model names. The format of the output from cpu_list() is also adjusted to match with other targets. Signed-off-by: Gavin Shan --- target/loongarch/cpu.c| 5 - target/loongarch/loongarch-qmp-cmds.c | 3 +-- 2 files changed, 5

[PATCH v3 09/32] target/m68k: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
x27;s for the CPU model name instead of the CPU type name, and adjusted output format to match with other targets. Signed-off-by: Gavin Shan --- target/m68k/helper.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/target/m68k/helper.c b/target/m68k/helper.c

[PATCH v3 11/32] target/openrisc: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
@model since it points to the CPU model name instead of the CPU type name. Besides, openrisc_cpu_class_by_name() is simplified since the condtion of '@oc == NULL' has been covered by object_class_dynamic_cast(). Signed-off-by: Gavin Shan --- target/openrisc/cpu.c | 23 ++--

[PATCH v3 10/32] target/mips: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
ement mips_cpu_list() by fetching the CPU model names from the available CPU classes. Besides, the retrieved class needs to be validated before it's returned in mips_cpu_class_by_name(), as other targets do. Signed-off-by: Gavin Shan --- target/mips/cpu-defs.c.inc | 9 - target/

[PATCH v3 12/32] target/ppc: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
e possible information, the CPU model name, aliases of the CPU models and PVRs are all shown in ppc_cpu_list_entry(). Use generic helper cpu_model_from_type() in ppc_cpu_list_entry(), and rename @name to @model since it points to the CPU model name instead of the CPU type name. Signed-off-by:

[PATCH v3 13/32] target/riscv: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
cast(). Signed-off-by: Gavin Shan --- target/riscv/cpu.c| 23 +-- target/riscv/riscv-qmp-cmds.c | 3 +-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 6b93b04453..a525e24c5a 100644 --- a/target/ri

[PATCH v3 14/32] target/rx: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
, rx_cpu_class_by_name() is improved by merging the condition of '@oc == NULL' to object_class_dynamic_cast(). Signed-off-by: Gavin Shan --- target/rx/cpu.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 157e57da0f..

[PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
functions. Besides, we need validate the CPU class in s390_cpu_class_by_name(), as other targets do. Signed-off-by: Gavin Shan --- target/s390x/cpu_models.c| 18 +++--- target/s390x/cpu_models_sysemu.c | 9 - 2 files changed, 15 insertions(+), 12 deletions(-) diff --git

[PATCH v3 16/32] target/sh4: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
el name in the above function. Besides, superh_cpu_class_by_name() is improved by avoiding "goto out" and validating the CPU class. Signed-off-by: Gavin Shan --- target/sh4/cpu.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/target/sh4/cpu.

[PATCH v3 18/32] target/sparc: Improve sparc_cpu_class_by_name()

2023-09-06 Thread Gavin Shan
Improve sparc_cpu_class_by_name() by validating @oc, to ensure it's child of TYPE_SPARC_CPU since it's possible for other types of classes to have TYPE_SPARC_CPU as the suffix of their type names. Signed-off-by: Gavin Shan --- target/sparc/cpu.c | 7 ++- 1 file changed, 6 insert

[PATCH v3 17/32] target/tricore: Use generic helper to show CPU model names

2023-09-06 Thread Gavin Shan
also improved by merging the condition of '@oc == NULL' to object_class_dynamic_cast(). Signed-off-by: Gavin Shan --- target/tricore/cpu.c| 9 + target/tricore/helper.c | 13 + 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/target/tricore/cpu.

[PATCH v3 19/32] target/xtensa: Improve xtensa_cpu_class_by_name()

2023-09-06 Thread Gavin Shan
Improve xtensa_cpu_class_by_name() by merging the condition of '@oc == NULL' to object_class_dynamic_cast(). Signed-off-by: Gavin Shan --- target/xtensa/cpu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index

[PATCH v3 20/32] target/hppa: Implement hppa_cpu_list()

2023-09-06 Thread Gavin Shan
Implement hppa_cpu_list() to support cpu_list(). With this applied, the available CPU model names, same to the CPU type names, are shown as below. $ ./build/qemu-system-hppa -cpu ? Available CPUs: hppa-cpu Signed-off-by: Gavin Shan --- target/hppa/cpu.c | 19 +++ target

[PATCH v3 21/32] target/microblaze: Implement microblaze_cpu_list()

2023-09-06 Thread Gavin Shan
Implement microblaze_cpu_list() to support cpu_list(). With this applied, the available CPU model names, same to the CPU type names, are shown as below. $ ./build/qemu-system-hppa -cpu ? Available CPUs: microblaze-cpu Signed-off-by: Gavin Shan --- target/microblaze/cpu.c | 20

[PATCH v3 22/32] target/nios2: Implement nios2_cpu_list()

2023-09-06 Thread Gavin Shan
Implement nios2_cpu_list() to support cpu_list(). With this applied, the available CPU model names, same to the CPU type names, are shown as below. $ ./build/qemu-system-nios2 -cpu ? Available CPUs: nios2-cpu Signed-off-by: Gavin Shan --- target/nios2/cpu.c | 20

[PATCH v3 23/32] Mark cpu_list() supported on all targets

2023-09-06 Thread Gavin Shan
Remove the false conditions and comments since cpu_list() has been supported on all targets. Signed-off-by: Gavin Shan --- bsd-user/main.c | 3 --- cpu.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index f913cb55a7..3a2d84f14b 100644 --- a

[PATCH v3 24/32] machine: Constify MachineClass::valid_cpu_types[i]

2023-09-06 Thread Gavin Shan
Constify MachineClass::valid_cpu_types[i], as suggested by Richard Henderson. Suggested-by: Richard Henderson Signed-off-by: Gavin Shan --- hw/m68k/q800.c | 2 +- include/hw/boards.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c

[PATCH v3 26/32] machine: Introduce helper is_cpu_type_supported()

2023-09-06 Thread Gavin Shan
line spanning of code. The comments are tweaked a bit either. No functional change intended. Signed-off-by: Gavin Shan --- hw/core/machine.c | 82 +-- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c

[PATCH v3 25/32] machine: Use error handling when CPU type is checked

2023-09-06 Thread Gavin Shan
tions in the same function. No functional change intended. Suggested-by: Igor Mammedov Signed-off-by: Gavin Shan --- hw/core/machine.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index da699cf4e1..6d3f8e133f 100644 --- a

[PATCH v3 28/32] hw/arm/virt: Check CPU type in machine_run_board_init()

2023-09-06 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do the check by ourselves. Signed-off-by: Gavin Shan --- hw/arm/virt.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/hw/ar

[PATCH v3 30/32] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init()

2023-09-06 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan --- hw/arm/sbsa-ref.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/hw/

[PATCH v3 27/32] machine: Print CPU model name instead of CPU type name

2023-09-06 Thread Gavin Shan
The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported, to be consistent with the output from '-cpu ?'. Correct the error messages to print CPU model names instead of CPU type names. Signed-off-by: Gavin Sha

[PATCH v3 29/32] hw/arm/virt: Hide host CPU model for tcg

2023-09-06 Thread Gavin Shan
x-a15, cortex-a35, cortex-a55, cortex-a72, cortex-a76, a64fx, neoverse-n1, neoverse-v1, cortex-a53, cortex-a57, (null), max Hide 'host' CPU model until KVM or HVF is enabled. Signed-off-by: Gavin Shan --- hw/a

[PATCH v3 31/32] hw/arm: Check CPU type in machine_run_board_init()

2023-09-06 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan --- hw/arm/bananapi_m2u.c | 12 ++-- hw/arm/cubieboard.c | 12 ++-- hw/arm/mps2-tz.c

[PATCH v3 32/32] hw/riscv/shakti_c: Check CPU type in machine_run_board_init()

2023-09-06 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan --- hw/riscv/shakti_c.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/riscv/shakti_

Re: [PATCH v3 01/32] cpu: Add helper cpu_model_from_type()

2023-09-07 Thread Gavin Shan
On 9/7/23 18:54, Philippe Mathieu-Daudé wrote: On 7/9/23 02:35, Gavin Shan wrote: Add helper cpu_model_from_type() to extract the CPU model name from the CPU type name in two circumstances: (1) The CPU type name is the combination of the CPU model name and suffix. (2) The CPU type name is same

Re: [PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names

2023-09-07 Thread Gavin Shan
On 9/7/23 18:31, Thomas Huth wrote: On 07/09/2023 02.35, Gavin Shan wrote: For target/s390x, the CPU type name is always the combination of the CPU modle name and suffix. The CPU model names have been correctly s/modle/model/ Thanks, will be fixed in next respin. Thanks, Gavin

Re: [PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names

2023-09-07 Thread Gavin Shan
On 9/7/23 18:20, David Hildenbrand wrote: On 07.09.23 02:35, Gavin Shan wrote: For target/s390x, the CPU type name is always the combination of the CPU modle name and suffix. The CPU model names have been correctly shown in s390_print_cpu_model_list_entry() and create_cpu_model_list(). Use

Re: [PATCH v3 27/32] machine: Print CPU model name instead of CPU type name

2023-09-07 Thread Gavin Shan
On 9/7/23 19:05, Philippe Mathieu-Daudé wrote: On 7/9/23 02:35, Gavin Shan wrote: The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported, to be consistent with the output from '-cpu ?'. Correct the error messag

Re: [PATCH 3/4] hw/cpu: Introduce CPUClass::cpu_resolving_type field

2023-09-10 Thread Gavin Shan
Hi Philippe, On 9/8/23 21:22, Philippe Mathieu-Daudé wrote: Add a field to return the QOM type name of a CPU class. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 2 ++ hw/core/cpu-common.c| 2 +- target/alpha/cpu.c | 1 + target/arm/cpu.c| 1 + targ

Re: [PATCH 1/4] target/alpha: Tidy up alpha_cpu_class_by_name()

2023-09-10 Thread Gavin Shan
On 9/8/23 21:22, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) Reviewed-by: Gavin Shan diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 270ae787b1..351ee2e9f2 100644

Re: [PATCH 4/4] hw/cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()

2023-09-10 Thread Gavin Shan
On 9/8/23 21:22, Philippe Mathieu-Daudé wrote: Leverage the public CPUClass::cpu_resolving_type field and call object_class_dynamic_cast() once in cpu_class_by_name(). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 3 ++- target/alpha/cpu.c | 3 +-- target/arm/cpu.

Re: [PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names

2023-09-10 Thread Gavin Shan
On 9/8/23 21:23, Philippe Mathieu-Daudé wrote: On 8/9/23 10:04, Philippe Mathieu-Daudé wrote: On 8/9/23 01:44, Gavin Shan wrote: On 9/7/23 18:20, David Hildenbrand wrote: On 07.09.23 02:35, Gavin Shan wrote: For target/s390x, the CPU type name is always the combination of the CPU modle name

Re: [PATCH v3 27/32] machine: Print CPU model name instead of CPU type name

2023-09-10 Thread Gavin Shan
On 9/8/23 17:56, Philippe Mathieu-Daudé wrote: On 8/9/23 01:49, Gavin Shan wrote: On 9/7/23 19:05, Philippe Mathieu-Daudé wrote: On 7/9/23 02:35, Gavin Shan wrote: The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported,

Re: [PATCH 3/4] hw/cpu: Introduce CPUClass::cpu_resolving_type field

2023-09-11 Thread Gavin Shan
On 9/11/23 19:43, Philippe Mathieu-Daudé wrote: On 11/9/23 01:28, Gavin Shan wrote: On 9/8/23 21:22, Philippe Mathieu-Daudé wrote: Add a field to return the QOM type name of a CPU class. Signed-off-by: Philippe Mathieu-Daudé ---   include/hw/core/cpu.h   | 2 ++   hw/core/cpu-common.c

Re: [PATCH v5 00/31] Unified CPU type check

2023-11-17 Thread Gavin Shan
On 11/17/23 17:34, Philippe Mathieu-Daudé wrote: On 17/11/23 00:26, Gavin Shan wrote: On 11/17/23 02:20, Philippe Mathieu-Daudé wrote: On 16/11/23 14:35, Philippe Mathieu-Daudé wrote: I'm queuing patches 1-3 & 5-23 to my cpus-next tree. No need to repost them, please base them o

[PATCH v6 2/8] machine: Introduce helper is_cpu_type_supported()

2023-11-19 Thread Gavin Shan
nning of code. The error messages and comments are tweaked a bit either. No functional change intended. Signed-off-by: Gavin Shan --- v6: 'const MachineState *' in is_cpu_type_supported() (Phil) Clearer hint if only one valid CPU is supported (Phil) --- hw/core

[PATCH v6 0/8] Unified CPU type check

2023-11-19 Thread Gavin Shan
m Philippe Mathieu-Daudé, Leif Lindholm, Bastian Koppelmann, Daniel Henrique Barboza, Cédric Le Goater, Gavin Shan (Gavin) v3: * Generic helper cpu_model_from_type()(Igor) * Apply cpu_model_from_type() to the individu

[PATCH v6 1/8] machine: Use error handling when CPU type is checked

2023-11-19 Thread Gavin Shan
tions in the same function. No functional change intended. Suggested-by: Igor Mammedov Signed-off-by: Gavin Shan --- hw/core/machine.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 0c17398141..5b45dbbbd5 100644 --- a

[PATCH v6 5/8] hw/arm/virt: Check CPU type in machine_run_board_init()

2023-11-19 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do the check by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v6: Move valid_cpu_ty

[PATCH v6 8/8] hw/riscv/shakti_c: Check CPU type in machine_run_board_init()

2023-11-19 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé --- v6: Move valid_cpu_types[] to shakti_c_machine_class_init() (Phil) ---

[PATCH v6 7/8] hw/arm: Check CPU type in machine_run_board_init()

2023-11-19 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Richard Henderson --- v6: To have unified valid_cpu_types[] and move it to board's class_in

[PATCH v6 3/8] machine: Print CPU model name instead of CPU type

2023-11-19 Thread Gavin Shan
The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported, to be consistent with the output from '-cpu ?'. Correct the error messages to print CPU model names instead of CPU type names. Signed-off-by: Gavin Sha

[PATCH v6 6/8] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init()

2023-11-19 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm Reviewed-by: Richard Henderson --- v6: Move valid_cpu_ty

[PATCH v6 4/8] hw/arm/virt: Hide host CPU model for tcg

2023-11-19 Thread Gavin Shan
, the valid CPU models can be shown. qemu-system-aarch64: Invalid CPU type: cortex-a8 The valid types are: cortex-a7, cortex-a15, cortex-a35, \ cortex-a55, cortex-a72, cortex-a76, cortex-a710, a64fx, \ neoverse-n1, neoverse-v1, neoverse-n2, cortex-a53, \ cortex-a57, max Signed-off-b

Re: [PATCH-for-8.2? v2 2/4] hw/arm/stm32f405: Report error when incorrect CPU is used

2023-11-19 Thread Gavin Shan
eu-Daudé --- include/hw/arm/stm32f405_soc.h | 4 hw/arm/netduinoplus2.c | 7 ++- hw/arm/olimex-stm32-h405.c | 8 ++-- hw/arm/stm32f405_soc.c | 8 +--- 4 files changed, 13 insertions(+), 14 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH-for-8.2? v2 3/4] hw/arm/stm32f205: Report error when incorrect CPU is used

2023-11-19 Thread Gavin Shan
o2.c | 7 ++- hw/arm/stm32f205_soc.c | 9 ++--- 3 files changed, 8 insertions(+), 12 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH-for-8.2? v2 4/4] hw/arm/stm32f100: Report error when incorrect CPU is used

2023-11-19 Thread Gavin Shan
/stm32f100_soc.h | 4 hw/arm/stm32f100_soc.c | 9 ++--- hw/arm/stm32vldiscovery.c | 7 ++- 3 files changed, 8 insertions(+), 12 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH v6 0/8] Unified CPU type check

2023-11-20 Thread Gavin Shan
On 11/21/23 05:42, Marcin Juszkiewicz wrote: W dniu 20.11.2023 o 01:27, Gavin Shan pisze: Testing === With the following command lines, the output messages are varied before and after the series is applied.    ./build/qemu-system-aarch64    \    -accel tcg -machine virt,gic

Re: [PATCH for-9.0] hw: Add compat machines for 9.0

2023-11-21 Thread Gavin Shan
insertions(+), 9 deletions(-) For hw/arm/virt.c Reviewed-by: Gavin Shan

[PATCH v7 0/8] Unified CPU type check

2023-11-26 Thread Gavin Shan
(Philippe) * Collected r-bs from Philippe Mathieu-Daudé, Leif Lindholm, Bastian Koppelmann, Daniel Henrique Barboza, Cédric Le Goater, Gavin Shan (Gavin) v3: * Generic helper cpu_model_from_type()(Igor) * Apply cpu_

[PATCH v7 4/8] hw/arm/virt: Hide host CPU model for tcg

2023-11-26 Thread Gavin Shan
, the valid CPU models can be shown. qemu-system-aarch64: Invalid CPU type: cortex-a8 The valid types are: cortex-a7, cortex-a15, cortex-a35, \ cortex-a55, cortex-a72, cortex-a76, cortex-a710, a64fx, \ neoverse-n1, neoverse-v1, neoverse-n2, cortex-a53, \ cortex-a57, max Signed-off-b

[PATCH v7 7/8] hw/arm: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Richard Henderson --- hw/arm/bananapi_m2u.c | 12 ++-- hw/arm/cubieboard.c | 12 ++--

[PATCH v7 2/8] machine: Introduce helper is_cpu_type_supported()

2023-11-26 Thread Gavin Shan
nning of code. The error messages and comments are tweaked a bit either. No functional change intended. Signed-off-by: Gavin Shan --- hw/core/machine.c | 90 +++ 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/hw/core/machine.c b/hw

[PATCH v7 6/8] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm Reviewed-by: Richard Henderson --- hw/arm/sbsa-re

[PATCH v7 3/8] machine: Print CPU model name instead of CPU type

2023-11-26 Thread Gavin Shan
The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported, to be consistent with the output from '-cpu ?'. Correct the error messages to print CPU model names instead of CPU type names. Signed-off-by: Gavin Sha

[PATCH v7 1/8] machine: Use error handling when CPU type is checked

2023-11-26 Thread Gavin Shan
tions in the same function. No functional change intended. Suggested-by: Igor Mammedov Signed-off-by: Gavin Shan --- v7: Add 'return' after error_propagate() to avoid calling into mc->init() in the failing case(Marcin) --- hw/core/machine.c | 15 +-

[PATCH v7 8/8] hw/riscv/shakti_c: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do it by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé --- hw/riscv/shakti_c.c | 13 ++--- 1 file changed, 6 insertions(+), 7 d

[PATCH v7 5/8] hw/arm/virt: Check CPU type in machine_run_board_init()

2023-11-26 Thread Gavin Shan
Set mc->valid_cpu_types so that the user specified CPU type can be validated in machine_run_board_init(). We needn't to do the check by ourselves. Signed-off-by: Gavin Shan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/vir

Re: [PATCH 01/21] accel/kvm: Make kvm_has_guest_debug static

2023-11-26 Thread Gavin Shan
On 11/23/23 15:41, Richard Henderson wrote: This variable is not used or declared outside kvm-all.c. Signed-off-by: Richard Henderson --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Gavin Shan

Re: [PATCH 02/21] target/arm: kvm64: remove a redundant KVM_CAP_SET_GUEST_DEBUG probe

2023-11-26 Thread Gavin Shan
Message-Id: <20231025070726.22689-1-duc...@eswincomputing.com> Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 03/21] target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 8 target/arm/kvm.c | 8 +++- target/arm/kvm64.c | 12 3 files changed, 7 insertions(+), 21 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 04/21] target/arm/kvm: Move kvm_arm_verify_ext_dabt_pending and unexport

2023-11-26 Thread Gavin Shan
(+), 59 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 05/21] target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 10 -- target/arm/kvm.c | 24 target/arm/kvm64.c | 17 - 3 files changed, 24 insertions(+), 27 deletions(-) Reviewed-by: Gavin

Re: [PATCH 06/21] target/arm/kvm: Move kvm_arm_hw_debug_active and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 8 target/arm/kvm.c | 11 +++ target/arm/kvm64.c | 5 - 3 files changed, 11 insertions(+), 13 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 07/21] target/arm/kvm: Move kvm_arm_handle_debug and unexport

2023-11-26 Thread Gavin Shan
(+), 79 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 08/21] target/arm/kvm: Unexport kvm_arm_{get, put}_virtual_time

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 16 target/arm/kvm.c | 16 ++-- 2 files changed, 14 insertions(+), 18 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 09/21] target/arm/kvm: Inline kvm_arm_steal_time_supported

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: This function is only used once, and is quite simple. Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 13 - target/arm/kvm64.c | 7 +-- 2 files changed, 1 insertion(+), 19 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 10/21] target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport

2023-11-26 Thread Gavin Shan
(+), 276 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 11/21] target/arm/kvm: Use a switch for kvm_arm_cpreg_level

2023-11-26 Thread Gavin Shan
-by: Gavin Shan diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 504526b24c..61fb9dbde0 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -361,32 +361,18 @@ bool kvm_arm_reg_syncs_via_cpreg_list(uint64_t regidx) } } -typedef struct CPRegStateLevel { -uint64_t

Re: [PATCH 12/21] target/arm/kvm: Move kvm_arm_cpreg_level and unexport

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 9 - target/arm/kvm.c | 22 ++ target/arm/kvm64.c | 15 --- 3 files changed, 22 insertions(+), 24 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 13/21] target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport

2023-11-26 Thread Gavin Shan
following nits addressed: Reviewed-by: Gavin Shan diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 2755ee8366..1043123cc7 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -77,16 +77,6 @@ void kvm_arm_register_device(MemoryRegion *mr, uint64_t devid, uint64_t group

Re: [PATCH 14/21] target/arm/kvm: Merge kvm64.c into kvm.c

2023-11-26 Thread Gavin Shan
| 820 - target/arm/meson.build | 2 +- 3 files changed, 790 insertions(+), 821 deletions(-) delete mode 100644 target/arm/kvm64.c With Phil's comments addressed: Reviewed-by: Gavin Shan

Re: [PATCH 15/21] target/arm/kvm: Unexport kvm_arm_vcpu_init

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 12 target/arm/kvm.c | 12 +++- 2 files changed, 11 insertions(+), 13 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 16/21] target/arm/kvm: Unexport kvm_arm_vcpu_finalize

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 14 -- target/arm/kvm.c | 14 +- 2 files changed, 13 insertions(+), 15 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 17/21] target/arm/kvm: Unexport kvm_arm_init_cpreg_list

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 12 target/arm/kvm.c | 10 -- 2 files changed, 8 insertions(+), 14 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 18/21] target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init

2023-11-26 Thread Gavin Shan
changed, 4 insertions(+), 17 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 19/21] target/arm/kvm: Unexport kvm_{get,put}_vcpu_events

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 20 target/arm/kvm.c | 20 ++-- 2 files changed, 18 insertions(+), 22 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 20/21] target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}

2023-11-26 Thread Gavin Shan
deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH 21/21] target/arm/kvm: Unexport kvm_arm_vm_state_change

2023-11-26 Thread Gavin Shan
On 11/23/23 15:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/arm/kvm_arm.h | 2 -- target/arm/kvm.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH-for-9.0 01/16] hw/intc/arm_gicv3: Include missing 'qemu/error-report.h' header

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: kvm_arm_its_reset_hold() calls warn_report(), itself declared in "qemu/error-report.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/arm_gicv3_its_kvm.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Gavin Shan

Re: [PATCH-for-9.0 02/16] target/arm/kvm: Remove unused includes

2023-11-26 Thread Gavin Shan
On 11/24/23 05:35, Philippe Mathieu-Daudé wrote: Both MemoryRegion and Error types are forward declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Gavin Shan

Re: [PATCH-for-9.0 03/16] target/arm/kvm: Have kvm_arm_add_vcpu_properties take a ARMCPU argument

2023-11-26 Thread Gavin Shan
target/arm/kvm_arm.h | 4 ++-- target/arm/cpu.c | 2 +- target/arm/kvm.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) With the following comments resolved: Reviewed-by: Gavin Shan diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 50967f4ae9..6fb8a5f67e

<    3   4   5   6   7   8   9   10   11   >