xen/xenpaging.notify_policy_only_once.patch
Charles Arnold 9a05aa7fc4 - bnc#658704 - SLES11 SP1 Xen boot panic in x2apic mode
22707-x2apic-preenabled-check.patch
- bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed:
  Cannot allocate memory"
  7434-qemu-rlimit-as.patch
- Additional or upstream patches from Jan
  22693-fam10-mmio-conf-base-protect.patch
  22694-x86_64-no-weak.patch
  22708-xenctx-misc.patch
  21432-4.0-cpu-boot-failure.patch
  22645-amd-flush-filter.patch
  qemu-fix-7433.patch

- Maintain compatibility with the extid flag even though it is
  deprecated for both legacy and sxp config files.
  hv_extid_compatibility.patch 

- bnc#649209-improve suspend eventchn lock
  suspend_evtchn_lock.patch

- Removed the hyper-v shim patches in favor of using the upstream 
  version. 

- bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap
  failed: Cannot allocate memory" 
  qemu-rlimit-as.patch

- Upstream c/s 7433 to replace qemu_altgr_more.patch
  7433-qemu-altgr.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=90
2011-01-14 18:24:51 +00:00

58 lines
2.2 KiB
Diff

Subject: xenpaging: notify policy only on resume
If a page is requested more than once, the policy is also notified more
than once about the page-in. However, a page-in happens only once. Any
further resume will only unpause the other vcpu. The multiple notify
will put the page into the mru list multiple times and it will unlock
other already resumed pages too early. In the worst case, a page that
was just resumed can be evicted right away, causing a deadlock in the
guest.
(xen-unstable changeset: 22441:7d2c013727d7)
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/xenpaging/xenpaging.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- xen-4.0.1-testing.orig/tools/xenpaging/xenpaging.c
+++ xen-4.0.1-testing/tools/xenpaging/xenpaging.c
@@ -380,7 +380,7 @@ int xenpaging_evict_page(xenpaging_t *pa
return ret;
}
-static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t *rsp)
+static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t *rsp, int notify_policy)
{
int ret;
@@ -390,7 +390,8 @@ static int xenpaging_resume_page(xenpagi
goto out;
/* Notify policy of page being paged in */
- policy_notify_paged_in(paging->mem_event.domain_id, rsp->gfn);
+ if ( notify_policy )
+ policy_notify_paged_in(paging->mem_event.domain_id, rsp->gfn);
/* Tell Xen page is ready */
ret = xc_mem_paging_resume(paging->xc_handle, paging->mem_event.domain_id,
@@ -621,7 +622,7 @@ int main(int argc, char *argv[])
rsp.vcpu_id = req.vcpu_id;
rsp.flags = req.flags;
- rc = xenpaging_resume_page(paging, &rsp);
+ rc = xenpaging_resume_page(paging, &rsp, 1);
if ( rc != 0 )
{
ERROR("Error resuming page");
@@ -650,7 +651,7 @@ int main(int argc, char *argv[])
rsp.vcpu_id = req.vcpu_id;
rsp.flags = req.flags;
- rc = xenpaging_resume_page(paging, &rsp);
+ rc = xenpaging_resume_page(paging, &rsp, 0);
if ( rc != 0 )
{
ERROR("Error resuming");