diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-10-19 01:27:40 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-10-19 01:27:40 +0000 |
commit | 99642cdfcbeeacb6d6d0f21f708aeb286e5de856 (patch) | |
tree | 9e6f1e74f88ede78d8b2f429418a0c2fa823f855 /sys/i386/include/cpufunc.h | |
parent | c272550e836db5b7cd2282c4e7ef0e2d6d2b8107 (diff) | |
download | FreeBSD-src-99642cdfcbeeacb6d6d0f21f708aeb286e5de856.zip FreeBSD-src-99642cdfcbeeacb6d6d0f21f708aeb286e5de856.tar.gz |
- move gdt, ldt allocation to before KPT allocation
- fix bugs where we would:
- try to map the hypervisors address space
- accidentally kick out an existing kernel mapping for some domain creation memory allocation sizes
- accidentally skip a 2MB kernel mapping for some domain creation memory allocation sizes
- don't rely on trapping in to xen to read rcr2, reference through vcpu
- whitespace cleanups
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 5f28a86..4bf93b1 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -45,6 +45,7 @@ #ifdef XEN extern void xen_cli(void); extern void xen_sti(void); +extern u_int xen_rcr2(void); extern void xen_load_cr3(u_int data); extern void xen_tlb_flush(void); extern void xen_invlpg(u_int addr); @@ -94,7 +95,7 @@ disable_intr(void) #ifdef XEN xen_cli(); #else - __asm __volatile("cli" : : : "memory"); + __asm __volatile("cli" : : : "memory"); #endif } @@ -119,7 +120,7 @@ enable_intr(void) { #ifdef XEN xen_sti(); -#else +#else __asm __volatile("sti"); #endif } @@ -423,6 +424,9 @@ rcr2(void) { u_int data; +#ifdef XEN + return (xen_rcr2()); +#endif __asm __volatile("movl %%cr2,%0" : "=r" (data)); return (data); } |