|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/arm: static-shmem: request host address to be specified for 1:1 domains
commit c56f1ef577831ec70645ca5874d54f2e698c6761
Author: Michal Orzel <michal.orzel@xxxxxxx>
AuthorDate: Fri Jun 21 11:22:05 2024 +0200
Commit: Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Mon Jun 24 17:55:06 2024 +0100
xen/arm: static-shmem: request host address to be specified for 1:1 domains
As a follow up to commit cb1ddafdc573 ("xen/arm/static-shmem: Static-shmem
should be direct-mapped for direct-mapped domains") add a check to
request that both host and guest physical address must be supplied for
direct mapped domains. Otherwise return an error to prevent unwanted
behavior.
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
Fixes: 988f1c7e1f40 ("xen/arm: static-shmem: fix "gbase/pbase used
uninitialized" build failure")
Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>
Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
xen/arch/arm/static-shmem.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/xen/arch/arm/static-shmem.c b/xen/arch/arm/static-shmem.c
index cd48d2896b..aa80756c3c 100644
--- a/xen/arch/arm/static-shmem.c
+++ b/xen/arch/arm/static-shmem.c
@@ -378,6 +378,13 @@ int __init process_shm(struct domain *d, struct
kernel_info *kinfo,
const struct membank *alloc_bank =
find_shm_bank_by_id(get_shmem_heap_banks(), shm_id);
+ if ( is_domain_direct_mapped(d) )
+ {
+ printk("%pd: host and guest physical address must be supplied
for direct-mapped domains\n",
+ d);
+ return -EINVAL;
+ }
+
/* guest phys address is right at the beginning */
gbase = dt_read_paddr(cells, addr_cells);
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |