1 #include <asm/cpufeature.h>
3 #include <asm/processor.h>
5 void xen_scrub_pages(void *v, unsigned int count)
7 if (likely(cpu_has_xmm2)) {
8 unsigned long n = count * (PAGE_SIZE / sizeof(long) / 4);
10 for (; n--; v += sizeof(long) * 4)
11 asm("movnti %1,(%0)\n\t"
12 "movnti %1,%c2(%0)\n\t"
13 "movnti %1,2*%c2(%0)\n\t"
14 "movnti %1,3*%c2(%0)\n\t"
15 : : "r" (v), "r" (0L), "i" (sizeof(long))
17 asm volatile("sfence" : : : "memory");
19 for (; count--; v += PAGE_SIZE)