[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1() |
Date: |
Wed, 03 Oct 2012 16:40:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 03/10/2012 15:28, Eduardo Habkost ha scritto:
> It would be interesting to make the generic machine intialization code
> create a machine object instead, but changing the machine initialization
> function signature is a nightmare, so by now I am creating the object
> inside pc_init1().
>
> The object is not used for anything by now, but it will be used during
> some steps of the initialization, later.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> hw/pc_piix.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index fd5898f..28b5f8a 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -148,6 +148,7 @@ static void pc_init1(MemoryRegion *system_memory,
> MemoryRegion *pci_memory;
> MemoryRegion *rom_memory;
> void *fw_cfg = NULL;
> + PC *pc = PC(object_new(TYPE_PC_MACHINE));
>
> pc_cpus_init(cpu_model);
>
> @@ -285,6 +286,8 @@ static void pc_init1(MemoryRegion *system_memory,
> if (pci_enabled) {
> pc_pci_device_init(pci_bus);
> }
> +
> + qdev_init_nofail(DEVICE(pc));
> }
>
> static void pc_init_pci(ram_addr_t ram_size,
>
Can you add a hook to QEMUMachine so that this object is created by
qdev_get_machine() and ends up at /machine?
Paolo
- Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class, (continued)
[Qemu-devel] [RFC 04/18] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 06/18] hw/apic.c: rename bit functions to not conflict with bitops.h (v2), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 05/18] cpus.h: include qemu-stdio.h, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1(), Eduardo Habkost, 2012/10/03
- Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1(),
Paolo Bonzini <=
[Qemu-devel] [RFC 16/18] tests: support target-specific unit tests, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 11/18] target-i386: cpu_x86_init: allow APIC ID to be set by caller, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 07/18] kvm: create kvm_arch_vcpu_id() function, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 13/18] pc: set explicit APIC ID for CPUs, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 15/18] pc: set fw_cfg data based on APIC ID calculation (v2), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 14/18] pc: create apic_id_for_cpu() function (v3), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 18/18] pc: generate APIC IDs according to CPU topology (v3), Eduardo Habkost, 2012/10/03