0c76f22ef1
- bnc#633573 - System fail to boot after running several warm reboot tests 22749-vtd-workarounds.patch - Upstream patches from Jan 22744-ept-pod-locking.patch 22777-vtd-ats-fixes.patch 22781-pod-hap-logdirty.patch 22782-x86-emul-smsw.patch 22789-i386-no-x2apic.patch 22790-svm-resume-migrate-pirqs.patch 22816-x86-pirq-drop-priv-check.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=94
60 lines
2.3 KiB
Diff
60 lines
2.3 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(-)
|
|
|
|
Index: xen-4.0.2-testing/tools/xenpaging/xenpaging.c
|
|
===================================================================
|
|
--- xen-4.0.2-testing.orig/tools/xenpaging/xenpaging.c
|
|
+++ xen-4.0.2-testing/tools/xenpaging/xenpaging.c
|
|
@@ -381,7 +381,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;
|
|
|
|
@@ -391,7 +391,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,
|
|
@@ -622,7 +623,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");
|
|
@@ -651,7 +652,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");
|