Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread David Hildenbrand
CCing Thomas. commit 956a78118bfc7fa512b03cbe8a77b9384c6d89f4 Author: Thomas Huth Date: Sat Jun 30 08:45:25 2018 +0200 m68k: Add NeXTcube machine It is still quite incomplete (no SCSI, no floppy emulation, no network, etc.), but the firmware already shows up the de

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread David Hildenbrand
On 08.11.24 16:07, Peter Xu wrote: On Fri, Nov 08, 2024 at 03:54:13PM +0100, David Hildenbrand wrote: Likely AUX is everything that is "neither explicitly specified by the user nor very special RAM" So I think hw/misc/ivshmem.c would also not count as "aux", and similarly hw/remote/memory.c; bo

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Peter Xu
On Fri, Nov 08, 2024 at 03:54:13PM +0100, David Hildenbrand wrote: > Likely AUX is everything that is "neither explicitly specified by the user nor > very special RAM" > > So I think hw/misc/ivshmem.c would also not count as "aux", and similarly > hw/remote/memory.c; both use memory_region_init_ra

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Peter Xu
On Fri, Nov 08, 2024 at 03:18:07PM +0100, David Hildenbrand wrote: > > > > Could anyone remind me why we can't simply set PRIVATE|SHARED all over the > > place? > > > IMHO RAM_AUX is too hard for any new callers to know how to set. It's > much > > easier when we already have SHARED, adding PRIVATE

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread David Hildenbrand
On 08.11.24 15:37, Steven Sistare wrote: On 11/8/2024 9:20 AM, David Hildenbrand wrote: On 08.11.24 14:56, Steven Sistare wrote: On 11/8/2024 6:31 AM, David Hildenbrand wrote: On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven S

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Steven Sistare
On 11/8/2024 9:20 AM, David Hildenbrand wrote: On 08.11.24 14:56, Steven Sistare wrote: On 11/8/2024 6:31 AM, David Hildenbrand wrote: On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Peter Xu
On Fri, Nov 08, 2024 at 09:14:02AM -0500, Steven Sistare wrote: > > Could anyone remind me why we can't simply set PRIVATE|SHARED all over the > > place? > > > > IMHO RAM_AUX is too hard for any new callers to know how to set. It's much > > easier when we already have SHARED, adding PRIVATE could

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread David Hildenbrand
On 08.11.24 14:56, Steven Sistare wrote: On 11/8/2024 6:31 AM, David Hildenbrand wrote: On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 21:12, Steven S

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread David Hildenbrand
On 08.11.24 14:43, Peter Xu wrote: On Fri, Nov 08, 2024 at 12:31:45PM +0100, David Hildenbrand wrote: On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 2

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Steven Sistare
On 11/8/2024 8:43 AM, Peter Xu wrote: On Fri, Nov 08, 2024 at 12:31:45PM +0100, David Hildenbrand wrote: On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.2

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Steven Sistare
On 11/8/2024 6:31 AM, David Hildenbrand wrote: On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 21:12, Steven Sistare wrote: On 11/4/2024 4:36 PM, David

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread Peter Xu
On Fri, Nov 08, 2024 at 12:31:45PM +0100, David Hildenbrand wrote: > On 07.11.24 17:40, Steven Sistare wrote: > > On 11/7/2024 11:26 AM, David Hildenbrand wrote: > > > On 07.11.24 17:02, Steven Sistare wrote: > > > > On 11/7/2024 8:23 AM, David Hildenbrand wrote: > > > > > On 06.11.24 21:12, Steven

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-08 Thread David Hildenbrand
On 07.11.24 17:40, Steven Sistare wrote: On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 21:12, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven S

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Steven Sistare
On 11/7/2024 11:19 AM, David Hildenbrand wrote: On 07.11.24 15:04, Steven Sistare wrote: On 11/7/2024 8:05 AM, David Hildenbrand wrote: [...] Do you plan to submit the part of your "tmp" patch that refactors shm_backend_memory_alloc and defines qemu_shm_alloc?  If you want, I could include it

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Peter Xu
On Thu, Nov 07, 2024 at 05:38:26PM +0100, David Hildenbrand wrote: > > David: why do we need to drop PRIVATE in ramblock flags? I thought it was > > pretty harmless. I suppose things like qemu_ram_is_shared() will even keep > > working as before? > > > > It looks ok to remove it too, but it adds

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Peter Xu
On Thu, Nov 07, 2024 at 09:04:02AM -0500, Steven Sistare wrote: > On 11/7/2024 8:05 AM, David Hildenbrand wrote: > > On 06.11.24 21:59, Steven Sistare wrote: > > > On 11/6/2024 3:41 PM, Peter Xu wrote: > > > > On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: > > > > > On 11/4/2024 4:

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread David Hildenbrand
On 07.11.24 15:04, Steven Sistare wrote: On 11/7/2024 8:05 AM, David Hildenbrand wrote: On 06.11.24 21:59, Steven Sistare wrote: On 11/6/2024 3:41 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread David Hildenbrand
On 06.11.24 21:59, Steven Sistare wrote: On 11/6/2024 3:41 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Steven Sistare
On 11/7/2024 11:26 AM, David Hildenbrand wrote: On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 21:12, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread David Hildenbrand
On 07.11.24 17:32, Peter Xu wrote: On Thu, Nov 07, 2024 at 09:04:02AM -0500, Steven Sistare wrote: On 11/7/2024 8:05 AM, David Hildenbrand wrote: On 06.11.24 21:59, Steven Sistare wrote: On 11/6/2024 3:41 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: On

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread David Hildenbrand
On 07.11.24 17:02, Steven Sistare wrote: On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 21:12, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hil

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Steven Sistare
On 11/7/2024 8:23 AM, David Hildenbrand wrote: On 06.11.24 21:12, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24 18:38, Steven

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Steven Sistare
On 11/6/2024 4:21 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:59:23PM -0500, Steven Sistare wrote: On 11/6/2024 3:41 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote:

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread Steven Sistare
On 11/7/2024 8:05 AM, David Hildenbrand wrote: On 06.11.24 21:59, Steven Sistare wrote: On 11/6/2024 3:41 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-07 Thread David Hildenbrand
On 06.11.24 21:12, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24 18:38, Steven Sistare wrote: On 11/4/2024 5:39 AM, David H

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-06 Thread Peter Xu
On Wed, Nov 06, 2024 at 03:59:23PM -0500, Steven Sistare wrote: > On 11/6/2024 3:41 PM, Peter Xu wrote: > > On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: > > > On 11/4/2024 4:36 PM, David Hildenbrand wrote: > > > > On 04.11.24 21:56, Steven Sistare wrote: > > > > > On 11/4/2024 3:

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-06 Thread Steven Sistare
On 11/6/2024 3:41 PM, Peter Xu wrote: On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-06 Thread Peter Xu
On Wed, Nov 06, 2024 at 03:12:20PM -0500, Steven Sistare wrote: > > > On 11/4/2024 4:36 PM, David Hildenbrand wrote: > > On 04.11.24 21:56, Steven Sistare wrote: > > > On 11/4/2024 3:15 PM, David Hildenbrand wrote: > > > > On 04.11.24 20:51, David Hildenbrand wrote: > > > > > On 04.11.24 18:38, S

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-06 Thread Steven Sistare
On 11/4/2024 4:36 PM, David Hildenbrand wrote: On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24 18:38, Steven Sistare wrote: On 11/4/2024 5:39 AM, David Hildenbrand wrote: On 01.11.24 14:47, Ste

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread David Hildenbrand
On 04.11.24 21:56, Steven Sistare wrote: On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24 18:38, Steven Sistare wrote: On 11/4/2024 5:39 AM, David Hildenbrand wrote: On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread Steven Sistare
On 11/4/2024 3:15 PM, David Hildenbrand wrote: On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24 18:38, Steven Sistare wrote: On 11/4/2024 5:39 AM, David Hildenbrand wrote: On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using mmap MAP_ANON or memfd_create depending on

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread Peter Xu
On Mon, Nov 04, 2024 at 09:17:30PM +0100, David Hildenbrand wrote: > On 04.11.24 21:14, Peter Xu wrote: > > On Mon, Nov 04, 2024 at 08:51:56PM +0100, David Hildenbrand wrote: > > > > I did that previously, and Peter objected, saying the explicit > > > > anon-shared > > > > should not override the

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread Peter Xu
On Mon, Nov 04, 2024 at 08:51:56PM +0100, David Hildenbrand wrote: > > I did that previously, and Peter objected, saying the explicit anon-shared > > should not override the implicit shared=off. > > Yes, it's better if we can detect that somehow. There should be easy ways to > make that work, so I

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread David Hildenbrand
On 04.11.24 21:14, Peter Xu wrote: On Mon, Nov 04, 2024 at 08:51:56PM +0100, David Hildenbrand wrote: I did that previously, and Peter objected, saying the explicit anon-shared should not override the implicit shared=off. Yes, it's better if we can detect that somehow. There should be easy way

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread David Hildenbrand
On 04.11.24 20:51, David Hildenbrand wrote: On 04.11.24 18:38, Steven Sistare wrote: On 11/4/2024 5:39 AM, David Hildenbrand wrote: On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using mmap MAP_ANON or memfd_create depending on the value of the anon-alloc machine property. 

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread David Hildenbrand
On 04.11.24 18:38, Steven Sistare wrote: On 11/4/2024 5:39 AM, David Hildenbrand wrote: On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using mmap MAP_ANON or memfd_create depending on the value of the anon-alloc machine property.  This option applies to memory allocated as a

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread Steven Sistare
On 11/4/2024 5:39 AM, David Hildenbrand wrote: On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using mmap MAP_ANON or memfd_create depending on the value of the anon-alloc machine property.  This option applies to memory allocated as a side effect of creating various devices. I

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread David Hildenbrand
On 04.11.24 11:39, David Hildenbrand wrote: On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using mmap MAP_ANON or memfd_create depending on the value of the anon-alloc machine property. This option applies to memory allocated as a side effect of creating various devices. It d

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-04 Thread David Hildenbrand
On 01.11.24 14:47, Steve Sistare wrote: Allocate anonymous memory using mmap MAP_ANON or memfd_create depending on the value of the anon-alloc machine property. This option applies to memory allocated as a side effect of creating various devices. It does not apply to memory-backend-objects, whet

Re: [PATCH V3 01/16] machine: anon-alloc option

2024-11-01 Thread Peter Xu
On Fri, Nov 01, 2024 at 06:47:40AM -0700, Steve Sistare wrote: > @@ -1849,6 +1852,35 @@ static void ram_block_add(RAMBlock *new_block, Error > **errp) > qemu_mutex_unlock_ramlist(); > return; > } > + > +} else if (current_machine->anon_alloc =