From: Linus Torvalds Date: Thu, 13 Dec 2012 23:31:08 +0000 (-0800) Subject: Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66cdd0ceaf65a18996f561b770eedde1d123b019;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge tag 'kvm-3.8-1' of git://git./virt/kvm/kvm Pull KVM updates from Marcelo Tosatti: "Considerable KVM/PPC work, x86 kvmclock vsyscall support, IA32_TSC_ADJUST MSR emulation, amongst others." Fix up trivial conflict in kernel/sched/core.c due to cross-cpu migration notifier added next to rq migration call-back. * tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (156 commits) KVM: emulator: fix real mode segment checks in address linearization VMX: remove unneeded enable_unrestricted_guest check KVM: VMX: fix DPL during entry to protected mode x86/kexec: crash_vmclear_local_vmcss needs __rcu kvm: Fix irqfd resampler list walk KVM: VMX: provide the vmclear function and a bitmap to support VMCLEAR in kdump x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary KVM: MMU: optimize for set_spte KVM: PPC: booke: Get/set guest EPCR register using ONE_REG interface KVM: PPC: bookehv: Add EPCR support in mtspr/mfspr emulation KVM: PPC: bookehv: Add guest computation mode for irq delivery KVM: PPC: Make EPCR a valid field for booke64 and bookehv KVM: PPC: booke: Extend MAS2 EPN mask for 64-bit KVM: PPC: e500: Mask MAS2 EPN high 32-bits in 32/64 tlbwe emulation KVM: PPC: Mask ea's high 32-bits in 32/64 instr emulation KVM: PPC: e500: Add emulation helper for getting instruction ea KVM: PPC: bookehv64: Add support for interrupt handling KVM: PPC: bookehv: Remove GET_VCPU macro from exception handler KVM: PPC: booke: Fix get_tb() compile error on 64-bit KVM: PPC: e500: Silence bogus GCC warning in tlb code ... --- 66cdd0ceaf65a18996f561b770eedde1d123b019 diff --cc arch/powerpc/include/asm/Kbuild index 2d62b484b3fc,324495a08c87..650757c300db --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild @@@ -1,5 -1,3 +1,4 @@@ - generic-y += clkdev.h generic-y += rwsem.h +generic-y += trace_clock.h diff --cc include/linux/sched.h index 651b51a36711,6eb2ed819e36..2c2f3072beef --- a/include/linux/sched.h +++ b/include/linux/sched.h @@@ -107,10 -107,16 +107,18 @@@ extern unsigned long this_cpu_load(void extern void calc_global_load(unsigned long ticks); extern void update_cpu_load_nohz(void); + /* Notifier for when a task gets migrated to a new CPU */ + struct task_migration_notifier { + struct task_struct *task; + int from_cpu; + int to_cpu; + }; + extern void register_task_migration_notifier(struct notifier_block *n); + extern unsigned long get_parent_ip(unsigned long addr); +extern void dump_cpu_task(int cpu); + struct seq_file; struct cfs_rq; struct task_group; diff --cc kernel/sched/core.c index 6271b89f87ac,c86b8b6e70f4..0533496b6228 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@@ -953,10 -959,16 +960,18 @@@ void set_task_cpu(struct task_struct *p trace_sched_migrate_task(p, new_cpu); if (task_cpu(p) != new_cpu) { + struct task_migration_notifier tmn; + + if (p->sched_class->migrate_task_rq) + p->sched_class->migrate_task_rq(p, new_cpu); p->se.nr_migrations++; perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, NULL, 0); + + tmn.task = p; + tmn.from_cpu = task_cpu(p); + tmn.to_cpu = new_cpu; + + atomic_notifier_call_chain(&task_migration_notifier, 0, &tmn); } __set_task_cpu(p, new_cpu);