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-changelog

[Xen-changelog] [xen-unstable] libxc: Do not bother initialising shared-

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Do not bother initialising shared-info page in HVM-domain builder.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Jul 2010 07:30:21 -0700
Delivery-date: Thu, 22 Jul 2010 07:30:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1279808689 -3600
# Node ID b0b1a6163203574d53876c3afa2e1ffc94c9f3d3
# Parent  bba5ac2066c8dc2896ba6253813a06de74309c23
libxc: Do not bother initialising shared-info page in HVM-domain builder.

It is already zeroed by the hypervisor, and setting the evtchn_mask
array is pointless since its location varies between 32- and 64-bit
guests, and the builder can't know which is the correct bitness.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_hvm_build.c |   23 +----------------------
 1 files changed, 1 insertion(+), 22 deletions(-)

diff -r bba5ac2066c8 -r b0b1a6163203 tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c        Thu Jul 22 15:19:25 2010 +0100
+++ b/tools/libxc/xc_hvm_build.c        Thu Jul 22 15:24:49 2010 +0100
@@ -28,8 +28,7 @@
 #define SPECIALPAGE_XENSTORE 1
 #define SPECIALPAGE_IOREQ    2
 #define SPECIALPAGE_IDENT_PT 3
-#define SPECIALPAGE_SHINFO   4
-#define NR_SPECIAL_PAGES     5
+#define NR_SPECIAL_PAGES     4
 #define special_pfn(x) (0xff000u - NR_SPECIAL_PAGES + (x))
 
 static void build_hvm_info(void *hvm_info_page, uint64_t mem_size)
@@ -125,8 +124,6 @@ static int setup_guest(xc_interface *xch
     unsigned long target_pages = (unsigned long)target << (20 - PAGE_SHIFT);
     unsigned long pod_pages = 0;
     unsigned long entry_eip, cur_pages;
-    struct xen_add_to_physmap xatp;
-    struct shared_info *shared_info;
     void *hvm_info_page;
     uint32_t *ident_pt;
     struct elf_binary elf;
@@ -337,28 +334,10 @@ static int setup_guest(xc_interface *xch
     build_hvm_info(hvm_info_page, v_end);
     munmap(hvm_info_page, PAGE_SIZE);
 
-    /* Map and initialise shared_info page. */
-    xatp.domid = dom;
-    xatp.space = XENMAPSPACE_shared_info;
-    xatp.idx   = 0;
-    xatp.gpfn  = special_pfn(SPECIALPAGE_SHINFO);
-    if ( (xc_memory_op(xch, XENMEM_add_to_physmap, &xatp) != 0) ||
-         ((shared_info = xc_map_foreign_range(
-             xch, dom, PAGE_SIZE, PROT_READ | PROT_WRITE,
-             special_pfn(SPECIALPAGE_SHINFO))) == NULL) )
-        goto error_out;
-    memset(shared_info, 0, PAGE_SIZE);
-    /* NB. evtchn_upcall_mask is unused: leave as zero. */
-    memset(&shared_info->evtchn_mask[0], 0xff,
-           sizeof(shared_info->evtchn_mask));
-    munmap(shared_info, PAGE_SIZE);
-
     /* Allocate and clear special pages. */
     for ( i = 0; i < NR_SPECIAL_PAGES; i++ )
     {
         xen_pfn_t pfn = special_pfn(i);
-        if ( i == SPECIALPAGE_SHINFO )
-            continue;
         rc = xc_domain_memory_populate_physmap(xch, dom, 1, 0, 0, &pfn);
         if ( rc != 0 )
         {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: Do not bother initialising shared-info page in HVM-domain builder., Xen patchbot-unstable <=