From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel <qemu-devel@nongnu.org>,
xming <xmingske@gmail.com>, Jan Kiszka <jan.kiszka@web.de>,
Gerd Hoffmann <kraxel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] Re: kvm crashes with spice while loading qxl
Date: Tue, 08 Mar 2011 11:17:52 +0200 [thread overview]
Message-ID: <4D75F440.6010401@redhat.com> (raw)
In-Reply-To: <20110307161305.GB10021@amt.cnet>
On 03/07/2011 06:13 PM, Marcelo Tosatti wrote:
> On Sun, Mar 06, 2011 at 12:38:44PM +0200, Avi Kivity wrote:
> > On 03/05/2011 06:35 PM, Marcelo Tosatti wrote:
> > >Regarding global mutex, TCG and KVM execution behaviour can become more
> > >similar wrt locking by dropping qemu_global_mutex during generation and
> > >execution of TBs.
> >
> > How can you do that? During generation, a device can assert the
> > reset line, changing cpu modes,
>
> Writes to CPUState fields needs can moved to vcpu thread context
> (run_on_cpu), and reads performed under a lock.
>
> Good thing is most CPUState accesses are local to vcpu context.
That's a really good idea. And in fact that's what we do in kvm, if we
have something to do to a cpu we queue it up in vcpu->requests and let
the vcpu thread process it.
> > or move the memory map.
>
> Memory map can be protected by a read-write lock initially, so that vcpu
> thread holds it for read. Later can be converted to URCU.
rwlock is insufficient, need a way to force the vcpu off so a writer can
actually do something.
So we need some kind of priority rwlock where a reader lets the lock
know how it can force it off in case a writer comes along.
> Is write access to memory map necessary from vcpu context?
Yes, examples writes to PCI BARs or the VGA windows at 0xa0000.
We can move them to a device thread, but the vcpu thread will have to
wait for it (so it needs to drop any locks anyway).
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2011-03-08 9:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTint9-P-1jD5pbXstzPcYueLHQ68Rd0T_Chz6xRN@mail.gmail.com>
2011-02-26 12:29 ` [Qemu-devel] Re: kvm crashes with spice while loading qxl Jan Kiszka
2011-02-26 14:44 ` xming
2011-02-27 19:03 ` Alon Levy
2011-02-27 19:11 ` Jan Kiszka
2011-02-27 19:16 ` Alon Levy
2011-02-27 19:27 ` Jan Kiszka
2011-02-27 19:29 ` Alon Levy
2011-02-27 19:32 ` Alon Levy
2011-03-01 12:58 ` Alon Levy
2011-03-02 8:22 ` Jan Kiszka
2011-03-02 10:56 ` Alon Levy
2011-03-02 11:34 ` Jan Kiszka
2011-03-02 12:32 ` Alon Levy
2011-02-28 12:56 ` xming
2011-03-01 3:56 ` Rick Vernam
2011-03-05 16:35 ` Marcelo Tosatti
2011-03-05 17:11 ` Paolo Bonzini
2011-03-06 10:30 ` Alon Levy
2011-03-07 16:02 ` Marcelo Tosatti
2011-03-06 10:38 ` Avi Kivity
2011-03-07 16:13 ` Marcelo Tosatti
2011-03-07 22:27 ` Paolo Bonzini
2011-03-08 9:17 ` Avi Kivity [this message]
2011-03-08 9:28 ` Paolo Bonzini
2011-03-08 9:32 ` Avi Kivity
2011-04-26 8:53 ` [Qemu-devel] " Gerd Hoffmann
2011-04-26 9:06 ` Jan Kiszka
2011-04-26 9:43 ` Gerd Hoffmann
2011-04-26 9:34 ` Alon Levy
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=4D75F440.6010401@redhat.com \
--to=avi@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xmingske@gmail.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 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).