Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops

2023-03-21 Thread Claudio Fontana
On 3/20/23 16:34, Philippe Mathieu-Daudé wrote: > On 20/3/23 16:23, Claudio Fontana wrote: >> Hi Alex, all, >> >> again, this moves TCG-only code to common code, no? > > Oh, good point. > >> Even if this happens to work, the idea is to avoid adding unneeded accel TCG >> code to a KVM-only binary

Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops

2023-03-20 Thread Alex Bennée
Claudio Fontana writes: > Hi Alex, all, > > again, this moves TCG-only code to common code, no? > > Even if this happens to work, the idea is to avoid adding unneeded accel TCG > code to a KVM-only binary. > > We need to keep in mind all dimensions when we do refactorings: > > user-mode vs sys

Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops

2023-03-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 20/3/23 11:10, Alex Bennée wrote: >> We don't want to be polluting the core run loop code with target >> specific handling, punt it to sysemu_ops where it belongs. >> Signed-off-by: Alex Bennée >> --- >> include/hw/core/sysemu-cpu-ops.h | 5 + >> tar

Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops

2023-03-20 Thread Philippe Mathieu-Daudé
On 20/3/23 16:23, Claudio Fontana wrote: Hi Alex, all, again, this moves TCG-only code to common code, no? Oh, good point. Even if this happens to work, the idea is to avoid adding unneeded accel TCG code to a KVM-only binary. Could yet another AccelSysemuCPUOps *accel struct in SysemuCPU

Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops

2023-03-20 Thread Claudio Fontana
Hi Alex, all, again, this moves TCG-only code to common code, no? Even if this happens to work, the idea is to avoid adding unneeded accel TCG code to a KVM-only binary. We need to keep in mind all dimensions when we do refactorings: user-mode vs sysemu, the architecture, the accel, in particu

Re: [PATCH 03/10] accel/tcg: move i386 halt handling to sysemu_ops

2023-03-20 Thread Philippe Mathieu-Daudé
On 20/3/23 11:10, Alex Bennée wrote: We don't want to be polluting the core run loop code with target specific handling, punt it to sysemu_ops where it belongs. Signed-off-by: Alex Bennée --- include/hw/core/sysemu-cpu-ops.h | 5 + target/i386/cpu-internal.h | 1 + accel/tcg/cpu