]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen/netfront: Define PTE flags per architecture
authorJulien Grall <julien.grall@linaro.org>
Tue, 14 Jan 2014 01:41:15 +0000 (01:41 +0000)
committerJulien Grall <julien.grall@linaro.org>
Sun, 12 Apr 2015 11:08:06 +0000 (12:08 +0100)
PG_* flags doesn't exists on ARM. As this code is not executed on this platform
(every guests use auto-translate address), it's possible to define as 0 the
flags.

sys/dev/xen/netfront/netfront.c

index a347e77f0f86e62e109c426ce1d7553868619385..43563a4e3135d452233d24ae9700154cb7d464f6 100644 (file)
@@ -1356,9 +1356,14 @@ xennet_get_responses(struct netfront_info *np,
                                mcl = np->rx_mcl + pages_flipped;
                                mmu = np->rx_mmu + pages_flipped;
 
+#ifdef __arm__
+# define PTE_FLAGS     0
+#else
+# define PTE_FLAGS     (PG_RW | PG_V | PG_M | PG_A)
+#endif
                                MULTI_update_va_mapping(mcl, (u_long)vaddr,
-                                   (((vm_paddr_t)mfn) << PAGE_SHIFT) | PG_RW |
-                                   PG_V | PG_M | PG_A, 0);
+                                       (((vm_paddr_t)mfn) << PAGE_SHIFT) |
+                                       PTE_FLAGS, 0);
                                pfn = (uintptr_t)m->m_ext.ext_arg1;
                                mmu->ptr = ((vm_paddr_t)mfn << PAGE_SHIFT) |
                                    MMU_MACHPHYS_UPDATE;