qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] KVM call minutes July 10th


From: Andreas Färber
Subject: Re: [Qemu-devel] KVM call minutes July 10th
Date: Tue, 10 Jul 2012 19:24:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]