Page MenuHomeFreeBSD

D29351.diff
No OneTemporary

D29351.diff

diff --git a/sys/dev/xen/bus/xenpv.c b/sys/dev/xen/bus/xenpv.c
--- a/sys/dev/xen/bus/xenpv.c
+++ b/sys/dev/xen/bus/xenpv.c
@@ -125,7 +125,7 @@
phys_addr = rman_get_start(res);
error = vm_phys_fictitious_reg_range(phys_addr, phys_addr + size,
- VM_MEMATTR_DEFAULT);
+ VM_MEMATTR_XEN);
if (error) {
bus_release_resource(child, SYS_RES_MEMORY, *res_id, res);
return (NULL);
diff --git a/sys/dev/xen/console/xen_console.c b/sys/dev/xen/console/xen_console.c
--- a/sys/dev/xen/console/xen_console.c
+++ b/sys/dev/xen/console/xen_console.c
@@ -273,7 +273,7 @@
xencons_early_init_ring(struct xencons_priv *cons)
{
cons->intf = pmap_mapdev_attr(ptoa(xen_get_console_mfn()), PAGE_SIZE,
- VM_MEMATTR_WRITE_BACK);
+ VM_MEMATTR_XEN);
cons->evtchn = xen_get_console_evtchn();
}
diff --git a/sys/dev/xen/xenstore/xenstore.c b/sys/dev/xen/xenstore/xenstore.c
--- a/sys/dev/xen/xenstore/xenstore.c
+++ b/sys/dev/xen/xenstore/xenstore.c
@@ -1130,7 +1130,7 @@
} else {
xs.gpfn = xen_get_xenstore_mfn();
xen_store = pmap_mapdev_attr(ptoa(xs.gpfn), PAGE_SIZE,
- PAT_WRITE_BACK);
+ VM_MEMATTR_XEN);
xs.initialized = true;
}
diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h
--- a/sys/x86/include/xen/xen-os.h
+++ b/sys/x86/include/xen/xen-os.h
@@ -30,6 +30,9 @@
#ifndef _MACHINE_X86_XEN_XEN_OS_H_
#define _MACHINE_X86_XEN_XEN_OS_H_
+/* Shared memory needs write-back as its cache attribute for coherency. */
+#define VM_MEMATTR_XEN VM_MEMATTR_WRITE_BACK
+
/* Everything below this point is not included by assembler (.S) files. */
#ifndef __ASSEMBLY__

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 8, 1:38 PM (11 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29406987
Default Alt Text
D29351.diff (1 KB)

Event Timeline