xen/arm: define PAGE_HYPERVISOR as BUFFERABLE
PATCH 1/1 xen/arm: define PAGE_HYPERVISOR as BUFFERABLE
Use stage 1 attribute indexes for PAGE_HYPERVISOR, the appriopriate one for normal memory hypervisor mappings would be BUFFERABLE.
xen/include/asm-arm/page.h +1 -1
@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (BUFFERABLE)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/*
Quoted 10 lines · Stefano Stabellini
Use stage 1 attribute indexes for
PAGE_HYPERVISOR, the appriopriate one for normal memory hypervisor mappings would be BUFFERABLE.Signed-off-by Stefano Stabellini <[email protected]>xen/include/asm-arm/page.h +0
-0
xen/include/asm-arm/page.h line 64
Quoted 8 lines
xen/include/asm-arm/page.h +1
-1@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (BUFFERABLE)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/*
This patch is completely wrong, fortunately it hasn't been applied.
Despite the name, BUFFERABLE means non-cacheable. Mapping a guest page non-cacheable in the hypervisor would cause mismatch in memory attributes.
We should map the guest page as "normal memory", that is WRITEBACK.
xen/include/asm-arm/page.h +1 -1
@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (WRITEBACK)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/*
Quoted 14 lines · Stefano Stabellini
Quoted 13 lines · Stefano Stabellini
Use stage 1 attribute indexes for
PAGE_HYPERVISOR, the appriopriate one for normal memory hypervisor mappings would be BUFFERABLE.Signed-off-by Stefano Stabellini <[email protected]>xen/include/asm-arm/page.h +0
-0@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK
Quoted 7 lines
xen/include/asm-arm/page.h line 64
Quoted 5 lines
xen/include/asm-arm/page.h +1
-1-#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (BUFFERABLE)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/* This patch is completely wrong, fortunately it hasn't been applied.
Yes, it appears to have slipped through my net, sorry. (But good in this case!)
Quoted 6 lines
Despite the name, BUFFERABLE means non-cacheable. Mapping a guest page non-cacheable in the hypervisor would cause mismatch in memory attributes.
We should map the guest page as "normal memory", that is WRITEBACK.
The hypervisor's own memory mappings are using WRITEALLOC not WRITEBACK (see mfn_to_xen_entry). Is one or the other wrong?
Quoted 13 lines
xen/include/asm-arm/page.h +1
-1@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (WRITEBACK)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/*
Quoted 27 lines · Ian Campbell
Quoted 14 lines · Stefano Stabellini
Quoted 13 lines · Stefano Stabellini
Use stage 1 attribute indexes for
PAGE_HYPERVISOR, the appriopriate one for normal memory hypervisor mappings would be BUFFERABLE.Signed-off-by Stefano Stabellini <[email protected]>xen/include/asm-arm/page.h +0
-0@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACKQuoted 7 lines
xen/include/asm-arm/page.h line 64
Quoted 5 lines
xen/include/asm-arm/page.h +1
-1-#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (BUFFERABLE)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/* This patch is completely wrong, fortunately it hasn't been applied.
Yes, it appears to have slipped through my net, sorry. (But good in this case!)
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Despite the name, BUFFERABLE means non-cacheable. Mapping a guest page non-cacheable in the hypervisor would cause mismatch in memory attributes.
We should map the guest page as "normal memory", that is WRITEBACK.
The hypervisor's own memory mappings are using WRITEALLOC not WRITEBACK (see
mfn_to_xen_entry). Is one or the other wrong?
They are both appropriate. BTW WRITEALLOC is effectively what we have now (MATTR_MEM is truncated to 0x7 that is WRITEALLOC).
Quoted 11 lines
Quoted 11 lines
xen/include/asm-arm/page.h +1
-1@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (WRITEBACK)#define MAP_SMALL_PAGES PAGE_HYPERVISOR
Quoted 32 lines · Stefano Stabellini
Quoted 31 lines · Ian Campbell
Quoted 14 lines · Stefano Stabellini
Quoted 13 lines · Stefano Stabellini
Use stage 1 attribute indexes for
PAGE_HYPERVISOR, the appriopriate one for normal memory hypervisor mappings would be BUFFERABLE.Signed-off-by Stefano Stabellini <[email protected]>xen/include/asm-arm/page.h +0
-0@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACKQuoted 7 lines
xen/include/asm-arm/page.h line 64
Quoted 5 lines
xen/include/asm-arm/page.h +1
-1-#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (BUFFERABLE)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/* This patch is completely wrong, fortunately it hasn't been applied.
Yes, it appears to have slipped through my net, sorry. (But good in this case!)
Quoted 5 lines
Despite the name, BUFFERABLE means non-cacheable. Mapping a guest page non-cacheable in the hypervisor would cause mismatch in memory attributes.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
We should map the guest page as "normal memory", that is WRITEBACK.
The hypervisor's own memory mappings are using WRITEALLOC not WRITEBACK (see
mfn_to_xen_entry). Is one or the other wrong?They are both appropriate. BTW WRITEALLOC is effectively what we have now (
MATTR_MEMis truncated to0x7that is WRITEALLOC).
OK. So should we switch to WRITEALLOC explicitly or would you make an argument for switching to WRITEBACK?
Can we get all that in an update changelog with an S-o-b etc please.
Ian.
Quoted 14 lines
Quoted 13 lines
Quoted 13 lines
xen/include/asm-arm/page.h +1
-1@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (WRITEBACK)#define MAP_SMALL_PAGES PAGE_HYPERVISOR
Quoted 35 lines · Ian Campbell
Quoted 34 lines · Stefano Stabellini
Quoted 33 lines · Ian Campbell
Quoted 14 lines · Stefano Stabellini
Quoted 13 lines · Stefano Stabellini
Use stage 1 attribute indexes for
PAGE_HYPERVISOR, the appriopriate one for normal memory hypervisor mappings would be BUFFERABLE.Signed-off-by Stefano Stabellini <[email protected]>xen/include/asm-arm/page.h +0
-0@@ -58,7 +58,7 @@#define DEV_WC BUFFERABLE#define DEV_CACHED WRITEBACKQuoted 7 lines
xen/include/asm-arm/page.h line 64
Quoted 5 lines
xen/include/asm-arm/page.h +1
-1-#define PAGE_HYPERVISOR (MATTR_MEM) +#define PAGE_HYPERVISOR (BUFFERABLE)#define MAP_SMALL_PAGES PAGE_HYPERVISOR/* This patch is completely wrong, fortunately it hasn't been applied.
Yes, it appears to have slipped through my net, sorry. (But good in this case!)
Quoted 6 lines
Despite the name, BUFFERABLE means non-cacheable. Mapping a guest page non-cacheable in the hypervisor would cause mismatch in memory attributes.
We should map the guest page as "normal memory", that is WRITEBACK.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
The hypervisor's own memory mappings are using WRITEALLOC not WRITEBACK (see
mfn_to_xen_entry). Is one or the other wrong?They are both appropriate. BTW WRITEALLOC is effectively what we have now (
MATTR_MEMis truncated to0x7that is WRITEALLOC).OK. So should we switch to WRITEALLOC explicitly or would you make an argument for switching to WRITEBACK?
The only argument for using WRITEBACK instead of WRITEALLOC would be to match Linux cache policy, but it's not a very good argument.
Quoted 1 line
Can we get all that in an update changelog with an S-o-b etc please.
OK