From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mttcg@greensocs.com, peter.maydell@linaro.org,
mark.burton@greensocs.com, qemu-devel@nongnu.org, agraf@suse.de,
guillaume.delbergue@greensocs.com, fred.konrad@greensocs.com
Subject: Re: [Qemu-devel] RFC Multi-threaded TCG design document
Date: Wed, 17 Jun 2015 16:57:01 +0100 [thread overview]
Message-ID: <87lhfi72gi.fsf@linaro.org> (raw)
In-Reply-To: <558160F4.3010604@redhat.com>
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 12/06/2015 18:37, Alex Bennée wrote:
>> Emulated hardware state
>> -----------------------
>>
>> Currently the hardware emulation has no protection against
>> multiple-accesses. However guest systems accessing emulated hardware
>> should be carrying out their own locking to prevent multiple CPUs
>> confusing the hardware. Of course there is no guarantee the there
>> couldn't be a broken guest that doesn't lock so you could get racing
>> accesses to the hardware.
>>
>> There is the class of paravirtualized hardware (VIRTIO) that works in
>> a purely mmio mode. Often setting flags directly in guest memory as a
>> result of a guest triggered transaction.
>>
>> DESIGN REQUIREMENTS:
>>
>> - Access to IO Memory should be serialised by an IOMem mutex
>
> This should simply be the "big QEMU lock", which also protects the I/O
> subsystem.
>
> With BQL-free TCG (a subset of multi-threaded TCG), the code in
> qemu_mutex_lock_iothread that forces VCPUs to relinquish the mutex can
> be dropped.
>
> Paolo
>
>> - The mutex should be recursive (e.g. allowing pid to relock
>> itself)
Paolo,
But would there be a risk is we make the BQL recursive?
I had to do this because the iomem accesses either side of a virt-io
transaction would deadlock otherwise.
--
Alex Bennée
next prev parent reply other threads:[~2015-06-17 15:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 16:37 [Qemu-devel] RFC Multi-threaded TCG design document Alex Bennée
2015-06-15 9:13 ` Frederic Konrad
2015-06-15 10:06 ` Alex Bennée
2015-06-15 10:51 ` Mark Burton
2015-06-15 12:36 ` Alex Bennée
2015-06-15 14:25 ` Alex Bennée
2015-06-15 13:06 ` alvise rigo
2015-06-15 14:25 ` Alex Bennée
2015-06-17 11:58 ` Paolo Bonzini
2015-06-17 15:57 ` Alex Bennée [this message]
2015-06-17 16:13 ` Paolo Bonzini
2015-06-17 16:57 ` Dr. David Alan Gilbert
2015-06-17 18:23 ` Mark Burton
2015-06-17 21:45 ` Frederic Konrad
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=87lhfi72gi.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=agraf@suse.de \
--cc=fred.konrad@greensocs.com \
--cc=guillaume.delbergue@greensocs.com \
--cc=mark.burton@greensocs.com \
--cc=mttcg@greensocs.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).