WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Don't crash xen if hvm_read() from paged or shared m

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Don't crash xen if hvm_read() from paged or shared memory
From: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Date: Thu, 25 Mar 2010 18:44:07 +0000
Cc: Steven.Hand@xxxxxxxxxxxx
Delivery-date: Thu, 25 Mar 2010 11:44:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
 
There are two new return cases from hvm_copy_from_guest_virt() to deal
with paging or shared memory -- retry the emulation rather than crash.


Signed-off-by: Steven Hand <steven.hand@xxxxxxxxxxxx>

diff -r 25a3b799ff0e xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Mar 25 11:38:46 2010 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Thu Mar 25 18:33:01 2010 +0000
@@ -180,6 +180,9 @@
     case HVMCOPY_bad_gfn_to_mfn:
     case HVMCOPY_unhandleable:
         return X86EMUL_UNHANDLEABLE;
+    case HVMCOPY_gfn_paged_out: 
+    case HVMCOPY_gfn_shared:
+        return X86EMUL_RETRY;
     }
 
     BUG();


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Don't crash xen if hvm_read() from paged or shared memory, Steven Hand <=