From: Paolo Bonzini <pbonzini@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Blue Swirl <blauwirbel@gmail.com>, Jan Kiszka <jan.kiszka@web.de>,
Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once
Date: Mon, 13 Feb 2012 09:17:00 +0100 [thread overview]
Message-ID: <4F38C6FC.5040908@redhat.com> (raw)
In-Reply-To: <4F36774D.4040405@suse.de>
On 02/11/2012 03:12 PM, Andreas Färber wrote:
> Yes and no. They can have any target-specific pointer they want, just
> as before. But no global first_cpu / cpu_single_env pointer - that's
> replaced by CPU pointers, through which members of derived classes can
> be accessed (which did not work for CPUState due to CPU_COMMON members
> being at target-specific offset in the middle).
Hmm, now I'm not even sure what I want that Andreas referred to. :)
I definitely would like CPUState pointers to be changed into link
properties, but that's not related to what Jan is doing here with
cpu_single_env. Each LAPIC refers to a CPU, and that would become a
link property indeed. But here we're using cpu_single_env to find out
which LAPIC is being read. It's the other direction.
Relying on thread-local cpu_single_env means that you restrict LAPIC
memory reads to run in VCPU thread context, and this makes sense anyway.
The only case of MMIO running in iothread context is Xen, but Xen
always keeps the LAPIC in the hypervisor.
Also, I think that having a view of CPUs in QOM is laudable, but I don't
understand why that means you need to remove first_cpu / cpu_single_env.
Finally, CPU_COMMON members may be referenced from TCG-generated code,
how do you plan to move them and still keep the TLBs at small offsets
within CPUState? Perhaps we need a drawing of the situation before and
after the QOMization of CPUs.
Paolo
next prev parent reply other threads:[~2012-02-13 8:17 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 18:31 [Qemu-devel] [PATCH v2 0/8] uq/master: TPR access optimization for Windows guests Jan Kiszka
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once Jan Kiszka
2012-02-11 10:02 ` Blue Swirl
2012-02-11 10:06 ` Jan Kiszka
2012-02-11 11:25 ` Blue Swirl
2012-02-11 11:49 ` Andreas Färber
2012-02-11 12:43 ` Jan Kiszka
2012-02-11 13:06 ` Andreas Färber
2012-02-11 13:07 ` Jan Kiszka
2012-02-11 13:21 ` Andreas Färber
2012-02-11 13:35 ` Jan Kiszka
2012-02-11 13:59 ` Andreas Färber
2012-02-11 14:02 ` Jan Kiszka
2012-02-11 14:12 ` Andreas Färber
2012-02-11 14:24 ` Jan Kiszka
2012-02-11 14:49 ` Andreas Färber
2012-02-13 8:17 ` Paolo Bonzini [this message]
2012-02-11 13:54 ` Blue Swirl
2012-02-11 14:00 ` Jan Kiszka
2012-02-11 14:11 ` Blue Swirl
2012-02-11 14:18 ` Jan Kiszka
2012-02-11 14:23 ` Blue Swirl
2012-02-11 12:41 ` Jan Kiszka
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 2/8] Allow to use pause_all_vcpus from VCPU context Jan Kiszka
2012-02-11 14:16 ` Blue Swirl
2012-02-11 14:31 ` Jan Kiszka
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 3/8] target-i386: Add infrastructure for reporting TPR MMIO accesses Jan Kiszka
2012-02-11 14:32 ` Blue Swirl
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 4/8] kvmvapic: Add option ROM Jan Kiszka
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests Jan Kiszka
2012-02-11 15:25 ` Blue Swirl
2012-02-13 10:16 ` Jan Kiszka
2012-02-13 18:50 ` Blue Swirl
2012-02-13 19:11 ` Gleb Natapov
2012-02-13 19:22 ` Jan Kiszka
2012-02-14 7:54 ` Gleb Natapov
2012-02-14 8:55 ` Jan Kiszka
2012-02-14 8:59 ` Gleb Natapov
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 6/8] kvmvapic: Simplify mp/up_set_tpr Jan Kiszka
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 7/8] optionsrom: Reserve space for checksum Jan Kiszka
2012-02-11 11:46 ` Andreas Färber
2012-02-11 12:45 ` Jan Kiszka
2012-02-11 12:51 ` Andreas Färber
2012-02-11 12:57 ` Jan Kiszka
2012-02-10 18:31 ` [Qemu-devel] [PATCH v2 8/8] kvmvapic: Use optionrom helpers Jan Kiszka
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=4F38C6FC.5040908@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--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).