Skip to contentSkip to conversation

x86/cpu for v3.9-rc1 [take 2]

GIT PULL H. Peter Anvin 1 participant 1 message Feb 22, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

This is a corrected attempt at the x86/cpu branch, this time with the fixes in that makes it not break on KVM (current or past), or any other virtualizer which traps on this configuration.

Again, the biggest change here is enabling the WC+ memory type on AMD processors, if the BIOS doesn't.

The following changes since commit ff7532ca2c631e7e96dcd305a967b610259dc0ea:

Merge tag 'usb-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb (2013-01-23 20:11:35 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cpu-for-linus

for you to fetch changes up to 2e32b7190641a184b8510d3e342400473ff1ab60:

x86, kvm: Add MSR_AMD64_BU_CFG2 to the list of ignored MSRs (2013-02-19 10:44:07 -0800)

----------------------------------------------------------------
Boris Ostrovsky (2):
x86, AMD: Clean up init_amd()
x86, AMD: Enable WC+ memory type on family 10 processors

Borislav Petkov (2):
x86, cpu, amd: Fix WC+ workaround for older virtual hosts x86, kvm: Add MSR_AMD64_BU_CFG2 to the list of ignored MSRs

Chen Gang (1):
x86/process: Change %8s to %s for pr_warn() in release_thread()

Kees Cook (1):
x86/cpu/hotplug: Remove CONFIG_EXPERIMENTAL dependency

 arch/x86/Kconfig                      |  4 +--
 arch/x86/include/uapi/asm/msr-index.h |  1 +
 arch/x86/kernel/cpu/amd.c             | 52 ++++++++++++++++++++---------------
 arch/x86/kernel/process_64.c          |  2 +-
 arch/x86/kvm/x86.c                    | 16 ++++++-----
 5 files changed, 43 insertions(+), 32 deletions(-)
arch/x86/Kconfig +2 -2
index 79795af..2d62103 100644
@@ -1699,7 +1699,7 @@ config HOTPLUG_CPU
 config BOOTPARAM_HOTPLUG_CPU0
 	bool "Set default setting of cpu0_hotpluggable"
 	default n
-	depends on HOTPLUG_CPU && EXPERIMENTAL
+	depends on HOTPLUG_CPU
 	---help---
 	  Set whether default state of cpu0_hotpluggable is on or off.
 
@@ -1728,7 +1728,7 @@ config BOOTPARAM_HOTPLUG_CPU0
 config DEBUG_HOTPLUG_CPU0
 	def_bool n
 	prompt "Debug CPU0 hotplug"
-	depends on HOTPLUG_CPU && EXPERIMENTAL
+	depends on HOTPLUG_CPU
 	---help---
 	  Enabling this option offlines CPU0 (if CPU0 can be offlined) as
 	  soon as possible and boots up userspace with CPU0 offlined. User
arch/x86/include/uapi/asm/msr-index.h +1 -0
index 433a59f..158cde9 100644
@@ -173,6 +173,7 @@
 #define MSR_AMD64_OSVW_ID_LENGTH	0xc0010140
 #define MSR_AMD64_OSVW_STATUS		0xc0010141
 #define MSR_AMD64_DC_CFG		0xc0011022
+#define MSR_AMD64_BU_CFG2		0xc001102a
 #define MSR_AMD64_IBSFETCHCTL		0xc0011030
 #define MSR_AMD64_IBSFETCHLINAD		0xc0011031
 #define MSR_AMD64_IBSFETCHPHYSAD	0xc0011032
arch/x86/kernel/cpu/amd.c +30 -22

95 lines not on this page · raw message

arch/x86/kernel/process_64.c +1 -1
index 6e68a61..0f49677 100644
@@ -117,7 +117,7 @@ void release_thread(struct task_struct *dead_task)
 {
 	if (dead_task->mm) {
 		if (dead_task->mm->context.size) {
-			pr_warn("WARNING: dead process %8s still has LDT? <%p/%d>\n",
+			pr_warn("WARNING: dead process %s still has LDT? <%p/%d>\n",
 				dead_task->comm,
 				dead_task->mm->context.ldt,
 				dead_task->mm->context.size);
arch/x86/kvm/x86.c +9 -7
index c243b81..3704007 100644
@@ -1881,6 +1881,14 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 	u64 data = msr_info->data;
 
 	switch (msr) {
+	case MSR_AMD64_NB_CFG:
+	case MSR_IA32_UCODE_REV:
+	case MSR_IA32_UCODE_WRITE:
+	case MSR_VM_HSAVE_PA:
+	case MSR_AMD64_PATCH_LOADER:
+	case MSR_AMD64_BU_CFG2:
+		break;
+
 	case MSR_EFER:
 		return set_efer(vcpu, data);
 	case MSR_K7_HWCR:
@@ -1900,8 +1908,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 			return 1;
 		}
 		break;
-	case MSR_AMD64_NB_CFG:
-		break;
 	case MSR_IA32_DEBUGCTLMSR:
 		if (!data) {
 			/* We support the non-activated case already */
@@ -1914,11 +1920,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 		vcpu_unimpl(vcpu, "%s: MSR_IA32_DEBUGCTLMSR 0x%llx, nop\n",
 			    __func__, data);
 		break;
-	case MSR_IA32_UCODE_REV:
-	case MSR_IA32_UCODE_WRITE:
-	case MSR_VM_HSAVE_PA:
-	case MSR_AMD64_PATCH_LOADER:
-		break;
 	case 0x200 ... 0x2ff:
 		return set_msr_mtrr(vcpu, msr, data);
 	case MSR_IA32_APICBASE:
@@ -2253,6 +2254,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 	case MSR_K8_INT_PENDING_MSG:
 	case MSR_AMD64_NB_CFG:
 	case MSR_FAM10H_MMIO_CONF_BASE:
+	case MSR_AMD64_BU_CFG2:
 		data = 0;
 		break;
 	case MSR_P6_PERFCTR0: