[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 6/6] target-i386: make cpus childs of /machi
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH RFC 6/6] target-i386: make cpus childs of /machine |
Date: |
Tue, 17 Apr 2012 06:04:04 -0400 (EDT) |
----- Original Message -----
> From: "Paolo Bonzini" <address@hidden>
> To: "Igor Mammedov" <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden, "jan kiszka"
> <address@hidden>
> Sent: Tuesday, April 17, 2012 9:19:44 AM
> Subject: Re: [PATCH RFC 6/6] target-i386: make cpus childs of /machine
>
> Il 17/04/2012 01:37, Igor Mammedov ha scritto:
> > From: Igor Mammedov <address@hidden>
> >
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> > target-i386/helper.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/target-i386/helper.c b/target-i386/helper.c
> > index de7637c..1996b97 100644
> > --- a/target-i386/helper.c
> > +++ b/target-i386/helper.c
> > @@ -1134,6 +1134,7 @@ CPUX86State *cpu_x86_init(const char
> > *cpu_model)
> > X86CPU *cpu;
> > CPUX86State *env;
> > Error *errp = NULL;
> > + char cpuname[8];
> >
> > cpu = X86_CPU(object_new(TYPE_X86_CPU));
> > env = &cpu->env;
> > @@ -1146,6 +1147,9 @@ CPUX86State *cpu_x86_init(const char
> > *cpu_model)
> > }
> > }
> >
> > + snprintf(cpuname, sizeof(cpuname), "cpu%d",
> > env->cpuid_apic_id);
> > + object_property_add_child(container_get("/machine"), cpuname,
> > OBJECT(cpu), NULL);
> > +
> > object_property_set_bool(OBJECT(cpu), true, "realized",
> > &errp);
> > if (errp) {
> > object_delete(OBJECT(cpu));
>
> I think the right name would be /machine/cpu[%d]/cpu. The local APIC
> for example should reside under /machine/cpu[%d]/apic.
APIC is a child of cpu, see [4/6]
>
> Paolo
>
- [Qemu-devel] [PATCH RFC 0/6] target-i386: use realize for cpu initialization, Igor Mammedov, 2012/04/16
- [Qemu-devel] [PATCH RFC 1/6] target-i386: move cpu halted decision into x86_cpu_reset, Igor Mammedov, 2012/04/16
- [Qemu-devel] [PATCH RFC 2/6] target-i386: add cpu-model property to x86_cpu, Igor Mammedov, 2012/04/16
- [Qemu-devel] [PATCH RFC 3/6] pc: move apic_mapped intialization into common apic init code, Igor Mammedov, 2012/04/16
- [Qemu-devel] [PATCH RFC 4/6] target-i386: convert cpu to 2-stage initialization, Igor Mammedov, 2012/04/16
- [Qemu-devel] [PATCH RFC 6/6] target-i386: make cpus childs of /machine, Igor Mammedov, 2012/04/16
- [Qemu-devel] [PATCH RFC 5/6] target-i386: move reset callback to cpu.c, Igor Mammedov, 2012/04/16
Re: [Qemu-devel] [PATCH RFC 0/6] target-i386: use realize for cpu initialization, Andreas Färber, 2012/04/17