From: Gerd Hoffmann <kraxel@redhat.com>
To: Claudio Fontana <cfontana@suse.de>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com,
richard.henderson@linaro.org,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Jose R. Ziviani" <jziviani@suse.de>
Subject: Re: modular tcg
Date: Thu, 29 Jul 2021 12:26:27 +0200 [thread overview]
Message-ID: <20210729102627.ovaimyubcfieaika@sirius.home.kraxel.org> (raw)
In-Reply-To: <d04c1456-e2fb-2b0d-e011-bcdafbacc9ba@suse.de>
Hi,
> > It's basically two groups:
> >
> > * Arch-specific (functions taking CPUX86State as argument), most of the
> > unresolved symbols in target/i386/ and i386/ directories go into this
> > category.
>
> Yes, and we need to think about all targets, not just i386.
Sure. I just want go forward in small steps, so my plan is to tackle
them one by one (starting with i386).
> > * Common (functions taking CPUState as argument). Everything else.
> >
> > The common functions could be added TCGCPUOps to allow them being called via
>
> TCGCCPUOps are target-specific in their implementation, so I guess
> it's the arch specific part that could be TCGCPUOps (maybe, would need
> deep thinking).
Ok, lets make it three groups then.
(1) generic interface, arch implementation (this is what we have
TCGCPUOps hooks right now).
(2) generic interface, generic implementation (functions taking a
CPUState as argument, simliar to group (1).
(3) arch-specific interface and implementation (functions taking a
CPUX86State argument).
We could add group (2) to TCGCPUOps for this ...
> > CPUClass->tcg_ops->$name instead of a direct symbol reference. Not sure this
> > is a good idea though. Experimental patch covering tcg_exec_realizefn +
> > tcg_exec_unrealizefn below.
... but as I sayed, not sure this is the best plan.
Adding group (3) to TCGCPUOps is a non-starter IMHO given that the
function prototypes are arch-specific (using CPUX86State) and also
the interfaces actually needed are arch-specific. something like
x86_register_ferr_irq or cpu_x86_update_dr7 simply doesn't exist on
!x86. I guess we'll need TCG${arch}Ops for those.
> > No idea yet how to handle arch-specific bits best. Seems there is no existing
> > infrastructure to untangle target-specific code and tcg, so this probably needs
> > something new.
>
> We need target-specific modules. They could at the beginning absorb
> also the non-target specific parts in my view. So you have a big
> tcg-arm module, a tcg-i386 module etc.
>
> I think I sketched already the idea in the Makefile I shared before?
We have target-specific modules in master branch.
Used for qtest (all archs) and tcg (i386/x86_64 only, accel ops only).
The build system changes to build more tcg bits modular are here:
https://git.kraxel.org/cgit/qemu/log/?h=sirius/modules-tcg-meson
Doesn't build due unresolved symbols, but shows which code
changes/cleanups/reorganizations are needed for (more) modular tcg.
take care,
Gerd
next prev parent reply other threads:[~2021-07-29 10:28 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 22:09 [PATCH v2 0/1] Improve module accelerator error message Jose R. Ziviani
2021-07-22 22:09 ` [PATCH v2 1/1] modules: Improve error message when module is not found Jose R. Ziviani
2021-07-23 6:25 ` Gerd Hoffmann
2021-07-23 8:04 ` Claudio Fontana
2021-07-23 8:28 ` Markus Armbruster
2021-07-23 8:32 ` Claudio Fontana
2021-07-23 9:41 ` Claudio Fontana
2021-07-23 9:52 ` Gerd Hoffmann
2021-07-23 11:20 ` Claudio Fontana
2021-07-23 12:20 ` Claudio Fontana
2021-07-23 12:48 ` Gerd Hoffmann
2021-07-29 9:14 ` modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found Gerd Hoffmann
2021-07-29 9:40 ` modular tcg Claudio Fontana
2021-07-29 10:26 ` Gerd Hoffmann [this message]
2021-07-29 10:42 ` Claudio Fontana
2021-07-29 9:42 ` Claudio Fontana
2021-07-29 10:29 ` Gerd Hoffmann
2021-07-29 10:44 ` Claudio Fontana
2021-07-29 11:34 ` Philippe Mathieu-Daudé
2021-07-29 11:39 ` Claudio Fontana
2021-07-29 14:22 ` Claudio Fontana
2021-07-29 14:59 ` Philippe Mathieu-Daudé
2021-07-29 16:35 ` Claudio Fontana
2021-07-29 16:40 ` modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found Paolo Bonzini
2021-07-30 9:05 ` modular tcg Gerd Hoffmann
2021-07-30 10:02 ` Claudio Fontana
2022-09-02 9:50 ` modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found Claudio Fontana
2021-07-23 13:50 ` [PATCH v2 1/1] modules: Improve error message when module is not found Jose R. Ziviani
2021-07-23 14:02 ` Claudio Fontana
2021-07-23 14:14 ` Philippe Mathieu-Daudé
2021-07-23 14:36 ` Jose R. Ziviani
2021-07-23 15:27 ` Claudio Fontana
2021-07-23 15:46 ` Jose R. Ziviani
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=20210729102627.ovaimyubcfieaika@sirius.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=cfontana@suse.de \
--cc=f4bug@amsat.org \
--cc=jziviani@suse.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).