All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Guest XenStore page allocation for 11 Dom0less domUs
@ 2024-05-24 22:55 Stefano Stabellini
  2024-05-24 22:55 ` [PATCH v4 1/4] xen/arm/static-shmem: Static-shmem should be direct-mapped for direct-mapped domains Stefano Stabellini
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stefano Stabellini @ 2024-05-24 22:55 UTC (permalink / raw)
  To: xen-devel
  Cc: Henry Wang, Stefano Stabellini, Julien Grall, Bertrand Marquis,
	Michal Orzel, Volodymyr Babchuk, Anthony PERARD, Andrew Cooper,
	George Dunlap, Jan Beulich

Hi all,

This series is trying to fix the reported guest magic region alloc
issue for 11 Dom0less domUs, an error message can seen from the
init-dom0less application on 1:1 direct-mapped Dom0less DomUs:
```
Allocating magic pages
memory.c:238:d0v0 mfn 0x39000 doesn't belong to d1
Error on alloc magic pages
```

This is because populate_physmap() automatically assumes gfn == mfn
for direct mapped domains. This cannot be true for the magic pages
that are allocated later for 1:1 Dom0less DomUs from the init-dom0less
helper application executed in Dom0. For domain using statically
allocated memory but not 1:1 direct-mapped, similar error "failed to
retrieve a reserved page" can be seen as the reserved memory list
is empty at that time.

In [1] I've tried to fix this issue by the domctl approach, and
discussions in [2] and [3] indicates that a domctl is not really
necessary, as we can simplify the issue to "allocate the Dom0less
guest magic regions at the Dom0less DomU build time and pass the
region base PFN to init-dom0less application". The later on
discussion [4] reached an agreement that we only need to allocate
one single page for XenStore, and set the HVM_PARAM_STORE_PFN from
hypervisor with some Linux XenStore late init protocol improvements.
Therefore, this series tries to fix the issue based on all discussions.
The first patch puts a restriction that static shared memory on
direct-mapped DomUs should also be direct mapped, as otherwise it will
clash [5]. Patch 2 allocates the XenStore page from Xen and set the
initial connection status to RECONNECTED. Patch 3 is the update of the
init-dom0less application with all of the changes. Patch 4 is the doc
change to reflect the changes introduced by this series.

**NOTE**: This series should work with the Linux change [6].

[1] https://lore.kernel.org/xen-devel/20240409045357.236802-1-xin.wang2@amd.com/
[2] https://lore.kernel.org/xen-devel/c7857223-eab8-409a-b618-6ec70f6165aa@apertussolutions.com/
[3] https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2404251508470.3940@ubuntu-linux-20-04-desktop/
[4] https://lore.kernel.org/xen-devel/d33ea00d-890d-45cc-9583-64c953abd70f@xen.org/
[5] https://lore.kernel.org/xen-devel/686ba256-f8bf-47e7-872f-d277bf7df0aa@xen.org/
[6] https://lore.kernel.org/xen-devel/20240517011516.1451087-1-xin.wang2@amd.com/

Henry Wang (4):
  xen/arm/static-shmem: Static-shmem should be direct-mapped for
    direct-mapped domains
  xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor
  tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE
  docs/features/dom0less: Update the late XenStore init protocol



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-06-20  0:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 22:55 [PATCH v4 0/4] Guest XenStore page allocation for 11 Dom0less domUs Stefano Stabellini
2024-05-24 22:55 ` [PATCH v4 1/4] xen/arm/static-shmem: Static-shmem should be direct-mapped for direct-mapped domains Stefano Stabellini
2024-05-24 22:55 ` [PATCH v4 2/4] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor Stefano Stabellini
2024-05-24 23:06   ` Julien Grall
2024-05-27 14:28     ` Oleksii K.
2024-06-19  0:37       ` Stefano Stabellini
2024-06-19 11:49         ` Julien Grall
2024-06-20  0:35           ` Stefano Stabellini
2024-05-29  7:57   ` Michal Orzel
2024-05-24 22:55 ` [PATCH v4 3/4] tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE Stefano Stabellini
2024-06-12 12:19   ` Anthony PERARD
2024-05-24 22:55 ` [PATCH v4 4/4] docs/features/dom0less: Update the late XenStore init protocol Stefano Stabellini
2024-05-29  8:00   ` Michal Orzel

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.