Re: dangers of current NEED_CPU_H, CONFIG_SOFTMMU, CONFIG_USER_ONLY (was: [PATCH v11 7/7] cpu: introduce cpu_accel_instance_init)

2020-12-17 Thread Eduardo Habkost
On Thu, Dec 17, 2020 at 10:13:17PM +0100, Paolo Bonzini wrote: > I will take a look, CONFIG_USER_ONLY is definitely something that should be > poisoned. Thanks! I started looking at it, but I gave up when I realized how much work it would required. :) In any case, feel free to reuse the 2 small

Re: dangers of current NEED_CPU_H, CONFIG_SOFTMMU, CONFIG_USER_ONLY (was: [PATCH v11 7/7] cpu: introduce cpu_accel_instance_init)

2020-12-17 Thread Paolo Bonzini
I will take a look, CONFIG_USER_ONLY is definitely something that should be poisoned. Paolo Il gio 17 dic 2020, 21:26 Peter Maydell ha scritto: > On Thu, 17 Dec 2020 at 20:15, Peter Maydell > wrote: > > (So in theory we could make CONFIG_USER_ONLY > > a poisoned identifier but that will requir

Re: dangers of current NEED_CPU_H, CONFIG_SOFTMMU, CONFIG_USER_ONLY (was: [PATCH v11 7/7] cpu: introduce cpu_accel_instance_init)

2020-12-17 Thread Eduardo Habkost
On Thu, Dec 17, 2020 at 08:15:38PM +, Peter Maydell wrote: > On Thu, 17 Dec 2020 at 19:46, Claudio Fontana wrote: > > > > Hi, > > > > I would like to highlight the current dangerous state of NEED_CPU_H / > > CONFIG_SOFTMMU / CONFIG_USER_ONLY. > > > So our struct TcgCpuOperations in include/h

Re: dangers of current NEED_CPU_H, CONFIG_SOFTMMU, CONFIG_USER_ONLY (was: [PATCH v11 7/7] cpu: introduce cpu_accel_instance_init)

2020-12-17 Thread Peter Maydell
On Thu, 17 Dec 2020 at 20:15, Peter Maydell wrote: > (So in theory we could make CONFIG_USER_ONLY > a poisoned identifier but that will require some work to > adjust places where we currently use it in "safe" ways...) Specifically, putting it in poison.h turns up these places that would need to b

Re: dangers of current NEED_CPU_H, CONFIG_SOFTMMU, CONFIG_USER_ONLY (was: [PATCH v11 7/7] cpu: introduce cpu_accel_instance_init)

2020-12-17 Thread Peter Maydell
On Thu, 17 Dec 2020 at 19:46, Claudio Fontana wrote: > > Hi, > > I would like to highlight the current dangerous state of NEED_CPU_H / > CONFIG_SOFTMMU / CONFIG_USER_ONLY. > So our struct TcgCpuOperations in include/hw/core/cpu.h, > which contains after this series: > > #ifndef CONFIG_USER_ONLY

dangers of current NEED_CPU_H, CONFIG_SOFTMMU, CONFIG_USER_ONLY (was: [PATCH v11 7/7] cpu: introduce cpu_accel_instance_init)

2020-12-17 Thread Claudio Fontana
Hi, I would like to highlight the current dangerous state of NEED_CPU_H / CONFIG_SOFTMMU / CONFIG_USER_ONLY. This patch of mine (the last in the i386 cleanup PART 2) breaks check-tcg. The why is not obvious at all. I'll comment below it. On 12/11/20 11:09 AM, Claudio Fontana wrote: > centraliz

[PATCH v11 7/7] cpu: introduce cpu_accel_instance_init

2020-12-11 Thread Claudio Fontana
centralize the calls to cpu->accel_cpu_interface Signed-off-by: Claudio Fontana --- include/hw/core/cpu.h | 6 ++ hw/core/cpu.c | 9 + target/i386/cpu.c | 9 ++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/