Patches contributed by Eötvös Lorand University


commit 04197c83b3e05546d1003cfa3ff43f1639c0057f
Merge: 71998e83c520 b635acec48bc
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Aug 15 17:07:34 2008 +0200

    Merge branch 'linus' into x86/tracehook
    
    Conflicts:
            arch/x86/Kconfig
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --cc arch/x86/Kconfig
index f463a8a3b21f,ac2fb0641a04..2206787b1157
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@@ -30,7 -29,7 +29,8 @@@ config X8
  	select HAVE_FTRACE
  	select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
  	select HAVE_ARCH_KGDB if !X86_VOYAGER
 +	select HAVE_ARCH_TRACEHOOK
+ 	select HAVE_GENERIC_DMA_COHERENT if X86_32
  	select HAVE_EFFICIENT_UNALIGNED_ACCESS
  
  config ARCH_DEFCONFIG

commit 1a10390708d675ebf1a2f5e169a5165626afbd88
Merge: 239bd83104ec b635acec48bc
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Aug 15 16:16:15 2008 +0200

    Merge branch 'linus' into x86/cpu

commit 8bb851900f5d0a79d3fddac808cc670d9894ef67
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Aug 15 15:34:32 2008 +0200

    x86, nmi: clean UP NMI watchdog failure message
    
    clean up the failure message - and redirect people to bugzilla
    instead of lkml.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 919473ad4a29..abb78a2cc4ad 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -114,6 +114,23 @@ static __init void nmi_cpu_busy(void *data)
 }
 #endif
 
+static void report_broken_nmi(int cpu, int *prev_nmi_count)
+{
+	printk(KERN_CONT "\n");
+
+	printk(KERN_WARNING
+		"WARNING: CPU#%d: NMI appears to be stuck (%d->%d)!\n",
+			cpu, prev_nmi_count[cpu], get_nmi_count(cpu));
+
+	printk(KERN_WARNING
+		"Please report this to bugzilla.kernel.org,\n");
+	printk(KERN_WARNING
+		"and attach the output of the 'dmesg' command.\n");
+
+	per_cpu(wd_enabled, cpu) = 0;
+	atomic_dec(&nmi_active);
+}
+
 int __init check_nmi_watchdog(void)
 {
 	unsigned int *prev_nmi_count;
@@ -141,19 +158,8 @@ int __init check_nmi_watchdog(void)
 	for_each_online_cpu(cpu) {
 		if (!per_cpu(wd_enabled, cpu))
 			continue;
-		if (get_nmi_count(cpu) - prev_nmi_count[cpu] <= 5) {
-			printk("\n");
-			printk(KERN_WARNING "WARNING: CPU#%d: NMI "
-				"appears to be stuck (%d->%d)!\n",
-				cpu,
-				prev_nmi_count[cpu],
-				get_nmi_count(cpu));
-			printk(KERN_WARNING "Please report this to "
-			       "linux-kernel@vger.kernel.org and attach "
-			       "the output of 'dmesg' command.\n");
-			per_cpu(wd_enabled, cpu) = 0;
-			atomic_dec(&nmi_active);
-		}
+		if (get_nmi_count(cpu) - prev_nmi_count[cpu] <= 5)
+			report_broken_nmi(cpu, prev_nmi_count);
 	}
 	endflag = 1;
 	if (!atomic_read(&nmi_active)) {

commit 975439fe73d1f0f7ce8c235c66783bd34dc459c3
Merge: ef31023743e6 129d6aba444d
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Aug 15 13:57:32 2008 +0200

    Merge branch 'x86/amd-iommu' into x86/urgent

commit 5aa37e4f0614e3b1f385426ce1e962e84c275bdf
Merge: d4c63ec060f3 b76d69ed721e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Aug 15 13:46:28 2008 +0200

    Merge branch 'x86/core' into x86/apic

commit 881b374705f352725ba1f558968ef34c17ba900e
Merge: c83d12806b61 d4c63ec060f3
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Aug 14 15:13:47 2008 +0200

    Merge branch 'x86/apic' into x86/core

diff --cc arch/x86/kernel/io_apic_32.c
index a0f4c27c822d,d54455ec9850..e710289f673e
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@@ -1480,10 -1484,9 +1481,10 @@@ __apicdebuginit(void) print_APIC_bitfie
  	}
  }
  
- void /*__init*/ print_local_APIC(void *dummy)
+ __apicdebuginit(void) print_local_APIC(void *dummy)
  {
  	unsigned int v, ver, maxlvt;
 +	u64 icr;
  
  	if (apic_verbosity == APIC_QUIET)
  		return;
diff --cc arch/x86/kernel/io_apic_64.c
index e63282e78864,8cdcc4f287cc..a1bec2969c6a
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@@ -1234,10 -1081,9 +1233,10 @@@ __apicdebuginit(void) print_APIC_bitfie
  	}
  }
  
- void __apicdebuginit print_local_APIC(void * dummy)
+ __apicdebuginit(void) print_local_APIC(void *dummy)
  {
  	unsigned int v, ver, maxlvt;
 +	unsigned long icr;
  
  	if (apic_verbosity == APIC_QUIET)
  		return;

commit c83d12806b6185131ece682de8696d8cfb78df69
Merge: 51ca3c679194 8d7ccaa54549 8067794bec1c a677f58a8c8c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Aug 14 14:58:22 2008 +0200

    Merge branches 'x86/prototypes', 'x86/x2apic' and 'x86/debug' into x86/core

diff --cc arch/x86/kernel/signal_64.c
index ca316b5b742c,02b02583f5b5,b45ef8ddd651,47c3d249e638..2f1464050059
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@@@@ -53,68 -54,59 -53,59 -53,6 +54,68 @@@@@ sys_sigaltstack(const stack_t __user *u
    	return do_sigaltstack(uss, uoss, regs->sp);
    }
    
   +/*
   + * Signal frame handlers.
   + */
   +
   +static inline int save_i387(struct _fpstate __user *buf)
   +{
   +	struct task_struct *tsk = current;
   +	int err = 0;
   +
   +	BUILD_BUG_ON(sizeof(struct user_i387_struct) !=
   +			sizeof(tsk->thread.xstate->fxsave));
   +
   +	if ((unsigned long)buf % 16)
   +		printk("save_i387: bad fpstate %p\n", buf);
   +
   +	if (!used_math())
   +		return 0;
   +	clear_used_math(); /* trigger finit */
   +	if (task_thread_info(tsk)->status & TS_USEDFPU) {
   +		err = save_i387_checking((struct i387_fxsave_struct __user *)
   +					 buf);
   +		if (err)
   +			return err;
   +		task_thread_info(tsk)->status &= ~TS_USEDFPU;
   +		stts();
   +	} else {
   +		if (__copy_to_user(buf, &tsk->thread.xstate->fxsave,
   +				   sizeof(struct i387_fxsave_struct)))
   +			return -1;
   +	}
   +	return 1;
   +}
   +
   +/*
   + * This restores directly out of user space. Exceptions are handled.
   + */
   +static inline int restore_i387(struct _fpstate __user *buf)
   +{
   +	struct task_struct *tsk = current;
   +	int err;
   +
   +	if (!used_math()) {
   +		err = init_fpu(tsk);
   +		if (err)
   +			return err;
   +	}
   +
   +	if (!(task_thread_info(current)->status & TS_USEDFPU)) {
   +		clts();
   +		task_thread_info(current)->status |= TS_USEDFPU;
   +	}
 -- 	return restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
 +++	err = restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
 +++	if (unlikely(err)) {
 +++		/*
 +++		 * Encountered an error while doing the restore from the
 +++		 * user buffer, clear the fpu state.
 +++		 */
 +++		clear_fpu(tsk);
 +++		clear_used_math();
 +++	}
 +++	return err;
   +}
    
    /*
     * Do a signal return; undo the signal stack.
diff --cc include/asm-x86/apic.h
index bc2e364bdb10,519ad65708e7,502ca6594b1d,133c998161ca..1311c82b165b
--- a/include/asm-x86/apic.h
+++ b/include/asm-x86/apic.h
@@@@@ -54,8 -54,13 -54,8 -54,8 +54,13 @@@@@ extern int disable_apic
    #endif
    
    extern int is_vsmp_box(void);
+ ++extern void xapic_wait_icr_idle(void);
+ ++extern u32 safe_xapic_wait_icr_idle(void);
+ ++extern u64 xapic_icr_read(void);
+ ++extern void xapic_icr_write(u32, u32);
+ ++extern int setup_profiling_timer(unsigned int);
    
 - -static inline void native_apic_write(unsigned long reg, u32 v)
 + +static inline void native_apic_mem_write(u32 reg, u32 v)
    {
    	volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
    
diff --cc include/asm-x86/traps.h
index 2a891a704719,b60fab546da7,a4b65a71bd66,a4b65a71bd66..2ccebc6fb0b0
--- a/include/asm-x86/traps.h
+++ b/include/asm-x86/traps.h
@@@@@ -62,5 -64,7 -62,5 -62,5 +64,7 @@@@@ asmlinkage void do_coprocessor_error(st
    asmlinkage void do_simd_coprocessor_error(struct pt_regs *);
    asmlinkage void do_spurious_interrupt_bug(struct pt_regs *);
    
+ ++asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);
+ ++
    #endif /* CONFIG_X86_32 */
 ---#endif /* _ASM_X86_TRAPS_H */
 +++#endif /* ASM_X86__TRAPS_H */

commit 51ca3c679194e7435c25b8e77b0a73c597e41ae9
Merge: b55793f7528c b635acec48bc
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Aug 14 14:58:01 2008 +0200

    Merge branch 'linus' into x86/core
    
    Conflicts:
            arch/x86/kernel/genapic_64.c
            include/asm-x86/kvm_host.h
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --cc arch/x86/kernel/io_apic_64.c
index b9950dae59b7,61a83b70c18f..e63282e78864
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@@ -898,18 -838,7 +911,10 @@@ void __setup_vector_irq(int cpu
  	}
  }
  
- void setup_vector_irq(int cpu)
- {
- 	spin_lock(&vector_lock);
- 	__setup_vector_irq(smp_processor_id());
- 	spin_unlock(&vector_lock);
- }
- 
- 
  static struct irq_chip ioapic_chip;
 +#ifdef CONFIG_INTR_REMAP
 +static struct irq_chip ir_ioapic_chip;
 +#endif
  
  static void ioapic_register_intr(int irq, unsigned long trigger)
  {
diff --cc include/asm-x86/kvm_host.h
index 95eb742765b3,0f3c53114614..72e9a525f91a
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@@ -729,4 -731,8 +731,8 @@@ asmlinkage void kvm_handle_fault_on_reb
  	KVM_EX_ENTRY " 666b, 667b \n\t" \
  	".popsection"
  
+ #define KVM_ARCH_WANT_MMU_NOTIFIER
+ int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
+ int kvm_age_hva(struct kvm *kvm, unsigned long hva);
+ 
 -#endif
 +#endif /* ASM_X86__KVM_HOST_H */

commit 8d7ccaa545490cdffdfaff0842436a8dd85cf47b
Merge: b2139aa0eec3 30a2f3c60a84
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Aug 14 12:19:59 2008 +0200

    Merge commit 'v2.6.27-rc3' into x86/prototypes
    
    Conflicts:
    
            include/asm-x86/dma-mapping.h
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit 31677619650cac2bcc9f50920824323b005e3d8a
Merge: c2dcfde82748 6ffac1e90a17
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Aug 14 11:18:08 2008 +0200

    Merge branch 'x86/fpu' into x86/urgent