[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps

From: Richard Henderson
Subject: Re: [PATCH 10/29] tcg_funcs: Add tlb_flush to TCGModuleOps
Date: Thu, 2 Sep 2021 15:09:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 8/31/21 2:15 PM, Gerd Hoffmann wrote:
diff --git a/target/i386/helper.c b/target/i386/helper.c
index 533b29cb91b6..100add713c5d 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -103,7 +103,7 @@ void x86_cpu_set_a20(X86CPU *cpu, int a20_state)
/* when a20 is changed, all the MMU mappings are invalid, so
             we must flush everything */
-        tlb_flush(cs);
+        tcg.tlb_flush(cs);

I think this is a mistake.

(1) If tcg module is not enabled, we should be able to make a direct call.

(2) A *proper* modularization would load the target/ stuff as a module as well, at which point this should be a call through the PLT, not an indirect call after a couple of indirect pointer loads.

So IMO we want to retain the direct function call syntax in all the uses. I think you want to put wrapper functions doing the indirection somewhere -- possibly tcg-module.c.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]