With more and more CDF_xxx internal flags in and to save the space, this
commit introduces a new field "flags" in struct domain to store CDF_*
internal flags directly.
Another new CDF_xxx will be introduced in the next patch.
Signed-off-by: Penny Zheng
Acked-by: Julien Grall
---
, and free_staticmem_pages will be called by it
in runtime, so let's drop the __init flag.
Signed-off-by: Penny Zheng
---
v9 changes:
- move free_domheap_page into else-condition
- considering scrubbing static pages, domain dying case and opt_scrub_domheap
both donot apply to static pages
as a result.
So in order to avoid the above scenario, this commit updates free_heap_pages()
to check whether the predecessor and/or successor has PGC_reserved set,
when trying to merge the about-to-be-freed chunk with the predecessor
and/or successor.
Suggested-by: Julien Grall
Signed-off-by: Penny Zheng
PGC_reserved could be ambiguous, and we have to tell what the pages are
reserved for, so this commit intends to rename PGC_reserved to
PGC_static, which clearly indicates the page is reserved for static
memory.
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
Acked-by: Julien Grall
---
v8
t;
- put reserved pages on resv_page_list after having taken them off
the "normal" list
- introduce acquire_reserved_page to retrieve reserved pages from
resv_page_list
- forbid non-zero-order requests in populate_physmap
- let is_domain_static return ((void)(d), false) on x86
- fix coding
Hi Jan
> -Original Message-
> From: Jan Beulich
> Sent: Friday, July 8, 2022 9:06 PM
> To: Penny Zheng
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Julien Grall ; Stefano Stabellini ;
> Wei Liu ; xen-devel@lists.xenproject.org
> Subject: Re: [PATCH v8
Hi Jan
> -Original Message-
> From: Jan Beulich
> Sent: Friday, July 8, 2022 8:48 PM
> To: Penny Zheng
> Cc: Wei Chen ; Stefano Stabellini
> ; Julien Grall ; Bertrand Marquis
> ; Volodymyr Babchuk
> ; Andrew Cooper
> ; George Dunlap ;
> Wei Liu ; xen-devel@
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, July 16, 2022 2:10 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v5 1/8] xen/arm:
Hi Julien
Before submitting the v6 patch series, I would like to double confirm that ...
> -Original Message-
> From: Julien Grall
> Sent: Wednesday, June 29, 2022 6:18 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
>
Hi Xenia
> -Original Message-
> From: Xenia Ragiadakou
> Sent: Monday, July 11, 2022 11:29 PM
> To: Penny Zheng ; Stefano Stabellini
> ; Julien Grall
> Cc: xen-devel@lists.xenproject.org; Doug Goldstein
> Subject: Re: [PATCH 2/2] automation: arm64: Create a
; +# Run the test
> >>> +rm -f qemu-staticmem.serial
> >>> +set +e
> >>> +echo " virtio scan; dhcp; tftpb 0x4000 boot.scr; source
> >>> +0x4000"| \ timeout -k 1 60 ./binaries/qemu-system-aarch64 -
> nographic \
> >>> +-M virtualization=true \
> >>> +-M virt \
> >>> +-M virt,gic-version=2 \
> >>> +-cpu cortex-a57 \
> >>> +-smp 2 \
> >>> +-m 8G \
> >>> +-no-reboot \
> >>> +-device virtio-net-pci,netdev=vnet0 -netdev
> >>> +user,id=vnet0,tftp=binaries
> >>> \
> >>> +-bios /usr/lib/u-boot/qemu_arm64/u-boot.bin \
> >>> +-dtb ./binaries/virt-gicv2.dtb \
> >>> +|& tee qemu-staticmem.serial
> >>> +
> >>> +set -e
> >>
> >> A lot of the code above is duplicated from qemu-smoke-arm64.sh. I
> >> think it would be better to consolidate in a single script. Looking
> >> briefly throught the existing scripts, it looks like it is possible
> >> to pass arguments (see qemu-smoke-x86-64.sh).
> >
> > One idea would be to make the script common and "source" a second
> > script or config file with just the ImageBuilder configuration because
> > it looks like it is the only thing different.
> >
> >
> >>> +
> >>> +(grep -q "Xen dom0less mode detected" qemu-staticmem.serial) ||
> >>> +exit 1
> >>> +
> >>> +for ((i=0; i<${#base[@]}; i++))
> >>> +do
> >>> +start="$(printf "0x%016x" ${base[$i]})"
> >>> +end="$(printf "0x%016x" $((${base[$i]} + ${size[$i]} - 1)))"
> >>> +grep -q "node 0: \[mem ${start}-${end}\]" qemu-staticmem.serial
> >>> +if test $? -eq 1
> >>> +then
> >>> +exit 1
> >>> +fi
> >>> +done
> >>
> >> Please add a comment on top to explain what this is meant to do.
> >> However, I think we should avoid relying on output that we have
> >> written ourself. IOW, relying on Xen/Linux to always write the same
> >> message is risky because they can change at any time.
> >
> > Especially if we make the script common, then we could just rely on
> > the existing check to see if the guest started correctly (no special
> > check for static memory).
>
> In this case, how the test will verify that the static memory configuration
> has
> been taken into account and has not just been ignored?
>
If only statically allocated memory is enabled, guest memory address will still
be mapped
to GUEST_RAM_BASE(0x4000)
> >>> +
> >>> +(grep -q "BusyBox" qemu-staticmem.serial) || exit 1
> >
>
> --
> Xenia
---
Cheers,
Penny Zheng
Hi Stefano
> -Original Message-
> From: Stefano Stabellini
> Sent: Saturday, July 9, 2022 12:41 AM
> To: Penny Zheng
> Cc: Stefano Stabellini ; jul...@xen.org; xen-
> de...@lists.xenproject.org; Wei Chen ; Bertrand
> Marquis ; Volodymyr Babchuk
>
> Subject:
acquire_staticmem_pages() in two parts, and
introduces prepare_staticmem_pages to bypass all "pointless work".
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v8 changes:
- no change
---
v7 changes:
- no change
---
v6 changes:
- adapt to PGC_static
---
v5 changes:
- new commit
---
.
Signed-off-by: Penny Zheng
---
v8 changes:
- As concurrent free/allocate could modify the resv_page_list, we still
need the lock
---
v7 changes:
- remove the lock, since we add the page to rsv_page_list after it has
been totally freed.
---
v6 changes:
- drop the lock before returning
---
v5 changes
In order to have an easy and quick way to find out whether this domain memory
is statically configured, this commit introduces a new flag CDF_staticmem and a
new helper is_domain_using_staticmem() to tell.
Signed-off-by: Penny Zheng
---
v8 changes:
- #ifdef-ary around is_domain_using_staticmem
go back to heap
allocator.
This commit puts reserved pages on the new list resv_page_list only after
having taken them off the "normal" list, when the last ref dropped.
Signed-off-by: Penny Zheng
---
v8 changes:
- adapt this patch for newly introduced free_domstatic_page
- order as a
With more and more CDF_xxx internal flags in and to save the space, this
commit introduces a new field "flags" in struct domain to store CDF_*
internal flags directly.
Another new CDF_xxx will be introduced in the next patch.
Signed-off-by: Penny Zheng
Acked-by: Julien Grall
---
as a result.
So in order to avoid the above scenario, this commit updates free_heap_pages()
to check whether the predecessor and/or successor has PGC_reserved set,
when trying to merge the about-to-be-freed chunk with the predecessor
and/or successor.
Suggested-by: Julien Grall
Signed-off-by: Penny Zheng
PGC_reserved could be ambiguous, and we have to tell what the pages are
reserved for, so this commit intends to rename PGC_reserved to
PGC_static, which clearly indicates the page is reserved for static
memory.
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v8 changes
- no change
---
v7
SUPPORT.md doesn't seem to explicitly say whether static memory is
supported, so this commit updates SUPPORT.md to add feature static
allocation tech preview for now.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v8 changes:
- no change
---
v7 changes:
- no change
---
v6
, and free_staticmem_pages will be called by it
in runtime, so let's drop the __init flag.
Signed-off-by: Penny Zheng
---
v8 changes:
- introduce new helper free_domstatic_page
- let put_page call free_domstatic_page for static page, when last ref
drops
- #define PGC_static zero when
reserved pages on resv_page_list after having taken them off
the "normal" list
- introduce acquire_reserved_page to retrieve reserved pages from
resv_page_list
- forbid non-zero-order requests in populate_physmap
- let is_domain_static return ((void)(d), false) on x86
- fix coding style
Hi Stefano and julien
> -Original Message-
> From: Stefano Stabellini
> Sent: Thursday, July 7, 2022 7:53 AM
> To: Penny Zheng
> Cc: Stefano Stabellini ; Julien Grall
> ;
> xen-devel@lists.xenproject.org; Wei Chen ; Bertrand
> Marquis ; Volodymyr Babchuk
>
&
Hi Stefano and Julien
> -Original Message-
> From: Stefano Stabellini
> Sent: Saturday, June 25, 2022 5:57 AM
> To: Julien Grall
> Cc: Penny Zheng ; xen-devel@lists.xenproject.org;
> Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
>
> -Original Message-
> From: Julien Grall
> Sent: Wednesday, June 29, 2022 6:35 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk ; Andrew Cooper
> ; George Dunlap ;
> Jan Beuli
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 3:26 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v5 1/8] xen/arm:
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 1:55 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v5 1/8] xen/arm:
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 3:18 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v5 5/8] xen/arm:
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 3:07 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v5 3/8] xen/arm
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 2:22 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk ; Andrew Cooper
> ; George Dunlap ;
Hi Jan
> -Original Message-
> From: Jan Beulich
> Sent: Wednesday, June 29, 2022 1:56 PM
> To: Penny Zheng
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Stefano Stabellini ; Wei Liu ; xen-
> de...@lists.xenproject.org; Julien Grall
> Subject:
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 1:55 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v5 1/8] xen/arm:
Hi Julien and Jan
> -Original Message-
> From: Julien Grall
> Sent: Monday, June 27, 2022 6:19 PM
> To: Penny Zheng ; Jan Beulich
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Stefano Stabellini ; Wei Liu ; xen-
> de...@lists.xenproject.org
> Subject:
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Saturday, June 25, 2022 3:51 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Jan Beulich ; Stefano Stabellini ;
> Wei Liu
> Subject: Re: [
Hi jan
> -Original Message-
> From: Jan Beulich
> Sent: Wednesday, June 22, 2022 5:24 PM
> To: Penny Zheng
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Julien Grall ; Stefano Stabellini ;
> Wei Liu ; xen-devel@lists.xenproject.org
> Subject:
From: Penny Zheng
To add statically shared memory nodes in Dom0, user shall put according
static shared memory configuration under /chosen node.
This commit adds shm-processing function process_shm in construct_dom0
to enable statically shared memory on Dom0.
Signed-off-by: Penny Zheng
following properties:
- compatible:
compatible = "xen,shared-memory-v1"
- reg:
the base guest physical address and size of the shared memory region
- xen,id:
a string that identifies the shared memory region.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabelli
This commit sets up shared memory foreign mapping for borrower domain.
If owner domain is the default dom_io, all shared domain are treated as
borrower domain.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v5 change:
- no change
---
v4 changes:
- no change
---
v3 change:
- use
Borrower domain will fail to get a page ref using the owner domain
during allocation, when the owner is created after borrower.
So here, we decide to get and add the right amount of reference, which
is the number of borrowers, when the owner is allocated.
Signed-off-by: Penny Zheng
Reviewed
introduces a set of new helpers
put_page_nr() and get_page_nr() to increment/drop the page reference by nr.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v5 change:
- no change
---
v4 changes:
- fix the assert about checking overflow to make sure that the right equation
return
will be introduced later in the
following commits.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v5 change:
- no change
---
v4 change:
- no changes
---
v3 change:
- simplify the code since o_gbase is not used if the domain is dom_io
---
v2 change:
- P2M mapping is restricted to normal
From: Penny Zheng
This commit introduces process_shm to cope with static shared memory in
domain construction.
DOMID_IO will be the default owner of memory pre-shared among multiple domains
at boot time, when no explicit owner is specified.
This commit only considers allocating static shared
tails.
Penny Zheng (8):
xen/arm: introduce static shared memory
xen/arm: allocate static shared memory to the default owner dom_io
xen/arm: allocate static shared memory to a specific owner domain
xen/arm: introduce put_page_nr and get_page_nr
xen/arm: Add additional reference to owner domain
From: Penny Zheng
This patch serie introduces a new feature: setting up static
shared memory on a dom0less system, through device tree configuration.
This commit parses shared memory node at boot-time, and reserve it in
bootinfo.reserved_mem to avoid other use.
This commits proposes a new
In order to have an easy and quick way to find out whether this domain memory
is statically configured, this commit introduces a new flag CDF_staticmem and a
new helper is_domain_using_staticmem() to tell.
Signed-off-by: Penny Zheng
---
v7 changes:
- IS_ENABLED(CONFIG_STATIC_MEMORY) would
.
Signed-off-by: Penny Zheng
---
v7 changes:
- remove the lock, since we add the page to rsv_page_list after it has
been totally freed.
---
v6 changes:
- drop the lock before returning
---
v5 changes:
- extract common codes for assigning pages into a helper assign_domstatic_pages
- refine commit
acquire_staticmem_pages() in two parts, and
introduces prepare_staticmem_pages to bypass all "pointless work".
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v7 changes:
- no change
---
v6 changes:
- adapt to PGC_static
---
v5 changes:
- new commit
---
xen/common/page_al
go back to heap
allocator.
This commit puts reserved pages on the new list resv_page_list only after
having taken them off the "normal" list, when the last ref dropped.
Signed-off-by: Penny Zheng
---
v7 changes:
- Add page on the rsv_page_list *after* it has been freed
---
v6 changes
With more and more CDF_xxx internal flags in and to save the space, this
commit introduces a new field "flags" in struct domain to store CDF_*
internal flags directly.
Another new CDF_xxx will be introduced in the next patch.
Signed-off-by: Penny Zheng
Acked-by: Julien Grall
---
as a result.
So in order to avoid the above scenario, this commit updates free_heap_pages()
to check whether the predecessor and/or successor has PGC_reserved set,
when trying to merge the about-to-be-freed chunk with the predecessor
and/or successor.
Suggested-by: Julien Grall
Signed-off-by: Penny Zheng
page_list
- forbid non-zero-order requests in populate_physmap
- let is_domain_static return ((void)(d), false) on x86
- fix coding style
Penny Zheng (9):
xen/arm: rename PGC_reserved to PGC_static
xen: do not free reserved memory into heap
xen: update SUPPORT.md for static allocation
xen: d
PGC_reserved could be ambiguous, and we have to tell what the pages are
reserved for, so this commit intends to rename PGC_reserved to
PGC_static, which clearly indicates the page is reserved for static
memory.
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v7 changes:
- no change
---
v6
freeing memory resource, so let's drop the __init
flag.
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v7 changes:
- protect free_staticmem_pages with heap_lock to match its reverse function
acquire_staticmem_pages
---
v6 changes:
- adapt to PGC_static
- remove #ifdef aroud function
SUPPORT.md doesn't seem to explicitly say whether static memory is
supported, so this commit updates SUPPORT.md to add feature static
allocation tech preview for now.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v7 changes:
- no change
---
v6 changes:
- use domain instead
Hi Jan
Sorry about the late reply, got sidetracked a few weeks.
> -Original Message-
> From: Jan Beulich
> Sent: Wednesday, May 18, 2022 2:36 PM
> To: Penny Zheng
> Cc: Wei Chen ; Stefano Stabellini
> ; Julien Grall ; Bertrand Marquis
> ; Volodymyr Babchuk
> ;
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Thursday, June 9, 2022 5:22 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk ; Andrew Cooper
> ; George Dunlap ;
Hi Jan
> -Original Message-
> From: Jan Beulich
> Sent: Tuesday, June 7, 2022 3:58 PM
> To: Penny Zheng
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Julien Grall ; Stefano Stabellini ;
> Wei
> Liu ; xen-devel@lists.xenproject.org
> Subject: Re
> -Original Message-
> From: Julien Grall
> Sent: Tuesday, June 7, 2022 5:13 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk ; Andrew Cooper
> ; George Dunlap ;
> Jan Beuli
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Tuesday, June 7, 2022 5:20 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk ; Andrew Cooper
> ; George Dunlap ;
acquire_staticmem_pages() in two parts, and
introduces prepare_staticmem_pages to bypass all "pointless work".
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v6 changes:
- adapt to PGC_static
---
v5 changes:
- new commit
---
xen/common/page_al
go back to heap
allocator.
This commit puts reserved pages on the new list resv_page_list only after
having taken them off the "normal" list, when the last ref dropped.
Signed-off-by: Penny Zheng
Acked-by: Jan Beulich
---
v6 changes:
- refine in-code comment
- move
.
Signed-off-by: Penny Zheng
---
v6 changes:
- drop the lock before returning
---
v5 changes:
- extract common codes for assigning pages into a helper assign_domstatic_pages
- refine commit message
- remove stub function acquire_reserved_page
- Alloc/free of memory can happen concurrently. So access
In order to have an easy and quick way to find out whether this domain memory
is statically configured, this commit introduces a new flag CDF_staticmem and a
new helper is_domain_using_staticmem() to tell.
Signed-off-by: Penny Zheng
---
v6 changes:
- move non-zero is_domain_using_staticmem
With more and more CDF_xxx internal flags in and to save the space, this
commit introduces a new field "flags" in struct domain to store CDF_*
internal flags directly.
Another new CDF_xxx will be introduced in the next patch.
Signed-off-by: Penny Zheng
Acked-by: Julien Grall
---
as a result.
So in order to avoid the above scenario, this commit updates free_heap_pages()
to check whether the predecessor and/or successor has PGC_reserved set,
when trying to merge the about-to-be-freed chunk with the predecessor
and/or successor.
Suggested-by: Julien Grall
Signed-off-by: Penny Zheng
SUPPORT.md doesn't seem to explicitly say whether static memory is
supported, so this commit updates SUPPORT.md to add feature static
allocation tech preview for now.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v6 changes:
- use domain instead of sub-systems
---
v5 changes
PGC_reserved could be ambiguous, and we have to tell what the pages are
reserved for, so this commit intends to rename PGC_reserved to
PGC_static, which clearly indicates the page is reserved for static
memory.
Signed-off-by: Penny Zheng
---
v6 changes:
- rename PGC_staticmem to PGC_static
freeing memory resource, so let's drop the __init
flag.
Signed-off-by: Penny Zheng
---
v6 changes:
- adapt to PGC_static
- remove #ifdef aroud function declaration
---
v5 changes:
- In order to avoid stub functions, we #define PGC_staticmem to non-zero only
when CONFIG_STATIC_MEMORY
- use "unl
"is_domain_static()"
- put reserved pages on resv_page_list after having taken them off
the "normal" list
- introduce acquire_reserved_page to retrieve reserved pages from
resv_page_list
- forbid non-zero-order requests in populate_physmap
- let is_domain_static return ((void)(d), false) on x86
- f
Hi Jan
> -Original Message-
> From: Jan Beulich
> Sent: Tuesday, May 31, 2022 4:41 PM
> To: Penny Zheng
> Cc: Wei Chen ; Stefano Stabellini
> ; Julien Grall ; Bertrand Marquis
> ; Volodymyr Babchuk
> ; Andrew Cooper
> ; George Dunlap ;
> Wei Liu ;
> -Original Message-
> From: Jan Beulich
> Sent: Tuesday, May 31, 2022 4:37 PM
> To: Penny Zheng
> Cc: Wei Chen ; Stefano Stabellini
> ; Julien Grall ; Bertrand Marquis
> ; Volodymyr Babchuk
> ; Andrew Cooper
> ; George Dunlap ;
> Wei Liu ; xen-devel@list
Hi jan
> -Original Message-
> From: Jan Beulich
> Sent: Tuesday, May 31, 2022 4:33 PM
> To: Penny Zheng
> Cc: Wei Chen ; Stefano Stabellini
> ; Julien Grall ; Bertrand Marquis
> ; Volodymyr Babchuk
> ; Andrew Cooper
> ; George Dunlap ;
> Wei Liu ;
.
Signed-off-by: Penny Zheng
---
v5 changes:
- extract common codes for assigning pages into a helper assign_domstatic_pages
- refine commit message
- remove stub function acquire_reserved_page
- Alloc/free of memory can happen concurrently. So access to rsv_page_list
needs to be protected
In order to have an easy and quick way to find out whether this domain memory
is statically configured, this commit introduces a new flag CDF_staticmem and a
new helper is_domain_using_staticmem() to tell.
Signed-off-by: Penny Zheng
---
v5 changes:
- guard "is_domain_using_staticmem&q
acquire_staticmem_pages() in two parts, and
introduces prepare_staticmem_pages to bypass all "pointless work".
Signed-off-by: Penny Zheng
---
v5 changes:
- new commit
---
xen/common/page_alloc.c | 61 -
1 file changed, 36 insertions(+), 25 deletion
go back to heap
allocator.
This commit puts reserved pages on the new list resv_page_list only after
having taken them off the "normal" list, when the last ref dropped.
Signed-off-by: Penny Zheng
---
v5 changes:
- adapt this patch for PGC_staticmem
---
v4 changes:
- no changes
---
With more and more CDF_xxx internal flags in and to save the space, this
commit introduces a new field "flags" in struct domain to store CDF_*
internal flags directly.
Another new CDF_xxx will be introduced in the next patch.
Signed-off-by: Penny Zheng
Acked-by: Julien Grall
---
()"
- put reserved pages on resv_page_list after having taken them off
the "normal" list
- introduce acquire_reserved_page to retrieve reserved pages from
resv_page_list
- forbid non-zero-order requests in populate_physmap
- let is_domain_static return ((void)(d), false) on x86
- fix
as a result.
So in order to avoid the above scenario, this commit updates free_heap_pages()
to check whether the predecessor and/or successor has PGC_reserved set,
when trying to merge the about-to-be-freed chunk with the predecessor
and/or successor.
Suggested-by: Julien Grall
Signed-off-by: Penny Zheng
SUPPORT.md doesn't seem to explicitly say whether static memory is
supported, so this commit updates SUPPORT.md to add feature static
allocation tech preview for now.
Signed-off-by: Penny Zheng
---
v5 changes:
- new commit
---
SUPPORT.md | 7 +++
1 file changed, 7 insertions(+)
diff --git
freeing memory resource, so let's drop the __init
flag.
Signed-off-by: Penny Zheng
---
v5 changes:
- In order to avoid stub functions, we #define PGC_staticmem to non-zero only
when CONFIG_STATIC_MEMORY
- use "unlikely()" around pg->count_info & PGC_staticmem
- remove poin
PGC_reserved could be ambiguous, and we have to tell what the pages are
reserved for, so this commit intends to rename PGC_reserved to
PGC_staticmem, which clearly indicates the page is reserved for static
memory.
Signed-off-by: Penny Zheng
---
v5 changes:
- new commit
---
xen/arch/arm/include
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Tuesday, May 17, 2022 5:29 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Jan Beulich ; Stefano Stabellini ;
> Wei Liu
> Subject: Re: [PAT
Hi Jan
> -Original Message-
> From: Jan Beulich
> Sent: Wednesday, May 18, 2022 12:01 AM
> To: Penny Zheng
> Cc: Wei Chen ; Stefano Stabellini
> ; Julien Grall ; Bertrand Marquis
> ; Volodymyr Babchuk
> ; Andrew Cooper
> ; George Dunlap ;
> Wei Liu ;
Hi Jan and Julien
> -Original Message-
> From: Jan Beulich
> Sent: Wednesday, May 18, 2022 12:11 AM
> To: Penny Zheng
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Julien Grall ; Stefano Stabellini ;
> Wei
> Liu ; xen-devel@lists.xenproject.org
> S
From: Penny Zheng
To add statically shared memory nodes in Dom0, user shall put according
static shared memory configuration under /chosen node.
This commit adds shm-processing function process_shm in construct_dom0
to enable statically shared memory on Dom0.
Signed-off-by: Penny Zheng
This commit sets up shared memory foreign mapping for borrower domain.
If owner domain is the default dom_io, all shared domain are treated as
borrower domain.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v4 changes:
- no change
---
v3 change:
- use map_regions_p2mt instead
following properties:
- compatible:
compatible = "xen,shared-memory-v1"
- reg:
the base guest physical address and size of the shared memory region
- xen,id:
a string that identifies the shared memory region.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabelli
Borrower domain will fail to get a page ref using the owner domain
during allocation, when the owner is created after borrower.
So here, we decide to get and add the right amount of reference, which
is the number of borrowers, when the owner is allocated.
Signed-off-by: Penny Zheng
---
v4
introduces a set of new helpers
put_page_nr() and get_page_nr() to increment/drop the page reference by nr.
Signed-off-by: Penny Zheng
---
v4 changes:
- make sure that the right equation return is at least equal to n
- simplify the underflow
---
v3 changes:
- check overflow with "n"
- remov
will be introduced later in the
following commits.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v4 change:
- no changes
---
v3 change:
- simplify the code since o_gbase is not used if the domain is dom_io
---
v2 change:
- P2M mapping is restricted to normal domain
- in-code comment fix
From: Penny Zheng
This commit introduces process_shm to cope with static shared memory in
domain construction.
DOMID_IO will be the default owner of memory pre-shared among multiple domains
at boot time, when no explicit owner is specified.
This commit only considers allocating static shared
tails.
Penny Zheng (8):
xen/arm: introduce static shared memory
xen/arm: allocate static shared memory to the default owner dom_io
xen/arm: allocate static shared memory to a specific owner domain
xen/arm: introduce put_page_nr and get_page_nr
xen/arm: Add additional reference to owner domain
From: Penny Zheng
This patch serie introduces a new feature: setting up static
shared memory on a dom0less system, through device tree configuration.
This commit parses shared memory node at boot-time, and reserve it in
bootinfo.reserved_mem to avoid other use.
This commits proposes a new
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Tuesday, May 17, 2022 2:01 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Jan Beulich ; Stefano Stabellini ;
> Wei Liu
> Subject: Re: [PAT
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Tuesday, May 17, 2022 2:29 AM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Andrew Cooper
> ; George Dunlap ;
> Jan Beulich ; Stefano Stabellini ;
> Wei Liu
> Subject: Re: [
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Thursday, May 12, 2022 6:54 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v3 5/8] xen/arm:
Hi Julien
> -Original Message-
> From: Julien Grall
> Sent: Thursday, May 12, 2022 6:14 PM
> To: Penny Zheng ; xen-devel@lists.xenproject.org
> Cc: Wei Chen ; Stefano Stabellini
> ; Bertrand Marquis ;
> Volodymyr Babchuk
> Subject: Re: [PATCH v3 4/8] xen/ar
following properties:
- compatible:
compatible = "xen,shared-memory-v1"
- reg:
the base guest physical address and size of the shared memory region
- xen,id:
a string that identifies the shared memory region.
Signed-off-by: Penny Zheng
---
v3 change:
- move field &
This commit sets up shared memory foreign mapping for borrower domain.
If owner domain is the default dom_io, all shared domain are treated as
borrower domain.
Signed-off-by: Penny Zheng
Reviewed-by: Stefano Stabellini
---
v3 change:
- use map_regions_p2mt instead
---
v2 change:
- remove
301 - 400 of 718 matches
Mail list logo