- remove more obsolete changes:
CFLAGS passing to qemu-traditional, PYTHON_PREFIX_ARG handling and pygrub installation - update blktap-pv-cdrom.patch handle allocation errors in asprintf to fix compile errors handle value returned from xs_read properly remove casts from void pointers - update xenalyze to revision 138 Fix dump time calculation overflow move struct record_info into a header correctly display of count of HW events update trace.h to match xen-unstable Remove vestigal HW_IRQ trace records Remove decode of PV_UPDATE_VA_MAPPING automatically generate dependencies Get rid of redundant hvm dump_header Introduce more efficient read mechanism Eliminate unnecessary cycles_to_time calculation Rework math to remove two 64-bit divisions Enable -O2 optimization level Remove --dump-cooked Remove spurious dump_header construction Improve record-sorting algorithm Use long to cast into and out of pointers Make max_active_pcpu calculation smarter Optimize pcpu_string Enable more cr3 output Sort cr3 enumerated values by start time Add option to skip vga range in MMIO enumeration Handle MMIO records from different vmexits Relocate pio and mmio enumaration structs to their own sub-struct Handle new hvm_event traces Introduce generic summary functionality Function-ize setting of h->post_process Reorganize cr trace handling Allow several summary handlers to register on a single vmexit Get rid of all tabs in xenalyze.c Handle new IRQ tracing Decrease verbosity Print exit reason number if no string is available Fix minor summary issue Add string for TPR_BELOW_THRESHOLD Raise MAX_CPUS to 256 cpus. Add --report-pcpu option to report physical cpu utilization. increase MAX_CPUS Handle RUNSTATE_INIT in domain_runstate calculation - update RPM_OPT_FLAGS handling in spec file pass EXTRA_CFLAGS via environment - remove obsolete xencommons-proc-xen.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=206
This commit is contained in:
parent
08af757235
commit
bb48b639d0
@ -1,8 +1,43 @@
|
||||
---
|
||||
tools/blktap/drivers/Makefile | 6
|
||||
tools/blktap/drivers/block-cdrom.c | 565 +++++++++++++++++++++++
|
||||
tools/blktap/drivers/tapdisk.c | 16
|
||||
tools/blktap/drivers/tapdisk.h | 16
|
||||
tools/blktap/lib/blktaplib.h | 1
|
||||
tools/python/xen/xend/server/BlktapController.py | 1
|
||||
xen/include/public/io/blkif.h | 2
|
||||
xen/include/public/io/cdromif.h | 122 ++++
|
||||
8 files changed, 726 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/Makefile
|
||||
@@ -38,8 +38,9 @@ endif
|
||||
CFLAGS += $(PTHREAD_CFLAGS)
|
||||
LDFLAGS += $(PTHREAD_LDFLAGS)
|
||||
|
||||
-LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS)
|
||||
-LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz
|
||||
+LDLIBS_xen := $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore)
|
||||
+LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_xen) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS)
|
||||
+LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz $(LDLIBS_xen)
|
||||
|
||||
BLK-OBJS-y := block-aio.o
|
||||
BLK-OBJS-y += block-sync.o
|
||||
@@ -47,6 +48,7 @@ BLK-OBJS-y += block-vmdk.o
|
||||
BLK-OBJS-y += block-ram.o
|
||||
BLK-OBJS-y += block-qcow.o
|
||||
BLK-OBJS-y += block-qcow2.o
|
||||
+BLK-OBJS-y += block-cdrom.o
|
||||
BLK-OBJS-y += aes.o
|
||||
BLK-OBJS-y += tapaio.o
|
||||
BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
@@ -0,0 +1,535 @@
|
||||
@@ -0,0 +1,565 @@
|
||||
+/* block-cdrom.c
|
||||
+ *
|
||||
+ * simple slow synchronous cdrom disk implementation. Based off
|
||||
@ -45,7 +80,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+#include <sys/statvfs.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <linux/fs.h>
|
||||
+#include <sys/mount.h>
|
||||
+
|
||||
+#include "tapdisk.h"
|
||||
+#include <xen/io/cdromif.h>
|
||||
@ -75,7 +110,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ struct statvfs statBuf;
|
||||
+ struct stat stat;
|
||||
+ struct td_state *s = dd->td_state;
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+
|
||||
+ s->size = 0;
|
||||
+ s->sector_size = CDROM_DEFAULT_SECTOR_SIZE;
|
||||
@ -138,7 +173,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+static inline void init_fds(struct disk_driver *dd)
|
||||
+{
|
||||
+ int i;
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+
|
||||
+ for(i = 0; i < MAX_IOFD; i++)
|
||||
+ dd->io_fd[i] = 0;
|
||||
@ -150,7 +185,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+
|
||||
+void open_device (struct disk_driver *dd)
|
||||
+{
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ int o_flags;
|
||||
+
|
||||
+ o_flags = O_NONBLOCK | O_LARGEFILE |
|
||||
@ -189,10 +224,14 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ */
|
||||
+int tdcdrom_open (struct disk_driver *dd, const char *name, td_flag_t flags)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ int ret;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+
|
||||
+ asprintf(&prv->dev_name, "%s", name);
|
||||
+ ret = asprintf(&prv->dev_name, "%s", name);
|
||||
+ if (ret < 0) {
|
||||
+ prv->dev_name = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ prv->fd = -1;
|
||||
+ prv->media_changed = 0;
|
||||
+ prv->media_present = 0;
|
||||
@ -201,6 +240,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+
|
||||
+ open_device(dd);
|
||||
+
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
@ -209,7 +249,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ int id, void *private)
|
||||
+{
|
||||
+ struct td_state *s = dd->td_state;
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ int size = nb_sectors * s->sector_size;
|
||||
+ uint64_t offset = sector * (uint64_t)s->sector_size;
|
||||
+ int ret;
|
||||
@ -238,7 +278,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ int id, void *private)
|
||||
+{
|
||||
+ struct td_state *s = dd->td_state;
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ int size = nb_sectors * s->sector_size;
|
||||
+ uint64_t offset = sector * (uint64_t)s->sector_size;
|
||||
+ int ret = 0;
|
||||
@ -265,7 +305,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ int id, void *private)
|
||||
+{
|
||||
+ struct td_state *s = dd->td_state;
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ int size = nb_sectors * s->sector_size;
|
||||
+ uint64_t offset = sector * (uint64_t)s->sector_size;
|
||||
+ int ret = 0;
|
||||
@ -368,12 +408,10 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ break;
|
||||
+ case XEN_TYPE_CDROM_OPEN:
|
||||
+ {
|
||||
+ char *buf = NULL;
|
||||
+ unsigned int len;
|
||||
+ struct stat statbuf;
|
||||
+ int major = 0;
|
||||
+ int minor = 0;
|
||||
+ char *num;
|
||||
+
|
||||
+ if (stat (prv->dev_name, &statbuf) == 0) {
|
||||
+ major = major (statbuf.st_rdev);
|
||||
@ -383,21 +421,43 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ xco->err = 0;
|
||||
+ xco->ret = 0;
|
||||
+ if (xco->payload_offset) {
|
||||
+ char * nodename;
|
||||
+ char *present;
|
||||
+ char *buf;
|
||||
+ char *num;
|
||||
+ char *nodename;
|
||||
+ char media_present[2];
|
||||
+ nodename = (char *)sp + xco->payload_offset;
|
||||
+ asprintf(&buf, "%s/media-present", nodename);
|
||||
+ if (!xs_read(prv->xs_handle, XBT_NULL, buf, &len)) {
|
||||
+ sprintf(media_present, "%d", prv->media_present);
|
||||
+ xs_write(prv->xs_handle, XBT_NULL, buf, media_present, strlen(media_present));
|
||||
+ xs_watch(prv->xs_handle, buf, "media-present");
|
||||
+ asprintf(&buf, "%s/params", nodename);
|
||||
+ xs_watch(prv->xs_handle, buf, "params");
|
||||
+ asprintf(&num, "%x:%x", major, minor);
|
||||
+ asprintf(&buf, "%s/physical-device", nodename);
|
||||
+ xs_write(prv->xs_handle, XBT_NULL, buf, num, strlen(num));
|
||||
+ if (asprintf(&buf, "%s/media-present", nodename) < 0)
|
||||
+ goto out_payload_offset;
|
||||
+ present = xs_read(prv->xs_handle, XBT_NULL, buf, &len);
|
||||
+ if (present) {
|
||||
+ free(buf);
|
||||
+ goto out_payload_offset_free;
|
||||
+ }
|
||||
+
|
||||
+ sprintf(media_present, "%d", prv->media_present);
|
||||
+ xs_write(prv->xs_handle, XBT_NULL, buf, media_present, strlen(media_present));
|
||||
+ xs_watch(prv->xs_handle, buf, "media-present");
|
||||
+ free(buf);
|
||||
+
|
||||
+ if (asprintf(&buf, "%s/params", nodename) < 0)
|
||||
+ goto out_payload_offset_free;
|
||||
+ xs_watch(prv->xs_handle, buf, "params");
|
||||
+ free(buf);
|
||||
+
|
||||
+ if (asprintf(&num, "%x:%x", major, minor) < 0)
|
||||
+ goto out_payload_offset_free;
|
||||
+ if (asprintf(&buf, "%s/physical-device", nodename) < 0) {
|
||||
+ free(num);
|
||||
+ goto out_payload_offset_free;
|
||||
+ }
|
||||
+ xs_write(prv->xs_handle, XBT_NULL, buf, num, strlen(num));
|
||||
+ free(buf);
|
||||
+ free(num);
|
||||
+out_payload_offset_free:
|
||||
+ free(present);
|
||||
+out_payload_offset:
|
||||
+ ;
|
||||
+ }
|
||||
+
|
||||
+ xco->media_present = prv->media_present;
|
||||
@ -434,7 +494,7 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+
|
||||
+int tdcdrom_close(struct disk_driver *dd)
|
||||
+{
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+
|
||||
+ if (prv->fd != -1) {
|
||||
+ close(prv->fd);
|
||||
@ -449,8 +509,8 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+
|
||||
+void tdcdrom_process_media_change_event(struct disk_driver *dd, char **vec)
|
||||
+{
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ char *media_present = NULL;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ char *media_present;
|
||||
+ unsigned int len;
|
||||
+
|
||||
+ media_present = xs_read(prv->xs_handle, XBT_NULL, vec[XS_WATCH_PATH], &len);
|
||||
@ -463,22 +523,26 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ open_device(dd);
|
||||
+ prv->media_changed = 1;
|
||||
+ }
|
||||
+ free(media_present);
|
||||
+}
|
||||
+
|
||||
+void tdcrom_process_params_event(struct disk_driver *dd, char **vec)
|
||||
+{
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ char * params = NULL;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ char *params;
|
||||
+ unsigned int len;
|
||||
+
|
||||
+ params = xs_read(prv->xs_handle, XBT_NULL, vec[XS_WATCH_PATH], &len);
|
||||
+ if (params != NULL) {
|
||||
+ if (params) {
|
||||
+ char *cp = strchr(params, ':');
|
||||
+ if (cp) {
|
||||
+ cp++;
|
||||
+ if (prv->dev_name)
|
||||
+ free(prv->dev_name);
|
||||
+ asprintf(&prv->dev_name, "%s", cp);
|
||||
+ if (asprintf(&prv->dev_name, "%s", cp) < 0) {
|
||||
+ prv->dev_name = NULL;
|
||||
+ return;
|
||||
+ }
|
||||
+ if (prv->fd != -1) {
|
||||
+ close(prv->fd);
|
||||
+ prv->fd = -1;
|
||||
@ -486,12 +550,13 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ open_device(dd);
|
||||
+ prv->media_changed = 1;
|
||||
+ }
|
||||
+ free(params);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int tdcdrom_do_callbacks(struct disk_driver *dd, int sid)
|
||||
+{
|
||||
+ struct tdcdrom_state *prv = (struct tdcdrom_state *)dd->private;
|
||||
+ struct tdcdrom_state *prv = dd->private;
|
||||
+ char **vec;
|
||||
+ unsigned int num;
|
||||
+
|
||||
@ -538,6 +603,118 @@ Index: xen-4.2.0-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ .td_get_parent_id = tdcdrom_get_parent_id,
|
||||
+ .td_validate_parent = tdcdrom_validate_parent
|
||||
+};
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.c
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c
|
||||
@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta
|
||||
goto out;
|
||||
}
|
||||
break;
|
||||
+ case BLKIF_OP_PACKET:
|
||||
+ ret = 0;
|
||||
+ if (drv->td_queue_packet)
|
||||
+ ret = drv->td_queue_packet(dd, sector_nr,
|
||||
+ nsects, page,
|
||||
+ send_responses,
|
||||
+ idx, (void *)(long)i);
|
||||
+ if (ret > 0) dd->early += ret;
|
||||
+ else if (ret == -EBUSY) {
|
||||
+ /* put req back on queue */
|
||||
+ --info->fe_ring.req_cons;
|
||||
+ info->busy.req = req;
|
||||
+ info->busy.seg_idx = i;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ break;
|
||||
default:
|
||||
DPRINTF("Unknown block operation\n");
|
||||
break;
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.h
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/tapdisk.h
|
||||
@@ -137,6 +137,9 @@ struct tap_disk {
|
||||
int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id);
|
||||
int (*td_validate_parent)(struct disk_driver *dd,
|
||||
struct disk_driver *p, td_flag_t flags);
|
||||
+ int (*td_queue_packet) (struct disk_driver *dd, uint64_t sector,
|
||||
+ int nb_sectors, char *buf, td_callback_t cb,
|
||||
+ int id, void *prv);
|
||||
};
|
||||
|
||||
typedef struct disk_info {
|
||||
@@ -160,6 +163,7 @@ extern struct tap_disk tapdisk_vmdk;
|
||||
extern struct tap_disk tapdisk_ram;
|
||||
extern struct tap_disk tapdisk_qcow;
|
||||
extern struct tap_disk tapdisk_qcow2;
|
||||
+extern struct tap_disk tapdisk_cdrom;
|
||||
|
||||
|
||||
/*Define Individual Disk Parameters here */
|
||||
@@ -229,6 +233,17 @@ static disk_info_t qcow2_disk = {
|
||||
#endif
|
||||
};
|
||||
|
||||
+static disk_info_t cdrom_disk = {
|
||||
+ DISK_TYPE_CDROM,
|
||||
+ "raw image (cdrom)",
|
||||
+ "cdrom",
|
||||
+ 0,
|
||||
+ 0,
|
||||
+#ifdef TAPDISK
|
||||
+ &tapdisk_cdrom,
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
/*Main disk info array */
|
||||
static disk_info_t *dtypes[] = {
|
||||
&aio_disk,
|
||||
@@ -237,6 +252,7 @@ static disk_info_t *dtypes[] = {
|
||||
&ram_disk,
|
||||
&qcow_disk,
|
||||
&qcow2_disk,
|
||||
+ &cdrom_disk,
|
||||
};
|
||||
|
||||
typedef struct driver_list_entry {
|
||||
Index: xen-4.2.0-testing/tools/blktap/lib/blktaplib.h
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/lib/blktaplib.h
|
||||
+++ xen-4.2.0-testing/tools/blktap/lib/blktaplib.h
|
||||
@@ -219,6 +219,7 @@ typedef struct msg_pid {
|
||||
#define DISK_TYPE_RAM 3
|
||||
#define DISK_TYPE_QCOW 4
|
||||
#define DISK_TYPE_QCOW2 5
|
||||
+#define DISK_TYPE_CDROM 6
|
||||
|
||||
/* xenstore/xenbus: */
|
||||
#define DOMNAME "Domain-0"
|
||||
Index: xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
@@ -15,6 +15,7 @@ blktap1_disk_types = [
|
||||
'ram',
|
||||
'qcow',
|
||||
'qcow2',
|
||||
+ 'cdrom',
|
||||
'ioemu',
|
||||
]
|
||||
|
||||
Index: xen-4.2.0-testing/xen/include/public/io/blkif.h
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/xen/include/public/io/blkif.h
|
||||
+++ xen-4.2.0-testing/xen/include/public/io/blkif.h
|
||||
@@ -379,7 +379,7 @@
|
||||
* Used in SLES sources for device specific command packet
|
||||
* contained within the request. Reserved for that purpose.
|
||||
*/
|
||||
-#define BLKIF_OP_RESERVED_1 4
|
||||
+#define BLKIF_OP_PACKET 4
|
||||
/*
|
||||
* Indicate to the backend device that a region of storage is no longer in
|
||||
* use, and may be discarded at any time without impact to the client. If
|
||||
Index: xen-4.2.0-testing/xen/include/public/io/cdromif.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
@ -665,139 +842,3 @@ Index: xen-4.2.0-testing/xen/include/public/io/cdromif.h
|
||||
+ sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
|
||||
+
|
||||
+#endif
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/Makefile
|
||||
@@ -37,8 +37,9 @@ endif
|
||||
CFLAGS += $(PTHREAD_CFLAGS)
|
||||
LDFLAGS += $(PTHREAD_LDFLAGS)
|
||||
|
||||
-LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS)
|
||||
-LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz
|
||||
+LDLIBS_xen := $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore)
|
||||
+LDLIBS_blktapctrl := $(MEMSHRLIBS) $(LDLIBS_xen) -L../lib -lblktap -lrt -lm $(PTHREAD_LIBS)
|
||||
+LDLIBS_img := $(AIOLIBS) $(CRYPT_LIB) $(PTHREAD_LIBS) -lz $(LDLIBS_xen)
|
||||
|
||||
BLK-OBJS-y := block-aio.o
|
||||
BLK-OBJS-y += block-sync.o
|
||||
@@ -46,6 +47,7 @@ BLK-OBJS-y += block-vmdk.o
|
||||
BLK-OBJS-y += block-ram.o
|
||||
BLK-OBJS-y += block-qcow.o
|
||||
BLK-OBJS-y += block-qcow2.o
|
||||
+BLK-OBJS-y += block-cdrom.o
|
||||
BLK-OBJS-y += aes.o
|
||||
BLK-OBJS-y += tapaio.o
|
||||
BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.h
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/tapdisk.h
|
||||
@@ -137,6 +137,9 @@ struct tap_disk {
|
||||
int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id);
|
||||
int (*td_validate_parent)(struct disk_driver *dd,
|
||||
struct disk_driver *p, td_flag_t flags);
|
||||
+ int (*td_queue_packet) (struct disk_driver *dd, uint64_t sector,
|
||||
+ int nb_sectors, char *buf, td_callback_t cb,
|
||||
+ int id, void *prv);
|
||||
};
|
||||
|
||||
typedef struct disk_info {
|
||||
@@ -160,6 +163,7 @@ extern struct tap_disk tapdisk_vmdk;
|
||||
extern struct tap_disk tapdisk_ram;
|
||||
extern struct tap_disk tapdisk_qcow;
|
||||
extern struct tap_disk tapdisk_qcow2;
|
||||
+extern struct tap_disk tapdisk_cdrom;
|
||||
|
||||
|
||||
/*Define Individual Disk Parameters here */
|
||||
@@ -229,6 +233,17 @@ static disk_info_t qcow2_disk = {
|
||||
#endif
|
||||
};
|
||||
|
||||
+static disk_info_t cdrom_disk = {
|
||||
+ DISK_TYPE_CDROM,
|
||||
+ "raw image (cdrom)",
|
||||
+ "cdrom",
|
||||
+ 0,
|
||||
+ 0,
|
||||
+#ifdef TAPDISK
|
||||
+ &tapdisk_cdrom,
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
/*Main disk info array */
|
||||
static disk_info_t *dtypes[] = {
|
||||
&aio_disk,
|
||||
@@ -237,6 +252,7 @@ static disk_info_t *dtypes[] = {
|
||||
&ram_disk,
|
||||
&qcow_disk,
|
||||
&qcow2_disk,
|
||||
+ &cdrom_disk,
|
||||
};
|
||||
|
||||
typedef struct driver_list_entry {
|
||||
Index: xen-4.2.0-testing/tools/blktap/lib/blktaplib.h
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/lib/blktaplib.h
|
||||
+++ xen-4.2.0-testing/tools/blktap/lib/blktaplib.h
|
||||
@@ -219,6 +219,7 @@ typedef struct msg_pid {
|
||||
#define DISK_TYPE_RAM 3
|
||||
#define DISK_TYPE_QCOW 4
|
||||
#define DISK_TYPE_QCOW2 5
|
||||
+#define DISK_TYPE_CDROM 6
|
||||
|
||||
/* xenstore/xenbus: */
|
||||
#define DOMNAME "Domain-0"
|
||||
Index: xen-4.2.0-testing/xen/include/public/io/blkif.h
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/xen/include/public/io/blkif.h
|
||||
+++ xen-4.2.0-testing/xen/include/public/io/blkif.h
|
||||
@@ -379,7 +379,7 @@
|
||||
* Used in SLES sources for device specific command packet
|
||||
* contained within the request. Reserved for that purpose.
|
||||
*/
|
||||
-#define BLKIF_OP_RESERVED_1 4
|
||||
+#define BLKIF_OP_PACKET 4
|
||||
/*
|
||||
* Indicate to the backend device that a region of storage is no longer in
|
||||
* use, and may be discarded at any time without impact to the client. If
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/tapdisk.c
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/tapdisk.c
|
||||
@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta
|
||||
goto out;
|
||||
}
|
||||
break;
|
||||
+ case BLKIF_OP_PACKET:
|
||||
+ ret = 0;
|
||||
+ if (drv->td_queue_packet)
|
||||
+ ret = drv->td_queue_packet(dd, sector_nr,
|
||||
+ nsects, page,
|
||||
+ send_responses,
|
||||
+ idx, (void *)(long)i);
|
||||
+ if (ret > 0) dd->early += ret;
|
||||
+ else if (ret == -EBUSY) {
|
||||
+ /* put req back on queue */
|
||||
+ --info->fe_ring.req_cons;
|
||||
+ info->busy.req = req;
|
||||
+ info->busy.seg_idx = i;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ break;
|
||||
default:
|
||||
DPRINTF("Unknown block operation\n");
|
||||
break;
|
||||
Index: xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.2.0-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
@@ -15,6 +15,7 @@ blktap1_disk_types = [
|
||||
'ram',
|
||||
'qcow',
|
||||
'qcow2',
|
||||
+ 'cdrom',
|
||||
'ioemu',
|
||||
]
|
||||
|
||||
|
@ -1,35 +1,3 @@
|
||||
Index: xen-4.2.0-testing/tools/pygrub/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/pygrub/Makefile
|
||||
+++ xen-4.2.0-testing/tools/pygrub/Makefile
|
||||
@@ -11,12 +11,12 @@ build:
|
||||
.PHONY: install
|
||||
install: all
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
|
||||
- $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
|
||||
+ --prefix="/usr" --root="$(DESTDIR)" \
|
||||
--install-scripts=$(PRIVATE_BINDIR) --force
|
||||
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
|
||||
set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
|
||||
"`readlink -f $(PRIVATE_BINDIR)`" ]; then \
|
||||
- ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
|
||||
+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub; \
|
||||
fi
|
||||
|
||||
.PHONY: clean
|
||||
Index: xen-4.2.0-testing/tools/python/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/python/Makefile
|
||||
+++ xen-4.2.0-testing/tools/python/Makefile
|
||||
@@ -21,7 +21,7 @@ build: genpath genwrap.py $(XEN_ROOT)/to
|
||||
.PHONY: install
|
||||
install: install-dtd
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
|
||||
- $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
|
||||
+ --prefix="/usr" --root="$(DESTDIR)" --force
|
||||
|
||||
install-dtd: all
|
||||
$(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/xen
|
||||
Index: xen-4.2.0-testing/tools/xenstore/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/xenstore/Makefile
|
||||
@ -157,19 +125,6 @@ Index: xen-4.2.0-testing/tools/firmware/etherboot/Makefile
|
||||
mv _$T $T
|
||||
|
||||
$D/src/arch/i386/Makefile: $T Config
|
||||
Index: xen-4.2.0-testing/tools/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/Makefile
|
||||
+++ xen-4.2.0-testing/tools/Makefile
|
||||
@@ -187,7 +187,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-fi
|
||||
source=.; \
|
||||
fi; \
|
||||
cd qemu-xen-dir; \
|
||||
- $$source/configure --enable-xen --target-list=i386-softmmu \
|
||||
+ CFLAGS= $$source/configure --enable-xen --target-list=i386-softmmu \
|
||||
--source-path=$$source \
|
||||
--extra-cflags="-I$(XEN_ROOT)/tools/include \
|
||||
-I$(XEN_ROOT)/tools/libxc \
|
||||
Index: xen-4.2.0-testing/stubdom/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/stubdom/Makefile
|
||||
|
@ -1,25 +0,0 @@
|
||||
Index: xen-4.2.0-testing/tools/blktap/drivers/Makefile
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.2.0-testing/tools/blktap/drivers/Makefile
|
||||
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk
|
||||
IBIN = blktapctrl tapdisk
|
||||
QCOW_UTIL = img2qcow qcow2raw qcow-create
|
||||
|
||||
-CFLAGS += -Werror
|
||||
CFLAGS += -Wno-unused
|
||||
CFLAGS += -I../lib
|
||||
CFLAGS += $(CFLAGS_libxenctrl)
|
||||
Index: xen-4.2.0-testing/Config.mk
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/Config.mk
|
||||
+++ xen-4.2.0-testing/Config.mk
|
||||
@@ -24,7 +24,7 @@ SHELL ?= /bin/sh
|
||||
|
||||
# Tools to run on system hosting the build
|
||||
HOSTCC = gcc
|
||||
-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||
+HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes $(RPM_OPT_FLAGS)
|
||||
HOSTCFLAGS += -fno-strict-aliasing
|
||||
|
||||
DISTDIR ?= $(XEN_ROOT)/dist
|
@ -337,3 +337,17 @@ Index: xen-4.2.0-testing/tools/examples/xmexample.vti
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Define the disk devices you want the domain to have access to, and
|
||||
Index: xen-4.2.0-testing/docs/man/xl.pod.1
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/docs/man/xl.pod.1
|
||||
+++ xen-4.2.0-testing/docs/man/xl.pod.1
|
||||
@@ -12,7 +12,8 @@ The B<xl> program is the new tool for ma
|
||||
domains. The program can be used to create, pause, and shutdown
|
||||
domains. It can also be used to list current domains, enable or pin
|
||||
VCPUs, and attach or detach virtual block devices.
|
||||
-The old B<xm> tool is deprecated and should not be used.
|
||||
+The B<xm> tool continues to be supported on SLE11 platforms
|
||||
+and should still be used.
|
||||
|
||||
The basic structure of every B<xl> command is almost always:
|
||||
|
||||
|
69
xen.changes
69
xen.changes
@ -1,3 +1,72 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 5 21:58:46 CEST 2012 - ohering@suse.de
|
||||
|
||||
- remove more obsolete changes:
|
||||
CFLAGS passing to qemu-traditional, PYTHON_PREFIX_ARG handling
|
||||
and pygrub installation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 5 20:39:23 CEST 2012 - ohering@suse.de
|
||||
|
||||
- update blktap-pv-cdrom.patch
|
||||
handle allocation errors in asprintf to fix compile errors
|
||||
handle value returned from xs_read properly
|
||||
remove casts from void pointers
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 5 20:06:09 CEST 2012 - ohering@suse.de
|
||||
|
||||
- update xenalyze to revision 138
|
||||
Fix dump time calculation overflow
|
||||
move struct record_info into a header
|
||||
correctly display of count of HW events
|
||||
update trace.h to match xen-unstable
|
||||
Remove vestigal HW_IRQ trace records
|
||||
Remove decode of PV_UPDATE_VA_MAPPING
|
||||
automatically generate dependencies
|
||||
Get rid of redundant hvm dump_header
|
||||
Introduce more efficient read mechanism
|
||||
Eliminate unnecessary cycles_to_time calculation
|
||||
Rework math to remove two 64-bit divisions
|
||||
Enable -O2 optimization level
|
||||
Remove --dump-cooked
|
||||
Remove spurious dump_header construction
|
||||
Improve record-sorting algorithm
|
||||
Use long to cast into and out of pointers
|
||||
Make max_active_pcpu calculation smarter
|
||||
Optimize pcpu_string
|
||||
Enable more cr3 output
|
||||
Sort cr3 enumerated values by start time
|
||||
Add option to skip vga range in MMIO enumeration
|
||||
Handle MMIO records from different vmexits
|
||||
Relocate pio and mmio enumaration structs to their own sub-struct
|
||||
Handle new hvm_event traces
|
||||
Introduce generic summary functionality
|
||||
Function-ize setting of h->post_process
|
||||
Reorganize cr trace handling
|
||||
Allow several summary handlers to register on a single vmexit
|
||||
Get rid of all tabs in xenalyze.c
|
||||
Handle new IRQ tracing
|
||||
Decrease verbosity
|
||||
Print exit reason number if no string is available
|
||||
Fix minor summary issue
|
||||
Add string for TPR_BELOW_THRESHOLD
|
||||
Raise MAX_CPUS to 256 cpus.
|
||||
Add --report-pcpu option to report physical cpu utilization.
|
||||
increase MAX_CPUS
|
||||
Handle RUNSTATE_INIT in domain_runstate calculation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 5 19:58:57 CEST 2012 - ohering@suse.de
|
||||
|
||||
- update RPM_OPT_FLAGS handling in spec file
|
||||
pass EXTRA_CFLAGS via environment
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 5 19:53:38 CEST 2012 - ohering@suse.de
|
||||
|
||||
- remove obsolete xencommons-proc-xen.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 1 10:09:24 MDT 2012 - carnold@novell.com
|
||||
|
||||
|
26
xen.spec
26
xen.spec
@ -15,6 +15,7 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: xen
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
%define xvers 4.2
|
||||
@ -97,10 +98,10 @@ BuildRequires: gcc46
|
||||
BuildRequires: libgcc46
|
||||
BuildRequires: libgcc46-32bit
|
||||
%endif
|
||||
BuildRequires: glibc-32bit
|
||||
BuildRequires: glibc-devel-32bit
|
||||
BuildRequires: gcc-32bit
|
||||
BuildRequires: gcc43-32bit
|
||||
BuildRequires: glibc-32bit
|
||||
BuildRequires: glibc-devel-32bit
|
||||
%define max_cpus 256
|
||||
%define pae_enabled n
|
||||
%else
|
||||
@ -114,7 +115,7 @@ BuildRequires: kernel-syms
|
||||
BuildRequires: module-init-tools
|
||||
BuildRequires: xorg-x11
|
||||
%endif
|
||||
Version: 4.2.0_02
|
||||
Version: 4.2.0_03
|
||||
Release: 0
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
|
||||
@ -198,7 +199,6 @@ Patch25965: 25965-x86-ucode-Intel-resume.patch
|
||||
# Our patches
|
||||
Patch301: xend-config.diff
|
||||
Patch302: xen-destdir.diff
|
||||
Patch303: xen-rpmoptflags.diff
|
||||
Patch304: xen-changeset.diff
|
||||
Patch305: xen-paths.diff
|
||||
Patch306: xen-xmexample.diff
|
||||
@ -282,7 +282,6 @@ Patch451: ioemu-watchdog-linkage.patch
|
||||
Patch452: ioemu-watchdog-ib700-timer.patch
|
||||
Patch453: tools-watchdog-support.patch
|
||||
Patch454: xend-console-port-restore.patch
|
||||
Patch455: xencommons-proc-xen.patch
|
||||
Patch456: xend-vcpu-affinity-fix.patch
|
||||
Patch457: xen-cpupool-xl-config-format.patch
|
||||
Patch458: ipxe-enable-nics.patch
|
||||
@ -312,8 +311,6 @@ Patch651: ioemu-disable-scsi.patch
|
||||
Patch652: ioemu-disable-emulated-ide-if-pv.patch
|
||||
Patch700: hv_extid_compatibility.patch
|
||||
Patch701: xen.no-default-runlevel-4.patch
|
||||
# xenalyze
|
||||
Patch20000: xenalyze.gcc46.patch
|
||||
# Build patch
|
||||
Patch99998: tmp-initscript-modprobe.patch
|
||||
Patch99999: tmp_build.patch
|
||||
@ -651,7 +648,6 @@ Authors:
|
||||
%prep
|
||||
%setup -q -n %xen_build_dir -a 1 -a 2 -a 3 -a 4 -a 5 -a 20000
|
||||
tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
|
||||
%patch20000 -p1
|
||||
# Upstream patches
|
||||
%patch25833 -p1
|
||||
%patch25835 -p1
|
||||
@ -688,7 +684,6 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
|
||||
# Our patches
|
||||
%patch301 -p1
|
||||
%patch302 -p1
|
||||
%patch303 -p1
|
||||
%patch304 -p1
|
||||
%patch305 -p1
|
||||
%patch306 -p1
|
||||
@ -769,7 +764,6 @@ tar xfj %{SOURCE6} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
|
||||
%patch452 -p1
|
||||
%patch453 -p1
|
||||
%patch454 -p1
|
||||
%patch455 -p1
|
||||
%patch456 -p1
|
||||
%patch457 -p1
|
||||
%patch458 -p1
|
||||
@ -807,9 +801,9 @@ XEN_EXTRAVERSION=%version-%release
|
||||
XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}}
|
||||
sed -i "s/XEN_EXTRAVERSION[\t ]*.=.*\$/XEN_EXTRAVERSION = $XEN_EXTRAVERSION/" xen/Makefile
|
||||
sed -i "s/XEN_CHANGESET[\t ]*=.*\$/XEN_CHANGESET = %{changeset}/" xen/Makefile
|
||||
RPM_OPT_FLAGS=${RPM_OPT_FLAGS//-fstack-protector/}
|
||||
export CFLAGS="${RPM_OPT_FLAGS}"
|
||||
export RPM_OPT_FLAGS
|
||||
export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS"
|
||||
export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS"
|
||||
export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS"
|
||||
./configure \
|
||||
--enable-xenapi \
|
||||
--prefix=/usr \
|
||||
@ -820,7 +814,7 @@ export RPM_OPT_FLAGS
|
||||
--datadir=%{_datadir}
|
||||
%if %{?with_dom0_support}0
|
||||
CFLAGS_SAVE=$CFLAGS
|
||||
make -C xenalyze.hg CC="gcc -I../xen/include" %{?_smp_mflags}
|
||||
make -C xenalyze.hg CC="gcc -I../xen/include -DMAX_CPUS=%{max_cpus} ${RPM_OPT_FLAGS}" %{?_smp_mflags} -k
|
||||
make -C tools/include/xen-foreign %{?_smp_mflags}
|
||||
make tools docs %{?_smp_mflags}
|
||||
make -C tools/debugger/gdbsx
|
||||
@ -847,7 +841,9 @@ done
|
||||
%endif
|
||||
|
||||
%install
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS"
|
||||
export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS"
|
||||
export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS"
|
||||
%if %{?with_dom0_support}0
|
||||
# EFI
|
||||
%ifarch x86_64
|
||||
|
@ -1,140 +0,0 @@
|
||||
gcc -I../xen/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -Werror -o xenalyze xenalyze.c
|
||||
xenalyze.c: In function 'weighted_percentile':
|
||||
xenalyze.c:2017:9: error: variable 'progress' set but not used [-Werror=unused-but-set-variable]
|
||||
xenalyze.c: In function 'self_weighted_percentile':
|
||||
xenalyze.c:2105:9: error: variable 'progress' set but not used [-Werror=unused-but-set-variable]
|
||||
xenalyze.c: In function 'interval_domain_short_summary_output':
|
||||
xenalyze.c:2729:15: error: variable 'interval_cycles' set but not used [-Werror=unused-but-set-variable]
|
||||
xenalyze.c: In function 'hvm_generic_dump':
|
||||
xenalyze.c:4675:15: error: variable 'd' set but not used [-Werror=unused-but-set-variable]
|
||||
xenalyze.c: In function 'sched_runstate_process':
|
||||
xenalyze.c:6883:9: error: variable 'old_runstate' set but not used [-Werror=unused-but-set-variable]
|
||||
xenalyze.c:6882:11: error: variable 'runstate_tsc' set but not used [-Werror=unused-but-set-variable]
|
||||
xenalyze.c: In function 'cmd_parser':
|
||||
xenalyze.c:9253:24: error: variable 'p' set but not used [-Werror=unused-but-set-variable]
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
---
|
||||
xenalyze.hg/xenalyze.c | 21 ---------------------
|
||||
1 file changed, 21 deletions(-)
|
||||
|
||||
Index: xen-4.2.0-testing/xenalyze.hg/xenalyze.c
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/xenalyze.hg/xenalyze.c
|
||||
+++ xen-4.2.0-testing/xenalyze.hg/xenalyze.c
|
||||
@@ -2016,8 +2016,6 @@ float weighted_percentile(float * A, /*
|
||||
float X, t1;
|
||||
unsigned long long t2;
|
||||
|
||||
- int progress;
|
||||
-
|
||||
/* Calculate total weight */
|
||||
N_weight=0;
|
||||
|
||||
@@ -2078,15 +2076,11 @@ float weighted_percentile(float * A, /*
|
||||
}
|
||||
} while (I <= J); /* Keep going until our pointers meet or pass */
|
||||
|
||||
- progress = 0;
|
||||
-
|
||||
/* Re-adjust L and R, based on which element we're looking for */
|
||||
if(J_weight<K_weight) {
|
||||
- progress = 1;
|
||||
L=I; L_weight = I_weight;
|
||||
}
|
||||
if(K_weight<I_weight) {
|
||||
- progress = 1;
|
||||
R=J; R_weight = J_weight;
|
||||
}
|
||||
}
|
||||
@@ -2104,8 +2098,6 @@ long long self_weighted_percentile(long
|
||||
|
||||
long long X, t1;
|
||||
|
||||
- int progress;
|
||||
-
|
||||
/* Calculate total weight */
|
||||
N_weight=0;
|
||||
|
||||
@@ -2165,15 +2157,11 @@ long long self_weighted_percentile(long
|
||||
}
|
||||
} while (I <= J); /* Keep going until our pointers meet or pass */
|
||||
|
||||
- progress = 0;
|
||||
-
|
||||
/* Re-adjust L and R, based on which element we're looking for */
|
||||
if(J_weight<K_weight) {
|
||||
- progress = 1;
|
||||
L=I; L_weight = I_weight;
|
||||
}
|
||||
if(K_weight<I_weight) {
|
||||
- progress = 1;
|
||||
R=J; R_weight = J_weight;
|
||||
}
|
||||
}
|
||||
@@ -2728,13 +2716,10 @@ void interval_domain_short_summary_outpu
|
||||
|
||||
if(P.interval.domain.d) {
|
||||
struct domain_data *d;
|
||||
- tsc_t interval_cycles;
|
||||
int i;
|
||||
|
||||
d=P.interval.domain.d;
|
||||
|
||||
- interval_cycles = d->total_time.interval.cycles;
|
||||
-
|
||||
interval_time_output();
|
||||
|
||||
interval_cycle_percent_output(&d->total_time.interval);
|
||||
@@ -4663,7 +4648,6 @@ void hvm_generic_dump(struct record_info
|
||||
} *cr = (typeof(cr))ri->d;
|
||||
|
||||
char *evt_string, evt_number[256];
|
||||
- unsigned *d;
|
||||
int i, evt, is_64 = 0;
|
||||
|
||||
evt = ri->event - TRC_HVM_HANDLER;
|
||||
@@ -4683,7 +4667,6 @@ void hvm_generic_dump(struct record_info
|
||||
evt_string = evt_number;
|
||||
}
|
||||
|
||||
- d = ri->d;
|
||||
printf("%s%s %s%s [",
|
||||
prefix,
|
||||
ri->dump_header,
|
||||
@@ -6867,8 +6850,6 @@ void sched_runstate_process(struct pcpu_
|
||||
} sevt;
|
||||
int perfctrs;
|
||||
struct last_oldstate_struct last_oldstate;
|
||||
- tsc_t runstate_tsc;
|
||||
- int old_runstate;
|
||||
|
||||
switch(_sevt.lo)
|
||||
{
|
||||
@@ -6938,8 +6919,6 @@ void sched_runstate_process(struct pcpu_
|
||||
* be reset, it will be reset below. */
|
||||
last_oldstate = v->runstate.last_oldstate;
|
||||
v->runstate.last_oldstate.wrong = RUNSTATE_INIT;
|
||||
- runstate_tsc = v->runstate.tsc;
|
||||
- old_runstate = v->runstate.state;
|
||||
|
||||
/* Close vmexits when the putative reason for blocking / &c stops.
|
||||
* This way, we don't account cpu contention to some other overhead. */
|
||||
@@ -9284,7 +9263,7 @@ error_t cmd_parser(int key, char *arg, s
|
||||
|
||||
case OPT_TOLERANCE:
|
||||
{
|
||||
- char * inval, *p;
|
||||
+ char * inval;
|
||||
|
||||
opt.tolerance = (int)strtol(arg, &inval, 0);
|
||||
|
||||
@@ -9298,8 +9277,6 @@ error_t cmd_parser(int key, char *arg, s
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- p = inval;
|
||||
-
|
||||
printf("Tolerating errors at or below %d\n",
|
||||
opt.tolerance);
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6f1d68fa351de9e0d67790b038f791fec6c159530e59f1d9d03ba47f94f1095e
|
||||
size 118689
|
||||
oid sha256:006b68099906f6f0846e8a7d7ded8bc8f3abfbcc1c4daac013a4eaa9aefb344f
|
||||
size 124265
|
||||
|
@ -1,58 +0,0 @@
|
||||
# HG changeset patch
|
||||
# Parent ea18090ab6e3cb3c69d232ec0865589688db3f81
|
||||
hotplug: update xencommons script to run only when needed
|
||||
|
||||
Update the xencommons script to run only when needed:
|
||||
- do not run if /proc/xen does not exist
|
||||
- check if /proc/xen/capabilities exists before doing the grep for dom0
|
||||
- use variable for /proc/xen/capabilities
|
||||
- use grep -q instead of stdout redirection when looking for xenfs,
|
||||
its already used later
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
|
||||
---
|
||||
tools/hotplug/Linux/init.d/xencommons | 20 ++++++++++++++++----
|
||||
1 file changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: xen-4.2.0-testing/tools/hotplug/Linux/init.d/xencommons
|
||||
===================================================================
|
||||
--- xen-4.2.0-testing.orig/tools/hotplug/Linux/init.d/xencommons
|
||||
+++ xen-4.2.0-testing/tools/hotplug/Linux/init.d/xencommons
|
||||
@@ -27,6 +27,7 @@ fi
|
||||
test -f $xencommons_config/xencommons && . $xencommons_config/xencommons
|
||||
|
||||
XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
|
||||
+XEN_CAPABILITIES=/proc/xen/capabilities
|
||||
shopt -s extglob
|
||||
|
||||
# not running in Xen dom0 or domU
|
||||
@@ -34,10 +35,15 @@ if ! test -d /proc/xen ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
+# not running in Xen dom0 or domU
|
||||
+if ! test -d /proc/xen ; then
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
# mount xenfs in dom0 or domU with a pv_ops kernel
|
||||
if test "x$1" = xstart && \
|
||||
- ! test -f /proc/xen/capabilities && \
|
||||
- ! grep '^xenfs ' /proc/mounts >/dev/null;
|
||||
+ ! test -f $XEN_CAPABILITIES && \
|
||||
+ ! grep -q '^xenfs ' /proc/mounts ;
|
||||
then
|
||||
mount -t xenfs xenfs /proc/xen
|
||||
fi
|
||||
@@ -45,8 +51,8 @@ fi
|
||||
# run this script only in dom0:
|
||||
# no capabilities file in xenlinux domU kernel
|
||||
# empty capabilities file in pv_ops domU kernel
|
||||
-if test -f /proc/xen/capabilities && \
|
||||
- ! grep -q "control_d" /proc/xen/capabilities ; then
|
||||
+if test -f $XEN_CAPABILITIES && \
|
||||
+ ! grep -q "control_d" $XEN_CAPABILITIES ; then
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user