All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN-devel] arm64: fix incorrect pa_range_info table to support 42 bit PA systems.
@ 2017-05-13  0:26 Feng Kan
  2017-05-15 14:53 ` Julien Grall
  0 siblings, 1 reply; 4+ messages in thread
From: Feng Kan @ 2017-05-13  0:26 UTC (permalink / raw)
  To: xen-devel, sstabellini, julien.grall; +Cc: Feng Kan

The pa_range_info table contain incorrect root_order and t0sz which
prevent 42 bit PA systems from booting dom0.

Signed-off-by: Feng Kan <fkan@apm.com>
---
 xen/arch/arm/p2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 34d5776..cbb8675 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -1479,7 +1479,7 @@ void __init setup_virt_paging(void)
         [0] = { 32,      32/*32*/,  0,          1 },
         [1] = { 36,      28/*28*/,  0,          1 },
         [2] = { 40,      24/*24*/,  1,          1 },
-        [3] = { 42,      24/*22*/,  1,          1 },
+        [3] = { 42,      22/*22*/,  3,          1 },
         [4] = { 44,      20/*20*/,  0,          2 },
         [5] = { 48,      16/*16*/,  0,          2 },
         [6] = { 0 }, /* Invalid */
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [XEN-devel] arm64: fix incorrect pa_range_info table to support 42 bit PA systems.
  2017-05-13  0:26 [XEN-devel] arm64: fix incorrect pa_range_info table to support 42 bit PA systems Feng Kan
@ 2017-05-15 14:53 ` Julien Grall
  2017-05-15 17:11   ` Feng Kan
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2017-05-15 14:53 UTC (permalink / raw)
  To: Feng Kan, xen-devel, sstabellini

Hello Feng,

On 13/05/17 01:26, Feng Kan wrote:
> The pa_range_info table contain incorrect root_order and t0sz which
> prevent 42 bit PA systems from booting dom0.

As I mentioned in the previous thread [1], this is not a bug. What you 
configure below is the stage-2 page table and not the hypervisor page-table.

It is perfectly fine to expose less IPA (Intermediate Physical Address) 
bits than the number of PA (Physical Address) bits as long as all the 
address wired are below 40 bits (assumption made by the patch who added 
this code). Does your hardware have devices/RAM above 40 bits? If so, 
then you need to mention in the commit message.

This bring another question, now you will allocate 8 pages by default 
for both DOM0 and guests. Exposing 42 bits IPA to a guest does not sound 
necessary, so we would waste memory here. How are you going to address that?

Lastly, please quote the ARM ARM when you modify the generic ARM code to 
help the reviewer checking your code.

Cheers,

[1] 
https://lists.xenproject.org/archives/html/xen-devel/2017-05/msg01254.html

>
> Signed-off-by: Feng Kan <fkan@apm.com>
> ---
>  xen/arch/arm/p2m.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 34d5776..cbb8675 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1479,7 +1479,7 @@ void __init setup_virt_paging(void)
>          [0] = { 32,      32/*32*/,  0,          1 },
>          [1] = { 36,      28/*28*/,  0,          1 },
>          [2] = { 40,      24/*24*/,  1,          1 },
> -        [3] = { 42,      24/*22*/,  1,          1 },
> +        [3] = { 42,      22/*22*/,  3,          1 },
>          [4] = { 44,      20/*20*/,  0,          2 },
>          [5] = { 48,      16/*16*/,  0,          2 },
>          [6] = { 0 }, /* Invalid */
>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [XEN-devel] arm64: fix incorrect pa_range_info table to support 42 bit PA systems.
  2017-05-15 14:53 ` Julien Grall
@ 2017-05-15 17:11   ` Feng Kan
  2017-05-15 17:14     ` Julien Grall
  0 siblings, 1 reply; 4+ messages in thread
From: Feng Kan @ 2017-05-15 17:11 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, sstabellini

On Mon, May 15, 2017 at 7:53 AM, Julien Grall <julien.grall@arm.com> wrote:
> Hello Feng,
>
> On 13/05/17 01:26, Feng Kan wrote:
>>
>> The pa_range_info table contain incorrect root_order and t0sz which
>> prevent 42 bit PA systems from booting dom0.
>
>
> As I mentioned in the previous thread [1], this is not a bug. What you
> configure below is the stage-2 page table and not the hypervisor page-table.
>
> It is perfectly fine to expose less IPA (Intermediate Physical Address) bits
> than the number of PA (Physical Address) bits as long as all the address
> wired are below 40 bits (assumption made by the patch who added this code).
> Does your hardware have devices/RAM above 40 bits?
Yes,  the APM X-Gene series have all been 42 bit PA systems.
Particularly X-Gene 3, which
has its PCIe0 all the way up starting at 41 bit.

If so, then you need to
> mention in the commit message.
I will be more clear in the commit message.
>
> This bring another question, now you will allocate 8 pages by default for
> both DOM0 and guests. Exposing 42 bits IPA to a guest does not sound
> necessary, so we would waste memory here. How are you going to address that?
To be honest, I hadn't thought of that. I had assume system such as
these would have
plenty of memory. I will take a look regarding this. If you have any
suggestions that would
be greatly appreciated.
>
> Lastly, please quote the ARM ARM when you modify the generic ARM code to
> help the reviewer checking your code.
Thanks, will do.
>
> Cheers,
>
> [1]
> https://lists.xenproject.org/archives/html/xen-devel/2017-05/msg01254.html
>
>
>>
>> Signed-off-by: Feng Kan <fkan@apm.com>
>> ---
>>  xen/arch/arm/p2m.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
>> index 34d5776..cbb8675 100644
>> --- a/xen/arch/arm/p2m.c
>> +++ b/xen/arch/arm/p2m.c
>> @@ -1479,7 +1479,7 @@ void __init setup_virt_paging(void)
>>          [0] = { 32,      32/*32*/,  0,          1 },
>>          [1] = { 36,      28/*28*/,  0,          1 },
>>          [2] = { 40,      24/*24*/,  1,          1 },
>> -        [3] = { 42,      24/*22*/,  1,          1 },
>> +        [3] = { 42,      22/*22*/,  3,          1 },
>>          [4] = { 44,      20/*20*/,  0,          2 },
>>          [5] = { 48,      16/*16*/,  0,          2 },
>>          [6] = { 0 }, /* Invalid */
>>
>
> --
> Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [XEN-devel] arm64: fix incorrect pa_range_info table to support 42 bit PA systems.
  2017-05-15 17:11   ` Feng Kan
@ 2017-05-15 17:14     ` Julien Grall
  0 siblings, 0 replies; 4+ messages in thread
From: Julien Grall @ 2017-05-15 17:14 UTC (permalink / raw)
  To: Feng Kan; +Cc: xen-devel, sstabellini

Hi,

On 15/05/17 18:11, Feng Kan wrote:
> On Mon, May 15, 2017 at 7:53 AM, Julien Grall <julien.grall@arm.com> wrote:
>> Hello Feng,
>>
>> On 13/05/17 01:26, Feng Kan wrote:
>>>
>>> The pa_range_info table contain incorrect root_order and t0sz which
>>> prevent 42 bit PA systems from booting dom0.
>>
>>
>> As I mentioned in the previous thread [1], this is not a bug. What you
>> configure below is the stage-2 page table and not the hypervisor page-table.
>>
>> It is perfectly fine to expose less IPA (Intermediate Physical Address) bits
>> than the number of PA (Physical Address) bits as long as all the address
>> wired are below 40 bits (assumption made by the patch who added this code).
>> Does your hardware have devices/RAM above 40 bits?
> Yes,  the APM X-Gene series have all been 42 bit PA systems.
> Particularly X-Gene 3, which
> has its PCIe0 all the way up starting at 41 bit.

Thank you for the information.

> If so, then you need to
>> mention in the commit message.
> I will be more clear in the commit message.
>>
>> This bring another question, now you will allocate 8 pages by default for
>> both DOM0 and guests. Exposing 42 bits IPA to a guest does not sound
>> necessary, so we would waste memory here. How are you going to address that?
> To be honest, I hadn't thought of that. I had assume system such as
> these would have
> plenty of memory. I will take a look regarding this. If you have any
> suggestions that would
> be greatly appreciated

I am not totally against using 8 pages. Although a TODO will be useful 
in the code and the commit message.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-05-15 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-13  0:26 [XEN-devel] arm64: fix incorrect pa_range_info table to support 42 bit PA systems Feng Kan
2017-05-15 14:53 ` Julien Grall
2017-05-15 17:11   ` Feng Kan
2017-05-15 17:14     ` Julien Grall

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.