[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Int
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 5/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Introduce post-cpu-init function |
Date: |
Sun, 09 Jun 2013 00:10:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Am 07.06.2013 19:28, schrieb Jason J. Herne:
> From: "Jason J. Herne" <address@hidden>
>
> In preparation for treating cpus as devices
CPUs *are* devices since multiple releases now, so this is badly put.
> we need to separate machine
> initialization into two stages:
> 1. Initialization that needs to be done before cpu devices can be created.
> 2. Initialization that requires cpu devices to already be created.
>
> This is accomplished by creating an optional post-cpu initialization function
> for QEMUMachine.
Whatever you are using it for, this sounds wrong to me.
Machine init is supposed to use less code and more QOM infrastructure,
with a future goal of replacing most code with a config file
instantiating and wiring up devices.
And please don't forget to CC me on the next CPU series.
Regards,
Andreas
>
> Signed-off-by: Jason J. Herne <address@hidden>
> ---
> include/hw/boards.h | 3 ++-
> vl.c | 4 ++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index fb7c6f1..ed427a1 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -19,7 +19,7 @@ typedef struct QEMUMachineInitArgs {
> } QEMUMachineInitArgs;
>
> typedef void QEMUMachineInitFunc(QEMUMachineInitArgs *args);
> -
> +typedef void QEMUMachineInitPostCpusFunc(void);
> typedef void QEMUMachineResetFunc(void);
>
> typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
> @@ -29,6 +29,7 @@ typedef struct QEMUMachine {
> const char *alias;
> const char *desc;
> QEMUMachineInitFunc *init;
> + QEMUMachineInitPostCpusFunc *post_cpu_init;
> QEMUMachineResetFunc *reset;
> QEMUMachineHotAddCPUFunc *hot_add_cpu;
> BlockInterfaceType block_default_type;
> diff --git a/vl.c b/vl.c
> index 47ab45d..71e1e6d 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4305,6 +4305,10 @@ int main(int argc, char **argv, char **envp)
> .cpu_model = cpu_model };
> machine->init(&args);
>
> + if (machine->post_cpu_init) {
> + machine->post_cpu_init();
> + }
> +
> audio_init();
>
> cpu_synchronize_all_post_init();
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH 0/8] [PATCH RFC v2] s390-qemu: cpu hotplug, Jason J. Herne, 2013/06/07
- [Qemu-devel] [PATCH 4/8] [PATCH RFC v2] s390-qemu: cpu hotplug - ipi_states enhancements, Jason J. Herne, 2013/06/07
- [Qemu-devel] [PATCH 5/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Introduce post-cpu-init function, Jason J. Herne, 2013/06/07
- Re: [Qemu-devel] [PATCH 5/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Introduce post-cpu-init function,
Andreas Färber <=
- [Qemu-devel] [PATCH 3/8] [PATCH RFC v2] s390-qemu: cpu hotplug - SCLP Event integration, Jason J. Herne, 2013/06/07
- [Qemu-devel] [PATCH 2/8] [PATCH RFC v2] s390-qemu: cpu hotplug - SCLP CPU Info, Jason J. Herne, 2013/06/07
- [Qemu-devel] [PATCH 7/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Infrastructure for Cpu Devices, Jason J. Herne, 2013/06/07
- [Qemu-devel] [PATCH 8/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Treat S390 cpus as devices, Jason J. Herne, 2013/06/07