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] Merged.

# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 2de6e301a640c48e9a7ba73238e1e8aaa4e6d984
# Parent  edc33eea8630937f5616bf062c130a3b4ff3f625
# Parent  3842ebd7d480ed1dec103b51edba6c2890c3c1da
Merged.

diff -r edc33eea8630 -r 2de6e301a640 install.sh
--- a/install.sh        Mon Nov 14 11:11:41 2005
+++ b/install.sh        Mon Nov 14 11:12:29 2005
@@ -27,7 +27,7 @@
 cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
 echo "All done."
 
-if [ -x /sbin/udev ] && [ ! -z `udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
+if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 059 
]; then
   cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
 else
   cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
diff -r edc33eea8630 -r 2de6e301a640 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Mon Nov 14 
11:11:41 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Mon Nov 14 
11:12:29 2005
@@ -293,17 +293,18 @@
 {
        unsigned long sectors, sector_size;
        unsigned int binfo;
+       int err;
 
         if (info->connected == BLKIF_STATE_CONNECTED)
                return;
 
        DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
 
-       int err = xenbus_gather(NULL, info->xbdev->otherend,
-                               "sectors", "%lu", &sectors,
-                               "info", "%u", &binfo,
-                               "sector-size", "%lu", &sector_size,
-                               NULL);
+       err = xenbus_gather(NULL, info->xbdev->otherend,
+                           "sectors", "%lu", &sectors,
+                           "info", "%u", &binfo,
+                           "sector-size", "%lu", &sector_size,
+                           NULL);
        if (err) {
                xenbus_dev_fatal(info->xbdev, err,
                                 "reading backend fields at %s",
@@ -349,9 +350,9 @@
 
 static int blkfront_remove(struct xenbus_device *dev)
 {
+       struct blkfront_info *info = dev->data;
+
        DPRINTK("blkfront_remove: %s removed\n", dev->nodename);
-
-       struct blkfront_info *info = dev->data;
 
        blkif_free(info);
 
diff -r edc33eea8630 -r 2de6e301a640 
linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c   Mon Nov 14 
11:11:41 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c   Mon Nov 14 
11:12:29 2005
@@ -30,6 +30,12 @@
        return mfn_to_virt(xen_start_info->console_mfn);
 }
 
+static inline void notify_daemon(void)
+{
+       /* Use evtchn: this is called early, before irq is set up. */
+       notify_remote_via_evtchn(xen_start_info->console_evtchn);
+}
+
 int xencons_ring_send(const char *data, unsigned len)
 {
        int sent = 0;
@@ -47,8 +53,7 @@
        wmb();
        intf->out_prod = prod;
 
-       /* Use evtchn: this is called early, before irq is set up. */
-       notify_remote_via_evtchn(xen_start_info->console_evtchn);
+       notify_daemon();
 
        return sent;
 }      
@@ -70,8 +75,10 @@
                                1, regs);
        }
 
-       wmb();
+       mb();
        intf->in_cons = cons;
+
+       notify_daemon();
 
        return IRQ_HANDLED;
 }
@@ -102,6 +109,9 @@
 
        xencons_irq = err;
 
+       /* In case we have in-flight data after save/restore... */
+       notify_daemon();
+
        return 0;
 }
 
diff -r edc33eea8630 -r 2de6e301a640 
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Mon Nov 14 11:11:41 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Mon Nov 14 11:12:29 2005
@@ -118,10 +118,11 @@
        struct backend_info *be = xdev->data;
        netif_t *netif = be->netif;
        int i = 0, length = 0;
+       char *val;
 
        DPRINTK("netback_hotplug");
 
-       char *val = xenbus_read(NULL, xdev->nodename, "script", NULL);
+       val = xenbus_read(NULL, xdev->nodename, "script", NULL);
        if (IS_ERR(val)) {
                int err = PTR_ERR(val);
                xenbus_dev_fatal(xdev, err, "reading script");
diff -r edc33eea8630 -r 2de6e301a640 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Mon Nov 14 
11:11:41 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Mon Nov 14 
11:12:29 2005
@@ -36,7 +36,7 @@
 #include <asm-xen/xenbus.h>
 #include "xenbus_comms.h"
 
-static int xenbus_irq      = 0;
+static int xenbus_irq;
 
 extern void xenbus_probe(void *); 
 extern int xenstored_ready; 
@@ -51,7 +51,7 @@
 
 static irqreturn_t wake_waiting(int irq, void *unused, struct pt_regs *regs)
 {
-       if(unlikely(xenstored_ready == 0)) {
+       if (unlikely(xenstored_ready == 0)) {
                xenstored_ready = 1; 
                schedule_work(&probe_work); 
        } 
@@ -188,9 +188,6 @@
        }
 
        xenbus_irq = err;
-
-       /* FIXME zero out page -- domain builder should probably do this*/
-       memset(mfn_to_virt(xen_start_info->store_mfn), 0, PAGE_SIZE);
 
        return 0;
 }
diff -r edc33eea8630 -r 2de6e301a640 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Mon Nov 14 
11:11:41 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Mon Nov 14 
11:12:29 2005
@@ -284,6 +284,7 @@
        struct xenbus_device *dev =
                container_of(watch, struct xenbus_device, otherend_watch);
        struct xenbus_driver *drv = to_xenbus_driver(dev->dev.driver);
+       XenbusState state;
 
        /* Protect us against watches firing on old details when the otherend
           details change, say immediately after a resume. */
@@ -294,9 +295,10 @@
                return;
        }
 
-       XenbusState state = xenbus_read_driver_state(dev->otherend);
-
-       DPRINTK("state is %d, %s, %s", state, dev->otherend_watch.node, 
vec[XS_WATCH_PATH]);
+       state = xenbus_read_driver_state(dev->otherend);
+
+       DPRINTK("state is %d, %s, %s",
+               state, dev->otherend_watch.node, vec[XS_WATCH_PATH]);
 
        drv->otherend_changed(dev, state);
 }
diff -r edc33eea8630 -r 2de6e301a640 tools/check/check_hotplug
--- a/tools/check/check_hotplug Mon Nov 14 11:11:41 2005
+++ b/tools/check/check_hotplug Mon Nov 14 11:12:29 2005
@@ -7,7 +7,7 @@
    exit 1
 }
 
-if [ -x /sbin/udev ] && [ ! -z `udev -V` ] && [ `udev -V` -ge 059 ]; then
+if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 059 
]; then
   exit 0
 fi
 
diff -r edc33eea8630 -r 2de6e301a640 tools/examples/Makefile
--- a/tools/examples/Makefile   Mon Nov 14 11:11:41 2005
+++ b/tools/examples/Makefile   Mon Nov 14 11:12:29 2005
@@ -41,7 +41,7 @@
 ifeq ($(findstring $(DI),$(DE)),$(DI))
 HOTPLUGS=install-hotplug install-udev
 else
-ifeq ($(shell [ -x /sbin/udev ] && [ ! -z `udev -V` ] && [ `/sbin/udev -V` -ge 
059 ] && echo 1),1)
+ifeq ($(shell [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev 
-V` -ge 059 ] && echo 1),1)
 HOTPLUGS=install-udev
 else
 HOTPLUGS=install-hotplug
diff -r edc33eea8630 -r 2de6e301a640 tools/ioemu/target-i386-dm/Makefile
--- a/tools/ioemu/target-i386-dm/Makefile       Mon Nov 14 11:11:41 2005
+++ b/tools/ioemu/target-i386-dm/Makefile       Mon Nov 14 11:12:29 2005
@@ -376,9 +376,9 @@
 
 clean:
        rm -rf *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe slirp
-
-distclean:
-       rm -rf *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe slirp
+       rm -rf config.mak config.h
+
+distclean: clean
 
 install: all 
        if [ ! -d $(INSTALL_DIR) ];then mkdir -p $(INSTALL_DIR);fi
diff -r edc33eea8630 -r 2de6e301a640 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Mon Nov 14 11:11:41 2005
+++ b/tools/libxc/xc_linux_build.c      Mon Nov 14 11:12:29 2005
@@ -619,7 +619,9 @@
 
     *store_mfn = page_array[(vstoreinfo_start-dsi.v_start) >> PAGE_SHIFT];
     *console_mfn = page_array[(vconsole_start-dsi.v_start) >> PAGE_SHIFT];
-
+    if ( xc_clear_domain_page(xc_handle, dom, *store_mfn) ||
+         xc_clear_domain_page(xc_handle, dom, *console_mfn) )
+        goto error_out;
 
     start_info = xc_map_foreign_range(
         xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE,
diff -r edc33eea8630 -r 2de6e301a640 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Mon Nov 14 11:11:41 2005
+++ b/tools/libxc/xc_linux_restore.c    Mon Nov 14 11:12:29 2005
@@ -11,8 +11,6 @@
 
 #include "xg_private.h"
 #include "xg_save_restore.h"
-
-
 
 /* max mfn of the whole machine */
 static uint32_t max_mfn; 
diff -r edc33eea8630 -r 2de6e301a640 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Mon Nov 14 11:11:41 2005
+++ b/tools/libxc/xc_private.c  Mon Nov 14 11:12:29 2005
@@ -336,6 +336,19 @@
     return 0;
 }
 
+int xc_clear_domain_page(int xc_handle,
+                         uint32_t domid,
+                         unsigned long dst_pfn)
+{
+    void *vaddr = xc_map_foreign_range(
+        xc_handle, domid, PAGE_SIZE, PROT_WRITE, dst_pfn);
+    if ( vaddr == NULL )
+        return -1;
+    memset(vaddr, 0, PAGE_SIZE);
+    munmap(vaddr, PAGE_SIZE);
+    return 0;
+}
+
 unsigned long xc_get_filesz(int fd)
 {
     uint16_t sig;
diff -r edc33eea8630 -r 2de6e301a640 tools/libxc/xc_vmx_build.c
--- a/tools/libxc/xc_vmx_build.c        Mon Nov 14 11:11:41 2005
+++ b/tools/libxc/xc_vmx_build.c        Mon Nov 14 11:12:29 2005
@@ -495,6 +495,9 @@
     }
 
     *store_mfn = page_array[(v_end-2) >> PAGE_SHIFT];
+    if ( xc_clear_domain_page(xc_handle, dom, *store_mfn) )
+        goto error_out;
+
     shared_page_frame = (v_end - PAGE_SIZE) >> PAGE_SHIFT;
 
     if ((e820_page = xc_map_foreign_range(
diff -r edc33eea8630 -r 2de6e301a640 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Mon Nov 14 11:11:41 2005
+++ b/tools/libxc/xenctrl.h     Mon Nov 14 11:12:29 2005
@@ -424,6 +424,9 @@
 int xc_copy_to_domain_page(int xc_handle, uint32_t domid,
                           unsigned long dst_pfn, void *src_page);
 
+int xc_clear_domain_page(int xc_handle, uint32_t domid,
+                         unsigned long dst_pfn);
+
 int xc_ia64_copy_to_domain_pages(int xc_handle, uint32_t domid,
         void* src_page, unsigned long dst_pfn, int nr_pages);
 

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

<Prev in Thread] Current Thread [Next in Thread>