From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
ehabkost@redhat.com, gleb@redhat.com, jan.kiszka@siemens.com,
mtosatti@redhat.com, qemu-devel@nongnu.org,
mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, avi@redhat.com,
pbonzini@redhat.com, Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c
Date: Thu, 02 Aug 2012 00:15:40 +0200 [thread overview]
Message-ID: <5019AA8C.6090400@suse.de> (raw)
In-Reply-To: <CAFEAcA_yWiKsAn=qnogJj9MVctOH7W+n9Y2j3e4vaWBF3bmWjg@mail.gmail.com>
Am 01.08.2012 23:43, schrieb Peter Maydell:
> On 1 August 2012 22:25, Andreas Färber <afaerber@suse.de> wrote:
>> Am 01.08.2012 22:47, schrieb Anthony Liguori:
>>> Relying on the CPU list for this isn't very QOM-like. A better approach
>>> would be to make all CPUs appear in a container and then have the reset
>>> propagate through container.
>>
>> That doesn't work since our CPU modelling was going to be machine/SoC
>> specific. For x86, agreement seemed to be /machine/cpu[n]. For ARM,
>> Peter requested path/to/SoC/cortex/cpu[n].
>
> I don't think I got that specific (and I definitely wouldn't have
> suggested using 'cortex' outside the context of a product name like that).
http://lists.gnu.org/archive/html/qemu-devel/2012-03/msg02470.html
Context was Exynos and it was <soc>/cortex-a9/core[n] to be exact; I had
suggested to place them onto the SoC directly, you wanted to refine that.
My point here is that the container is not just for the CPUs.
And if we go ahead with /machine for x86 then for the time being that is
not a device and as an Object does not have a reset mechanism that could
trigger the CPUs' reset.
I am leaning towards that a SoC should be a DeviceState but am unclear
whether a SoC should have a central reset callback triggering the CPUs'
reset. Doesn't sound like real hardware behavior to me.
> I do think that there should be a container with the 4 (or whatever) CPUs,
> 4 timers, GIC, etc, similarly to the way the hardware is a selfcontained
> unit. (And that unit would then sit in a container with the other devices
> that live in the SoC). I don't think that's hugely different from how
> an x86 model would look.
>
> (The phrasing I tend to use is "one cpu with 4 cores", but if QEMU
> in general is going to call a single cpu core a "cpu" that's fine.
> We do need a term for the thing with all the cores, though...)
We had that discussion too and Anthony had some aggressive refactoring
ideas CPU -> core -> thread, but I see that in the pretty distant future
still. We haven't even managed to get a single data field into CPUState
yet, which would be a prerequisite for splitting it up - my series until
today conflicting with Igor's APIC refactoring. (Still working on making
at least a baby step into that direction for 1.2!)
>>> Reset is a complicated beast. While we model a single reset line today,
>>> this isn't technically correct. I believe the distinction between reset
>>> types start to matter with PCI-e actually.
>
> We already have one system (exynos) that would like to model a
> difference between system hard reset and warm reset of some kind.
>
> But really unless we want to bite the bullet and actually
> model reset properly (ie as a set of Pins wired up by the machine
> model, with no particular magic behaviour) it's always going to be
> a 'this kind of works and isn't too ugly to deal with' compromise,
> and I don't have very strong feelings about exactly how we
> compromise.
Well, we can easily add more callback hooks to CPUClass and/or change
the implementation of my central cpu_reset(). A clear advantage over the
old decentral cpu_[state_]reset(). :-)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-08-01 22:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 13:22 [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c Igor Mammedov
2012-07-23 13:22 ` [Qemu-devel] [PATCH 1/2] target-i386: move cpu halted decision into x86_cpu_reset Igor Mammedov
2012-08-01 14:00 ` Andreas Färber
2012-08-02 10:11 ` Igor Mammedov
2012-07-23 13:22 ` [Qemu-devel] [PATCH 2/2] target-i386: move cpu_reset and reset callback to cpu.c Igor Mammedov
2012-08-01 14:09 ` Andreas Färber
2012-08-01 8:13 ` [Qemu-devel] [PATCH 0/2 v3] target-i386: refactor reset handling and move it into cpu.c Gleb Natapov
2012-08-01 15:43 ` Anthony Liguori
2012-08-01 15:50 ` Andreas Färber
2012-08-01 18:25 ` Anthony Liguori
2012-08-01 19:35 ` Andreas Färber
2012-08-01 20:02 ` Anthony Liguori
2012-08-01 20:16 ` Andreas Färber
2012-08-01 20:47 ` Anthony Liguori
2012-08-01 21:25 ` Andreas Färber
2012-08-01 21:43 ` Peter Maydell
2012-08-01 22:15 ` Andreas Färber [this message]
2012-08-02 11:19 ` Igor Mammedov
2012-08-01 20:57 ` Andreas Färber
2012-08-01 21:19 ` Anthony Liguori
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=5019AA8C.6090400@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=ehabkost@redhat.com \
--cc=gleb@redhat.com \
--cc=imammedo@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).