qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Claudio Fontana <cfontana@suse.de>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Cc: Claudio Fontana <cfontana@centriq4.arch.suse.de>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Roman Bolshakov <r.bolshakov@yadro.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: softmmu vs sysemu [Was: Re: [RFC v1 06/38] target/arm: split off cpu-softmmu.c]
Date: Tue, 23 Feb 2021 19:18:29 +0100	[thread overview]
Message-ID: <a6682a0f-5993-ed12-98d7-0c8f59385bbd@suse.de> (raw)
In-Reply-To: <477a7799-cb25-afa7-c280-09d839a2b180@suse.de>

On 2/23/21 10:35 AM, Claudio Fontana wrote:
> On 2/23/21 10:16 AM, Philippe Mathieu-Daudé wrote:
>> On 2/23/21 9:55 AM, Claudio Fontana wrote:
>>> On 2/22/21 6:29 PM, Alex Bennée wrote:
>>>>
>>>> Claudio Fontana <cfontana@suse.de> writes:
>>>>
>>>>> From: Claudio Fontana <cfontana@centriq4.arch.suse.de>
>>>>>
>>>>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>>>>> ---
>>>>>  target/arm/internals.h   |   9 ++-
>>>>>  target/arm/cpu-softmmu.c | 134 +++++++++++++++++++++++++++++++++++++++
>>>>>  target/arm/cpu.c         |  95 ---------------------------
>>>>>  target/arm/meson.build   |   1 +
>>>>>  4 files changed, 143 insertions(+), 96 deletions(-)
>>>>>  create mode 100644 target/arm/cpu-softmmu.c
>>>>>
>>>>> diff --git a/target/arm/internals.h b/target/arm/internals.h
>>>>> index 6384461177..6589b63ebc 100644
>>>>> --- a/target/arm/internals.h
>>>>> +++ b/target/arm/internals.h
>>>>> @@ -1196,4 +1196,11 @@ static inline uint64_t useronly_maybe_clean_ptr(uint32_t desc, uint64_t ptr)
>>>>>      return ptr;
>>>>>  }
>>>>>  
>>>>> -#endif
>>>>> +#ifndef CONFIG_USER_ONLY
>>>>> +void arm_cpu_set_irq(void *opaque, int irq, int level);
>>>>> +void arm_cpu_kvm_set_irq(void *opaque, int irq, int level);
>>>>> +bool arm_cpu_virtio_is_big_endian(CPUState *cs);
>>>>> +uint64_t a15_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri);
>>>>> +#endif /* !CONFIG_USER_ONLY */
>>>>> +
>>>>> +#endif /* TARGET_ARM_INTERNALS_H */
>>>>> diff --git a/target/arm/cpu-softmmu.c b/target/arm/cpu-softmmu.c
>>>>> new file mode 100644
>>>>> index 0000000000..263d1fc588
>>>>> --- /dev/null
>>>>> +++ b/target/arm/cpu-softmmu.c
>>>>> @@ -0,0 +1,134 @@
>>>>> +/*
>>>>> + * QEMU ARM CPU
>>>>
>>>> I guess apropos the discussion earlier it's really cpu-sysemu.c and we
>>>> could expand the header comment.
>>>>
>>>>   QEMU ARM CPU - Helpers for system emulation and KVM only
>>>>
>>>> <snip>
>>>>
>>>> Otherwise:
>>>>
>>>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>>>>
>>>
>>> Should I rename all *softmmu in the series to "sysemu"?
>>>
>>> I wonder if we should take the issue of sysemu/system/softmmu topic into a separate series.
>>> Currently basically starting from the build system already, "softmmu", sysemu and system are treated as a single thing, and the convention from build system and directories seems to be "softmmu",
>>> while from the header files we get "sysemu/".
>>>
>>> I agree that this is not a sufficient model to account for the new feature that Richard wants to develop,
>>> I just suggest we could also consider tackling this separately, with a pass through the whole code, gathering more input in the context of a dedicated series.
>>>
>>> What do you think?
>>
>> This is a valid reasoning. However I have my doubts "doing
>> that later" will ever be done/finished (not related to you
>> Claudio in particular, but with dealing with all subsystems).

I went through this again, and looked at the todo.

Already just at the meson level, in the previous i386 series, the changes to split real softmmu (CONFIG_SOFTMMU?) and sysemu would be required.

Otherwise I don't feel so comfortable adding a half-baked discrepancy from the current convention, which is consistent
(even if "wrong", or "whose model is insufficiently detailed" to be able to implement new features).

If we don't believe that the work of splitting semantically real softmmu and sysemu would ever be completed,
why start in the middle of this series? The risk would then result in a worse situation than the current one I think,
with an even less homogeneous code base.

Could this work not be done independently of this series (and I could rebase on that if necessary),
and pushed by who really understand the problem? Probably starting from meson, configure, ...
I could help reviewing there, but probably I am not the best person to push it.

Why are we not confident that this can be done?


>>
>> Personally I'd rather see this sorted out with the arm target
>> then once done propose it as an example to the other ones.
>> You already considered the most complex cases, x86 and arm :)


I mean, after we have split the code a bit more properly, renaming the additional mentions of "softmmu" to "sysemu" should not be hard.
Or, we could do the softmmu vs sysemu split first, and I rebase on top of that.


> 
> 
> Ok, if there are no other comments I would go with "sysemu", just because "system" is a bit too much of a loaded word,
> and we have the precedent of include/sysemu/ .


I am all for "just getting it done", but here the i386 and the arm series become a mixture of things that I am not comfortable with,
I'd prefer a dedicated series..


>>> Also Paolo, any comments, since softmmu is all over meson?
>>>
> 
> And Peter, any comments, preference?
> 


Maybe let us give some more time for more comments to flow in?


Thanks,


Claudio





  reply	other threads:[~2021-02-23 18:19 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210221092449.7545-1-cfontana@suse.de>
     [not found] ` <20210221092449.7545-33-cfontana@suse.de>
2021-02-21  9:53   ` [RFC v1 32/38] target/arm: cpu: do not initialize TCG PMU for KVM Philippe Mathieu-Daudé
2021-02-21 13:59     ` Claudio Fontana
2021-02-22  6:11     ` Richard Henderson
     [not found] ` <20210221092449.7545-35-cfontana@suse.de>
2021-02-21  9:55   ` [RFC v1 34/38] target/arm: cpu: only initialize TCG gt timers under CONFIG_TCG Philippe Mathieu-Daudé
2021-02-21 13:59     ` Claudio Fontana
2021-02-22  8:35       ` Claudio Fontana
2021-03-01 18:19       ` Olaf Hering
     [not found]   ` <87v9ak5cz0.fsf@linaro.org>
2021-02-23  9:12     ` Claudio Fontana
2021-02-23 11:01       ` Alex Bennée
2021-02-23 11:36         ` Claudio Fontana
2021-02-23 12:38           ` Claudio Fontana
2021-02-23 14:47         ` Paolo Bonzini
2021-02-22  5:35 ` [RFC v1 00/38] arm cleanup experiment for kvm-only build Richard Henderson
2021-02-22  8:43   ` Claudio Fontana
2021-02-22 11:56     ` Philippe Mathieu-Daudé
2021-02-22 16:08     ` Richard Henderson
2021-02-22 16:57       ` Alex Bennée
2021-02-23  9:17       ` Claudio Fontana
     [not found] ` <20210221092449.7545-21-cfontana@suse.de>
2021-02-22  5:48   ` [RFC v1 20/38] target/arm: move arm_hcr_el2_eff to common_cpu Richard Henderson
     [not found] ` <20210221092449.7545-24-cfontana@suse.de>
2021-02-22  5:52   ` [RFC v1 23/38] target/arm: move arm_mmu_idx_el to common-cpu Richard Henderson
     [not found] ` <20210221092449.7545-25-cfontana@suse.de>
2021-02-22  6:02   ` [RFC v1 24/38] target/arm: move aa64_va_parameter_tbi,tbid,tcma and arm_rebuild_hflags Richard Henderson
2021-02-23 10:07     ` Claudio Fontana
2021-02-23 16:30       ` Richard Henderson
     [not found] ` <20210221092449.7545-26-cfontana@suse.de>
2021-02-22  6:04   ` [RFC v1 25/38] target/arm: move fp_exception_el outside of tcg helpers Richard Henderson
     [not found] ` <20210221092449.7545-27-cfontana@suse.de>
2021-02-22  6:05   ` [RFC v1 26/38] target/arm: move sve_exception_el to cpu Richard Henderson
     [not found] ` <20210221092449.7545-28-cfontana@suse.de>
2021-02-22  6:06   ` [RFC v1 27/38] target/arm: move sve_zcr_len_for_el to common_cpu Richard Henderson
2021-02-25 17:28     ` Claudio Fontana
2021-02-25 20:13       ` Claudio Fontana
2021-02-26  4:01         ` Richard Henderson
     [not found] ` <20210221092449.7545-29-cfontana@suse.de>
2021-02-22  6:09   ` [RFC v1 28/38] target/arm: make arm_pmu_timer_cb TCG-only, starting tcg-stub Richard Henderson
     [not found] ` <20210221092449.7545-2-cfontana@suse.de>
2021-02-22  6:14   ` [RFC v1 01/38] target/arm: move translate modules to tcg/ Richard Henderson
     [not found] ` <20210221092449.7545-4-cfontana@suse.de>
2021-02-22  6:16   ` [RFC v1 03/38] arm: tcg: only build under CONFIG_TCG Richard Henderson
     [not found] ` <20210221092449.7545-6-cfontana@suse.de>
2021-02-22  6:21   ` [RFC v1 05/38] target/arm: wrap arm_cpu_exec_interrupt in CONFIG_TCG Richard Henderson
2021-02-22  8:31     ` Claudio Fontana
2021-02-22 15:54       ` Richard Henderson
2021-02-23  8:46         ` Claudio Fontana
     [not found] ` <20210221092449.7545-9-cfontana@suse.de>
2021-02-22  6:29   ` [RFC v1 08/38] target/arm/tcg: split softmmu parts of v8_cp_reginfo and el2_cp_reginfo Richard Henderson
     [not found] ` <20210221092449.7545-3-cfontana@suse.de>
2021-02-22  6:16   ` [RFC v1 02/38] target/arm: move helpers to tcg/ Richard Henderson
2021-02-22 17:20   ` Philippe Mathieu-Daudé
     [not found] ` <20210221092449.7545-5-cfontana@suse.de>
     [not found]   ` <87eeh857xf.fsf@linaro.org>
2021-02-23  8:44     ` [RFC v1 04/38] target/arm: move psci.c into tcg/softmmu/ Claudio Fontana
     [not found] ` <20210221092449.7545-7-cfontana@suse.de>
     [not found]   ` <87blcc57rj.fsf@linaro.org>
2021-02-23  8:55     ` [RFC v1 06/38] target/arm: split off cpu-softmmu.c Claudio Fontana
2021-02-23  9:16       ` Philippe Mathieu-Daudé
2021-02-23  9:35         ` Claudio Fontana
2021-02-23 18:18           ` Claudio Fontana [this message]
2021-02-23 18:51             ` softmmu vs sysemu [Was: Re: [RFC v1 06/38] target/arm: split off cpu-softmmu.c] Richard Henderson
2021-02-23 23:43               ` Philippe Mathieu-Daudé
2021-02-24  0:06                 ` Richard Henderson
2021-02-24  9:20                   ` Paolo Bonzini
2021-02-24  9:30                     ` Claudio Fontana
2021-02-24 10:00                       ` Paolo Bonzini
     [not found] ` <875z2k53mn.fsf@linaro.org>
2021-02-23  9:18   ` [RFC v1 00/38] arm cleanup experiment for kvm-only build Philippe Mathieu-Daudé
2021-03-01 11:52     ` Claudio Fontana
2021-03-01 16:23       ` Alex Bennée
2021-03-03 17:57         ` Claudio Fontana
2021-03-03 18:09           ` Peter Maydell
2021-03-03 18:17             ` Claudio Fontana
2021-03-03 18:20               ` Claudio Fontana
2021-03-03 18:30                 ` Philippe Mathieu-Daudé
2021-03-03 18:39                 ` Richard Henderson
2021-03-03 18:45                   ` Claudio Fontana
2021-03-03 18:54                     ` Richard Henderson
2021-03-04 16:39                       ` Philippe Mathieu-Daudé
2021-03-04 17:19                         ` Claudio Fontana
2021-03-04 17:47                           ` Philippe Mathieu-Daudé
2021-03-04 19:24                         ` Peter Maydell
2021-03-05  9:04                           ` Claudio Fontana
2021-03-03 18:34           ` Philippe Mathieu-Daudé
2021-03-03 18:38             ` Claudio Fontana
2021-02-23  9:18   ` Claudio Fontana

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=a6682a0f-5993-ed12-98d7-0c8f59385bbd@suse.de \
    --to=cfontana@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=cfontana@centriq4.arch.suse.de \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).