|
From: | Michael Tokarev |
Subject: | Re: [PATCH] target/i386: Re-introduce few KVM stubs for Clang debug builds |
Date: | Mon, 11 Sep 2023 16:36:52 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 |
11.09.2023 15:32, Kevin Wolf wrote: ..
The approach with static inline functions defined only for a very specific configuration looks a lot more fragile to me. In fact, I'm surprised that it works because I think it requires that the header isn't used in any files that are shared between user space and system emulation - and naively cpu.c sounded like something that could be shared. Looks like this patch only works because the linux-user target uses a separate build of the same CPU emulation source file.
That's why both I and Stephan disliked the #ifdef condition, not the approach. If it were me, I'd change the condition to be !KVM and keep the inline functions (or #defines for that matter), instead of re- introducing stubs in a separate .c file. /mjt
[Prev in Thread] | Current Thread | [Next in Thread] |