All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: wang Tiger <tigerwang1986@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Chen Yufei <cyfdecyf@gmail.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: Release of COREMU, a scalable and portable  full-system emulator
Date: Fri, 23 Jul 2010 09:53:04 +0200	[thread overview]
Message-ID: <4C494A60.2040502@web.de> (raw)
In-Reply-To: <AANLkTikMBUa7JBK2sqI8Hhap_ewM5_j9IUTRLEbS2RWJ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]

wang Tiger wrote:
> 在 2010年7月22日 下午11:47,Stefan Hajnoczi <stefanha@gmail.com> 写道:
>> 2010/7/22 wang Tiger <tigerwang1986@gmail.com>:
>>> In our implementation for x86_64 target, all devices except LAPIC are
>>> emulated in a seperate thread. VCPUs are emulated  in other threads
>>> (one thread per VCPU).
>>> By observing some device drivers in linux, we have a hypothethis that
>>> drivers in OS have already ensured correct synchronization on
>>> concurrent hardware accesses.
>> This hypothesis is too optimistic.  If hardware emulation code assumes
>> it is only executed in a single-threaded fashion, but guests can
>> execute it in parallel, then this opens up the possibility of race
>> conditions that malicious guests can exploit.  There needs to be
>> isolation: a guest should not be able to cause QEMU to crash.
> 
> In our prototype, we assume the guest behaves correctly. If hardware
> emulation code can ensure atomic access(behave like real hardware),
> VCPUS can access device freely.  We actually refine some hardward
> emulation code (eg. BMDMA, IOAPIC ) to ensure the atomicity of
> hardware access.

This approach is surely helpful for a prototype to explore the limits.
But it's not applicable to production systems. It would create a huge
source of potential subtle regressions for other guest OSes,
specifically those that you cannot analyze regarding synchronized
hardware access. We must play safe.

That's why we currently have the global mutex. Its conversion can only
happen step-wise, e.g. by establishing an infrastructure to declare the
need of device models for that Big Lock. Then you can start converting
individual models to private locks or even smart lock-less patterns.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2010-07-23  7:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-17 10:27 [Qemu-devel] Release of COREMU, a scalable and portable full-system emulator Chen Yufei
2010-07-20 21:43 ` Blue Swirl
2010-07-21  7:03   ` Chen Yufei
2010-07-21 17:04     ` Stefan Weil
2010-07-22  8:48       ` Chen Yufei
2010-07-22 11:05         ` [Qemu-devel] " Jan Kiszka
2010-07-22 12:18         ` [Qemu-devel] " Stefan Hajnoczi
2010-07-22 13:00           ` [Qemu-devel] " Jan Kiszka
2010-07-22 13:21             ` Stefan Hajnoczi
2010-07-22 15:19             ` wang Tiger
2010-07-22 15:47               ` Stefan Hajnoczi
2010-07-23  3:29                 ` wang Tiger
2010-07-23  7:53                   ` Jan Kiszka [this message]
2010-07-23  8:38                     ` Alexander Graf
2010-07-23  9:13                       ` Stefan Hajnoczi
2010-07-23  9:47                         ` Jan Kiszka
2010-07-23 10:59                         ` wang Tiger
2010-07-23 11:02                           ` Stefan Hajnoczi
2010-07-25 15:56                             ` Paolo Bonzini
2010-07-23 10:35                     ` wang Tiger

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=4C494A60.2040502@web.de \
    --to=jan.kiszka@web.de \
    --cc=cyfdecyf@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=tigerwang1986@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.