From: Jan Kiszka <[email protected]>

This is the limit for 4K-paging which we rely on in Jailhouse. Make sure
that, if we hit support for even larger sizes, we still end up with this
limit.

Reported-by: Chase Conklin <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/arm64/paging.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hypervisor/arch/arm64/paging.c b/hypervisor/arch/arm64/paging.c
index d62c7142..2942b8d7 100644
--- a/hypervisor/arch/arm64/paging.c
+++ b/hypervisor/arch/arm64/paging.c
@@ -24,8 +24,8 @@
  */
 unsigned int get_cpu_parange(void)
 {
-       /* Larger than any possible value */
-       unsigned int parange = 0x10;
+       /* Largest supported value (for 4K paging) */
+       unsigned int parange = PARANGE_48B;
        unsigned int cpu;
 
        /*
@@ -51,8 +51,7 @@ unsigned int get_cpu_parange(void)
        case PARANGE_44B:
                return 44;
        case PARANGE_48B:
-               return 48;
        default:
-               return 0;
+               return 48;
        }
 }
-- 
2.26.2

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/1a832fddcbdf5a272a1afd998fc20807bc5b20f1.1602664150.git.jan.kiszka%40siemens.com.

Reply via email to