qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Amir Gonnen <amir.gonnen@neuroblade.ai>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"stefanha@redhat.com" <stefanha@redhat.com>
Subject: Re: Building QEMU as a shared library
Date: Wed, 15 Dec 2021 10:16:32 +0000	[thread overview]
Message-ID: <YbnAgMC6sdyoDQID@redhat.com> (raw)
In-Reply-To: <CAFEAcA8m0M2+=ZuBAXcRmyGMzjHdjCYWM+_KzFK_eoPdwX-vpA@mail.gmail.com>

On Wed, Dec 15, 2021 at 10:10:35AM +0000, Peter Maydell wrote:
> On Wed, 15 Dec 2021 at 08:18, Amir Gonnen <amir.gonnen@neuroblade.ai> wrote:
> > My goal is to simulate a mixed architecture system.
> >
> > Today QEMU strongly assumes that the simulated system is a *single architecture*.
> > Changing this assumption and supporting mixed architecture in QEMU proved to be
> > non-trivial and may require significant development effort. Common code such as
> > TCG and others explicitly include architecture specific header files, for example.
> 
> Yeah. This is definitely something we'd like to fix some day. It's
> the approach I would prefer for getting multi-architecture machines.
> 
> > Instead, I would like to suggest a new approach we use at Neuroblade to achieve this:
> > Build QEMU as a shared library that can be loaded and used directly in a larger simulation.
> > Today we build qemu-system-nios2 shared library and load it from qemu-system-x86_64 in order
> > to simulate an x86_64 system that also consists of multiple nios2 cores.
> > In our simulation, two independent "main" functions are running on different threads, and
> > simulation synchronization is reduced to synchronizing threads.
> 
> I agree with Stefan that you should go ahead and send the code as
> an RFC patchset, but I feel like there is a lot of work required
> to really get the codebase into a state where it is a clean
> shared library...

I expect there could end up being a big difference between

   "clean for use with QEMU CLI config X"

vs

   "clean for use with all possible QEMU CLI configs"


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2021-12-15 10:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  8:18 Building QEMU as a shared library Amir Gonnen
2021-12-15  9:45 ` Stefan Hajnoczi
2021-12-15 10:29   ` Daniel P. Berrangé
2021-12-15 12:18   ` Amir Gonnen
2021-12-15 13:23     ` Stefan Hajnoczi
2021-12-15 13:39       ` Peter Maydell
2021-12-15 10:10 ` Peter Maydell
2021-12-15 10:16   ` Daniel P. Berrangé [this message]
2021-12-23  9:49   ` Philippe Mathieu-Daudé
2021-12-26  7:48     ` Stefan Hajnoczi
2022-01-06 10:40     ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2025-02-22 13:36 Building QEMU as a Shared Library Saanjh Sengupta
2025-02-24  9:10 ` Philippe Mathieu-Daudé
2025-02-25  0:59   ` Pierrick Bouvier
2025-03-04  5:53     ` Saanjh Sengupta
2025-03-04 23:50       ` Pierrick Bouvier
2025-03-11  4:56         ` Saanjh Sengupta
2025-03-11  9:50         ` Saanjh Sengupta
2025-03-11 12:48           ` Saanjh Sengupta
2025-03-11 20:44           ` Pierrick Bouvier
2025-03-12  4:31             ` Saanjh Sengupta
2025-03-12  6:20               ` Pierrick Bouvier
2025-03-13 11:34                 ` Saanjh Sengupta
2025-03-13 14:58                   ` Pierrick Bouvier
2025-03-13 18:41                   ` Alex Bennée
2025-03-18  5:40                     ` Saanjh Sengupta
2025-03-18  8:18                       ` Alex Bennée
2025-03-18  8:45                         ` Saanjh Sengupta
2025-03-18  9:36                           ` Alex Bennée

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=YbnAgMC6sdyoDQID@redhat.com \
    --to=berrange@redhat.com \
    --cc=amir.gonnen@neuroblade.ai \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).