mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
xen: bug fixes for 3.17-rc4
- Fix for PVHVM suspend/resume and migration - Don't pointlessly retry certain ballooning ops - Fix gntalloc when grefs have run out. - Fix PV boot if KSALR is enable or very large modules are used. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJUEZw4AAoJEFxbo/MsZsTRoHkIAJ5h287Wer2Yf4ALlFI47Esl AhcgVKi7WMJ6mBQUk/xpbSS3MZEuTuPJVbuiabJwRaZk9vX7w8q08yrAD8SOrCwY 6iGooaWEZ96P5DPI5fmWBuOgt5f2wfqzAp//wl/dK/kzr6Kw63huTXa0H0fmd8BY Gy13pN4JEPDyvjjZWFvDcrcEUA9eTcTaXQZisBUGuGictXySr5ovz9G3EKOtJP0D vkmDzApijFEEjJwZMGazgipng4mwh94fW4+7bs57s6iREpMzOJDTRKrl9suaXdza 5HA2ed7Au/qL8IwiQAFGxQpMBqNQxEGerlFfPBhRPuGQ+Ek3/pZF3BTU56w/nt4= =y/Ol -----END PGP SIGNATURE----- Merge tag 'stable/for-linus-3.17-b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull Xen bug fixes from David Vrabel: - fix for PVHVM suspend/resume and migration - don't pointlessly retry certain ballooning ops - fix gntalloc when grefs have run out. - fix PV boot if KSALR is enable or very large modules are used. * tag 'stable/for-linus-3.17-b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: don't copy bogus duplicate entries into kernel page tables xen/gntalloc: safely delete grefs in add_grefs() undo path xen/gntalloc: fix oops after runnning out of grant refs xen/balloon: cancel ballooning if adding new memory failed xen/manage: Always freeze/thaw processes when suspend/resuming
This commit is contained in:
commit
7ee2d2d671
5 changed files with 22 additions and 33 deletions
|
|
@ -230,8 +230,8 @@ static enum bp_state reserve_additional_memory(long credit)
|
|||
rc = add_memory(nid, hotplug_start_paddr, balloon_hotplug << PAGE_SHIFT);
|
||||
|
||||
if (rc) {
|
||||
pr_info("%s: add_memory() failed: %i\n", __func__, rc);
|
||||
return BP_EAGAIN;
|
||||
pr_warn("Cannot add additional memory (%i)\n", rc);
|
||||
return BP_ECANCELED;
|
||||
}
|
||||
|
||||
balloon_hotplug -= credit;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ static int add_grefs(struct ioctl_gntalloc_alloc_gref *op,
|
|||
int i, rc, readonly;
|
||||
LIST_HEAD(queue_gref);
|
||||
LIST_HEAD(queue_file);
|
||||
struct gntalloc_gref *gref;
|
||||
struct gntalloc_gref *gref, *next;
|
||||
|
||||
readonly = !(op->flags & GNTALLOC_FLAG_WRITABLE);
|
||||
rc = -ENOMEM;
|
||||
|
|
@ -141,13 +141,11 @@ static int add_grefs(struct ioctl_gntalloc_alloc_gref *op,
|
|||
goto undo;
|
||||
|
||||
/* Grant foreign access to the page. */
|
||||
gref->gref_id = gnttab_grant_foreign_access(op->domid,
|
||||
rc = gnttab_grant_foreign_access(op->domid,
|
||||
pfn_to_mfn(page_to_pfn(gref->page)), readonly);
|
||||
if ((int)gref->gref_id < 0) {
|
||||
rc = gref->gref_id;
|
||||
if (rc < 0)
|
||||
goto undo;
|
||||
}
|
||||
gref_ids[i] = gref->gref_id;
|
||||
gref_ids[i] = gref->gref_id = rc;
|
||||
}
|
||||
|
||||
/* Add to gref lists. */
|
||||
|
|
@ -162,8 +160,8 @@ undo:
|
|||
mutex_lock(&gref_mutex);
|
||||
gref_size -= (op->count - i);
|
||||
|
||||
list_for_each_entry(gref, &queue_file, next_file) {
|
||||
/* __del_gref does not remove from queue_file */
|
||||
list_for_each_entry_safe(gref, next, &queue_file, next_file) {
|
||||
list_del(&gref->next_file);
|
||||
__del_gref(gref);
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +191,7 @@ static void __del_gref(struct gntalloc_gref *gref)
|
|||
|
||||
gref->notify.flags = 0;
|
||||
|
||||
if (gref->gref_id > 0) {
|
||||
if (gref->gref_id) {
|
||||
if (gnttab_query_foreign_access(gref->gref_id))
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,16 +103,11 @@ static void do_suspend(void)
|
|||
|
||||
shutting_down = SHUTDOWN_SUSPEND;
|
||||
|
||||
#ifdef CONFIG_PREEMPT
|
||||
/* If the kernel is preemptible, we need to freeze all the processes
|
||||
to prevent them from being in the middle of a pagetable update
|
||||
during suspend. */
|
||||
err = freeze_processes();
|
||||
if (err) {
|
||||
pr_err("%s: freeze failed %d\n", __func__, err);
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
err = dpm_suspend_start(PMSG_FREEZE);
|
||||
if (err) {
|
||||
|
|
@ -157,10 +152,8 @@ out_resume:
|
|||
dpm_resume_end(si.cancelled ? PMSG_THAW : PMSG_RESTORE);
|
||||
|
||||
out_thaw:
|
||||
#ifdef CONFIG_PREEMPT
|
||||
thaw_processes();
|
||||
out:
|
||||
#endif
|
||||
shutting_down = SHUTDOWN_INVALID;
|
||||
}
|
||||
#endif /* CONFIG_HIBERNATE_CALLBACKS */
|
||||
|
|
|
|||
Loading…
Reference in a new issue