OBS User unknown 2008-09-01 00:39:12 +00:00 committed by Git OBS Bridge
parent 9683113742
commit 9794955703
18 changed files with 512 additions and 309 deletions

View File

@ -2,7 +2,7 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-3.3.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.3.0-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-3.3.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2251,7 +2251,7 @@ class XendDomainInfo: @@ -2255,7 +2255,7 @@ class XendDomainInfo:
vtd_mem = ((vtd_mem + 1023) / 1024) * 1024 vtd_mem = ((vtd_mem + 1023) / 1024) * 1024
# Make sure there's enough RAM available for the domain # Make sure there's enough RAM available for the domain

View File

@ -1,8 +1,8 @@
Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py 2008-08-12 07:36:39.000000000 -0600 +++ xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py 2008-08-29 06:25:55.000000000 -0600
@@ -0,0 +1,238 @@ @@ -0,0 +1,243 @@
+#!/usr/bin/env python +#!/usr/bin/env python
+# -*- mode: python; -*- +# -*- mode: python; -*-
+#============================================================================ +#============================================================================
@ -42,6 +42,8 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
+from xen.xend import XendLogging +from xen.xend import XendLogging
+from xen.xend.XendLogging import log +from xen.xend.XendLogging import log
+ +
+DEVICE_TYPES = ['vbd', 'tap']
+
+class HalDaemon: +class HalDaemon:
+ """The Hald block device watcher for XEN + """The Hald block device watcher for XEN
+ """ + """
@ -52,6 +54,7 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
+ """Default level of information to be logged.""" + """Default level of information to be logged."""
+ loglevel_default = 'INFO' + loglevel_default = 'INFO'
+ +
+
+ def __init__(self): + def __init__(self):
+ +
+ XendLogging.init(self.logfile_default, self.loglevel_default) + XendLogging.init(self.logfile_default, self.loglevel_default)
@ -59,7 +62,7 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
+ +
+ self.udi_dict = {} + self.udi_dict = {}
+ self.debug = 0 + self.debug = 0
+ self.dbpath = "/local/domain/0/backend/vbd" + self.dbpath = "/local/domain/0/backend"
+ self.bus = dbus.SystemBus() + self.bus = dbus.SystemBus()
+ self.hal_manager_obj = self.bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/Manager') + self.hal_manager_obj = self.bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/Manager')
+ self.hal_manager = dbus.Interface( self.hal_manager_obj, 'org.freedesktop.Hal.Manager') + self.hal_manager = dbus.Interface( self.hal_manager_obj, 'org.freedesktop.Hal.Manager')
@ -182,20 +185,22 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
+ # Set or clear xenstore media-present depending on the action argument + # Set or clear xenstore media-present depending on the action argument
+ # for every vbd that has this block device + # for every vbd that has this block device
+ def change_xenstore(self,action, device, major, minor): + def change_xenstore(self,action, device, major, minor):
+ domains = xstransact.List(self.dbpath) + for type in DEVICE_TYPES:
+ path = self.dbpath + '/' + type
+ domains = xstransact.List(path)
+ log.debug('domains: %s', domains) + log.debug('domains: %s', domains)
+ for domain in domains: # for each domain + for domain in domains: # for each domain
+ devices = xstransact.List( self.dbpath + '/' + domain) + devices = xstransact.List( path + '/' + domain)
+ log.debug('devices: %s',devices) + log.debug('devices: %s',devices)
+ for device in devices: # for each vbd device + for device in devices: # for each vbd device
+ str = device.split('/') + str = device.split('/')
+ vbd_type = None; + vbd_type = None;
+ vbd_physical_device = None + vbd_physical_device = None
+ vbd_media = None + vbd_media = None
+ vbd_device_path = self.dbpath + '/' + domain + '/' + device + vbd_device_path = path + '/' + domain + '/' + device
+ listing = xstransact.List(vbd_device_path) + listing = xstransact.List(vbd_device_path)
+ for entry in listing: # for each entry + for entry in listing: # for each entry
+ item = self.dbpath + '/' + entry + item = path + '/' + entry
+ value = xstransact.Read( vbd_device_path + '/' + entry) + value = xstransact.Read( vbd_device_path + '/' + entry)
+ log.debug('%s=%s',item,value) + log.debug('%s=%s',item,value)
+ if item.find('media-present') != -1: + if item.find('media-present') != -1:
@ -244,7 +249,7 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
Index: xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py Index: xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py 2008-08-12 07:36:39.000000000 -0600 +++ xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py 2008-08-29 06:11:48.000000000 -0600
@@ -0,0 +1,125 @@ @@ -0,0 +1,125 @@
+#============================================================================ +#============================================================================
+# This library is free software; you can redistribute it and/or +# This library is free software; you can redistribute it and/or
@ -373,8 +378,8 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py
+ watcher.shutdown() + watcher.shutdown()
Index: xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py Index: xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/python/xen/xend/server/SrvServer.py 2008-08-11 12:44:35.000000000 -0600 --- xen-3.3.0-testing.orig/tools/python/xen/xend/server/SrvServer.py 2008-08-22 08:34:00.000000000 -0600
+++ xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py 2008-08-12 07:36:39.000000000 -0600 +++ xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py 2008-08-29 06:11:48.000000000 -0600
@@ -56,6 +56,7 @@ @@ -56,6 +56,7 @@
from SrvRoot import SrvRoot from SrvRoot import SrvRoot
@ -394,8 +399,8 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py
root = SrvDir() root = SrvDir()
Index: xen-3.3.0-testing/tools/ioemu-remote/xenstore.c Index: xen-3.3.0-testing/tools/ioemu-remote/xenstore.c
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/ioemu-remote/xenstore.c 2008-08-11 12:36:15.000000000 -0600 --- xen-3.3.0-testing.orig/tools/ioemu-remote/xenstore.c 2008-08-22 08:35:31.000000000 -0600
+++ xen-3.3.0-testing/tools/ioemu-remote/xenstore.c 2008-08-12 07:48:22.000000000 -0600 +++ xen-3.3.0-testing/tools/ioemu-remote/xenstore.c 2008-08-29 06:11:48.000000000 -0600
@@ -297,6 +297,16 @@ @@ -297,6 +297,16 @@
bdrv_set_type_hint(bs, BDRV_TYPE_CDROM); bdrv_set_type_hint(bs, BDRV_TYPE_CDROM);
if (pasprintf(&buf, "%s/params", bpath) != -1) if (pasprintf(&buf, "%s/params", bpath) != -1)

View File

@ -33,9 +33,9 @@ Index: xen-3.3.0-testing/tools/Makefile
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/Makefile --- xen-3.3.0-testing.orig/tools/Makefile
+++ xen-3.3.0-testing/tools/Makefile +++ xen-3.3.0-testing/tools/Makefile
@@ -23,7 +23,7 @@ SUBDIRS-y += blktap @@ -24,7 +24,7 @@ SUBDIRS-y += libfsimage
SUBDIRS-y += libfsimage
SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
SUBDIRS-y += fs-back
-ifeq (ioemu,$(CONFIG_QEMU)) -ifeq (ioemu,$(CONFIG_QEMU))
+ifeq ($(XEN_COMPILE_ARCH)$(CONFIG_IOEMU),$(XEN_TARGET_ARCH)y) +ifeq ($(XEN_COMPILE_ARCH)$(CONFIG_IOEMU),$(XEN_TARGET_ARCH)y)

View File

@ -11,31 +11,3 @@ Index: xen-3.3.0-testing/unmodified_drivers/linux-2.6/mkbuildtree
# Need to be quite careful here: we don't want the files we link in to # Need to be quite careful here: we don't want the files we link in to
# risk overriding the native Linux ones (in particular, system.h must # risk overriding the native Linux ones (in particular, system.h must
Index: xen-3.3.0-testing/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
===================================================================
--- xen-3.3.0-testing.orig/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
+++ xen-3.3.0-testing/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
@@ -151,7 +151,7 @@ typedef irqreturn_t (*irq_handler_t)(int
#endif
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) && CONFIG_SLE_VERSION < 10
#define setup_xen_features xen_setup_features
#endif
Index: xen-3.3.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
===================================================================
--- xen-3.3.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
+++ xen-3.3.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
@@ -119,7 +119,9 @@ void *kzalloc(size_t size, int flags)
EXPORT_SYMBOL(kzalloc);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+#if defined(CONFIG_SUSE_KERNEL) \
+ ? LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) \
+ : LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
/* Simplified asprintf. */
char *kasprintf(gfp_t gfp, const char *fmt, ...)
{

113
qemu-img-snapshot.patch Normal file
View File

@ -0,0 +1,113 @@
Index: xen-3.3.0-testing/tools/ioemu-remote/qemu-img.c
===================================================================
--- xen-3.3.0-testing.orig/tools/ioemu-remote/qemu-img.c
+++ xen-3.3.0-testing/tools/ioemu-remote/qemu-img.c
@@ -57,6 +57,7 @@ static void help(void)
" commit [-f fmt] filename\n"
" convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] filename [filename2 [...]] output_filename\n"
" info [-f fmt] filename\n"
+ " snapshot [-l|-a snapshot|-d snapshot] filename\n"
"\n"
"Command parameters:\n"
" 'filename' is a disk image filename\n"
@@ -694,6 +695,91 @@ static int img_info(int argc, char **arg
return 0;
}
+#define SNAPSHOT_LIST 1
+#define SNAPSHOT_APPLY 2
+#define SNAPSHOT_DELETE 3
+
+static void img_snapshot(int argc, char **argv)
+{
+ BlockDriverState *bs;
+ char *filename, *snapshot_name = NULL;
+ char c;
+ int ret;
+ int action = 0;
+
+ /* Parse commandline parameters */
+ for(;;) {
+ c = getopt(argc, argv, "la:d:h");
+ if (c == -1)
+ break;
+ switch(c) {
+ case 'h':
+ help();
+ return;
+ case 'l':
+ if (action) {
+ help();
+ return;
+ }
+ action = SNAPSHOT_LIST;
+ break;
+ case 'a':
+ if (action) {
+ help();
+ return;
+ }
+ action = SNAPSHOT_APPLY;
+ snapshot_name = optarg;
+ break;
+ case 'd':
+ if (action) {
+ help();
+ return;
+ }
+ action = SNAPSHOT_DELETE;
+ snapshot_name = optarg;
+ break;
+ }
+ }
+
+ if (optind >= argc)
+ help();
+ filename = argv[optind++];
+
+ /* Open the image */
+ bs = bdrv_new("");
+ if (!bs)
+ error("Not enough memory");
+
+ if (bdrv_open2(bs, filename, 0, NULL) < 0) {
+ error("Could not open '%s'", filename);
+ }
+
+ /* Perform the requested action */
+ switch(action) {
+ case SNAPSHOT_LIST:
+ dump_snapshots(bs);
+ break;
+
+ case SNAPSHOT_APPLY:
+ ret = bdrv_snapshot_goto(bs, snapshot_name);
+ if (ret)
+ error("Could not apply snapshot '%s': %d (%s)",
+ snapshot_name, strerror(ret), ret);
+ break;
+
+ case SNAPSHOT_DELETE:
+ ret = bdrv_snapshot_delete(bs, snapshot_name);
+ if (ret)
+ error("Could not delete snapshot '%s': %d (%s)",
+ snapshot_name, strerror(ret), ret);
+ break;
+ }
+
+ /* Cleanup */
+ bdrv_delete(bs);
+}
+
int main(int argc, char **argv)
{
const char *cmd;
@@ -711,6 +797,8 @@ int main(int argc, char **argv)
img_convert(argc, argv);
} else if (!strcmp(cmd, "info")) {
img_info(argc, argv);
+ } else if (!strcmp(cmd, "snapshot")) {
+ img_snapshot(argc, argv);
} else {
help();
}

View File

@ -2,7 +2,7 @@ Index: xen-3.3.0-testing/tools/examples/Makefile
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/examples/Makefile --- xen-3.3.0-testing.orig/tools/examples/Makefile
+++ xen-3.3.0-testing/tools/examples/Makefile +++ xen-3.3.0-testing/tools/examples/Makefile
@@ -71,7 +71,7 @@ install-initd: @@ -70,7 +70,7 @@ install-initd:
[ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/ [ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/
$(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d

View File

@ -0,0 +1,24 @@
Index: xen-3.3.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
--- xen-3.3.0-testing.orig/tools/ioemu-remote/xenstore.c
+++ xen-3.3.0-testing/tools/ioemu-remote/xenstore.c
@@ -652,6 +652,19 @@ static void xenstore_process_dm_command_
}
snapshot_name = xs_read(xsh, XBT_NULL, path, &len);
+ } else if (!strncmp(command, "snapshot-delete", len)) {
+
+ if (pasprintf(&path,
+ "/local/domain/0/device-model/%u/parameter", domid) == -1) {
+ fprintf(logfile, "out of memory reading dm command parameter\n");
+ goto out;
+ }
+ par = xs_read(xsh, XBT_NULL, path, &len);
+ if (!par)
+ goto out;
+ // TODO Error handling
+ do_delvm(par);
+ xenstore_record_dm_state("snapshot-deleted");
} else if (!strncmp(command, "continue", len)) {
fprintf(logfile, "dm-command: continue after state save\n");
xen_pause_requested = 0;

View File

@ -295,7 +295,15 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/python/xen/xend/XendDomain.py --- xen-3.3.0-testing.orig/tools/python/xen/xend/XendDomain.py
+++ xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py +++ xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
@@ -1396,6 +1396,148 @@ class XendDomain: @@ -52,6 +52,7 @@ from xen.xend.xenstore.xstransact import
from xen.xend.xenstore.xswatch import xswatch
from xen.util import mkdir
from xen.xend import uuid
+from xen.xend import sxp
xc = xen.lowlevel.xc.xc()
xoptions = XendOptions.instance()
@@ -1396,6 +1397,164 @@ class XendDomain:
raise XendError("can't write guest state file %s: %s" % raise XendError("can't write guest state file %s: %s" %
(dst, ex[1])) (dst, ex[1]))
@ -324,6 +332,10 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
+ POWER_STATE_NAMES[DOM_STATE_RUNNING], + POWER_STATE_NAMES[DOM_STATE_RUNNING],
+ POWER_STATE_NAMES[dominfo._stateGet()]) + POWER_STATE_NAMES[dominfo._stateGet()])
+ +
+ if not os.path.exists(self._managed_config_path(dominfo.get_uuid())):
+ raise XendError("Domain is not managed by Xend lifecycle " +
+ "support.")
+
+ snap_path = os.path.join(xoptions.get_xend_domains_path(), + snap_path = os.path.join(xoptions.get_xend_domains_path(),
+ dominfo.get_uuid(), "snapshots") + dominfo.get_uuid(), "snapshots")
+ mkdir.parents(snap_path, stat.S_IRWXU) + mkdir.parents(snap_path, stat.S_IRWXU)
@ -421,7 +433,6 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
+ @rtype: None + @rtype: None
+ @raise XendInvalidDomain: Domain is not valid + @raise XendInvalidDomain: Domain is not valid
+ """ + """
+ try:
+ dominfo = self.domain_lookup_nr(domid) + dominfo = self.domain_lookup_nr(domid)
+ if not dominfo: + if not dominfo:
+ raise XendInvalidDomain(str(domid)) + raise XendInvalidDomain(str(domid))
@ -433,13 +444,26 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
+ raise XendError("Snapshot %s does not exist for domain %s" % + raise XendError("Snapshot %s does not exist for domain %s" %
+ (name, str(domid))) + (name, str(domid)))
+ +
+ # Warning! + # Need to "remove" snapshot from qcow2 image file.
+ # Need to "remove" snapshot from qcow2 image file. How + # For running domains, this is left to ioemu. For stopped domains
+ # should we do this? + # we must invoke qemu-img for all devices ourselves
+ os.unlink(snap_file) + if dominfo._stateGet() != DOM_STATE_HALTED:
+ dominfo.image.signalDeviceModel("snapshot-delete",
+ "snapshot-deleted", name)
+ else:
+ for dev_type, dev_info in dominfo.info.all_devices_sxpr():
+ if dev_type != 'tap':
+ continue
+ +
+ except: + # Fetch the filename and strip off tap:xyz:
+ return + image_file = sxp.child_value(dev_info, 'uname')
+ image_file = image_file.split(':')[2]
+
+ os.system("qemu-img-xen snapshot -d %s %s" %
+ (name, image_file));
+
+
+ os.unlink(snap_file)
+ +
def domain_pincpu(self, domid, vcpu, cpumap): def domain_pincpu(self, domid, vcpu, cpumap):
"""Set which cpus vcpu can use """Set which cpus vcpu can use

View File

@ -67,7 +67,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/Makefile
+OBJS := $(XEN_TARGET_ARCH)/entry.o +OBJS := $(XEN_TARGET_ARCH)/entry.o
+OBJS += main.o console.o vsprintf.o string.o ctype.o +OBJS += main.o console.o vsprintf.o string.o ctype.o
+ +
+CFLAGS += -g -I$(XEN_ROOT)/tools/libxc -I$(XEN_TARGET_ARCH) +CFLAGS += -g -I$(XEN_ROOT)/tools/libxc -I$(XEN_TARGET_ARCH) -I$(XEN_INCLUDE)
+ +
+ifeq ($(XEN_TARGET_ARCH),x86_32) +ifeq ($(XEN_TARGET_ARCH),x86_32)
+HLP_LDFLAGS := -melf_i386 +HLP_LDFLAGS := -melf_i386
@ -132,12 +132,12 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/console.c
+ +
+ cons = intf->out_cons; + cons = intf->out_cons;
+ prod = intf->out_prod; + prod = intf->out_prod;
+ mb(); + xen_mb();
+ +
+ while ((sent < len) && ((prod - cons) < sizeof(intf->out))) + while ((sent < len) && ((prod - cons) < sizeof(intf->out)))
+ intf->out[MASK_XENCONS_IDX(prod++, intf->out)] = data[sent++]; + intf->out[MASK_XENCONS_IDX(prod++, intf->out)] = data[sent++];
+ +
+ wmb(); + xen_wmb();
+ intf->out_prod = prod; + intf->out_prod = prod;
+ +
+ if (0 != notify_remote_via_evtchn(console_evtchn)) + if (0 != notify_remote_via_evtchn(console_evtchn))
@ -456,7 +456,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
+ return; + return;
+ +
+ memset(xenstore_page, 0, PAGE_SIZE); + memset(xenstore_page, 0, PAGE_SIZE);
+ wmb(); + xen_wmb();
+ printk("xs: debug fixup [zero page] done\r\n"); + printk("xs: debug fixup [zero page] done\r\n");
+} +}
+#endif +#endif
@ -541,7 +541,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
+static void fillup_memory_p2m(void) +static void fillup_memory_p2m(void)
+{ +{
+ struct xen_memory_reservation reservation = { + struct xen_memory_reservation reservation = {
+ .address_bits = 0, + .mem_flags = 0,
+ .extent_order = 0, + .extent_order = 0,
+ .nr_extents = 1, + .nr_extents = 1,
+ .domid = DOMID_SELF, + .domid = DOMID_SELF,
@ -696,7 +696,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
+ else + else
+ map_page_32(page, mfn, flags); + map_page_32(page, mfn, flags);
+ xen_tlb_flush(); + xen_tlb_flush();
+ wmb(); + xen_wmb();
+} +}
+ +
+static void map_virt_base(void) +static void map_virt_base(void)
@ -706,7 +706,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
+ else + else
+ map_virt_base_32(); + map_virt_base_32();
+ xen_tlb_flush(); + xen_tlb_flush();
+ wmb(); + xen_wmb();
+} +}
+ +
+static void fixup_pagetables_32(void) +static void fixup_pagetables_32(void)
@ -822,7 +822,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
+ pte[pte_off] = (mfn << PAGE_SHIFT) | flags; + pte[pte_off] = (mfn << PAGE_SHIFT) | flags;
+ +
+ xen_tlb_flush(); + xen_tlb_flush();
+ wmb(); + xen_wmb();
+} +}
+ +
+static void map_virt_base(void) +static void map_virt_base(void)
@ -857,7 +857,7 @@ Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
+ pgd_low++; + pgd_low++;
+ } + }
+ xen_tlb_flush(); + xen_tlb_flush();
+ wmb(); + xen_wmb();
+} +}
+ +
+static void fixup_pagetables(void) +static void fixup_pagetables(void)

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:e63df7fa5cc4d603cf44b7562d2f03f0784f2951389eb44b752897f67b1ed24e oid sha256:c53af8d91df0454b584aa771232a715bd068467c2841a3d44812fd9e70cb497e
size 9818013 size 9822192

View File

@ -2,7 +2,7 @@ Index: xen-3.3.0-testing/Config.mk
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/Config.mk --- xen-3.3.0-testing.orig/Config.mk
+++ xen-3.3.0-testing/Config.mk +++ xen-3.3.0-testing/Config.mk
@@ -84,20 +84,20 @@ QEMU_REMOTE=http://xenbits.xensource.com @@ -85,20 +85,20 @@ QEMU_REMOTE=http://xenbits.xensource.com
# Specify which qemu-dm to use. This may be `ioemu' to use the old # Specify which qemu-dm to use. This may be `ioemu' to use the old
# Mercurial in-tree version, or a local directory, or a git URL. # Mercurial in-tree version, or a local directory, or a git URL.

View File

@ -1,22 +0,0 @@
Index: xen-unstable/xen/include/public/foreign/Makefile
===================================================================
--- xen-unstable.orig/xen/include/public/foreign/Makefile
+++ xen-unstable/xen/include/public/foreign/Makefile
@@ -17,8 +17,6 @@ ifeq ($(CROSS_COMPILE),)
check-headers: checker
./checker > $(XEN_TARGET_ARCH).size
diff -u reference.size $(XEN_TARGET_ARCH).size
-checker: checker.c $(headers)
- $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
else
check-headers:
@echo "cross build: skipping check"
@@ -33,5 +31,8 @@ x86_64.h: ../arch-x86/xen-x86_64.h ../ar
ia64.h: ../arch-ia64.h ../xen.h $(scripts)
python mkheader.py $* $@ $(filter %.h,$^)
+checker: checker.c $(headers)
+ $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
+
checker.c: $(scripts)
python mkchecker.py $(XEN_TARGET_ARCH) $@ $(architectures)

View File

@ -1,13 +0,0 @@
Index: xen-4.0.0-testing/tools/examples/Makefile
===================================================================
--- xen-4.0.0-testing.orig/tools/examples/Makefile
+++ xen-4.0.0-testing/tools/examples/Makefile
@@ -13,7 +13,7 @@ XEN_CONFIGS += xm-config.xml
XEN_CONFIGS += xmexample1
XEN_CONFIGS += xmexample2
XEN_CONFIGS += xmexample.hvm
-XEN_CONFIGS += xmexample.vti
+XEN_CONFIGS += xmexample.nbd
XEN_CONFIGS += xend-pci-quirks.sxp
XEN_CONFIGS += xend-pci-permissive.sxp

12
xen-xmexample-vti.diff Normal file
View File

@ -0,0 +1,12 @@
Index: xen-3.3.0-testing/tools/examples/Makefile
===================================================================
--- xen-3.3.0-testing.orig/tools/examples/Makefile
+++ xen-3.3.0-testing/tools/examples/Makefile
@@ -20,7 +20,6 @@ XEN_CONFIGS += xmexample.hvm-stubdom
XEN_CONFIGS += xmexample.hvm-dm
XEN_CONFIGS += xmexample.pv-grub
XEN_CONFIGS += xmexample.nbd
-XEN_CONFIGS += xmexample.vti
XEN_CONFIGS += xend-pci-quirks.sxp
XEN_CONFIGS += xend-pci-permissive.sxp

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Fri Aug 29 06:39:21 MDT 2008 - plc@novell.com
- Added 'tap' to the type of devices for HalDaemon.py to
scan for change of xenstore attribute media-present.
-------------------------------------------------------------------
Wed Aug 27 12:21:19 MDT 2008 - jfehlig@novell.com
- Don't create pv vif device if emulated network device is
explicitly specified in guest config.
-------------------------------------------------------------------
Fri Aug 22 08:37:49 MDT 2008 - carnold@novell.com
- Updated to xen-unstable changeset 18358 Xen 3.3.0 FCS.
-------------------------------------------------------------------
Wed Aug 20 13:59:45 MDT 2008 - carnold@novell.com
- Updated to xen-unstable changeset 18353 RC7.
-------------------------------------------------------------------
Wed Aug 20 15:08:19 CEST 2008 - kwolf@suse.de
- Implementation of xm snapshot-delete
snapshot-ioemu-delete.patch, snapshot-xend.patch
- Add snapshot options to qemu-img-xen
qemu-img-snapshot.patch
-------------------------------------------------------------------
Tue Aug 19 10:27:05 MDT 2008 - carnold@novell.com
- Enable kboot and kexec patches.
-------------------------------------------------------------------
Mon Aug 18 11:13:55 MDT 2008 - carnold@novell.com
- Updated to xen-unstable changeset 18335 RC5.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 18 17:17:25 CEST 2008 - carnold@suse.de Mon Aug 18 17:17:25 CEST 2008 - carnold@suse.de

360
xen.spec

File diff suppressed because it is too large Load Diff

View File

@ -264,7 +264,7 @@ Index: xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/python/xen/xend/XendDomain.py --- xen-3.3.0-testing.orig/tools/python/xen/xend/XendDomain.py
+++ xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py +++ xen-3.3.0-testing/tools/python/xen/xend/XendDomain.py
@@ -1294,6 +1294,7 @@ class XendDomain: @@ -1295,6 +1295,7 @@ class XendDomain:
POWER_STATE_NAMES[DOM_STATE_RUNNING], POWER_STATE_NAMES[DOM_STATE_RUNNING],
POWER_STATE_NAMES[dominfo._stateGet()]) POWER_STATE_NAMES[dominfo._stateGet()])
@ -318,7 +318,7 @@ Index: xen-3.3.0-testing/tools/examples/Makefile
=================================================================== ===================================================================
--- xen-3.3.0-testing.orig/tools/examples/Makefile --- xen-3.3.0-testing.orig/tools/examples/Makefile
+++ xen-3.3.0-testing/tools/examples/Makefile +++ xen-3.3.0-testing/tools/examples/Makefile
@@ -36,6 +36,7 @@ XEN_SCRIPTS += vtpm vtpm-delete @@ -35,6 +35,7 @@ XEN_SCRIPTS += vtpm vtpm-delete
XEN_SCRIPTS += xen-hotplug-cleanup XEN_SCRIPTS += xen-hotplug-cleanup
XEN_SCRIPTS += external-device-migrate XEN_SCRIPTS += external-device-migrate
XEN_SCRIPTS += vscsi XEN_SCRIPTS += vscsi

18
xend-vif-fix.patch Normal file
View File

@ -0,0 +1,18 @@
Index: xen-3.3.0-testing/tools/python/xen/xend/server/netif.py
===================================================================
--- xen-3.3.0-testing.orig/tools/python/xen/xend/server/netif.py
+++ xen-3.3.0-testing/tools/python/xen/xend/server/netif.py
@@ -101,6 +101,13 @@ class NetifController(DevController):
def __init__(self, vm):
DevController.__init__(self, vm)
+ def createDevice(self, config):
+ typ = config.get('type', '')
+ if typ == 'ioemu':
+ return 0
+
+ DevController.createDevice(self, config)
+
def getDeviceDetails(self, config):
"""@see DevController.getDeviceDetails"""