From a2c7db64f561821fd528614e68c4d92718210126 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 18 Jun 2008 09:36:47 +0100 Subject: Add PV-GRUB This fetches GRUB1 sources, applies the {graphical, print function, save default, and ext3_256byte} patches from debian, and applies a patch to make it work on x86_64 and port it to Mini-OS. By using libxc, PV-GRUB can then "kexec" the loaded kernel from inside the domain itself, hence permitting to avoid the security-concerned pygrub. Signed-off-by: Samuel Thibault --- extras/mini-os/netfront.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'extras/mini-os/netfront.c') diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c index 00f159c332..d01ce6927b 100644 --- a/extras/mini-os/netfront.c +++ b/extras/mini-os/netfront.c @@ -497,15 +497,26 @@ void shutdown_netfront(struct netfront_dev *dev) printk("close network: backend at %s\n",dev->backend); snprintf(path, sizeof(path), "%s/state", dev->backend); + err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 5); /* closing */ xenbus_wait_for_value(path, "5", &dev->events); err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 6); xenbus_wait_for_value(path, "6", &dev->events); + err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 1); + xenbus_wait_for_value(path, "2", &dev->events); + xenbus_unwatch_path(XBT_NIL, path); - err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 1); + snprintf(path, sizeof(path), "%s/tx-ring-ref", nodename); + xenbus_rm(XBT_NIL, path); + snprintf(path, sizeof(path), "%s/rx-ring-ref", nodename); + xenbus_rm(XBT_NIL, path); + snprintf(path, sizeof(path), "%s/event-channel", nodename); + xenbus_rm(XBT_NIL, path); + snprintf(path, sizeof(path), "%s/request-rx-copy", nodename); + xenbus_rm(XBT_NIL, path); free_netfront(dev); } -- cgit v1.2.3