All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Fontana <cfontana@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, richard.henderson@linaro.org,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Jose R. Ziviani" <jziviani@suse.de>
Subject: Re: modular tcg
Date: Fri, 30 Jul 2021 12:02:18 +0200	[thread overview]
Message-ID: <9d4a9fde-2fd4-a7d3-4d8a-62a29ccc28d0@suse.de> (raw)
In-Reply-To: <20210730090538.ypohhzrd4nzqngk6@sirius.home.kraxel.org>

On 7/30/21 11:05 AM, Gerd Hoffmann wrote:
>   Hi,
> 
> On Thu, Jul 29, 2021 at 06:40:17PM +0200, Paolo Bonzini wrote:
>> On 29/07/21 11:14, Gerd Hoffmann wrote:
>>> The common functions could be added TCGCPUOps to allow them being called via
>>> 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.
>>
>> A lot of these (though probably not all) are already stubbed out as "static
>> inline" in include/exec/exec-all.h.  I think they can be changed to function
>> pointers in the style of ui/spice-module.c (accel/tcg/tcg-module.c?).
> 
> Yep, was thinking about that too.  But then I noticed we already have
> TCGCPUOps and wondered whenever extending that would be the better
> option.

I'd read TCGCPUOps as TCG CPU-specific Operations in this case,
IIRC they are for the TCG Operations that have cpu target-specific behavior.

Maybe they should be called TCGCPUTargetOps to avoid confusion?

So, a TCGCPUOps will have an arm implementation, x86 implementation and so on.

In my view tcg_exec_realizefn does not fit, as this is just a set of additional
generic non-target-specific operations for the generic cpu_exec_realizefn() that needs to be called specifically and only for TCG.


> 
>>> 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.
>>
>> If they are few enough, I would just move them out of target/i386/tcg and
>> into target/i386/cpu-sysemu.c.
> 
> I'll have a look.
> 
>>> Noticed softmmu/physmem.c has lots of CONFIG_TCG #ifdefs, splitting this into
>>> softmmu/physmem-{common,tcg}.c is probably a good idea.
>>
>> I only count one, and those function should be easily moved  to
>> accel/tcg/cputlb.c (after all both physmem.c and cputlb.c used to be a
>> single file, exec.c, so this is just an oversight).
> 
> Well, I noticed one larger block covering multiple functions, didn't
> check the whole file ...
> 
> thanks & take care,
>   Gerd
> 



  reply	other threads:[~2021-07-30 10:03 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
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 [this message]
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=9d4a9fde-2fd4-a7d3-4d8a-62a29ccc28d0@suse.de \
    --to=cfontana@suse.de \
    --cc=f4bug@amsat.org \
    --cc=jziviani@suse.de \
    --cc=kraxel@redhat.com \
    --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 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.