mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Five bug-fixes:
- When booting as PVHVM we would try to use PV console - but would not validate
the parameters causing us to crash during restore b/c we re-use the wrong event
channel.
- When booting on machines with SR-IOV PCI bridge we didn't check for the bridge
and tried to use it.
- Under AMD machines would advertise the APERFMPERF resulting in needless amount
of MSRs from the guest.
- A global value (xen_released_pages) was not subtracted at bootup when pages
were added back in. This resulted in the balloon worker having the wrong
account of how many pages were truly released.
- Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAABAgAGBQJP2kcmAAoJEFjIrFwIi8fJXLcH/0a2m6KMcyjc4WaCHspAEFDL
9B055QUFDEOlH55wE2QeED/8D+0HUbTYnQBycH126XLKzLfRv1fsrKFKDSA/SWW2
Mh8N316UrY5Wc3KMdxXdCXJCDqDs7VhARTv6JdlUqUlH9oLRYE6CMRO8MujT0iwd
r+uEnNuW0udMFt8x9SnJW7pEaq7u2N5koEGdWEzZhfoumDaCRxm5OKAKXZ0DZlEZ
/BPjTW/N+Pf4u+bJZY+wQq41y4zGMqu7TDo/hOpuGZxeqtVnCE9trBbuGLnp4K+W
n4TfZZs9Y1kovSMj6qTeB0aP0F77tqHyXPb1oPKxm2kWfqT2dFtIRpuLtXYSC+o=
=cQl2
-----END PGP SIGNATURE-----
Merge tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull five Xen bug-fixes from Konrad Rzeszutek Wilk:
- When booting as PVHVM we would try to use PV console - but would not validate
the parameters causing us to crash during restore b/c we re-use the wrong event
channel.
- When booting on machines with SR-IOV PCI bridge we didn't check for the bridge
and tried to use it.
- Under AMD machines would advertise the APERFMPERF resulting in needless amount
of MSRs from the guest.
- A global value (xen_released_pages) was not subtracted at bootup when pages
were added back in. This resulted in the balloon worker having the wrong
account of how many pages were truly released.
- Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback.
* tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: mark local pages as FOREIGN in the m2p_override
xen/setup: filter APERFMPERF cpuid feature out
xen/balloon: Subtract from xen_released_pages the count that is populated.
xen/pci: Check for PCI bridge before using it.
xen/events: Add WARN_ON when quick lookup found invalid type.
xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness.
xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
xen/hvc: Collapse error logic.
This commit is contained in:
commit
069915b946
6 changed files with 73 additions and 16 deletions
|
|
@ -214,24 +214,24 @@ static int xen_hvm_console_init(void)
|
|||
/* already configured */
|
||||
if (info->intf != NULL)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If the toolstack (or the hypervisor) hasn't set these values, the
|
||||
* default value is 0. Even though mfn = 0 and evtchn = 0 are
|
||||
* theoretically correct values, in practice they never are and they
|
||||
* mean that a legacy toolstack hasn't initialized the pv console correctly.
|
||||
*/
|
||||
r = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
|
||||
if (r < 0) {
|
||||
kfree(info);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (r < 0 || v == 0)
|
||||
goto err;
|
||||
info->evtchn = v;
|
||||
hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v);
|
||||
if (r < 0) {
|
||||
kfree(info);
|
||||
return -ENODEV;
|
||||
}
|
||||
v = 0;
|
||||
r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v);
|
||||
if (r < 0 || v == 0)
|
||||
goto err;
|
||||
mfn = v;
|
||||
info->intf = ioremap(mfn << PAGE_SHIFT, PAGE_SIZE);
|
||||
if (info->intf == NULL) {
|
||||
kfree(info);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (info->intf == NULL)
|
||||
goto err;
|
||||
info->vtermno = HVC_COOKIE;
|
||||
|
||||
spin_lock(&xencons_lock);
|
||||
|
|
@ -239,6 +239,9 @@ static int xen_hvm_console_init(void)
|
|||
spin_unlock(&xencons_lock);
|
||||
|
||||
return 0;
|
||||
err:
|
||||
kfree(info);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int xen_pv_console_init(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue