[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/15] target/arm/monitor: Replace current_machine by qdev_ge
From: |
Alistair Francis |
Subject: |
Re: [PATCH 08/15] target/arm/monitor: Replace current_machine by qdev_get_machine() |
Date: |
Sun, 12 Jan 2020 17:47:04 +0800 |
On Thu, Jan 9, 2020 at 11:23 PM Philippe Mathieu-Daudé
<address@hidden> wrote:
>
> As we want to remove the global current_machine,
> replace 'current_machine' by MACHINE(qdev_get_machine()).
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> target/arm/monitor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/arm/monitor.c b/target/arm/monitor.c
> index fa054f8a36..bcbf69802d 100644
> --- a/target/arm/monitor.c
> +++ b/target/arm/monitor.c
> @@ -136,7 +136,8 @@ CpuModelExpansionInfo
> *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
> }
>
> if (kvm_enabled()) {
> - const char *cpu_type = current_machine->cpu_type;
> + MachineState *ms = MACHINE(qdev_get_machine());
> + const char *cpu_type = ms->cpu_type;
> int len = strlen(cpu_type) - strlen(ARM_CPU_TYPE_SUFFIX);
> bool supported = false;
>
> --
> 2.21.1
>
>
- Re: [PATCH 04/15] hw/ppc/spapr_rtas: Restrict variables scope to single switch case, (continued)
- [PATCH 05/15] device-hotplug: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 06/15] migration/savevm: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 07/15] hw/core/machine-qmp-cmds: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 08/15] target/arm/monitor: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- Re: [PATCH 08/15] target/arm/monitor: Replace current_machine by qdev_get_machine(),
Alistair Francis <=
- [PATCH 09/15] device_tree: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 10/15] memory: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 11/15] exec: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 12/15] accel: Introduce the current_accel() method, Philippe Mathieu-Daudé, 2020/01/09