Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #43

Merged
merged 22 commits into from
Feb 26, 2015
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a7e6645
HID: wacom: Add missing ABS_MISC event and feature declaration for 27QHD
Pinglinux Feb 5, 2015
e0b561e
livepatch: fix format string in kobject_init_and_add()
Feb 15, 2015
f2de746
HID: i2c-hid: The interrupt should be level sensitive
westeri Jan 26, 2015
afe9893
HID: saitek: add USB ID for older R.A.T. 7
dsalt Jan 29, 2015
f9d904a
HID: hid-sensor-hub: Correct documentation
spandruvada Jan 7, 2015
ed11977
HID: sensor-hub: correct dyn_callback_lock IRQ-safe change
spandruvada Jan 7, 2015
6c40065
HID: sony: Fix a WARNING shown when rmmod-ing the driver
ao2 Feb 16, 2015
b0bd96f
lguest: now depends on PCI
rustyrussell Feb 19, 2015
f476893
lguest: update help text.
rustyrussell Feb 19, 2015
c4ce0da
livepatch: RCU protect struct klp_func all the time when used in klp_…
pmladek Feb 18, 2015
8b402c9
HID: sony: initialize sony_dev_list_lock properly
Feb 23, 2015
b94993f
HID: sony: fix uninitialized per-controller spinlock
Feb 23, 2015
6d00f37
HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events
Feb 20, 2015
ef567cf
HID: microsoft: Add ID for NE7K wireless keyboard
jsitnicki Feb 21, 2015
31795b4
x86/xen: Make sure X2APIC_ENABLE bit of MSR_IA32_APICBASE is not set
Feb 11, 2015
fdfd811
x86/xen: allow privcmd hypercalls to be preempted
Feb 19, 2015
facb573
xen-scsiback: mark pvscsi frontend request consumed only after last read
jgross1 Feb 17, 2015
5054daa
x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
Feb 23, 2015
c4bbb39
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Feb 24, 2015
9ec0de0
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Feb 24, 2015
84257ce
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Feb 24, 2015
b24e2bd
Merge tag 'stable/for-linus-4.0-rc1-tag' of git://git.kernel.org/pub/…
torvalds Feb 24, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
x86/xen: Make sure X2APIC_ENABLE bit of MSR_IA32_APICBASE is not set
Commit d524165 ("x86/apic: Check x2apic early") tests X2APIC_ENABLE
bit of MSR_IA32_APICBASE when CONFIG_X86_X2APIC is off and panics
the kernel when this bit is set.

Xen's PV guests will pass this MSR read to the hypervisor which will
return its version of the MSR, where this bit might be set. Make sure
we clear it before returning MSR value to the caller.

Signed-off-by: Boris Ostrovsky <[email protected]>
Signed-off-by: David Vrabel <[email protected]>
  • Loading branch information
Boris Ostrovsky authored and David Vrabel committed Feb 23, 2015
commit 31795b470b0872b66f7fa26f791b695c79821220
19 changes: 18 additions & 1 deletion arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,23 @@ static inline void xen_write_cr8(unsigned long val)
BUG_ON(val);
}
#endif

static u64 xen_read_msr_safe(unsigned int msr, int *err)
{
u64 val;

val = native_read_msr_safe(msr, err);
switch (msr) {
case MSR_IA32_APICBASE:
#ifdef CONFIG_X86_X2APIC
if (!(cpuid_ecx(1) & (1 << (X86_FEATURE_X2APIC & 31))))
#endif
val &= ~X2APIC_ENABLE;
break;
}
return val;
}

static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
{
int ret;
Expand Down Expand Up @@ -1240,7 +1257,7 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = {

.wbinvd = native_wbinvd,

.read_msr = native_read_msr_safe,
.read_msr = xen_read_msr_safe,
.write_msr = xen_write_msr_safe,

.read_tsc = native_read_tsc,
Expand Down