diff --git a/sources b/sources index bdc0567..8da7406 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ bf8f1f9e3ca83d732c00a79a6ef29bc4 newlib-1.16.0.tar.gz 36cc57650cffda9a0269493be2a169bb lwip-1.3.0.tar.gz cec05e7785497c5e19da2f114b934ffd pciutils-2.2.9.tar.bz2 debc62758716a169df9f62e6ab2bc634 zlib-1.2.3.tar.gz -cbe84c44bc156ad1b4a20dc1c73464b8 xen-3.4.3.tar.gz +f8d001eb9e08525c451d38deb93908b1 xen-3.4.3.tar.gz diff --git a/xen-dev-create-cleanup.patch b/xen-dev-create-cleanup.patch new file mode 100644 index 0000000..0cfb93a --- /dev/null +++ b/xen-dev-create-cleanup.patch @@ -0,0 +1,244 @@ + +# HG changeset patch +# User Keir Fraser +# Date 1276160957 -3600 +# Node ID 985dcbf87197e8f5517ccf8658393cd74a09398c +# Parent c4b9a16c20a2f8795d3be0b03387c2d2f7c02e4b +libxc: Remove obsolete xc_find_device_number() declaration. + +Signed-off-by: Keir Fraser +xen-unstable changeset: 21528:d4a91417a023 +xen-unstable date: Fri Jun 04 10:46:32 2010 +0100 + + +tools: assume that special Xen devices have been created by the platform + +Remove all the magic surrounding the special Xen devices in Linux +specific code whereby we attempt to figure out what the correct +major:minor number is and check the the existing device has these +numbers etc. In 2010 we really should be able to trust that the +platform has created the devices correctly or provide correct +configuration settings such that they are without resorting to tearing +down the platform configured state and rebuilding it. + +tools/hotplug/Linux/xen-backend.rules already contains the necessary +udev rules to create /dev/xen/evtchn and friends in the correct place. + +Signed-off-by: Ian Campbell +xen-unstable changeset: 21507:a3bdee5a20da +xen-unstable date: Wed Jun 02 10:54:32 2010 +0100 + +--- a/tools/blktap/drivers/blktapctrl_linux.c Tue Jun 08 12:00:22 2010 +0100 ++++ b/tools/blktap/drivers/blktapctrl_linux.c Thu Jun 10 10:09:17 2010 +0100 +@@ -79,31 +79,11 @@ int blktap_interface_create(int ctlfd, i + + int blktap_interface_open(void) + { +- char *devname; +- int ret; + int ctlfd; + +- /* Attach to blktap0 */ +- if (asprintf(&devname,"%s/%s0", BLKTAP_DEV_DIR, BLKTAP_DEV_NAME) == -1) +- goto open_failed; +- +- ret = xc_find_device_number("blktap0"); +- if (ret < 0) { +- DPRINTF("couldn't find device number for 'blktap0'\n"); +- goto open_failed; +- } +- +- blktap_major = major(ret); +- make_blktap_dev(devname,blktap_major, 0); +- +- ctlfd = open(devname, O_RDWR); +- if (ctlfd == -1) { ++ ctlfd = open(BLKTAP_DEV_DIR "/" BLKTAP_DEV_NAME "0", O_RDWR); ++ if (ctlfd == -1) + DPRINTF("blktap0 open failed\n"); +- goto open_failed; +- } + + return ctlfd; +- +-open_failed: +- return -1; + } +--- a/tools/libxc/xc_linux.c Tue Jun 08 12:00:22 2010 +0100 ++++ b/tools/libxc/xc_linux.c Thu Jun 10 10:09:17 2010 +0100 +@@ -167,102 +167,11 @@ int do_xen_hypercall(int xc_handle, priv + (unsigned long)hypercall); + } + +-#define MTAB "/proc/mounts" +-#define MAX_PATH 255 +-#define _STR(x) #x +-#define STR(x) _STR(x) +- +-static int find_sysfsdir(char *sysfsdir) +-{ +- FILE *fp; +- char type[MAX_PATH + 1]; +- +- if ( (fp = fopen(MTAB, "r")) == NULL ) +- return -1; +- +- while ( fscanf(fp, "%*s %" +- STR(MAX_PATH) +- "s %" +- STR(MAX_PATH) +- "s %*s %*d %*d\n", +- sysfsdir, type) == 2 ) +- { +- if ( strncmp(type, "sysfs", 5) == 0 ) +- break; +- } +- +- fclose(fp); +- +- return ((strncmp(type, "sysfs", 5) == 0) ? 0 : -1); +-} +- +-int xc_find_device_number(const char *name) +-{ +- FILE *fp; +- int i, major, minor; +- char sysfsdir[MAX_PATH + 1]; +- static char *classlist[] = { "xen", "misc" }; +- +- for ( i = 0; i < (sizeof(classlist) / sizeof(classlist[0])); i++ ) +- { +- if ( find_sysfsdir(sysfsdir) < 0 ) +- goto not_found; +- +- /* /class///dev */ +- strncat(sysfsdir, "/class/", MAX_PATH); +- strncat(sysfsdir, classlist[i], MAX_PATH); +- strncat(sysfsdir, "/", MAX_PATH); +- strncat(sysfsdir, name, MAX_PATH); +- strncat(sysfsdir, "/dev", MAX_PATH); +- +- if ( (fp = fopen(sysfsdir, "r")) != NULL ) +- goto found; +- } +- +- not_found: +- errno = -ENOENT; +- return -1; +- +- found: +- if ( fscanf(fp, "%d:%d", &major, &minor) != 2 ) +- { +- fclose(fp); +- goto not_found; +- } +- +- fclose(fp); +- +- return makedev(major, minor); +-} +- +-#define EVTCHN_DEV_NAME "/dev/xen/evtchn" ++#define DEVXEN "/dev/xen/" + + int xc_evtchn_open(void) + { +- struct stat st; +- int fd; +- int devnum; +- +- devnum = xc_find_device_number("evtchn"); +- +- /* Make sure any existing device file links to correct device. */ +- if ( (lstat(EVTCHN_DEV_NAME, &st) != 0) || !S_ISCHR(st.st_mode) || +- (st.st_rdev != devnum) ) +- (void)unlink(EVTCHN_DEV_NAME); +- +- reopen: +- if ( (fd = open(EVTCHN_DEV_NAME, O_RDWR)) == -1 ) +- { +- if ( (errno == ENOENT) && +- ((mkdir("/dev/xen", 0755) == 0) || (errno == EEXIST)) && +- (mknod(EVTCHN_DEV_NAME, S_IFCHR|0600, devnum) == 0) ) +- goto reopen; +- +- PERROR("Could not open event channel interface"); +- return -1; +- } +- +- return fd; ++ return open(DEVXEN "evtchn", O_RDWR); + } + + int xc_evtchn_close(int xce_handle) +@@ -376,34 +285,9 @@ void discard_file_cache(int fd, int flus + errno = saved_errno; + } + +-#define GNTTAB_DEV_NAME "/dev/xen/gntdev" +- + int xc_gnttab_open(void) + { +- struct stat st; +- int fd; +- int devnum; +- +- devnum = xc_find_device_number("gntdev"); +- +- /* Make sure any existing device file links to correct device. */ +- if ( (lstat(GNTTAB_DEV_NAME, &st) != 0) || !S_ISCHR(st.st_mode) || +- (st.st_rdev != devnum) ) +- (void)unlink(GNTTAB_DEV_NAME); +- +-reopen: +- if ( (fd = open(GNTTAB_DEV_NAME, O_RDWR)) == -1 ) +- { +- if ( (errno == ENOENT) && +- ((mkdir("/dev/xen", 0755) == 0) || (errno == EEXIST)) && +- (mknod(GNTTAB_DEV_NAME, S_IFCHR|0600, devnum) == 0) ) +- goto reopen; +- +- PERROR("Could not open grant table interface"); +- return -1; +- } +- +- return fd; ++ return open(DEVXEN "gntdev", O_RDWR); + } + + int xc_gnttab_close(int xcg_handle) +--- a/tools/libxc/xc_minios.c Tue Jun 08 12:00:22 2010 +0100 ++++ b/tools/libxc/xc_minios.c Thu Jun 10 10:09:17 2010 +0100 +@@ -126,12 +126,6 @@ int do_xen_hypercall(int xc_handle, priv + return -1; + } + return call.result; +-} +- +-int xc_find_device_number(const char *name) +-{ +- printf("xc_find_device_number(%s)\n", name); +- do_exit(); + } + + int xc_evtchn_open(void) +--- a/tools/libxc/xenctrl.h Tue Jun 08 12:00:22 2010 +0100 ++++ b/tools/libxc/xenctrl.h Thu Jun 10 10:09:17 2010 +0100 +@@ -96,16 +96,6 @@ int xc_interface_close(int xc_handle); + int xc_interface_close(int xc_handle); + + /* +- * KERNEL INTERFACES +- */ +- +-/* +- * Resolve a kernel device name (e.g., "evtchn", "blktap0") into a kernel +- * device number. Returns -1 on error (and sets errno). +- */ +-int xc_find_device_number(const char *name); +- +-/* + * DOMAIN DEBUGGING FUNCTIONS + */ + + diff --git a/xen.spec b/xen.spec index c412399..4229a60 100644 --- a/xen.spec +++ b/xen.spec @@ -6,11 +6,11 @@ Summary: Xen is a virtual machine monitor Name: xen Version: 3.4.3 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries License: GPLv2+ and LGPLv2+ and BSD URL: http://xen.org/ -Source0: http://bits.xensource.com/oss-xen/release/3.4.0/xen-%{version}.tar.gz +Source0: http://bits.xensource.com/oss-xen/release/3.4.3/xen-%{version}.tar.gz Source1: %{name}.modules Source2: %{name}.logrotate Source3: dom0-kernel.repo @@ -37,6 +37,8 @@ Patch5: xen-net-disable-iptables-on-bridge.patch Patch10: xen-no-werror.patch +Patch15: xen-dev-create-cleanup.patch + Patch100: xen-configure-xend.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -141,6 +143,8 @@ which manage Xen virtual machines. %patch10 -p1 +%patch15 -p1 + %patch100 -p1 # stubdom sources @@ -456,6 +460,11 @@ rm -rf %{buildroot} %{_libdir}/*.so %changelog +* Sun Jun 20 2010 Michael Young - 3.4.3-2 +- add patch to remove some old device creation code that doesn't + work with the latest pvops kernels +- use official xen-3.4.3.tar.gz now there is one + * Tue Jun 1 2010 Michael Young - 3.4.3-1 - update to 3.4.3 release including support for latest pv_ops kernels (possibly incomplete)