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
-off-by: Gavin Shan
Reviewed-by: Daniel Henrique Barboza
---
target/riscv/cpu.c| 14 --
target/riscv/riscv-qmp-cmds.c | 3 +--
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 8b4024338c..9f47379145 100644
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
For target/cris, the registered CPU type name is always the combination
of the CPU model name and suffix. Use cpu_model_from_type() to show the
CPU model names.
Signed-off-by: Gavin Shan
---
target/cris/cpu.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/cris
For target/tricore, the registered CPU type name is always the
combination of the CPU model name and suffix. Use cpu_model_from_type()
to show the CPU model names.
Signed-off-by: Gavin Shan
Reviewed-by: Bastian Koppelmann
---
target/tricore/helper.c | 13 +
1 file changed, 5
For target/i386, the registered CPU type name is always the
combination of the CPU model name and suffix. Use cpu_model_from_type()
to convert the CPU type name to the CPU model name.
Signed-off-by: Gavin Shan
---
target/i386/cpu.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions
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é
---
hw/arm/virt.c | 21 +++--
1 file changed, 3 insertions(+),
Constify MachineClass::valid_cpu_types[i], as suggested by Richard
Henderson.
Suggested-by: Richard Henderson
Signed-off-by: Gavin Shan
Reviewed-by: Philippe Mathieu-Daudé
---
hw/m68k/q800.c | 2 +-
include/hw/boards.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
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
of the staticly
defined array.
Signed-off-by: Gavin Shan
---
target/mips/cpu-defs.c.inc | 9 -
target/mips/cpu.c | 18 ++
target/mips/sysemu/mips-qmp-cmds.c | 3 +--
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/target/mips/cpu-defs.c.inc b
For target/s390x, the registered CPU type name is always the
combination of the CPU model name and suffix. Use cpu_model_from_type()
to show the CPU model names.
Signed-off-by: Gavin Shan
---
target/s390x/cpu_models.c| 12 ++--
target/s390x/cpu_models_sysemu.c | 9 -
2
model name.
Signed-off-by: Gavin Shan
---
target/sh4/cpu.c | 23 ---
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
index a8ec98b134..6097ddd52d 100644
--- a/target/sh4/cpu.c
+++ b/target/sh4/cpu.c
@@ -125,9 +125,10 @@ s
For target/arm, the registered CPU type name is always the combination
of the CPU model name and suffix. Use cpu_model_from_type() to show the
CPU model names. In arm_cpu_list_entry(), @name is renamed to @model
since it points to CPU model name instead of CPU type name.
Signed-off-by: Gavin Shan
For target/openrisc, the registered CPU type name is always the
combination of the CPU model name and suffix. Use cpu_model_from_type()
to show the CPU model names.
Signed-off-by: Gavin Shan
---
target/openrisc/cpu.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff
For target/hexagon, the registered CPU type name is always the
combination of the CPU model name and suffix. Use cpu_model_from_type()
to show the CPU model names.
Signed-off-by: Gavin Shan
---
target/hexagon/cpu.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git
From: Philippe Mathieu-Daudé
Let CPUClass::class_by_name() handlers to return abstract classes,
and filter them once in the public cpu_class_by_name() method.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Gavin Shan
---
hw/core/cpu-common.c | 8 +++-
include/hw/core/cpu.h | 7
the
CPU type name to the CPU model name.
Suggested-by: Igor Mammedov
Signed-off-by: Gavin Shan
---
cpu-target.c | 16
include/hw/core/cpu.h | 12
2 files changed, 28 insertions(+)
diff --git a/cpu-target.c b/cpu-target.c
index 876b498233..344bad5736 100644
For target/avr, the registered CPU type name is always the combination
of the CPU model name and suffix. Use cpu_model_from_type() to show the
CPU model names. Besides, the conversion from CPU model name to CPU type
name needs to be supported in avr_cpu_class_by_name().
Signed-off-by: Gavin Shan
For target/alpha, the registered CPU type name is always the combination
of the CPU model name and suffix. Use cpu_model_from_type() to show the
CPU model names instead of the CPU type names.
Signed-off-by: Gavin Shan
---
target/alpha/cpu.c | 6 --
1 file changed, 4 insertions(+), 2
() for individual
target. In order to make CPU_RESOLVING_TYPE visible to cpu_class_by_name(),
the helper has to be moved to cpu-target.c
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Gavin Shan
---
cpu-target.c | 15 +++
hw/core/cpu-common.c | 14 --
target/arm
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_model_from_type() to the indiv
pe Mathieu-Daudé
Reviewed-by: Gavin Shan
---
target/alpha/cpu.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index 51b7d8d1bf..c7ae4d6a41 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -142,13 +142,10 @@ static O
Hi Salil,
On 10/12/23 10:04, Salil Mehta wrote:
On 12/10/2023 00:31, Gavin Shan wrote:
On 10/12/23 05:43, Salil Mehta wrote:
[...]
+void cpu_address_space_destroy(CPUState *cpu, int asidx)
+{
+ CPUAddressSpace *cpuas;
+
+ assert(asidx < cpu->num_ases);
+ assert(asid
/gdbstub.h | 5 +
2 files changed, 20 insertions(+)
With the following nits addressed:
Reviewed-by: Gavin Shan
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 349d348c7b..97b89e2d00 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -491,6 +491,21 @@ void
ftmmu/
directory as system/"). So please consider leveraging the respin chance
to address the following minor comments. With that,
Reviewed-by: Gavin Shan
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 41788c0bdd..eb56a228a2 100644
--- a/include/exec/cpu-comm
-events | 4 +++
include/sysemu/kvm.h | 16 +++
3 files changed, 69 insertions(+), 15 deletions(-)
With the following one comment addressed:
Reviewed-by: Gavin Shan
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index ff1578bb32..0dcaa15276 100644
--- a/accel/kvm/kvm-all.c
Hi Philippe,
On 10/11/23 13:28, Philippe Mathieu-Daudé wrote:
On 25/9/23 02:24, Gavin Shan wrote:
On 9/12/23 08:40, Gavin Shan wrote:
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
On 10/11/23 00:24, Cornelia Huck wrote:
We can use read_sys_reg64 to get the SVE_VLS register instead of
calling GET_ONE_REG directly.
Suggested-by: Gavin Shan
Signed-off-by: Cornelia Huck
---
target/arm/kvm64.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
Reviewed
Hi Salil,
On 10/3/23 02:20, Salil Mehta wrote:
From: Gavin Shan
Sent: Wednesday, September 27, 2023 7:52 AM
To: Salil Mehta ; qemu-devel@nongnu.org; qemu-
a...@nongnu.org
Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron
; lpieral...@kernel.org;
peter.mayd...@linaro.org
Hi Salil,
On 10/2/23 20:21, Salil Mehta wrote:
From: Gavin Shan
Sent: Wednesday, September 27, 2023 4:54 AM
To: Salil Mehta ; qemu-devel@nongnu.org; qemu-
a...@nongnu.org
Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron
; lpieral...@kernel.org;
peter.mayd...@linaro.org
Hi Salil,
On 10/2/23 19:53, Salil Mehta wrote:
Many thanks for taking pains to review this patch-set.
No worries.
From: Gavin Shan
Sent: Wednesday, September 27, 2023 12:57 AM
To: Salil Mehta ; qemu-devel@nongnu.org;
qemu-...@nongnu.org
Cc: m...@kernel.org; jean-phili...@linaro.org
. Force mp_state synchronization.
Signed-off-by: Jean-Philippe Brucker
Signed-off-by: Salil Mehta
Reviewed-by: Alex Bennée
---
target/arm/kvm.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Gavin Shan
insertions(+)
With the following nits addressed:
Reviewed-by: Gavin Shan
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 349d348c7b..89ac0edfea 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -491,6 +491,20 @@ void gdb_register_coprocessor(CPUState *cpu,
}
}
+void
On 9/30/23 10:19, Salil Mehta wrote:
Virtual CPU Hot-unplug leads to unrealization of a CPU object. This also
involves destruction of the CPU AddressSpace. Add common function to help
destroy the CPU AddressSpace.
Signed-off-by: Salil Mehta
---
include/exec/cpu-common.h | 8
Signed-off-by: Salil Mehta
---
hw/acpi/generic_event_device.c | 10 ++
1 file changed, 10 insertions(+)
Reviewed-by: Gavin Shan
method with the call to
\\_SB.CPUS.CSCN which will do above.
Co-developed-by: Keqian Zhu
Signed-off-by: Keqian Zhu
Signed-off-by: Salil Mehta
---
hw/acpi/generic_event_device.c | 4
include/hw/acpi/cpu_hotplug.h | 2 ++
2 files changed, 6 insertions(+)
Reviewed-by: Gavin Shan
improved to address Jonathan's comments why
@event_handler_method
won't be needed on aarch64:
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 45defdc0e2..66a71660ec 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -338,9 +338,10 @@ const VMStateDescription
-by: Gavin Shan
-stub.c | 6 ++
1 file changed, 6 insertions(+)
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/acpi-cpu-hotplug-stub.c b/hw/acpi/acpi-cpu-hotplug-stub.c
index 3fc4b14c26..c6c61bb9cd 100644
--- a/hw/acpi/acpi-cpu-hotplug-stub.c
+++ b/hw/acpi/acpi-cpu-hotplug-stub.c
@@ -19,6 +19,12 @@ void
| 2 +-
include/hw/acpi/cpu_hotplug.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Gavin Shan
On 9/30/23 10:19, Salil Mehta wrote:
KVM vCPU creation is done once during the initialization of the VM when Qemu
threads are spawned. This is common to all the architectures.
^^^
thread is spawned.
Hot-unplug of vCPU results in destruction of the vCPU objects in QOM but
Hi Salil,
On 9/26/23 20:36, Salil Mehta wrote:
Physical CPU hotplug results in (un)setting of ACPI _STA.Present bit. AARCH64
platforms do not support physical CPU hotplug. Virtual CPU hotplug support being
implemented toggles ACPI _STA.Enabled Bit to achieve hotplug functionality. This
is not
Hi Salil,
On 9/26/23 20:36, Salil Mehta wrote:
From: Author Salil Mehta
Add registration and Handling of HVC/SMC hypercall exits to VMM
Co-developed-by: Salil Mehta
Signed-off-by: Salil Mehta
Co-developed-by: Jean-Philippe Brucker
Signed-off-by: Jean-Philippe Brucker
Signed-off-by: Salil
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
During any vCPU hot-(un)plug, running guest VM needs to be intimated about the
new vCPU being added or request the deletion of the vCPU which is already part
of the guest VM. This is done using the ACPI GED event which eventually gets
demultiplexed
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
Add CPU hot-unplug hooks and update hotplug hooks with additional sanity checks
for use in hotplug paths.
Note, Functional contents of the hooks(now left with TODO comment) shall be
gradually filled in the subsequent patches in an incremental
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
During machvirt_init(), QOM ARMCPU objects are also pre-created along with the
corresponding KVM vCPUs in the host for all possible vCPUs. This necessary
because of the architectural constraint, KVM restricts the deferred creation of
the KVM vCPUs
addressed:
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index e1299696d3..217db99538 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -715,11 +715,13 @@ void build_cpus_aml(Aml *table, MachineState *machine,
CPUHotplugFeatures opts,
aml_append(dev, method
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
Changes required during building of MADT Table by QEMU to accomodate disabled
possible vCPUs. This info shall be used by the guest kernel to size up its
resources during boot time. This pre-sizing of the guest kernel done on
possible vCPUs will
changed, 6 insertions(+)
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index b84602b238..ad252e6a91 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -108,6 +108,10 @@ void build_ged_aml(Aml *table, const
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
ACPI AML changes to properly reflect the _STA.PRES and _STA.ENA Bits to the
guest during initialzation, when CPUs are hotplugged and after CPUs are
hot-unplugged.
Signed-off-by: Salil Mehta
---
hw/acpi/cpu.c | 49
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
ARM arch does not allow CPUs presence to be changed [1] after kernel has booted.
Hence, firmware/ACPI/Qemu must ensure persistent view of the vCPUs to the Guest
kernel even when they are not present in the QoM i.e. are unplugged or are
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
Support of vCPU Hotplug requires sequence of ACPI handshakes between Qemu and
Guest kernel when a vCPU is plugged or unplugged. Most of the AML code to
support these handshakes already exists. This AML need to be build during VM
init for ARM
in build_cpus_aml(), as part of the generic container device
(\\_SB.PCI0 or \\_SB.PRES).
Adapt build_cpus_aml() so that IO region and memory region can be handled
in the mean while.
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index d5ba37b209..232720992d 100644
--- a/hw/acpi/cpu.c
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
ACPI CPU hotplug state (is_present=_STA.PRESENT, is_enabled=_STA.ENABLED) for
all the possible vCPUs MUST be initialized during machine init. This is done
during the creation of the GED device. VMM/Qemu MUST expose/fake the ACPI state
of the
exchanges between Qemu/VMM and the guest.
Signed-off-by: Salil Mehta
---
hw/arm/virt.c | 5 -
include/hw/arm/virt.h | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
The changes look good to me:
Reviewed-by: Gavin Shan
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index
changes look good to me with the following nits addressed:
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index a3d31631fe..d2fa1d0e4a 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -25,6 +25,7 @@ static
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
ACPI CPU Hotplug code assumes a virtual CPU is unplugged if the CPUState object
is absent in the list of ths possible CPUs(CPUArchIdList *possible_cpus)
maintained on per-machine basis. Use the earlier introduced qemu_present_cpu()
API to check
| 6 ++
1 file changed, 6 insertions(+)
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/acpi-cpu-hotplug-stub.c b/hw/acpi/acpi-cpu-hotplug-stub.c
index 3fc4b14c26..c6c61bb9cd 100644
--- a/hw/acpi/acpi-cpu-hotplug-stub.c
+++ b/hw/acpi/acpi-cpu-hotplug-stub.c
@@ -19,6 +19,12 @@ void
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
ACPI is required to interface QEMU with the guest. Roughly falls into below
cases,
1. Convey the possible vcpus config at the machine init time to the guest
using various DSDT tables like MADT etc.
2. Convey vcpu hotplug events to guest(using
to a header file.
Signed-off-by: Salil Mehta
---
hw/acpi/cpu.c | 2 +-
include/hw/acpi/cpu_hotplug.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Gavin Shan
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 19c154d78f..45defdc0e2 100644
--- a/hw/acpi
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
GIC needs to be pre-sized with possible vcpus at the initialization time. This
is necessary because Memory regions and resources associated with GICC/GICR
etc cannot be changed (add/del/modified) after VM has inited. Also, GIC_TYPER
needs to be
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
In ARMv8 architecture, GIC needs all the vCPUs to be created and present when
it is initialized. This is because:
1. GICC and MPIDR association must be fixed at the VM initialization time.
This is represented by register GIC_TYPER(mp_afffinity,
cleaned up the code
to not depend on virt board internals but forgot to also remove the
now-redundant include line.
Signed-off-by: Peter Maydell
---
target/arm/kvm64.c | 1 -
1 file changed, 1 deletion(-)
Reviewed-by: Gavin Shan
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
KVM vCPU creation is done once during the initialization of the VM when Qemu
threads are spawned. This is common to all the architectures. If the
architecture
supports vCPU hot-{un}plug then this KVM vCPU creation could be deferred to
later point
Mehta
Signed-off-by: Salil Mehta
Co-developed-by: Keqian Zhu
Signed-off-by: Keqian Zhu
Reported-by: Gavin Shan
^
[GS: pointed the assertion due to wrong range check]
Signed-off-by: Salil Mehta
---
hw/arm/virt.c
-by: Salil Mehta
Signed-off-by: Salil Mehta
Co-developed-by: Keqian Zhu
Signed-off-by: Keqian Zhu
Reported-by: Gavin Shan
[GS: pointed the assertion due to wrong range check]
Signed-off-by: Salil Mehta
---
hw/arm/virt.c | 149 -
target/arm/cpu.c
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
Factor out CPU properties code common for {hot,cold}-plugged CPUs. This allows
code reuse.
Signed-off-by: Salil Mehta
---
hw/arm/virt.c | 220 ++
include/hw/arm/virt.h | 4 +
2 files changed,
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
Adds various utility functions which might be required to fetch or check the
state of the possible vCPUs. This also introduces concept of *disabled* vCPUs,
which are part of the *possible* vCPUs but are not part of the *present* vCPU.
This state
Hi Salil,
On 9/26/23 20:04, Salil Mehta wrote:
This shall be used to store user specified topology{socket,cluster,core,thread}
and shall be converted to a unique 'vcpu-id' which is used as slot-index during
hot(un)plug of vCPU.
Note that we don't have 'vcpu-id' property. It's actually the
Hi Salil,
On 9/26/23 06:21, Salil Mehta wrote:
From: Russell King
Sent: Monday, September 25, 2023 9:13 PM
To: Salil Mehta
Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org;
james.mo...@arm.com; jean-phili...@linaro.org; Jonathan Cameron
; lorenzo.pieral...@linaro.com;
Hi Philippe,
On 9/12/23 08:40, Gavin Shan wrote:
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
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
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
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
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 +--
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
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 +
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 messages to print CPU
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
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
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
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_c.c b
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|
-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/arm/virt.c | 2 ++
1 file changed, 2
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 Shan
---
hw/core
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/arm/s
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/arm/vir
ons 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/hw/c
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
index
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
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
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
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
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
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 acaf8c905f
() is 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.c b/target
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 insertions(+), 1
model 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.
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
, 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..ff0ced1f3d
201 - 300 of 971 matches
Mail list logo