qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "pingfank@linux.vnet.ibm.com" <pingfank@linux.vnet.ibm.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"gleb@redhat.com" <gleb@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] VCPU hotplug support
Date: Tue, 24 Jan 2012 17:24:24 +0100	[thread overview]
Message-ID: <4F1EDB38.5050807@redhat.com> (raw)
In-Reply-To: <4F1D9F06.1040404@siemens.com>

On 01/23/2012 06:55 PM, Jan Kiszka wrote:
> On 2012-01-23 17:29, Igor Mammedov wrote:
>> On 01/17/2012 03:17 PM, Jan Kiszka wrote:
>>
>> It seams that "env->cpuid_apic_id = cpu" is pointless especcialy
>> taking in account that in cpu_x86_init cpuid_apic_id is initialized
>> by cpu_index.
>> What we gain in having cpuid_apic_id that actually duplicate cpu_index?
>> May be there is sence to get rid of cpuid_apic_id?
>
> cpu_index is for internal counting (I think to remember that,
> cpuid_apic_id is the ID exposed to the guest. During CPU hotplug, you
> can control this by virtually plugging the CPU in a specific slot. So we
> need to pass this ID down the init chain - just not set it in generic code.

It could be set in target specific new_cpu, it is not necessary to change
whole cpu_init call chain and affect all other targets that might be not
interested in this change at all.

>
>>
>> Another question is about how hot-plug/unplug should be designed:
>> 1st approach:
>>      With the current code we can't create vcpu with specific index.
>
> Forget about index, the apic_id is important to control. And that could
> become something like -cpu XXX,apid_id=N. Of course, collisions need to
> be detected and rejected.
>
>>      But we can implement xen like approach, where hot-plug command says
>>      which amount of active vcpus guest should have. This way we can
>>      leave current cpu_init ->  cpu_x86_init ->  cpu_exec_init call
>>      chain without change and plug/unplug next/last vcpu.
>>
>> 2nd approach:
>>      Ability to plug/unplug individual vcpus based on their cpu_index.
>>      to do this we need add cpu_index argument to cpu_init ->
>>      cpu_x86_init ->  cpu_exec_init call chain. It will look more
>>      like the real hardware cpu hot-plug, but do virtual guests really
>>      need it. And what for if this way is more preferrable than the 1st.
>>

Jan,

Am I right in assuming that you are in a favor of 2nd approach with correction
that some opaque cpu ID (in case of x86 it will be apic_id) will be passed down
to new_cpu?

-- 
Thanks,
  Igor

  reply	other threads:[~2012-01-24 16:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 13:17 [Qemu-devel] [PATCH 0/3] Make vcpu hotplug work for qemu Igor Mammedov
2012-01-17 13:17 ` [Qemu-devel] [PATCH 1/3] Introduce a new bus "ICC" to connect APIC Igor Mammedov
2012-01-17 13:57   ` Jan Kiszka
2012-01-17 13:17 ` [Qemu-devel] [PATCH 2/3] VCPU hotplug support Igor Mammedov
2012-01-17 14:17   ` Jan Kiszka
2012-01-17 14:22     ` Jan Kiszka
2012-01-23 16:29     ` Igor Mammedov
2012-01-23 17:55       ` Jan Kiszka
2012-01-24 16:24         ` Igor Mammedov [this message]
2012-01-24 16:37           ` Jan Kiszka
2012-01-17 13:17 ` [Qemu-devel] [PATCH 3/3] add cpu_set qmp command Igor Mammedov
2012-01-17 14:18   ` Jan Kiszka
2012-01-19  9:38     ` Igor Mammedov
2012-01-19 10:24       ` Jan Kiszka
2012-01-19 11:04         ` Igor Mammedov

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=4F1EDB38.5050807@redhat.com \
    --to=imammedo@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=pingfank@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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).