From: Patrick Colp <pjcolp@cs.ubc.ca>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: xen-devel@lists.xensource.com,
Keir Fraser <keir.fraser@eu.citrix.com>,
Grzegorz Milos <gm281@cam.ac.uk>,
Andrew Peace <Andrew.Peace@eu.citrix.com>
Subject: Re: [PATCH] Paging and memory sharing for HVM guests
Date: Wed, 16 Dec 2009 16:00:22 -0800 [thread overview]
Message-ID: <4B297496.5010903@cs.ubc.ca> (raw)
In-Reply-To: <e694a260-5f70-40f1-9136-40e7b1a077f7@default>
[-- Attachment #1: Type: text/plain, Size: 1963 bytes --]
Oops! I've attached the missing patch.
The easiest way to apply them is to use a mercurial patch queue, but simply
applying them in order of the series file works too. Did the patches that
failed fail before or after this missing one? If after, then try again with
this patch and see if there are still any problems. If before, which patches?
The queue was refreshed against revision 20683, pulled yesterday morning.
Patrick
Dan Magenheimer wrote:
> Hi Gregor and Patrick --
>
> Congrats!
>
> Could you provide instructions on how to apply them
> to xen-unstable tip? I tried applying them using
> "patch -p1" in the order given in the file "series"
> and most applied but I got a handful of failed hunks
> and even one patch file missing altogether
> (...pfec_page_paged.patch).
>
> (Just xen patches, no Linux patches tried yet.)
>
> Thanks,
> Dan
>
>> -----Original Message-----
>> From: Grzegorz Milos [mailto:gm281@cam.ac.uk]
>> Sent: Wednesday, December 16, 2009 4:15 PM
>> To: xen-devel@lists.xensource.com; Patrick Colp; Andrew Peace; Keir
>> Fraser
>> Subject: [Xen-devel] [PATCH] Paging and memory sharing for HVM guests
>>
>>
>> The series of 46 patches attached to this email contain the initial
>> implementation of memory paging and sharing for Xen. Patrick Colp
>> leads the work on the pager, and I am mostly responsible for memory
>> sharing. We would be grateful for any comments/suggestions you might
>> have. Individual patches are labeled with comments describing their
>> purpose and a sign-off footnote. Of course we are happy to discuss
>> them in more detail, as required. Assuming that there are no major
>> objections against including them in the mainstream xen-unstable tree,
>> we would like to move future development to that tree.
>>
>> Thanks
>> Patrick & Gregor
>>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
[-- Attachment #2: mem_paging_xen_pfec_page_paged.patch --]
[-- Type: text/x-patch, Size: 2080 bytes --]
hap_gva_to_gfn paging support. Return PFEC_page_paged when a paged
out page is found. Ensure top-level page table page and l1 entry
are paged in. If an intermediary page table page is paged out,
propogate error to caller.
Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
diff -r 5c370b75a5b7 xen/arch/x86/mm/hap/guest_walk.c
--- a/xen/arch/x86/mm/hap/guest_walk.c Wed Oct 14 10:33:40 2009 -0700
+++ b/xen/arch/x86/mm/hap/guest_walk.c Wed Oct 14 10:33:44 2009 -0700
@@ -46,6 +46,14 @@
/* Get the top-level table's MFN */
cr3 = v->arch.hvm_vcpu.guest_cr[3];
top_mfn = gfn_to_mfn(v->domain, _gfn(cr3 >> PAGE_SHIFT), &p2mt);
+ if ( p2m_is_paging(p2mt) )
+ {
+// if ( p2m_is_paged(p2mt) )
+ p2m_mem_paging_populate(v->domain, cr3 >> PAGE_SHIFT);
+
+ pfec[0] = PFEC_page_paged;
+ return INVALID_GFN;
+ }
if ( !p2m_is_ram(p2mt) )
{
pfec[0] &= ~PFEC_page_present;
@@ -62,12 +70,28 @@
unmap_domain_page(top_map);
/* Interpret the answer */
- if ( missing == 0 )
- return gfn_x(guest_l1e_get_gfn(gw.l1e));
-
+ if ( missing == 0 )
+ {
+ gfn_t gfn = guest_l1e_get_gfn(gw.l1e);
+ gfn_to_mfn(v->domain, gfn, &p2mt);
+ if ( p2m_is_paging(p2mt) )
+ {
+// if ( p2m_is_paged(p2mt) )
+ p2m_mem_paging_populate(v->domain, gfn_x(gfn));
+
+ pfec[0] = PFEC_page_paged;
+ return INVALID_GFN;
+ }
+
+ return gfn_x(gfn);
+ }
+
if ( missing & _PAGE_PRESENT )
pfec[0] &= ~PFEC_page_present;
-
+
+ if ( missing & _PAGE_PAGED )
+ pfec[0] = PFEC_page_paged;
+
return INVALID_GFN;
}
diff -r 5c370b75a5b7 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h Wed Oct 14 10:33:40 2009 -0700
+++ b/xen/include/asm-x86/processor.h Wed Oct 14 10:33:44 2009 -0700
@@ -132,6 +132,7 @@
#define PFEC_user_mode (1U<<2)
#define PFEC_reserved_bit (1U<<3)
#define PFEC_insn_fetch (1U<<4)
+#define PFEC_page_paged (1U<<5)
#ifndef __ASSEMBLY__
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2009-12-17 0:00 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 23:14 [PATCH] Paging and memory sharing for HVM guests Grzegorz Milos
2009-12-16 23:52 ` Dan Magenheimer
2009-12-17 0:00 ` Patrick Colp [this message]
2009-12-17 0:15 ` Dan Magenheimer
2009-12-17 8:47 ` Jan Beulich
2009-12-17 13:08 ` Grzegorz Milos
2009-12-17 15:11 ` Patrick Colp
2009-12-17 11:19 ` Jan Beulich
2009-12-17 15:59 ` Keir Fraser
2009-12-17 18:34 ` Jeremy Fitzhardinge
2009-12-17 16:19 ` Dan Magenheimer
2009-12-18 18:05 ` Dan Magenheimer
2009-12-18 18:51 ` Patrick Colp
2009-12-20 15:04 ` Grzegorz Milos
2009-12-21 16:52 ` Dan Magenheimer
2009-12-17 16:38 ` Konrad Rzeszutek Wilk
2009-12-17 16:59 ` Jan Beulich
2009-12-17 17:05 ` Patrick Colp
2009-12-18 8:08 ` Jan Beulich
2009-12-18 17:29 ` Patrick Colp
2009-12-18 18:36 ` Konrad Rzeszutek Wilk
2009-12-18 18:54 ` Patrick Colp
2009-12-17 18:27 ` Konrad Rzeszutek Wilk
2009-12-17 17:02 ` Patrick Colp
2009-12-17 17:26 ` Patrick Colp
2009-12-17 19:47 ` Jeremy Fitzhardinge
2009-12-17 20:08 ` Patrick Colp
2009-12-17 20:15 ` Jeremy Fitzhardinge
2009-12-17 20:16 ` Jeremy Fitzhardinge
2009-12-17 20:22 ` Patrick Colp
2009-12-18 16:00 ` Jan Beulich
2009-12-18 17:16 ` Patrick Colp
2009-12-22 10:49 ` Jan Beulich
2009-12-22 11:34 ` Keir Fraser
2009-12-22 12:56 ` Jan Beulich
2009-12-22 13:35 ` Keir Fraser
2010-01-04 14:14 ` Jan Beulich
2010-01-04 15:32 ` Keir Fraser
2010-01-04 16:30 ` Jan Beulich
2010-01-05 7:51 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B297496.5010903@cs.ubc.ca \
--to=pjcolp@cs.ubc.ca \
--cc=Andrew.Peace@eu.citrix.com \
--cc=dan.magenheimer@oracle.com \
--cc=gm281@cam.ac.uk \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.