All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: quintela@redhat.com
Cc: KVM devel mailing list <kvm@vger.kernel.org>,
	qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Blue Swirl <blauwirbel@gmail.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Liu Ping Fan <pingfank@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] KVM call minutes July 10th
Date: Tue, 10 Jul 2012 19:24:49 +0200	[thread overview]
Message-ID: <4FFC6561.10007@suse.de> (raw)
In-Reply-To: <874npfsm1n.fsf@elfo.mitica>

Hi,

Am 10.07.2012 16:55, schrieb Juan Quintela:
> 
> We discussed this

- CPU VMState series by Juan
Question: Could we assign CPU-specific VMStateDescription to
DeviceState::vmsd?

> - cpu_index: is that transmited?  Yes (Juan).  we need to be sure that
>   cpu_common and cpu use the same index/whatever it is changed

Above answer => maybe.

> - We used cpu_index for SEABIOS interface as apic_id (Eduardo)
> 
> - cpu_hotplug makes that difficult.  How to pass the apic_id to
>   seabios with cpu-hotplug?  Getting apic_id of a cpu without running
>   code on that cpu is "tricky"  Anthony will look at the code.
> 
> - How to coordinate all changes with cpu hotplug?  Anthony and Andreas approach.
>   * Andreas: move softmmu to DeviceState, and let linux-user use current object

This original approach was based on existing include/qemu/cpu.h file.
Pro: sharing code
Pro: smallest patch
Con: no precedence for #ifdef'ed parent

>   * Anthony1: use different structures for each

Uses separate files per structs.
Pro: less #ifdefs
Pro: "that's how Linux does it" (aliguori)
Con: code duplication into multiple separate files

>   * Anthony2: make linux-user also use DeviceState

Pro: cleanest for cpu.h (same .parent everywhere)
Con: difficult to build qdev.h in linux-user due to target_phys_addr_t
???: Is it really a device that linux-user uses? (agraf)

>   [long discussion here, that would be summarized by Andreas?]

Why DeviceState?
qdev infrastructure including reset, realize, possibly VMState is not
being generalized to Object, thus everything that wants to hook into it
must be a DeviceState - applies to softmmu only so far. For
linux-user/bsd-user there was no requirement yet to actually use any
qdev infrastructure.

Juan's comment:
There are more dimensions than just the discussed softmmu vs. user:
     softmmu | *-user
 TCG    x         x
 KVM    x
[Xen did not seem to have special fields in CPUArchState. There have
been suggestions to split out KVM fields from CPUState, similar to TLB,
no patches yet though.]

My proposal:
Adopt Anthony1 qdev.h split, adopt Andreas #ifdef approach and adopt
Anthony1 approach of having -softmmu and -user files where things
largely differ. Optionally revisit exec.c, cpu-exec.c, cpus.c.

Anthony's proposal:
Adopt Anthony1 patchset, reconsider (fuse back?) once my CPUState field
movements get merged. [Note: I would've thought that to be rather soon
but the AREG0 changes are making rebasing it a bit of a pain right now.]

Anthony's proposal #2:
Rework CPU interface to be the subset linux-user needs, build something
around it for softmmu. No volunteers or concrete suggestions so far.
Anthony's CONFIG_ARCH_* (v2 upcoming) was agreed as prerequisite to
moving some cpu.h code [cpu_clone_regs()] into linux-user/, independent
of the QOM CPU modelling.

CPU hotplug is considered nice-to-have for v1.2 but no release blocker.

=> AF: If there is an urgent need to have qdev for making progress with
hotplug, apply any sanitized solution now, with the option of
refactoring it for code reuse shortly after again. Else, defer decision
to review of alternative patch series, better showing the effects.

Igor and Ping Fan were not on the call, so no action/merge plan was
tapped out yet. [Please coordinate among each others, thanks.]

Hope I managed to summarize somewhat objectively. ;)

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: quintela@redhat.com
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Liu Ping Fan <pingfank@linux.vnet.ibm.com>,
	KVM devel mailing list <kvm@vger.kernel.org>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] KVM call minutes July 10th
Date: Tue, 10 Jul 2012 19:24:49 +0200	[thread overview]
Message-ID: <4FFC6561.10007@suse.de> (raw)
In-Reply-To: <874npfsm1n.fsf@elfo.mitica>

Hi,

Am 10.07.2012 16:55, schrieb Juan Quintela:
> 
> We discussed this

- CPU VMState series by Juan
Question: Could we assign CPU-specific VMStateDescription to
DeviceState::vmsd?

> - cpu_index: is that transmited?  Yes (Juan).  we need to be sure that
>   cpu_common and cpu use the same index/whatever it is changed

Above answer => maybe.

> - We used cpu_index for SEABIOS interface as apic_id (Eduardo)
> 
> - cpu_hotplug makes that difficult.  How to pass the apic_id to
>   seabios with cpu-hotplug?  Getting apic_id of a cpu without running
>   code on that cpu is "tricky"  Anthony will look at the code.
> 
> - How to coordinate all changes with cpu hotplug?  Anthony and Andreas approach.
>   * Andreas: move softmmu to DeviceState, and let linux-user use current object

This original approach was based on existing include/qemu/cpu.h file.
Pro: sharing code
Pro: smallest patch
Con: no precedence for #ifdef'ed parent

>   * Anthony1: use different structures for each

Uses separate files per structs.
Pro: less #ifdefs
Pro: "that's how Linux does it" (aliguori)
Con: code duplication into multiple separate files

>   * Anthony2: make linux-user also use DeviceState

Pro: cleanest for cpu.h (same .parent everywhere)
Con: difficult to build qdev.h in linux-user due to target_phys_addr_t
???: Is it really a device that linux-user uses? (agraf)

>   [long discussion here, that would be summarized by Andreas?]

Why DeviceState?
qdev infrastructure including reset, realize, possibly VMState is not
being generalized to Object, thus everything that wants to hook into it
must be a DeviceState - applies to softmmu only so far. For
linux-user/bsd-user there was no requirement yet to actually use any
qdev infrastructure.

Juan's comment:
There are more dimensions than just the discussed softmmu vs. user:
     softmmu | *-user
 TCG    x         x
 KVM    x
[Xen did not seem to have special fields in CPUArchState. There have
been suggestions to split out KVM fields from CPUState, similar to TLB,
no patches yet though.]

My proposal:
Adopt Anthony1 qdev.h split, adopt Andreas #ifdef approach and adopt
Anthony1 approach of having -softmmu and -user files where things
largely differ. Optionally revisit exec.c, cpu-exec.c, cpus.c.

Anthony's proposal:
Adopt Anthony1 patchset, reconsider (fuse back?) once my CPUState field
movements get merged. [Note: I would've thought that to be rather soon
but the AREG0 changes are making rebasing it a bit of a pain right now.]

Anthony's proposal #2:
Rework CPU interface to be the subset linux-user needs, build something
around it for softmmu. No volunteers or concrete suggestions so far.
Anthony's CONFIG_ARCH_* (v2 upcoming) was agreed as prerequisite to
moving some cpu.h code [cpu_clone_regs()] into linux-user/, independent
of the QOM CPU modelling.

CPU hotplug is considered nice-to-have for v1.2 but no release blocker.

=> AF: If there is an urgent need to have qdev for making progress with
hotplug, apply any sanitized solution now, with the option of
refactoring it for code reuse shortly after again. Else, defer decision
to review of alternative patch series, better showing the effects.

Igor and Ping Fan were not on the call, so no action/merge plan was
tapped out yet. [Please coordinate among each others, thanks.]

Hope I managed to summarize somewhat objectively. ;)

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-07-10 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 14:55 KVM call minutes July 10th Juan Quintela
2012-07-10 14:55 ` [Qemu-devel] " Juan Quintela
2012-07-10 17:24 ` Andreas Färber [this message]
2012-07-10 17:24   ` Andreas Färber

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=4FFC6561.10007@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=blauwirbel@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.