[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] HAP fault handling for shared pages.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1261031276 0 # Node ID 8cf5bffd9663fc541be4d4a1b63630787739fd0d # Parent 98bd49474dbf9a4a1d958d30bd947f1258b5246b HAP fault handling for shared pages. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@xxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 7 +++++++ xen/arch/x86/hvm/svm/svm.c | 1 + xen/arch/x86/hvm/vmx/vmx.c | 1 + xen/arch/x86/mm/hap/p2m-ept.c | 1 + xen/arch/x86/mm/p2m.c | 2 ++ 5 files changed, 12 insertions(+) diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Thu Dec 17 06:27:56 2009 +0000 +++ b/xen/arch/x86/hvm/hvm.c Thu Dec 17 06:27:56 2009 +0000 @@ -960,6 +960,13 @@ bool_t hvm_hap_nested_page_fault(unsigne return 1; } + /* Mem sharing: unshare the page and try again */ + if ( p2mt == p2m_ram_shared ) + { + mem_sharing_unshare_page(current->domain, gfn, 0); + return 1; + } + /* Shouldn't happen: Maybe the guest was writing to a r/o grant mapping? */ if ( p2mt == p2m_grant_map_ro ) { diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Thu Dec 17 06:27:56 2009 +0000 +++ b/xen/arch/x86/hvm/svm/svm.c Thu Dec 17 06:27:56 2009 +0000 @@ -30,6 +30,7 @@ #include <asm/io.h> #include <asm/paging.h> #include <asm/p2m.h> +#include <asm/mem_sharing.h> #include <asm/regs.h> #include <asm/cpufeature.h> #include <asm/processor.h> diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Thu Dec 17 06:27:56 2009 +0000 +++ b/xen/arch/x86/hvm/vmx/vmx.c Thu Dec 17 06:27:56 2009 +0000 @@ -37,6 +37,7 @@ #include <asm/spinlock.h> #include <asm/paging.h> #include <asm/p2m.h> +#include <asm/mem_sharing.h> #include <asm/hvm/emulate.h> #include <asm/hvm/hvm.h> #include <asm/hvm/support.h> diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/mm/hap/p2m-ept.c --- a/xen/arch/x86/mm/hap/p2m-ept.c Thu Dec 17 06:27:56 2009 +0000 +++ b/xen/arch/x86/mm/hap/p2m-ept.c Thu Dec 17 06:27:56 2009 +0000 @@ -71,6 +71,7 @@ static void ept_p2m_type_to_flags(ept_en return; case p2m_ram_logdirty: case p2m_ram_ro: + case p2m_ram_shared: entry->r = entry->x = 1; entry->w = 0; return; diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c Thu Dec 17 06:27:56 2009 +0000 +++ b/xen/arch/x86/mm/p2m.c Thu Dec 17 06:27:56 2009 +0000 @@ -91,6 +91,8 @@ static unsigned long p2m_type_to_flags(p return flags | P2M_BASE_FLAGS; case p2m_ram_ro: case p2m_grant_map_ro: + return flags | P2M_BASE_FLAGS; + case p2m_ram_shared: return flags | P2M_BASE_FLAGS; case p2m_mmio_dm: return flags; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |