xen/xenpaging.evict_fail_fast_forward.patch
Charles Arnold c9e3853c04 - bnc#735806 - VF doesn't work after hot-plug for many times
24448-x86-pt-irq-leak.patch
- Upstream patches from Jan
  24261-x86-cpuidle-Westmere-EX.patch
  24417-amd-erratum-573.patch
  24429-mceinj-tool.patch
  24447-x86-TXT-INIT-SIPI-delay.patch
  ioemu-9868-MSI-X.patch 

- bnc#732884 - remove private runlevel 4 from init scripts
  xen.no-default-runlevel-4.patch

- bnc#727515 - Fragmented packets hang network boot of HVM guest 
  ipxe-gcc45-warnings.patch
  ipxe-ipv4-fragment.patch
  ipxe-enable-nics.patch

- fate#310510 - fix xenpaging
  update xenpaging.autostart.patch, make changes with mem-swap-target 
  permanent
  update xenpaging.doc.patch, mention issues with live migration

- fate#310510 - fix xenpaging
  add xenpaging.evict_mmap_readonly.patch
  update xenpaging.error-handling.patch, reduce debug output

- bnc#736824 - Microcode patches for AMD's 15h processors panic the 
  system
  24189-x86-p2m-pod-locking.patch
  24412-x86-AMD-errata-model-shift.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=164
2012-01-05 19:41:54 +00:00

58 lines
2.1 KiB
Diff

# HG changeset patch
# Parent 00989d5f44b59ba7f3a467342a14b9c7621fa926
xenpaging: restore p2mt if gfn is needed before evict
In the rare case that a gfn is needed by a guest or a foreign domain
between nominate and evict, restore the p2mt and skip sending a request.
A request is not needed because the pager will notice the evict failure.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
xen/arch/x86/mm/p2m.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -3036,6 +3036,7 @@ void p2m_mem_paging_populate(struct p2m_
p2m_type_t p2mt;
p2m_access_t a;
mfn_t mfn;
+ int restored = 0;
struct domain *d = p2m->domain;
/* Check that there's space on the ring for this request */
@@ -3051,23 +3052,25 @@ void p2m_mem_paging_populate(struct p2m_
/* Allow only nominated or evicted pages to enter page-in path */
if ( p2m_do_populate(p2mt) )
{
- /* Evict will fail now, tag this request for pager */
- if ( p2mt == p2m_ram_paging_out )
- req.flags |= MEM_EVENT_FLAG_EVICT_FAIL;
-
- set_p2m_entry(p2m, gfn, mfn, 0, p2m_ram_paging_in_start, a);
+ /* Restore page state if gfn was requested before evict */
+ if ( p2mt == p2m_ram_paging_out && mfn_valid(mfn) ) {
+ set_p2m_entry(p2m, gfn, mfn, 0, p2m_ram_rw, a);
+ restored = 1;
+ } else {
+ set_p2m_entry(p2m, gfn, mfn, 0, p2m_ram_paging_in_start, a);
+ }
audit_p2m(p2m, 1);
}
p2m_unlock(p2m);
/* Pause domain if request came from guest and gfn has paging type */
- if ( p2m_is_paging(p2mt) && v->domain == d )
+ if ( !restored && p2m_is_paging(p2mt) && v->domain == d )
{
vcpu_pause_nosync(v);
req.flags |= MEM_EVENT_FLAG_VCPU_PAUSED;
}
/* No need to inform pager if the gfn is not in the page-out path */
- else if ( !p2m_do_populate(p2mt) )
+ else if ( restored || !p2m_do_populate(p2mt) )
{
/* gfn is already on its way back and vcpu is not paused */
mem_event_put_req_producers(&d->mem_event->paging);