* Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? @ 2020-12-07 11:19 Claudio Fontana 2020-12-07 11:26 ` Paolo Bonzini 2020-12-07 11:50 ` Peter Maydell 0 siblings, 2 replies; 7+ messages in thread From: Claudio Fontana @ 2020-12-07 11:19 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Philippe Mathieu-Daudé, qemu-devel As in Subject, am I understanding correctly that the one or the other is redundant? Should we keep only one of them? Ciao, Claudio -- Claudio Fontana Engineering Manager Virtualization, SUSE Labs Core SUSE Software Solutions Italy Srl ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? 2020-12-07 11:19 Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? Claudio Fontana @ 2020-12-07 11:26 ` Paolo Bonzini 2020-12-07 11:27 ` Claudio Fontana 2020-12-07 11:50 ` Peter Maydell 1 sibling, 1 reply; 7+ messages in thread From: Paolo Bonzini @ 2020-12-07 11:26 UTC (permalink / raw) To: Claudio Fontana; +Cc: Philippe Mathieu-Daudé, qemu-devel On 07/12/20 12:19, Claudio Fontana wrote: > As in Subject, > > am I understanding correctly that the one or the other is redundant? > > Should we keep only one of them? In the code it's not strictly necessary. However in both Makefiles and meson.build it made/makes things a bit clearer. Paolo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? 2020-12-07 11:26 ` Paolo Bonzini @ 2020-12-07 11:27 ` Claudio Fontana 2020-12-07 11:53 ` Philippe Mathieu-Daudé 0 siblings, 1 reply; 7+ messages in thread From: Claudio Fontana @ 2020-12-07 11:27 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Philippe Mathieu-Daudé, qemu-devel On 12/7/20 12:26 PM, Paolo Bonzini wrote: > On 07/12/20 12:19, Claudio Fontana wrote: >> As in Subject, >> >> am I understanding correctly that the one or the other is redundant? >> >> Should we keep only one of them? > > In the code it's not strictly necessary. However in both Makefiles and > meson.build it made/makes things a bit clearer. > > Paolo > K.. thanks a lot, maybe we should document all of this stuff in docs/devel/... Ciao, Claudio ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? 2020-12-07 11:27 ` Claudio Fontana @ 2020-12-07 11:53 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 7+ messages in thread From: Philippe Mathieu-Daudé @ 2020-12-07 11:53 UTC (permalink / raw) To: Claudio Fontana, Paolo Bonzini; +Cc: qemu-devel On 12/7/20 12:27 PM, Claudio Fontana wrote: > On 12/7/20 12:26 PM, Paolo Bonzini wrote: >> On 07/12/20 12:19, Claudio Fontana wrote: >>> As in Subject, >>> >>> am I understanding correctly that the one or the other is redundant? >>> >>> Should we keep only one of them? CONFIG_SOFTMMU is poisoned while CONFIG_USER_ONLY isn't. I doubt this is a design decision, probably an unfinished transition? Anyhow we ended using CONFIG_USER_ONLY where CONFIG_SOFTMMU triggers a poisoned error. >> >> In the code it's not strictly necessary. However in both Makefiles and >> meson.build it made/makes things a bit clearer. >> >> Paolo >> > > K.. thanks a lot, maybe we should document all of this stuff in docs/devel/... > > Ciao, > > Claudio > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? 2020-12-07 11:19 Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? Claudio Fontana 2020-12-07 11:26 ` Paolo Bonzini @ 2020-12-07 11:50 ` Peter Maydell 2020-12-07 11:56 ` Claudio Fontana 1 sibling, 1 reply; 7+ messages in thread From: Peter Maydell @ 2020-12-07 11:50 UTC (permalink / raw) To: Claudio Fontana Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé, qemu-devel On Mon, 7 Dec 2020 at 11:39, Claudio Fontana <cfontana@suse.de> wrote: > > As in Subject, > > am I understanding correctly that the one or the other is redundant? > > Should we keep only one of them? I think that perhaps the idea at one point was that we might have a version of linux-user which used a softmmu (this would allow better control of the guest's view of its address space, so guest mmap() to fixed addresses would work better, for instance). But nobody's ever actually tried to implement that, so I imagine that if we ever did we'd find that some CONFIG_SOFTMMU and some CONFIG_USER_ONLY defines were the wrong way around... thanks -- PMM ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? 2020-12-07 11:50 ` Peter Maydell @ 2020-12-07 11:56 ` Claudio Fontana 2020-12-08 18:10 ` Richard Henderson 0 siblings, 1 reply; 7+ messages in thread From: Claudio Fontana @ 2020-12-07 11:56 UTC (permalink / raw) To: Peter Maydell Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé, qemu-devel On 12/7/20 12:50 PM, Peter Maydell wrote: > On Mon, 7 Dec 2020 at 11:39, Claudio Fontana <cfontana@suse.de> wrote: >> >> As in Subject, >> >> am I understanding correctly that the one or the other is redundant? >> >> Should we keep only one of them? > > I think that perhaps the idea at one point was that we > might have a version of linux-user which used a softmmu > (this would allow better control of the guest's view of > its address space, so guest mmap() to fixed addresses > would work better, for instance). But nobody's ever actually > tried to implement that, so I imagine that if we ever did > we'd find that some CONFIG_SOFTMMU and some CONFIG_USER_ONLY > defines were the wrong way around... > > thanks > -- PMM > Hi Peter, thanks for the background, indeed I am seeing some of these cases, target/XXX/cpu.c is protecting code with #ifndef CONFIG_USER_ONLY, but the header files in include/hw/core/cpu.h and others use #ifdef CONFIG_SOFTMMU. Ciao, CLaudio ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? 2020-12-07 11:56 ` Claudio Fontana @ 2020-12-08 18:10 ` Richard Henderson 0 siblings, 0 replies; 7+ messages in thread From: Richard Henderson @ 2020-12-08 18:10 UTC (permalink / raw) To: Claudio Fontana, Peter Maydell Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-devel On 12/7/20 5:56 AM, Claudio Fontana wrote: > On 12/7/20 12:50 PM, Peter Maydell wrote: >> On Mon, 7 Dec 2020 at 11:39, Claudio Fontana <cfontana@suse.de> wrote: >>> >>> As in Subject, >>> >>> am I understanding correctly that the one or the other is redundant? >>> >>> Should we keep only one of them? >> >> I think that perhaps the idea at one point was that we >> might have a version of linux-user which used a softmmu >> (this would allow better control of the guest's view of >> its address space, so guest mmap() to fixed addresses >> would work better, for instance). But nobody's ever actually >> tried to implement that, so I imagine that if we ever did >> we'd find that some CONFIG_SOFTMMU and some CONFIG_USER_ONLY >> defines were the wrong way around... >> >> thanks >> -- PMM >> > > Hi Peter, > > thanks for the background, > > indeed I am seeing some of these cases, target/XXX/cpu.c is protecting code with #ifndef CONFIG_USER_ONLY, > > but the header files in include/hw/core/cpu.h and others use #ifdef CONFIG_SOFTMMU. In an ideal future in which linux-user could use softmmu, I would have softmmu be a runtime option rather than a compile-time option. The option would merely affect how TCG generates code. So while in that ideal future only CONFIG_USER_ONLY would remain, in an ideal present CONFIG_SOFTMMU would mark those places where a runtime check should be added. But the present is not ideal, and system-ness (or non-user-only-ness) and actual mmu emulation are often confused. Cleanups welcome. ;-) r~ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-12-08 18:32 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-12-07 11:19 Why do we have both CONFIG_SOFTMMU and CONFIG_USER_ONLY? Claudio Fontana 2020-12-07 11:26 ` Paolo Bonzini 2020-12-07 11:27 ` Claudio Fontana 2020-12-07 11:53 ` Philippe Mathieu-Daudé 2020-12-07 11:50 ` Peter Maydell 2020-12-07 11:56 ` Claudio Fontana 2020-12-08 18:10 ` Richard Henderson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.