xen/xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
Charles Arnold 5a49a4e63b - Upstream patch for python 2.7 compatibility
22045-python27-compat.patch 

Thu Nov  11 18:44:48 CST 2010 - cyliu@novell.com
- bnc#641144 - FV Xen VM running windows or linux cannot write to
  virtual floppy drive
  bdrv_default_rwflag.patch

- fate#310510 - fix xenpaging
  xenpaging.optimize_p2m_mem_paging_populate.patch
  xenpaging.HVMCOPY_gfn_paged_out.patch

- bnc#649864 - automatic numa cpu placement of xen conflicts with
  cpupools
  22326-cpu-pools-numa-placement.patch

- fate#310510 - fix xenpaging
  xenpaging.populate_only_if_paged.patch
  - revert logic, populate needs to happen unconditionally
  xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
  - invalidate current mfn only if gfn is not in flight or done
  xenpaging.mem_event_check_ring-free_requests.patch
  - print info only if 1 instead of 2 slots are free
  xenpaging.guest_remove_page.patch
  - check mfn before usage in resume function
  xenpaging.machine_to_phys_mapping.patch
  - check mfn before usage in resume function

- bnc#552115 - Remove target discovery in block-iscsi

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=82
2010-11-12 17:55:23 +00:00

30 lines
1.2 KiB
Diff

Subject: xenpaging: when populating a page, check if populating is already in progress
p2m_mem_paging_populate can be called serveral times from different
vcpus. If the page is already in state p2m_ram_paging_in and has a new
valid mfn, invalidating this new mfn will cause trouble later if
p2m_mem_paging_resume will set the new gfn/mfn pair back to state
p2m_ram_rw.
Detect this situation and change p2m state not if the page is in the
process of being still paged-out or already paged-in.
In fact, p2m state p2m_ram_paged is the only state where the mfn type
can be invalidated.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
xen/arch/x86/mm/p2m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- xen-4.0.1-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.1-testing/xen/arch/x86/mm/p2m.c
@@ -2581,7 +2581,7 @@ void p2m_mem_paging_populate(struct doma
/* XXX: It seems inefficient to have this here, as it's only needed
* in one case (ept guest accessing paging out page) */
gfn_to_mfn(d, gfn, &p2mt);
- if ( p2mt != p2m_ram_paging_out )
+ if ( p2mt == p2m_ram_paged )
{
p2m_lock(d->arch.p2m);
set_p2m_entry(d, gfn, _mfn(PAGING_MFN), 0, p2m_ram_paging_in_start);