qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
To: "Andreas Färber" <afaerber@suse.de>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>
Cc: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>,
	Andrew Jones <drjones@redhat.com>,
	qemu-devel@nongnu.org, tangchen@cn.fujitsu.com,
	isimatu.yasuaki@jp.fujitsu.com,
	Paolo Bonzini <pbonzini@redhat.com>,
	guz.fnst@cn.fujitsu.com, anshul.makkar@profitbricks.com
Subject: Re: [Qemu-devel] [PATCH v3 6/7] cpu: add device_add foo-x86_64-cpu support
Date: Fri, 6 Feb 2015 13:27:48 +0800	[thread overview]
Message-ID: <54D450D4.2090300@cn.fujitsu.com> (raw)
In-Reply-To: <54CA6250.1010402@suse.de>


On 01/30/2015 12:39 AM, Andreas Färber wrote:
> Am 29.01.2015 um 17:01 schrieb Eduardo Habkost:
>> On Thu, Jan 29, 2015 at 03:46:03PM +0100, Igor Mammedov wrote:
>> [...]
>>>> @@ -2742,7 +2776,14 @@ static void x86_cpu_apic_create(X86CPU *cpu, Error **errp)
>>>>   
>>>>       object_property_add_child(OBJECT(cpu), "apic",
>>>>                                 OBJECT(cpu->apic_state), NULL);
>>>> -    qdev_prop_set_uint8(cpu->apic_state, "id", env->cpuid_apic_id);
>>>> +
>>>> +    apic_id = object_property_get_int(OBJECT(cpu), "apic-id", NULL);
>>>> +    if (apic_id == APIC_ID_NOT_SET) {
>>> Do we have in QOM a way to check if property was ever set?
>> I don't believe the QOM property model has any abstraction for unset
>> properties.
> Correct. The only way I can think of is turning it into a custom
> "dynamic" property, which lets you set some flag in the setter. Using a
> custom implementation for a static property might also be an option.
>
> But as a general reminder, this series does not seem to address some of
> the modeling considerations I had brought up, so I am again prioritizing
> work on an RFC for a cross-target QOM topology abstraction (me and
> Eduardo each had some early x86 patches to that effect iirc) and am
> still considering this v3 more of an RFC destined at testing hot-unplug
> on top, which will then be rebased on whatever structure we agree on.
Hi all,

For migration and arbitrary CPU add/rm, I have an idea to transmit
the source topology to dest for migration. for that we don't need to
care the topology problem on destination. we can add structure to
describe topology when parse smp. the topology show the cpu
details present:

                                  topology
                                         |
    |                                    |                         |
socket0                      socket1              socket2
    |  |                                ...                      ...
    |  core_sibling
core0
    |  |
    |  thread_sibling
thread0
    |
cpu_present

1) each time we create one CPU we update the cpu_present, and
when remove cpu, we clean the present bit.

2) when migration, we pass the cpu_present to destination via a
new vmsd. then from the tree hierarchy we would be aware of the
existed apic-id. so on destination loading the new calculated
apic-id to cpu object. one thing need to do I think is that we must
rebuild the srat table for preboot cpus before resume all cpu
on destination.

Thanks,
Chen


>
> Regards,
> Andreas
>

  reply	other threads:[~2015-02-06  5:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14  7:27 [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support Zhu Guihua
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 1/7] cpu: introduce CpuTopoInfo structure for argument simplification Zhu Guihua
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 2/7] qom/cpu: move register_vmstate to common CPUClass.realizefn Zhu Guihua
2015-01-29 14:04   ` Igor Mammedov
2015-02-09  8:30     ` Chen Fan
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 3/7] qom/cpu: move apic vmstate register into x86_cpu_apic_realize Zhu Guihua
2015-01-29 14:07   ` Igor Mammedov
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 4/7] monitor: use cc->get_arch_id as the cpu index Zhu Guihua
2015-01-29 14:12   ` Igor Mammedov
2015-01-29 14:21     ` Peter Krempa
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 5/7] acpi:cpu hotplug: set pcmachine as icc bus' hotplug handler Zhu Guihua
2015-01-29 14:18   ` Igor Mammedov
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 6/7] cpu: add device_add foo-x86_64-cpu support Zhu Guihua
2015-01-29 14:46   ` Igor Mammedov
2015-01-29 16:01     ` Eduardo Habkost
2015-01-29 16:39       ` Andreas Färber
2015-02-06  5:27         ` Chen Fan [this message]
2015-01-14  7:27 ` [Qemu-devel] [PATCH v3 7/7] i386/cpu: add instance finalize callback Zhu Guihua
2015-01-29 15:25   ` Igor Mammedov
2015-02-05 11:49 ` [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support Stefan Hajnoczi
2015-02-05 15:25   ` Eric Blake
2015-02-05 19:29     ` Junio C Hamano
2015-02-05 19:57       ` Jeff King
2015-02-05 20:17         ` Junio C Hamano
2015-02-06 19:33           ` Jeff King
     [not found]             ` <CAMuHMdWbHMPEwkYvzKzzc6L0T8ufk62DGS2sZ1w1BthL1kAZWA@mail.gmail.com>
2015-02-16 22:34               ` [Qemu-devel] [PATCH] send-email: ask confirmation if given encoding name is very short Junio C Hamano
2015-02-18 18:58                 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D450D4.2090300@cn.fujitsu.com \
    --to=chen.fan.fnst@cn.fujitsu.com \
    --cc=afaerber@suse.de \
    --cc=anshul.makkar@profitbricks.com \
    --cc=drjones@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=imammedo@redhat.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=zhugh.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).