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 V11 02/15] xen: Make Xen build once.

To: QEMU-devel <qemu-devel@xxxxxxxxxx>, Anthony Liguori <anthony@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH V11 02/15] xen: Make Xen build once.
From: anthony.perard@xxxxxxxxxx
Date: Tue, 1 Mar 2011 18:35:16 +0000
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 01 Mar 2011 10:38:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1299004529-31290-1-git-send-email-anthony.perard@xxxxxxxxxx>
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>
References: <1299004529-31290-1-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>

xen_domainbuild is now build in libhw. And xen_machine_pv is build only
for i386 targets.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 Makefile.objs        |    3 +++
 Makefile.target      |    2 +-
 hw/xen_domainbuild.c |   10 +++++-----
 hw/xen_domainbuild.h |    5 +++--
 hw/xen_machine_pv.c  |    2 +-
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 9e98a66..8034115 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -269,6 +269,9 @@ hw-obj-$(CONFIG_DP8393X) += dp8393x.o
 hw-obj-$(CONFIG_DS1225Y) += ds1225y.o
 hw-obj-$(CONFIG_MIPSNET) += mipsnet.o
 
+# Xen
+hw-obj-$(CONFIG_XEN) += xen_domainbuild.o
+
 # Sound
 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/Makefile.target b/Makefile.target
index 220589e..ab0a570 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -206,7 +206,7 @@ QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
 QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
 
 # xen backend driver support
-obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
+obj-i386-$(CONFIG_XEN) += xen_machine_pv.o
 
 # Inter-VM PCI shared memory
 obj-$(CONFIG_KVM) += ivshmem.o
diff --git a/hw/xen_domainbuild.c b/hw/xen_domainbuild.c
index 7f1fd66..b73d47f 100644
--- a/hw/xen_domainbuild.c
+++ b/hw/xen_domainbuild.c
@@ -1,9 +1,9 @@
 #include <signal.h>
-#include "xen_backend.h"
-#include "xen_domainbuild.h"
 #include "sysemu.h"
 #include "qemu-timer.h"
 #include "qemu-log.h"
+#include "xen_backend.h"
+#include "xen_domainbuild.h"
 
 #include <xenguest.h>
 
@@ -49,7 +49,7 @@ static int xenstore_domain_mkdir(char *path)
 }
 
 int xenstore_domain_init1(const char *kernel, const char *ramdisk,
-                          const char *cmdline)
+                          const char *cmdline, ram_addr_t ram_size)
 {
     char *dom, uuid_string[42], vm[256], path[256];
     int i;
@@ -225,7 +225,7 @@ static void xen_domain_cleanup(void)
 }
 
 int xen_domain_build_pv(const char *kernel, const char *ramdisk,
-                        const char *cmdline)
+                        const char *cmdline, ram_addr_t ram_size)
 {
     uint32_t ssidref = 0;
     uint32_t flags = 0;
@@ -246,7 +246,7 @@ int xen_domain_build_pv(const char *kernel, const char 
*ramdisk,
         goto err;
     }
 
-    xenstore_domain_init1(kernel, ramdisk, cmdline);
+    xenstore_domain_init1(kernel, ramdisk, cmdline, ram_size);
 
     rc = xc_domain_max_vcpus(xen_xc, xen_domid, smp_cpus);
     if (rc < 0) {
diff --git a/hw/xen_domainbuild.h b/hw/xen_domainbuild.h
index dea0121..49683f8 100644
--- a/hw/xen_domainbuild.h
+++ b/hw/xen_domainbuild.h
@@ -1,13 +1,14 @@
 #ifndef QEMU_HW_XEN_DOMAINBUILD_H
 #define QEMU_HW_XEN_DOMAINBUILD_H 1
 
+#include "cpu-common.h"
 #include "xen_common.h"
 
 int xenstore_domain_init1(const char *kernel, const char *ramdisk,
-                          const char *cmdline);
+                          const char *cmdline, ram_addr_t ram_size);
 int xenstore_domain_init2(int xenstore_port, int xenstore_mfn,
                           int console_port, int console_mfn);
 int xen_domain_build_pv(const char *kernel, const char *ramdisk,
-                        const char *cmdline);
+                        const char *cmdline, ram_addr_t ram_size);
 
 #endif /* QEMU_HW_XEN_DOMAINBUILD_H */
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 77a34bf..d0e6e8f 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -64,7 +64,7 @@ static void xen_init_pv(ram_addr_t ram_size,
         break;
     case XEN_CREATE:
         if (xen_domain_build_pv(kernel_filename, initrd_filename,
-                                kernel_cmdline) < 0) {
+                                kernel_cmdline, ram_size) < 0) {
             fprintf(stderr, "xen pv domain creation failed\n");
             exit(1);
         }
-- 
1.7.2.3


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