From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests
Date: Thu, 09 Feb 2012 18:47:49 +0200 [thread overview]
Message-ID: <4F33F8B5.5070109@redhat.com> (raw)
In-Reply-To: <4F33F50C.2050104@web.de>
On 02/09/2012 06:32 PM, Jan Kiszka wrote:
> >>
> >> We need to patch the causing instruction, so we have to know where it
> >> starts. Or what do you mean?
> >
> > Just don't deal with this at all, no one runs on kernels without kernel
> > irqchip.
>
> Not true for upstream,
It was introduced in 2.6.24? Is anyone running anything earlier?
I hope that qemu-1.1 will default to kvm irqchip. In fact we should
start thinking about deprecating apic-less kvm (in the kernel).
> and not a design goal of this approach,
> specifically when considering that it also works with TCG. Would be a
> pity to lose this generality.
It doesn't really speed up tcg, does it?
>
> >
> >>>
> >>> I'm not sure if the ABI guarantees anything about %rip.
> >>
> >> That's indeed a point. It's likely coupled to the emulator's internals
> >> and when it calls out to user space for MMIO write. How to deal with it?
> >
> > One way is to verify that it worked this way at least N versions back,
> > and then retro-doc it. The downside is that it reduces our flexibility
> > in the future, but I think that's a small downside.
>
> It need not reduce our flexibility, we just need to signal to user space
> when our behaviour changes again.
This means that if this code detects that rip is no longer accurate
using this signal, it has to disable itself. That's not something we
want, I think.
> >>
> >> I'm not sure if Windows has this properly set up for the UP HAL. I
> >> rather think this was a bug in the original implementation. The ROM uses
> >> 0 as CPU index in UP mode unconditionally, so should we in QEMU.
> >
> > I mean just check kpcr.self.
>
> Yes, clear, but that means that Windows must have initialized FS.base to
> point to the KPCR also in UP mode. Is that really the case? E.g. when
> ACPI is off?!
No idea.
> I wonder if that explains the reported bug of qemu-kvm
> with -no-acpi and in-kernel irqchip...
acpi-less smp? it exists but rarely used. It could explain the
problem, yes.
> >>
> >> I know, and it caused some pain to write it (not only to find out how to
> >> solve it technically). We would need to pass the RAM memory region down
> >> to this freaky device, like we do to the i440fx for PAM purposes. But,
> >> well, that is not straightforward right now. Better ideas welcome.
> >
> > Could we make it a child<> of i440FX, and have i440FX pass it the
> > MemoryRegion directly?
> >
> > It means we'll need to redo the glue for new chipsets, but it should be
> > just a few lines.
>
> Hmm... not really nice. It is rather a child of the APIC than of the
> chipset IMHO. Moving it over would also mean establishing logical link
> to the APIC from there.
Clearly it's involved with the 440fx as well, as it has the magical
ability to turn ROM into RAM.
> It is really an ugly beast...
Oh yes.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-02-09 16:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 12:39 [Qemu-devel] [PATCH 0/6] uq/master: TPR access optimization for Windows guests Jan Kiszka
2012-02-05 12:39 ` [Qemu-devel] [PATCH 1/6] target-i386: Add infrastructure for reporting TPR MMIO accesses Jan Kiszka
2012-02-05 12:39 ` [Qemu-devel] [PATCH 2/6] kvmvapic: Add option ROM Jan Kiszka
2012-02-05 12:39 ` [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests Jan Kiszka
2012-02-09 8:35 ` [Qemu-devel] subpages with memory region aliases (was: [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests) Jan Kiszka
2012-02-09 9:32 ` [Qemu-devel] subpages with memory region aliases Avi Kivity
2012-02-09 14:23 ` Jan Kiszka
2012-02-09 15:05 ` Avi Kivity
2012-02-09 15:18 ` [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests Avi Kivity
2012-02-09 15:39 ` Jan Kiszka
2012-02-09 16:00 ` Avi Kivity
2012-02-09 16:32 ` Jan Kiszka
2012-02-09 16:47 ` Avi Kivity [this message]
2012-02-09 17:24 ` Jan Kiszka
2012-02-09 17:20 ` Paolo Bonzini
2012-02-09 18:01 ` Jan Kiszka
2012-02-05 12:39 ` [Qemu-devel] [PATCH 4/6] kvmvapic: Simplify mp/up_set_tpr Jan Kiszka
2012-02-05 12:39 ` [Qemu-devel] [PATCH 5/6] optionsrom: Reserve space for checksum Jan Kiszka
2012-02-05 12:39 ` [Qemu-devel] [PATCH 6/6] 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=4F33F8B5.5070109@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.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).