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/
Home Products Support Community News


[Xen-devel] [Patch 2/2] Add dom0_get_sectioninfo for XEN/VTI

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch 2/2] Add dom0_get_sectioninfo for XEN/VTI
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 16 Jun 2005 18:25:46 +0800
Delivery-date: Thu, 16 Jun 2005 10:24:55 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVyXcIsVytcYfebSZSjZoKeCr8e2w==
Thread-topic: [Patch 2/2] Add dom0_get_sectioninfo for XEN/VTI
As discussed before on the list, unmodified domain is presented a
real-platform-like physical address space, including memory hole, MMIO,
etc. Device Model needs to map pages of other unmodified domain into its
own virtual space. To achieve that, DM needs to retrieve physical pfn ->
machine pfn information of targeted domain. However current
DOM0_GETMEMLIST only returns a list of active pages allocated to
targeted domain, which doesn't include hole information.

Attached patch adds a new operation (DOM0_GET_SECTIONINFO), to retrieve
hierarchy of physical address space. Together with DOM0_GETMEMLIST, DM
can then construct correct information to access page from other

Xenolinux has no such issue since it's physical memory is always
contiguous. ;-)

Signed-off-by Kevin Tian <Kevin.tian@xxxxxxxxx>


--- xeno-unstable.org/xen/include/public/dom0_ops.h     2005-06-16
17:42:48.000000000 +0800
+++ xeno-unstable/xen/include/public/dom0_ops.h 2005-06-16
17:46:09.000000000 +0800
@@ -371,6 +372,24 @@ typedef struct {
  *                 IA64 specific operations (START)        
+#define DOM0_GET_SECTIONINFO   DOM0_IA64_OP_BASE           
+typedef struct {                
+    memory_t   start;  /* start of memory hole */                
+    memory_t   end;    /* end of memory hole */                  
+} dom0_section_t;                                                
+/* Request section info which describes memory holes in guest    
+ * physical layer, like mmio, etc. When sections is NULL, return 
+ * number of holes. When sections is valid, return section info  
+ * upon requested number.                                        
+ * (ia64 specific now, but should adapt to other arch with holes)
+ */                                                              
+typedef struct {                                                 
+    domid_t domain;            /* Domain to be affected */       
+    u32 section_nr;            /* How many holes existing? */    
+    dom0_section_t *sections;  /* List to contain section info */
+} dom0_get_sectioninfo_t;                                        
  *                 IA64 specific operations (END)
@@ -407,6 +426,7 @@ typedef struct {              
         dom0_microcode_t         microcode;      
         dom0_ioport_permission_t ioport_permission;
         dom0_getvcpucontext_t    getvcpucontext;
+        dom0_get_sectioninfo_t   getsectioninfo;
     } u;
 } dom0_op_t;

Xen-devel mailing list