diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 30 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 3 | ||||
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 8 |
6 files changed, 31 insertions, 15 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b5cda6c03d1d..df9e885eee14 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -277,6 +277,7 @@ config SPARSE_IRQ | |||
277 | config NUMA_MIGRATE_IRQ_DESC | 277 | config NUMA_MIGRATE_IRQ_DESC |
278 | bool "Move irq desc when changing irq smp_affinity" | 278 | bool "Move irq desc when changing irq smp_affinity" |
279 | depends on SPARSE_IRQ && NUMA | 279 | depends on SPARSE_IRQ && NUMA |
280 | depends on BROKEN | ||
280 | default n | 281 | default n |
281 | ---help--- | 282 | ---help--- |
282 | This enables moving irq_desc to cpu/node that irq will use handled. | 283 | This enables moving irq_desc to cpu/node that irq will use handled. |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a2789e42e162..30da617d18e4 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3670,12 +3670,14 @@ int arch_setup_hpet_msi(unsigned int irq) | |||
3670 | { | 3670 | { |
3671 | int ret; | 3671 | int ret; |
3672 | struct msi_msg msg; | 3672 | struct msi_msg msg; |
3673 | struct irq_desc *desc = irq_to_desc(irq); | ||
3673 | 3674 | ||
3674 | ret = msi_compose_msg(NULL, irq, &msg); | 3675 | ret = msi_compose_msg(NULL, irq, &msg); |
3675 | if (ret < 0) | 3676 | if (ret < 0) |
3676 | return ret; | 3677 | return ret; |
3677 | 3678 | ||
3678 | hpet_msi_write(irq, &msg); | 3679 | hpet_msi_write(irq, &msg); |
3680 | desc->status |= IRQ_MOVE_PCNTXT; | ||
3679 | set_irq_chip_and_handler_name(irq, &hpet_msi_type, handle_edge_irq, | 3681 | set_irq_chip_and_handler_name(irq, &hpet_msi_type, handle_edge_irq, |
3680 | "edge"); | 3682 | "edge"); |
3681 | 3683 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index ecdb682ab516..208ecf6643df 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -65,14 +65,18 @@ enum { | |||
65 | struct acpi_cpufreq_data { | 65 | struct acpi_cpufreq_data { |
66 | struct acpi_processor_performance *acpi_data; | 66 | struct acpi_processor_performance *acpi_data; |
67 | struct cpufreq_frequency_table *freq_table; | 67 | struct cpufreq_frequency_table *freq_table; |
68 | unsigned int max_freq; | ||
69 | unsigned int resume; | 68 | unsigned int resume; |
70 | unsigned int cpu_feature; | 69 | unsigned int cpu_feature; |
71 | u64 saved_aperf, saved_mperf; | ||
72 | }; | 70 | }; |
73 | 71 | ||
74 | static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); | 72 | static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); |
75 | 73 | ||
74 | struct acpi_msr_data { | ||
75 | u64 saved_aperf, saved_mperf; | ||
76 | }; | ||
77 | |||
78 | static DEFINE_PER_CPU(struct acpi_msr_data, msr_data); | ||
79 | |||
76 | DEFINE_TRACE(power_mark); | 80 | DEFINE_TRACE(power_mark); |
77 | 81 | ||
78 | /* acpi_perf_data is a pointer to percpu data. */ | 82 | /* acpi_perf_data is a pointer to percpu data. */ |
@@ -287,11 +291,11 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy, | |||
287 | return 0; | 291 | return 0; |
288 | 292 | ||
289 | cur.aperf.whole = readin.aperf.whole - | 293 | cur.aperf.whole = readin.aperf.whole - |
290 | per_cpu(drv_data, cpu)->saved_aperf; | 294 | per_cpu(msr_data, cpu).saved_aperf; |
291 | cur.mperf.whole = readin.mperf.whole - | 295 | cur.mperf.whole = readin.mperf.whole - |
292 | per_cpu(drv_data, cpu)->saved_mperf; | 296 | per_cpu(msr_data, cpu).saved_mperf; |
293 | per_cpu(drv_data, cpu)->saved_aperf = readin.aperf.whole; | 297 | per_cpu(msr_data, cpu).saved_aperf = readin.aperf.whole; |
294 | per_cpu(drv_data, cpu)->saved_mperf = readin.mperf.whole; | 298 | per_cpu(msr_data, cpu).saved_mperf = readin.mperf.whole; |
295 | 299 | ||
296 | #ifdef __i386__ | 300 | #ifdef __i386__ |
297 | /* | 301 | /* |
@@ -335,7 +339,7 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy, | |||
335 | 339 | ||
336 | #endif | 340 | #endif |
337 | 341 | ||
338 | retval = per_cpu(drv_data, policy->cpu)->max_freq * perf_percent / 100; | 342 | retval = (policy->cpuinfo.max_freq * perf_percent) / 100; |
339 | 343 | ||
340 | return retval; | 344 | return retval; |
341 | } | 345 | } |
@@ -688,16 +692,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
688 | /* Check for high latency (>20uS) from buggy BIOSes, like on T42 */ | 692 | /* Check for high latency (>20uS) from buggy BIOSes, like on T42 */ |
689 | if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE && | 693 | if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE && |
690 | policy->cpuinfo.transition_latency > 20 * 1000) { | 694 | policy->cpuinfo.transition_latency > 20 * 1000) { |
691 | static int print_once; | ||
692 | policy->cpuinfo.transition_latency = 20 * 1000; | 695 | policy->cpuinfo.transition_latency = 20 * 1000; |
693 | if (!print_once) { | 696 | printk_once(KERN_INFO "Capping off P-state tranision" |
694 | print_once = 1; | 697 | " latency at 20 uS\n"); |
695 | printk(KERN_INFO "Capping off P-state tranision latency" | ||
696 | " at 20 uS\n"); | ||
697 | } | ||
698 | } | 698 | } |
699 | 699 | ||
700 | data->max_freq = perf->states[0].core_frequency * 1000; | ||
701 | /* table init */ | 700 | /* table init */ |
702 | for (i = 0; i < perf->state_count; i++) { | 701 | for (i = 0; i < perf->state_count; i++) { |
703 | if (i > 0 && perf->states[i].core_frequency >= | 702 | if (i > 0 && perf->states[i].core_frequency >= |
@@ -716,6 +715,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
716 | if (result) | 715 | if (result) |
717 | goto err_freqfree; | 716 | goto err_freqfree; |
718 | 717 | ||
718 | if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) | ||
719 | printk(KERN_WARNING FW_WARN "P-state 0 is not max freq\n"); | ||
720 | |||
719 | switch (perf->control_register.space_id) { | 721 | switch (perf->control_register.space_id) { |
720 | case ACPI_ADR_SPACE_SYSTEM_IO: | 722 | case ACPI_ADR_SPACE_SYSTEM_IO: |
721 | /* Current speed is unknown and not detectable by IO port */ | 723 | /* Current speed is unknown and not detectable by IO port */ |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index a331ec38af9e..38946c6e8433 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1410,7 +1410,10 @@ ENTRY(paranoid_exit) | |||
1410 | paranoid_swapgs: | 1410 | paranoid_swapgs: |
1411 | TRACE_IRQS_IRETQ 0 | 1411 | TRACE_IRQS_IRETQ 0 |
1412 | SWAPGS_UNSAFE_STACK | 1412 | SWAPGS_UNSAFE_STACK |
1413 | RESTORE_ALL 8 | ||
1414 | jmp irq_return | ||
1413 | paranoid_restore: | 1415 | paranoid_restore: |
1416 | TRACE_IRQS_IRETQ 0 | ||
1414 | RESTORE_ALL 8 | 1417 | RESTORE_ALL 8 |
1415 | jmp irq_return | 1418 | jmp irq_return |
1416 | paranoid_userspace: | 1419 | paranoid_userspace: |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 2a36f7f7c4c7..b6caf1329b1b 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1248,7 +1248,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, | |||
1248 | pgprintk("%s: adding gfn %lx role %x\n", __func__, gfn, role.word); | 1248 | pgprintk("%s: adding gfn %lx role %x\n", __func__, gfn, role.word); |
1249 | sp->gfn = gfn; | 1249 | sp->gfn = gfn; |
1250 | sp->role = role; | 1250 | sp->role = role; |
1251 | sp->global = role.cr4_pge; | 1251 | sp->global = 0; |
1252 | hlist_add_head(&sp->hash_link, bucket); | 1252 | hlist_add_head(&sp->hash_link, bucket); |
1253 | if (!direct) { | 1253 | if (!direct) { |
1254 | if (rmap_write_protect(vcpu->kvm, gfn)) | 1254 | if (rmap_write_protect(vcpu->kvm, gfn)) |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8ca100a9ecac..7c1ce5ac6131 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2775,6 +2775,9 @@ out: | |||
2775 | 2775 | ||
2776 | void kvm_arch_exit(void) | 2776 | void kvm_arch_exit(void) |
2777 | { | 2777 | { |
2778 | if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) | ||
2779 | cpufreq_unregister_notifier(&kvmclock_cpufreq_notifier_block, | ||
2780 | CPUFREQ_TRANSITION_NOTIFIER); | ||
2778 | kvm_x86_ops = NULL; | 2781 | kvm_x86_ops = NULL; |
2779 | kvm_mmu_module_exit(); | 2782 | kvm_mmu_module_exit(); |
2780 | } | 2783 | } |
@@ -4159,6 +4162,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu); | |||
4159 | 4162 | ||
4160 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) | 4163 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) |
4161 | { | 4164 | { |
4165 | if (vcpu->arch.time_page) { | ||
4166 | kvm_release_page_dirty(vcpu->arch.time_page); | ||
4167 | vcpu->arch.time_page = NULL; | ||
4168 | } | ||
4169 | |||
4162 | kvm_x86_ops->vcpu_free(vcpu); | 4170 | kvm_x86_ops->vcpu_free(vcpu); |
4163 | } | 4171 | } |
4164 | 4172 | ||