From: "Jan Beulich" Subject: [PATCH] x86: consolidate/enhance TLB flushing interface Date: Tue, 21 Aug 2007 16:25:06 +0100 Message-ID: <46CB1FF2.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Folding into a single local handler and a single SMP multiplexor as well as adding capability to also flush caches through the same interfaces (a subsequent patch will make use of this). Once at changing cpuinfo_x86, this patch also removes several unused fields apparently inherited from Linux. The changes to xen/include/asm-x86/cpufeature.h apply cleanly only with the SVM/EFER patch (which was sent several days ago) applied. Signed-off-by: Jan Beulich Index: 2007-08-08/xen/arch/x86/cpu/common.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/cpu/common.c 2007-08-21 14:15:47.0000000= 00 +0200 +++ 2007-08-08/xen/arch/x86/cpu/common.c 2007-08-08 12:03:19.0000000= 00 +0200 @@ -229,7 +229,6 @@ static void __init early_cpu_detect(void void __devinit generic_identify(struct cpuinfo_x86 * c) { u32 tfms, xlvl; - int junk; =20 if (have_cpuid_p()) { /* Get vendor name */ @@ -244,8 +243,8 @@ void __devinit generic_identify(struct c =09 /* Intel-defined flags: level 0x00000001 */ if ( c->cpuid_level >=3D 0x00000001 ) { - u32 capability, excap; - cpuid(0x00000001, &tfms, &junk, &excap, &capability= ); + u32 capability, excap, ebx; + cpuid(0x00000001, &tfms, &ebx, &excap, &capability)= ; c->x86_capability[0] =3D capability; c->x86_capability[4] =3D excap; c->x86 =3D (tfms >> 8) & 15; @@ -255,6 +254,8 @@ void __devinit generic_identify(struct c c->x86_model +=3D ((tfms >> 16) & 0xF) << = 4; }=20 c->x86_mask =3D tfms & 15; + if ( cpu_has(c, X86_FEATURE_CLFLSH) ) + c->x86_clflush_size =3D ((ebx >> 8) & = 0xff) * 8; } else { /* Have CPUID level 0 only - unheard of */ c->x86 =3D 4; @@ -272,6 +273,11 @@ void __devinit generic_identify(struct c } } =20 +#ifdef CONFIG_X86_64 + if ( cpu_has(c, X86_FEATURE_PAGE1GB) ) + __set_bit(3, &c->invlpg_works_ok); +#endif + early_intel_workaround(c); =20 #ifdef CONFIG_X86_HT @@ -313,6 +319,7 @@ void __devinit identify_cpu(struct cpuin c->x86_vendor_id[0] =3D '\0'; /* Unset */ c->x86_model_id[0] =3D '\0'; /* Unset */ c->x86_max_cores =3D 1; + c->x86_clflush_size =3D 0; memset(&c->x86_capability, 0, sizeof c->x86_capability); =20 if (!have_cpuid_p()) { Index: 2007-08-08/xen/arch/x86/cpu/intel.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/cpu/intel.c 2007-08-21 14:15:47.0000000= 00 +0200 +++ 2007-08-08/xen/arch/x86/cpu/intel.c 2007-08-21 12:17:32.000000000 = +0200 @@ -16,8 +16,6 @@ =20 #define select_idle_routine(x) ((void)0) =20 -extern int trap_init_f00f_bug(void); - #ifdef CONFIG_X86_INTEL_USERCOPY /* * Alignment at which movsl is preferred for bulk memory copies. @@ -97,25 +95,6 @@ static void __devinit init_intel(struct=20 unsigned int l2 =3D 0; char *p =3D NULL; =20 -#ifdef CONFIG_X86_F00F_BUG - /* - * All current models of Pentium and Pentium with MMX technology = CPUs - * have the F0 0F bug, which lets nonprivileged users lock up the = system. - * Note that the workaround only should be initialized once... - */ - c->f00f_bug =3D 0; - if ( c->x86 =3D=3D 5 ) { - static int f00f_workaround_enabled =3D 0; - - c->f00f_bug =3D 1; - if ( !f00f_workaround_enabled ) { - trap_init_f00f_bug(); - printk(KERN_NOTICE "Intel Pentium with F0 0F bug - = workaround enabled.\n"); - f00f_workaround_enabled =3D 1; - } - } -#endif - select_idle_routine(c); l2 =3D init_intel_cacheinfo(c); =20 @@ -123,6 +102,16 @@ static void __devinit init_intel(struct=20 if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633) clear_bit(X86_FEATURE_SEP, c->x86_capability); =20 + if ( /* PentiumPro erratum 30 */ + (c->x86 =3D=3D 6 && c->x86_model =3D=3D 1 && c->x86_mask < 9) = || + /* Dual-Core Intel Xeon 3000/5100 series erratum 89/90 */ + /* Quad-Core Intel Xeon 3200/5300 series erratum 89/88 */ + /* Intel Core2 erratum 89 */ + (c->x86 =3D=3D 6 && c->x86_model =3D=3D 15 ) || + /* Dual-Core Intel Xeon LV/ULV erratum 75 */ + (c->x86 =3D=3D 6 && c->x86_model =3D=3D 14 ) ) + __clear_bit(2, &c->invlpg_works_ok); + /* Names for the Pentium II/Celeron processors=20 detectable only by also checking the cache size. Dixon is NOT a Celeron. */ Index: 2007-08-08/xen/arch/x86/flushtlb.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/flushtlb.c 2007-08-21 14:15:47.0000000= 00 +0200 +++ 2007-08-08/xen/arch/x86/flushtlb.c 2007-08-21 14:00:19.000000000 = +0200 @@ -95,26 +95,74 @@ void write_cr3(unsigned long cr3) local_irq_restore(flags); } =20 -void local_flush_tlb(void) +void flush_one_local(const void *va, unsigned int flags) { - unsigned long flags; - u32 t; + const struct cpuinfo_x86 *c =3D ¤t_cpu_data; + unsigned int level =3D flags & FLUSH_LEVEL_MASK; + unsigned long irqfl; =20 - /* This non-reentrant function is sometimes called in interrupt = context. */ - local_irq_save(flags); - - t =3D pre_flush(); + if ( !c->x86 ) + c =3D &boot_cpu_data; =20 - hvm_flush_guest_tlbs(); + /* This non-reentrant function is sometimes called in interrupt = context. */ + local_irq_save(irqfl); =20 -#ifdef USER_MAPPINGS_ARE_GLOBAL - __pge_off(); - __pge_on(); -#else - __asm__ __volatile__ ( "mov %0, %%cr3" : : "r" (read_cr3()) : = "memory" ); + if ( flags & (FLUSH_TLB|FLUSH_TLB_GLOBAL) ) + { + if ( level > 0 && + level < CONFIG_PAGING_LEVELS && + test_bit(level, &c->invlpg_works_ok) ) + __asm__ __volatile__( "invlpg %0" + : + : "m" (*(const char *)(va)) + : "memory" ); + else + { + u32 t =3D pre_flush(); + + hvm_flush_guest_tlbs(); + +#ifndef USER_MAPPINGS_ARE_GLOBAL + if ( !(flags & FLUSH_TLB_GLOBAL) || + !(mmu_cr4_features & X86_CR4_PGE) ) + __asm__ __volatile__ ( "mov %0, %%cr3" + : + : "r" (read_cr3()) + : "memory" ); + else #endif + { + __pge_off(); + __pge_on(); + } + + post_flush(t); + } + } + + if ( flags & FLUSH_CACHE ) + { + unsigned long sz; + + if ( level > 0 && level < CONFIG_PAGING_LEVELS ) + sz =3D 1UL << ((level - 1) * PAGETABLE_ORDER); + else + sz =3D ULONG_MAX; + if ( c->x86_clflush_size > 0 && + c->x86_cache_size > 0 && + sz < (c->x86_cache_size >> (PAGE_SHIFT - 10)) ) + { + unsigned long i; + + va =3D (const void *)((unsigned long)va & ~(sz - 1)); + for ( i =3D 0; i < sz; i +=3D c->x86_clflush_size ) + __asm__ __volatile__( "clflush %0" + : + : "m" (((const char *)va)[i]) ); + } + else + wbinvd(); + } =20 - post_flush(t); - - local_irq_restore(flags); + local_irq_restore(irqfl); } Index: 2007-08-08/xen/arch/x86/mm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/mm.c 2007-08-21 14:15:47.000000000 = +0200 +++ 2007-08-08/xen/arch/x86/mm.c 2007-08-21 14:18:00.000000000 = +0200 @@ -3497,7 +3497,7 @@ int map_pages_to_xen( =20 if ( (l2e_get_flags(ol2e) & _PAGE_PRESENT) ) { - local_flush_tlb_pge(); + flush_one_local((void *)virt, FLUSH_TLB_GLOBAL|2); if ( !(l2e_get_flags(ol2e) & _PAGE_PSE) ) free_xen_pagetable(mfn_to_virt(l2e_get_pfn(ol2e))); } @@ -3525,7 +3525,7 @@ int map_pages_to_xen( l2e_get_flags(*pl2e) & = ~_PAGE_PSE)); l2e_write_atomic(pl2e, l2e_from_pfn(virt_to_mfn(pl1e), __PAGE_HYPERVISOR)); - local_flush_tlb_pge(); + flush_one_local((void *)virt, FLUSH_TLB_GLOBAL|2); } =20 pl1e =3D l2e_to_l1e(*pl2e) + l1_table_offset(virt); @@ -3608,7 +3608,7 @@ void destroy_xen_mappings(unsigned long=20 } } =20 - flush_tlb_all_pge(); + flush_global(FLUSH_TLB_GLOBAL); } =20 void __set_fixmap( Index: 2007-08-08/xen/arch/x86/setup.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/setup.c 2007-08-21 14:15:47.0000000= 00 +0200 +++ 2007-08-08/xen/arch/x86/setup.c 2007-08-21 11:06:23.000000000 = +0200 @@ -114,7 +114,7 @@ struct tss_struct init_tss[NR_CPUS]; =20 char __attribute__ ((__section__(".bss.stack_aligned"))) cpu0_stack[STACK_= SIZE]; =20 -struct cpuinfo_x86 boot_cpu_data =3D { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; +struct cpuinfo_x86 boot_cpu_data =3D { 0, 0, 0, 0, 0x6, 1, -1 }; =20 #if CONFIG_PAGING_LEVELS > 2 unsigned long mmu_cr4_features =3D X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE= ; Index: 2007-08-08/xen/arch/x86/smp.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/smp.c 2007-08-21 14:15:47.000000000 = +0200 +++ 2007-08-08/xen/arch/x86/smp.c 2007-08-21 12:20:28.000000000 = +0200 @@ -164,7 +164,8 @@ void send_IPI_mask_phys(cpumask_t mask,=20 =20 static DEFINE_SPINLOCK(flush_lock); static cpumask_t flush_cpumask; -static unsigned long flush_va; +static const void *flush_va; +static unsigned int flush_flags; =20 fastcall void smp_invalidate_interrupt(void) { @@ -172,26 +173,18 @@ fastcall void smp_invalidate_interrupt(v perfc_incr(ipis); irq_enter(); if ( !__sync_lazy_execstate() ) - { - if ( flush_va =3D=3D FLUSHVA_ALL ) - local_flush_tlb(); - else - local_flush_tlb_one(flush_va); - } + flush_one_local(flush_va, flush_flags); cpu_clear(smp_processor_id(), flush_cpumask); irq_exit(); } =20 -void __flush_tlb_mask(cpumask_t mask, unsigned long va) +void flush_one_mask(cpumask_t mask, const void *va, unsigned int flags) { ASSERT(local_irq_is_enabled()); =20 if ( cpu_isset(smp_processor_id(), mask) ) { - if ( va =3D=3D FLUSHVA_ALL ) - local_flush_tlb(); - else - local_flush_tlb_one(va); + flush_one_local(va, flags); cpu_clear(smp_processor_id(), mask); } =20 @@ -200,6 +193,7 @@ void __flush_tlb_mask(cpumask_t mask, un spin_lock(&flush_lock); flush_cpumask =3D mask; flush_va =3D va; + flush_flags =3D flags; send_IPI_mask(mask, INVALIDATE_TLB_VECTOR); while ( !cpus_empty(flush_cpumask) ) cpu_relax(); @@ -215,24 +209,13 @@ void new_tlbflush_clock_period(void) /* Flush everyone else. We definitely flushed just before entry. */ allbutself =3D cpu_online_map; cpu_clear(smp_processor_id(), allbutself); - __flush_tlb_mask(allbutself, FLUSHVA_ALL); + flush_mask(allbutself, FLUSH_TLB); =20 /* No need for atomicity: we are the only possible updater. */ ASSERT(tlbflush_clock =3D=3D 0); tlbflush_clock++; } =20 -static void flush_tlb_all_pge_ipi(void *info) -{ - local_flush_tlb_pge(); -} - -void flush_tlb_all_pge(void) -{ - smp_call_function(flush_tlb_all_pge_ipi, 0, 1, 1); - local_flush_tlb_pge(); -} - void smp_send_event_check_mask(cpumask_t mask) { cpu_clear(smp_processor_id(), mask); Index: 2007-08-08/xen/arch/x86/x86_32/mm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/x86_32/mm.c 2007-08-21 14:15:47.0000000= 00 +0200 +++ 2007-08-08/xen/arch/x86/x86_32/mm.c 2007-08-21 09:59:15.000000000 = +0200 @@ -149,7 +149,7 @@ void __init zap_low_mappings(l2_pgentry_ /* Now zap mappings in the idle pagetables. */ destroy_xen_mappings(0, HYPERVISOR_VIRT_START); =20 - flush_tlb_all_pge(); + flush_global(FLUSH_TLB_GLOBAL); =20 /* Replace with mapping of the boot trampoline only. */ map_pages_to_xen(BOOT_TRAMPOLINE, BOOT_TRAMPOLINE >> PAGE_SHIFT, Index: 2007-08-08/xen/arch/x86/x86_64/mm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/arch/x86/x86_64/mm.c 2007-08-21 14:15:47.0000000= 00 +0200 +++ 2007-08-08/xen/arch/x86/x86_64/mm.c 2007-08-21 12:33:35.000000000 = +0200 @@ -205,7 +205,7 @@ void __init zap_low_mappings(void) =20 /* Remove aliased mapping of first 1:1 PML4 entry. */ l4e_write(&idle_pg_table[0], l4e_empty()); - local_flush_tlb_pge(); + flush_local(FLUSH_TLB_GLOBAL); =20 /* Replace with mapping of the boot trampoline only. */ map_pages_to_xen(BOOT_TRAMPOLINE, BOOT_TRAMPOLINE >> PAGE_SHIFT, Index: 2007-08-08/xen/include/asm-x86/cpufeature.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/include/asm-x86/cpufeature.h 2007-08-21 = 14:15:47.000000000 +0200 +++ 2007-08-08/xen/include/asm-x86/cpufeature.h 2007-08-21 12:07:46.0000000= 00 +0200 @@ -50,6 +50,7 @@ #define X86_FEATURE_NX (1*32+20) /* Execute Disable */ #define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ #define X86_FEATURE_FFXSR (1*32+25) /* FFXSR instruction optimization= s */ +#define X86_FEATURE_PAGE1GB (1*32+26) /* 1Gb large page support */ #define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */ #define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ #define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ @@ -137,6 +138,7 @@ #define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR) #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) #define cpu_has_ffxsr 0 +#define cpu_has_page1gb 0 #else /* __x86_64__ */ #define cpu_has_vme 0 #define cpu_has_de 1 @@ -161,6 +163,7 @@ #define cpu_has_centaur_mcr 0 #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) #define cpu_has_ffxsr boot_cpu_has(X86_FEATURE_FFXSR) +#define cpu_has_page1gb boot_cpu_has(X86_FEATURE_PAGE1GB) #endif =20 #endif /* __ASM_I386_CPUFEATURE_H */ Index: 2007-08-08/xen/include/asm-x86/flushtlb.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/include/asm-x86/flushtlb.h 2007-08-21 = 14:15:47.000000000 +0200 +++ 2007-08-08/xen/include/asm-x86/flushtlb.h 2007-08-21 12:34:36.0000000= 00 +0200 @@ -15,6 +15,29 @@ #include #include =20 +#define FLUSH_LEVEL_MASK 0x0f +#define FLUSH_TLB 0x10 +#define FLUSH_TLB_GLOBAL 0x20 +#define FLUSH_CACHE 0x40 + +void flush_one_local(const void *va, unsigned int flags); +static inline void flush_local(unsigned int flags) +{ + flush_one_local(NULL, flags | FLUSH_LEVEL_MASK); +} +#ifdef CONFIG_SMP +void flush_one_mask(cpumask_t, const void *va, unsigned int flags); +static inline void flush_mask(cpumask_t mask, unsigned int flags) +{ + flush_one_mask(mask, NULL, flags | FLUSH_LEVEL_MASK); +} +#else +#define flush_mask(mask, flags) flush_local(flags) +#define flush_one_mask(mask, va, flags) flush_one_local(va, flags) +#endif +#define flush_global(flags) flush_mask(cpu_online_map, flags) +#define flush_one_global(va, flags) flush_one_mask(cpu_online_map, va, = flags) + /* The current time as shown by the virtual TLB clock. */ extern u32 tlbflush_clock; =20 @@ -72,31 +95,20 @@ static inline unsigned long read_cr3(voi extern void write_cr3(unsigned long cr3); =20 /* Flush guest mappings from the TLB and implicitly tick the tlbflush = clock. */ -extern void local_flush_tlb(void); - -#define local_flush_tlb_pge() \ - do { \ - __pge_off(); \ - local_flush_tlb(); \ - __pge_on(); \ - } while ( 0 ) +#define local_flush_tlb(void) flush_local(FLUSH_TLB) =20 -#define local_flush_tlb_one(__addr) \ - __asm__ __volatile__("invlpg %0": :"m" (*(char *) (__addr))) +#define local_flush_tlb_one(v) \ + flush_one_local((const void *)(v), FLUSH_TLB|1) =20 #define flush_tlb_all() flush_tlb_mask(cpu_online_map) =20 #ifndef CONFIG_SMP -#define flush_tlb_all_pge() local_flush_tlb_pge() #define flush_tlb_mask(mask) local_flush_tlb() -#define flush_tlb_one_mask(mask,v) local_flush_tlb_one(_v) +#define flush_tlb_one_mask(mask,v) local_flush_tlb_one(v) #else #include -#define FLUSHVA_ALL (~0UL) -extern void flush_tlb_all_pge(void); -extern void __flush_tlb_mask(cpumask_t mask, unsigned long va); -#define flush_tlb_mask(mask) __flush_tlb_mask(mask,FLUSHVA_ALL) -#define flush_tlb_one_mask(mask,v) __flush_tlb_mask(mask,(unsigned = long)(v)) +#define flush_tlb_mask(mask) flush_mask(mask, FLUSH_TLB) +#define flush_tlb_one_mask(mask,v) flush_one_mask(mask,(const void *)(v), = FLUSH_TLB|1) #endif =20 #endif /* __FLUSHTLB_H__ */ Index: 2007-08-08/xen/include/asm-x86/processor.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-08-08.orig/xen/include/asm-x86/processor.h 2007-08-21 = 14:15:47.000000000 +0200 +++ 2007-08-08/xen/include/asm-x86/processor.h 2007-08-21 11:34:25.0000000= 00 +0200 @@ -156,24 +156,20 @@ struct cpuinfo_x86 { __u8 x86_vendor; /* CPU vendor */ __u8 x86_model; __u8 x86_mask; - char wp_works_ok; /* It doesn't on 386's */ - char hlt_works_ok; /* Problems on some 486Dx4's and old 386's */ + __u8 invlpg_works_ok; char hard_math; - char rfu; int cpuid_level; /* Maximum supported CPUID level, -1=3Dno CPUID */ unsigned int x86_capability[NCAPINTS]; char x86_vendor_id[16]; char x86_model_id[64]; int x86_cache_size; /* in KB - valid for CPUS which support this = call */ int x86_cache_alignment; /* In bytes */ - char fdiv_bug; - char f00f_bug; char coma_bug; - char pad0; int x86_power; unsigned char x86_max_cores; /* cpuid returned max cores value */ unsigned char booted_cores; /* number of cores as seen by OS */ unsigned char apicid; + unsigned short x86_clflush_size; } __cacheline_aligned; =20 /*