xen/arm: domain_build: introduce dom0_lowmem bootargs
PATCH 1/1 xen/arm: domain_build: introduce dom0_lowmem bootargs
On AArch64 SoCs, some IPs may only have the capability to access 32bits address space. The physical memory assigned for Dom0 maybe not in 4GB address space, then the IPs will not work properly.
Introduce dom0_lowmem bootargs, user could pass "dom0_lowmem=xx" to xen. It means how much memory user would like to be allocated in lower 4GB memory space. If there is not enough memory for dom0_lowmem, higher memory will be allocated.
Thinking such a memory layout on an AArch64 SoC:
Region 0: 2GB(0x80000000 - 0xffffffff)
Region 1: 4GB(0x880000000 - 0x97fffffff)
If user would like to assign 2GB for Dom0 and 1GB of the 2GB memory in Region 0, user could pass "dom0=2048M dom0_lowmem=1024M" to xen.
---
RFC->V1:
This patch is to resolve the issue in https://lists.xen.org/archives/html/xen-devel/2016-09/msg00235.html
No code change since RFC.
Tested on xen-4.8 unstable with AArch64. See partial log:
"dom0_mem = 2048M dom0_lowmem=128M"
(XEN) Allocated 0x00000088000000-0x00000090000000 (128MB/2048MB, order 15)
(XEN) Allocated 0x00000880000000-0x000008c0000000 (1024MB/1920MB, order 18)
(XEN) Allocated 0x000009c0000000-0x000009e0000000 (512MB/896MB, order 17)
(XEN) Allocated 0x000009e0000000-0x000009f0000000 (256MB/384MB, order 16)
(XEN) Allocated 0x000008f8000000-0x00000900000000 (128MB/128MB, order 15)
"dom0_mem = 2048M dom0_lowmem=1024M"
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/2048MB, order 17) (XEN) Allocated 0x000000c0000000-0x000000e0000000 (512MB/1536MB, order 17) (XEN) Allocated 0x00000880000000-0x000008c0000000 (1024MB/1024MB, order 18)
"dom0_mem = 1024M dom0_lowmem=1024M"
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/1024MB, order 17) (XEN) Allocated 0x000000c0000000-0x000000e0000000 (512MB/512MB, order 17)
xen/arch/arm/domain_build.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
xen/arch/arm/domain_build.c +29 -1
@@ -33,6 +33,8 @@ int dom0_11_mapping = 1;#define DOM0_MEM_DEFAULT 0x8000000/* 128 MiB */ static u64 __initdata dom0_mem =DOM0_MEM_DEFAULT ; +/* Only for AArch64 */ +static u64 __initdata dom0_lowmem;static void __init parse_dom0_mem (const char *s) {
@@ -42,6 +44,12 @@ static void __init parse_dom0_mem(const char *s) }custom_param ("dom0_mem" , parse_dom0_mem); +static void __init parse_dom0_lowmem (const char *s) +{ + dom0_lowmem =parse_size_and_unit (s, &s); +} +custom_param ("dom0_lowmem" , parse_dom0_lowmem); +//#define DEBUG_11_ALLOCATION #ifdef DEBUG_11_ALLOCATION # define D11PRINT(fmt, args...) printk(XENLOG_DEBUG fmt, ##args)
@@ -244,7 +252,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || !!dom0_lowmem;unsigned int bits;/*
@@ -263,6 +271,9 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)* First try and allocate the largest thing we can as low as * possible to be bank 0. */ +if ( dom0_lowmem ) + order =get_order_from_bytes (dom0_lowmem); +while ( order >= min_low_order ) {for ( bits = order ; bits <= (lowmem ?32 :PADDR_BITS ); bits++ )
@@ -278,6 +289,11 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) got_bank0: +if ( dom0_lowmem ) { + dom0_lowmem -=pfn_to_paddr ((1 << order)); + lowmem =is_32bit_domain (d) || !!dom0_lowmem; + } +if ( !insert_11_bank (d, kinfo, pg, order) )BUG ();/* Cannot fail for first bank */
@@ -325,6 +341,16 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) } } +if ( dom0_lowmem && lowmem ) + { + dom0_lowmem -=pfn_to_paddr ((1 << order)); + lowmem =is_32bit_domain (d) || !!dom0_lowmem; + } +else + { + lowmem = false; + } +/* * Success, next time around try again to get the largest order * allocation possible.
@@ -2098,6 +2124,8 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U ; +BUG_ON (dom0_mem < dom0_lowmem); + kinfo.unassigned_mem = dom0_mem; rc =kernel_probe (&kinfo);
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hello,
Quoted 9 lines · Peng Fan
On AArch64 SoCs, some IPs may only have the capability to access 32bits address space. The physical memory assigned for Dom0 maybe not in 4GB address space, then the IPs will not work properly.
Introduce
dom0_lowmembootargs, user could pass "dom0_lowmem=xx" to xen. It means how much memory user would like to be allocated in lower 4GB memory space. If there is not enough memory fordom0_lowmem, higher memory will be allocated.
Quoted 5 lines
Thinking such a memory layout on an AArch64 SoC:
Region 0: 2GB(0x80000000 -0xffffffff)
Region 1: 4GB(0x880000000 -0x97fffffff)
If user would like to assign 2GB for Dom0 and 1GB of the 2GB memory in Region 0, user could pass "dom0=2048M dom0_lowmem=1024M" to xen.
See my comments on v1, I still don't think this new parameter is useful.
The commit message does not explain what is the advantage to only allocate a bit of low mem and not as much as we can (as we do on for 32-bit dom0).
xen/arch/arm/domain_build.c static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
Quoted 56 lines
Signed-off-by Peng Fan <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Julien Grall <[email protected]>---
RFC->V1:
This patch is to resolve the issue in https://lists.xen.org/archives/html/xen-devel/2016-09/msg00235.html
No code change since RFC.
Tested on xen-4.8 unstable with AArch64. See partial log:
"dom0_mem= 2048M dom0_lowmem=128M"
(XEN) Allocated 0x00000088000000-0x00000090000000 (128MB/2048MB, order 15)
(XEN) Allocated 0x00000880000000-0x000008c0000000 (1024MB/1920MB, order 18)
(XEN) Allocated 0x000009c0000000-0x000009e0000000 (512MB/896MB, order 17)
(XEN) Allocated 0x000009e0000000-0x000009f0000000 (256MB/384MB, order 16)
(XEN) Allocated 0x000008f8000000-0x00000900000000 (128MB/128MB, order 15)"
dom0_mem= 2048M dom0_lowmem=1024M"
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/2048MB, order 17) (XEN) Allocated 0x000000c0000000-0x000000e0000000 (512MB/1536MB, order 17) (XEN) Allocated 0x00000880000000-0x000008c0000000 (1024MB/1024MB, order 18)"
dom0_mem= 1024M dom0_lowmem=1024M"
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/1024MB, order 17) (XEN) Allocated 0x000000c0000000-0x000000e0000000 (512MB/512MB, order 17)xen/arch/arm/domain_build.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)xen/arch/arm/domain_build.c +8
-0@@ -33,6 +33,8 @@ int dom0_11_mapping = 1;#define DOM0_MEM_DEFAULT 0x8000000/* 128 MiB */ static u64 __initdata dom0_mem =DOM0_MEM_DEFAULT ; +/* Only for AArch64 */ +static u64 __initdata dom0_lowmem;static void __init parse_dom0_mem (const char *s) {@@ -42,6 +44,12 @@ static void __init parse_dom0_mem(const char *s) }custom_param ("dom0_mem" , parse_dom0_mem); +static void __init parse_dom0_lowmem (const char *s) +{ + dom0_lowmem =parse_size_and_unit (s, &s); +} +custom_param ("dom0_lowmem" , parse_dom0_lowmem); +//#define DEBUG_11_ALLOCATION #ifdef DEBUG_11_ALLOCATION # define D11PRINT(fmt, args...) printk(XENLOG_DEBUG fmt, ##args)@@ -244,7 +252,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
The comment on top of allocate_memory should be updated.
Quoted 19 lines
xen/arch/arm/domain_build.c +4
-1unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || !!dom0_lowmem;unsigned int bits;/* @@ -263,6 +271,9 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)* First try and allocate the largest thing we can as low as * possible to be bank 0. */ +if ( dom0_lowmem ) + order =get_order_from_bytes (dom0_lowmem); +while ( order >= min_low_order ) {for ( bits = order ; bits <= (lowmem ?32 :PADDR_BITS ); bits++ )
xen/arch/arm/domain_build.c static void allocate_memory(struct domain *d, struct kernel_info *kinfo) · line 294
Quoted 6 lines
xen/arch/arm/domain_build.c +3
-0@@ -278,6 +289,11 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) got_bank0: +if ( dom0_lowmem ) { + dom0_lowmem -=pfn_to_paddr ((1 << order)); + lowmem =is_32bit_domain (d) || !!dom0_lowmem;
Why do you spread the lowmem = is_32_bit_domain(d) || !!dom0_lowmem everywhere?
Quoted 23 lines
xen/arch/arm/domain_build.c +12
-0+ } +if ( !insert_11_bank (d, kinfo, pg, order) )BUG ();/* Cannot fail for first bank */ @@ -325,6 +341,16 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) } } +if ( dom0_lowmem && lowmem ) + { + dom0_lowmem -=pfn_to_paddr ((1 << order)); + lowmem =is_32bit_domain (d) || !!dom0_lowmem; + } +else + { + lowmem = false; + } +/* * Success, next time around try again to get the largest order * allocation possible.
xen/arch/arm/domain_build.c int construct_dom0(struct domain *d) · line 2128
Quoted 5 lines
xen/arch/arm/domain_build.c +2
-0@@ -2098,6 +2124,8 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U ; +BUG_ON (dom0_mem < dom0_lowmem); +
BUG_ON should not be used to check user input validity.
xen/arch/arm/domain_build.c int construct_dom0(struct domain *d) · line 2131
Quoted 4 lines
xen/arch/arm/domain_build.c +0
-0kinfo.unassigned_mem = dom0_mem; rc =kernel_probe (&kinfo);
Regards,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hello Julien,
Quoted 12 lines · Julien Grall
Hello,
Quoted 9 lines · Peng Fan
On AArch64 SoCs, some IPs may only have the capability to access 32bits address space. The physical memory assigned for Dom0 maybe not in 4GB address space, then the IPs will not work properly.
Introduce
dom0_lowmembootargs, user could pass "dom0_lowmem=xx" to xen. It means how much memory user would like to be allocated in lower 4GB memory space. If there is not enough memory fordom0_lowmem, higher memory will be allocated.
Quoted 7 lines
Quoted 5 lines
Thinking such a memory layout on an AArch64 SoC:
Region 0: 2GB(0x80000000 -0xffffffff)
Region 1: 4GB(0x880000000 -0x97fffffff)
If user would like to assign 2GB for Dom0 and 1GB of the 2GB memory in Region 0, user could pass "dom0=2048M dom0_lowmem=1024M" to xen.See my comments on v1, I still don't think this new parameter is useful.
Thanks for comments. I see :)
Quoted 3 lines
The commit message does not explain what is the advantage to only allocate a bit of low mem and not as much as we can (as we do on for 32-bit dom0).
This patch is just want to resolve the issue in
https://lists.xen.org/archives/html/xen-devel/2016-09/msg00235.html.
I am not keen on the method in this patch, a bit complicated.
The method in this patch is try to allocate the size lowmem indicated in bootargs.
Rethinking about DomU, seems allocate as much as possible lowmem for Dom0 is ok.
Then, do you agree to use the following patch?
xen/arch/arm/domain_build.c +0 -0
@@ -28,6 +28,8 @@
static unsigned int __initdata opt_dom0_max_vcpus; integer_param("dom0_max_vcpus", opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param("dom0_use_lowmem", opt_dom0_use_lowmem);
int dom0_11_mapping = 1;
@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
unsigned int order = get_11_allocation_size(kinfo->unassigned_mem);
int i;- bool_t lowmem = is_32bit_domain(d);
+ bool_t lowmem = is_32bit_domain(d) || opt_dom0_use_lowmem;
unsigned int bits;Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Quoted 80 lines
xen/arch/arm/domain_build.c static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
Quoted 57 lines
Signed-off-by Peng Fan <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Julien Grall <[email protected]>---
RFC->V1:
This patch is to resolve the issue in https://lists.xen.org/archives/html/xen-devel/2016-09/msg00235.html
No code change since RFC.
Tested on xen-4.8 unstable with AArch64. See partial log:
"dom0_mem= 2048M dom0_lowmem=128M"
(XEN) Allocated 0x00000088000000-0x00000090000000 (128MB/2048MB, order 15)
(XEN) Allocated 0x00000880000000-0x000008c0000000 (1024MB/1920MB, order 18)
(XEN) Allocated 0x000009c0000000-0x000009e0000000 (512MB/896MB, order 17)
(XEN) Allocated 0x000009e0000000-0x000009f0000000 (256MB/384MB, order 16)
(XEN) Allocated 0x000008f8000000-0x00000900000000 (128MB/128MB, order 15)"
dom0_mem= 2048M dom0_lowmem=1024M"
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/2048MB, order 17) (XEN) Allocated 0x000000c0000000-0x000000e0000000 (512MB/1536MB, order 17) (XEN) Allocated 0x00000880000000-0x000008c0000000 (1024MB/1024MB, order 18)"
dom0_mem= 1024M dom0_lowmem=1024M"
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/1024MB, order 17) (XEN) Allocated 0x000000c0000000-0x000000e0000000 (512MB/512MB, order 17)
xen/arch/arm/domain_build.c| 30 +++++++++++++++++++++++++++++-1 file changed, 29 insertions(+), 1 deletion(-)xen/arch/arm/domain_build.c +8
-0@@ -33,6 +33,8 @@ int dom0_11_mapping = 1;#define DOM0_MEM_DEFAULT 0x8000000/* 128 MiB */ static u64 __initdata dom0_mem =DOM0_MEM_DEFAULT ; +/* Only for AArch64 */ +static u64 __initdata dom0_lowmem;static void __init parse_dom0_mem (const char *s) {@@ -42,6 +44,12 @@ static void __init parse_dom0_mem(const char *s) }custom_param ("dom0_mem" , parse_dom0_mem); +static void __init parse_dom0_lowmem (const char *s) +{ + dom0_lowmem =parse_size_and_unit (s, &s); +} +custom_param ("dom0_lowmem" , parse_dom0_lowmem); +//#define DEBUG_11_ALLOCATION #ifdef DEBUG_11_ALLOCATION # define D11PRINT(fmt, args...) printk(XENLOG_DEBUG fmt, ##args)@@ -244,7 +252,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)The comment on top of
allocate_memoryshould be updated.Quoted 20 lines
xen/arch/arm/domain_build.c +4
-1unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || !!dom0_lowmem;unsigned int bits;/* @@ -263,6 +271,9 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)* First try and allocate the largest thing we can as low as * possible to be bank 0. */ +if ( dom0_lowmem ) + order =get_order_from_bytes (dom0_lowmem); +while ( order >= min_low_order ) {for ( bits = order ; bits <= (lowmem ?32 :PADDR_BITS ); bits++ )@@ -278,6 +289,11 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
Quoted 8 lines
xen/arch/arm/domain_build.c static void allocate_memory(struct domain *d, struct kernel_info *kinfo) · line 294
Quoted 5 lines
xen/arch/arm/domain_build.c +3
-0got_bank0: +if ( dom0_lowmem ) { + dom0_lowmem -=pfn_to_paddr ((1 << order)); + lowmem =is_32bit_domain (d) || !!dom0_lowmem;Why do you spread the lowmem =
is_32_bit_domain(d)|| !!dom0_lowmem everywhere?
If the first allocation does not allocate the needed lowmem, the following allocation will continue allocate lowmem.
Quoted 25 lines
Quoted 25 lines
xen/arch/arm/domain_build.c +12
-0+ } +if ( !insert_11_bank (d, kinfo, pg, order) )BUG ();/* Cannot fail for first bank */ @@ -325,6 +341,16 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo) } } +if ( dom0_lowmem && lowmem ) + { + dom0_lowmem -=pfn_to_paddr ((1 << order)); + lowmem =is_32bit_domain (d) || !!dom0_lowmem; + } +else + { + lowmem = false; + } +/* * Success, next time around try again to get the largest order * allocation possible. @@ -2098,6 +2124,8 @@ int construct_dom0(struct domain *d)
Quoted 6 lines
xen/arch/arm/domain_build.c int construct_dom0(struct domain *d) · line 2128
Quoted 4 lines
xen/arch/arm/domain_build.c +2
-0d->max_pages = ~0U ; +BUG_ON (dom0_mem < dom0_lowmem); +
BUG_ONshould not be used to check user input validity.
Thanks, get it.
Regards,
Peng.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;
Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Regards,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hello Julien,
Quoted 22 lines · Julien Grall
Hello,
Quoted 19 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +2
-0@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i;
Quoted 8 lines
Quoted 6 lines
xen/arch/arm/domain_build.c +1
-1-bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Then you prefer directly change "bool_t lowmem = is_32bit_domain(d);" to "bool_t lowmem = true" ? I just want to give user a choice.
Thanks,
Peng.
Quoted 5 lines
Regards,
Signature · 1 line
Julien Grall
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 28 lines · Julien Grall
Quoted 27 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.
We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Regards,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
I have not try, if there is no lowmem.
I have not look into alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-
while ( order >= min_low_order )
{
for ( bits = order ; bits <= (lowmem ? 32 : PADDR_BITS); bits++ )
{
pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
if ( pg != NULL )
goto got_bank0;
}
order--;
}
panic("Unable to allocate first memory bank");Thanks,
Peng.
Quoted 5 lines
Regards,
Signature · 1 line
Julien Grall
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 49 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Quoted 8 lines
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-
We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
I personally don't think this is a hard requirement and instead of panicking we should print a warning to say "no bank has been allocated below 4GB" or "a bank of N MB has been allocated below 4GB".
So my suggestion is to allocate as much as possible lowmem (i.e below 4GB) and if it does not work print a warning then allocate the first bank above 4GB.
I much prefer to let Xen decide itself what to do when possible rather than asking the user to specify himself whether lowmem is required.
This is making life easier for distribution to support multiple platforms with Xen without having to modify the command line.
Regards,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 61 lines · Julien Grall
Quoted 49 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Quoted 8 lines
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-
Quoted 3 lines
We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
Now also need to handle device that have DMA limitation -:)
Quoted 9 lines
I personally don't think this is a hard requirement and instead of panicking we should print a warning to say "no bank has been allocated below 4GB" or "a bank of N MB has been allocated below 4GB".
So my suggestion is to allocate as much as possible lowmem (i.e below 4GB) and if it does not work print a warning then allocate the first bank above 4GB.
Quoted 5 lines
I much prefer to let Xen decide itself what to do when possible rather than asking the user to specify himself whether lowmem is required.
This is making life easier for distribution to support multiple platforms with Xen without having to modify the command line.
Thanks. I'll follow you suggestion and do some test. Then send out a new patch.
Thanks,
Peng.
Quoted 5 lines
Regards,
Signature · 1 line
Julien Grall
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 62 lines · Peng Fan
Quoted 61 lines · Julien Grall
Quoted 57 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-
Quoted 5 lines
Quoted 3 lines
We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
Now also need to handle device that have DMA limitation -:)
Hi Peng,
Doesn't your platform have an IOMMU/SMMU?
Cheers,
Edgar
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Hi Edgar,
Quoted 67 lines · Edgar E. Iglesias
Quoted 66 lines · Peng Fan
Quoted 64 lines · Julien Grall
Quoted 49 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Quoted 8 lines
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
Quoted 5 lines
Quoted 1 line
Now also need to handle device that have DMA limitation -:)
Hi Peng,
Doesn't your platform have an IOMMU/SMMU?
We have SMMU. This is not related to SMMU. Dom0 use 1:1 mapping and no SMMU involved, the physical memory assigned to Dom0 maybe higher than 4GB, but Some IPs only supports 32bits DMA in Dom0. Then assign a 64bits dma address to a device only supports 32 bits device in Linux will hang the device or else.
Regards,
Peng.
Quoted 3 lines
Cheers,
Edgar
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 71 lines · Peng Fan
Hi Edgar,
Quoted 69 lines · Edgar E. Iglesias
Quoted 67 lines · Peng Fan
Quoted 61 lines · Julien Grall
Quoted 49 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Quoted 8 lines
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-Quoted 3 lines
We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
Now also need to handle device that have DMA limitation -:)
Quoted 8 lines
Quoted 3 lines
Hi Peng,
Doesn't your platform have an IOMMU/SMMU?
We have SMMU. This is not related to SMMU. Dom0 use 1:1 mapping and no SMMU involved, the physical memory assigned to Dom0 maybe higher than 4GB, but Some IPs only supports 32bits DMA in Dom0. Then assign a 64bits dma address to a device only supports 32 bits device in Linux will hang the device or else.
Well, I think it is somewhat related to the IOMMU.
If your SMMU supports S1 + S2 translations, allthough not supported by Xen/ARM today, we could support nested SMMU's so that Dom0 could get it's own private S1 portion of the SMMU.
Another option is to perhaps join into the efforts of PV-IOMMU and try to see if it would work for Xen on ARM:
https://lists.xen.org/archives/html/xen-devel/2016-02/msg01428.html
For platforms that have an IOMMU, I think both of these options may solve the use-case of dom0 using 32bit DMA devs without any lowmem. In addition to that, these features would be very nice as they also enable DMA API isolation and VFIO user-space drivers in dom0. Spending time on these kind of options seems worthwhile to me.
With 32bit DMA devs, without an IOMMU, lowmem becomes critical but such systems are not really secure as has already been mentioned. I'm not sure it's worth introducing workarounds/hax for such systems.
Cheers,
Edgar
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Hi,
Quoted 91 lines · Edgar E. Iglesias
Quoted 71 lines · Peng Fan
Hi Edgar,
Quoted 69 lines · Edgar E. Iglesias
Quoted 67 lines · Peng Fan
Quoted 61 lines · Julien Grall
Quoted 49 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Quoted 8 lines
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-Quoted 3 lines
We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
Now also need to handle device that have DMA limitation -:)
Quoted 8 lines
Quoted 3 lines
Hi Peng,
Doesn't your platform have an IOMMU/SMMU?
We have SMMU. This is not related to SMMU. Dom0 use 1:1 mapping and no SMMU involved, the physical memory assigned to Dom0 maybe higher than 4GB, but Some IPs only supports 32bits DMA in Dom0. Then assign a 64bits dma address to a device only supports 32 bits device in Linux will hang the device or else.
Well, I think it is somewhat related to the IOMMU.
If your SMMU supports S1 + S2 translations, allthough not supported by Xen/ARM today, we could support nested SMMU's so that Dom0 could get it's own private S1 portion of the SMMU.
Another option is to perhaps join into the efforts of PV-IOMMU and try to see if it would work for Xen on ARM:
https://lists.xen.org/archives/html/xen-devel/2016-02/msg01428.html
Quoted 5 lines
For platforms that have an IOMMU, I think both of these options may solve the use-case of dom0 using 32bit DMA devs without any lowmem. In addition to that, these features would be very nice as they also enable DMA API isolation and VFIO user-space drivers in dom0. Spending time on these kind of options seems worthwhile to me.
There is a third option. The direct memory mapping for DOM0 is a workaround for platform where not all DMA-capable devices are protected by an SMMU.
If you know the platform does not have such devices, it would be possible to remove the direct memory mapping.
In this case, Xen will allocate the RAM anywhere in the physical memory but will be mapped in DOM0 using the memory region find the device tree. (e.g if the first bank is below 4GB, DOM0 will have memory mapped below 4GB).
You would also have to remove specific xen_dma_ops (swiotlb-xen callback) as the device will be fully protected (and no workaround is necessary).
I suggested a generic way few years ago [1] that is a step towards removing direct mapping. But i never had the time to continue it.
Quoted 5 lines
With 32bit DMA devs, without an IOMMU, lowmem becomes critical but such systems are not really secure as has already been mentioned. I'm not sure it's worth introducing workarounds/hax for such systems.
Well, Dom0 (aka hardware domain) is a trusted domain as it owns most of the devices. There are so many other way to screw up the platform. So it would be fine to allocate lowmem for that domain.
The SMMU is only mandatory for any device passthrough to all the other domain.
Regards,
[1] https://lists.xen.org/archives/html/xen-devel/2014-02/msg01897.html
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hi Edgar,
Quoted 81 lines · Edgar E. Iglesias
Quoted 71 lines · Peng Fan
Hi Edgar,
Quoted 69 lines · Edgar E. Iglesias
Quoted 67 lines · Peng Fan
Quoted 61 lines · Julien Grall
Quoted 49 lines · Peng Fan
Hello Julien,
Quoted 39 lines · Julien Grall
Quoted 1 line · Peng Fan
Hello Julien,
Hello Peng,
Quoted 32 lines · Julien Grall
Quoted 30 lines
Hello,
Quoted 24 lines · Peng Fan
On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
xen/arch/arm/domain_build.c +3
-1@@ -28,6 +28,8 @@static unsigned int __initdata opt_dom0_max_vcpus;integer_param ("dom0_max_vcpus" , opt_dom0_max_vcpus); +static bool_t __initdata opt_dom0_use_lowmem; +boolean_param ("dom0_use_lowmem" , opt_dom0_use_lowmem);int dom0_11_mapping =1 ;@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)unsigned int order =get_11_allocation_size (kinfo->unassigned_mem);int i; -bool_t lowmem =is_32bit_domain (d); +bool_t lowmem =is_32bit_domain (d) || opt_dom0_use_lowmem;unsigned int bits;Quoted 1 line
Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
Again, what is the benefit to have a command line option for that?
Quoted 6 lines
Quoted 2 lines
Then you prefer directly change "
bool_tlowmem =is_32bit_domain(d);" to "bool_tlowmem = true" ? I just want to give user a choice.We don't add new command line parameter just because they look cool to have. So far, you did not explain why it would be good to let the choice to the user and how it could be used.
Quoted 8 lines
I have not try, if there is no lowmem.
I have not look into
alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no dram below 4GB. If we still can get memory when lowmem is true, I am ok to change directly assign lowmem with value true. Anyway I have not look into the internals of domheap and not sure whether there is such a platform that no lowmem (:-Quoted 3 lines
We cannot exclude this possibility. However, the only reason that Xen is requiring to allocate a bank below 4GB for 32-bit domain is to handle non-LPAE kernel.
Now also need to handle device that have DMA limitation -:)
Quoted 8 lines
Quoted 3 lines
Hi Peng,
Doesn't your platform have an IOMMU/SMMU?
We have SMMU. This is not related to SMMU. Dom0 use 1:1 mapping and no SMMU involved, the physical memory assigned to Dom0 maybe higher than 4GB, but Some IPs only supports 32bits DMA in Dom0. Then assign a 64bits dma address to a device only supports 32 bits device in Linux will hang the device or else.
Quoted 5 lines
Well, I think it is somewhat related to the IOMMU.
If your SMMU supports S1 + S2 translations, allthough not supported by Xen/ARM today, we could support nested SMMU's so that Dom0 could get it's own private S1 portion of the SMMU.
For DomU or hardware domain, I think supporting SMMU with Linux S1 + XEN S2 is a good feature to have. For Dom0, I think no need to use S1 + S2 for SMMU, It is control domain.
Quoted 4 lines
Another option is to perhaps join into the efforts of PV-IOMMU and try to see if it would work for Xen on ARM:
https://lists.xen.org/archives/html/xen-devel/2016-02/msg01428.html
This is new to me -:) Will get back to you when I know more about this.
Quoted 6 lines
For platforms that have an IOMMU, I think both of these options may solve the use-case of dom0 using 32bit DMA devs without any lowmem. In addition to that, these features would be very nice as they also enable DMA API isolation and VFIO user-space drivers in dom0. Spending time on these kind of options seems worthwhile to me.
If SMMU S1 is supported, we could use VFIO. This's good feature to have. If you have any progress or new update, please kindly CC me. I am happy to see this.
Quoted 5 lines
With 32bit DMA devs, without an IOMMU, lowmem becomes critical but such systems are not really secure as has already been mentioned. I'm not sure it's worth introducing workarounds/hax for such systems.
The proposed two options may cost big efforts I think -:)
I prefer Julien's suggestion to fix the issue I met, since easy to implement. Anyway from the long run, your two options are good feature to have.
Thanks,
Peng.
Quoted 3 lines
Cheers,
Edgar
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel