xen/bdrv_open2_fix_flags.patch
Charles Arnold fe31f9be81 - bnc#564406 - Make the new PV drivers work with older hosts that
do not understand the new PV driver protocol. 

- Upstream Xen version renamed to 4.0.0 in changeset 20624 & 20625. 

- fate#307594: HP-MCBS: XEN: support NR_CPUS=256 
  This is a spec file change (xen.spec)

- bnc#555152 - "NAME" column in xentop (SLES11) output limited to
  10 characters unlike SLES10
  The update to c/s 20572 includes this fix (at c/s 20567).

- Modify xen-paths.diff 

- Merge xend-tap-fix.patch to xen-domUloader.diff
  remove part of it which accepted by upstream

- Load gntdev module in xend init script similar to blkbk,
  netbk, etc.

- Backport dmmd from sles11/xen
  block-dmmd
  xen-qemu-iscsi-fix.patch
  xen.spec 

- Fix regression when create_vbd for tap
  xend-tap-fix.patch

- Temporarily disable libxl because of libconfig dependency. 

- fate#302864 domUloader support lvm in disk
  domUloader.py
  Note: for test in Beta1, if not good, remove it

- fate#302864 domUloader support fs on whole disk
  domUloader.py

- Turn KMPs back on now that kernel side fix is checked in. 

- fate#304415 VMM: ability to switch networking mode
  Add vif-route-ifup to handle routed configurations using
  sysconfig scripts.
  vif-route-ifup.patch

- fate#307540 USB for Xen VMs
  usb-add.patch

- fate#305545 XEN extra descriptive field within xenstore
  add_des.patch

- Update to Xen version 3.5.0 for the following features. 
  fate#304226 XEN: FlexMigration feature of VT-x2 support
  fate#305004 Add SR-IOV PF and VF drivers to Vt-d enabled Xen
  fate#306830 T states in Xen controlling by MSR
  fate#306832 Fix for xen panic on new processors
  fate#306833 Westmere and Nehalem-EX: Add support for Pause Loop exiting feature for Xen
  fate#306835 Xen: server virtual power management enhacement
  fate#306837 VT-d2 - PCI SIG ATS support
  fate#306872 Xen: Node manager support P/T-states change when Vt-d enable
  fate#306873 Xen: SMP guest live migration may fail with hap=1 on NHM
  fate#306875 Westmere: LT-SX (Xen)
  fate#306891 RAS features for Xen: Add support for Machine Check and CPU/Memory online/offline features
  fate#307322 1GB page support in Xen
  fate#307324 Xen IOMMU support

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=26
2010-01-16 00:12:54 +00:00

130 lines
4.7 KiB
Diff

Index: xen-4.0.0-testing/tools/ioemu-remote/block.c
===================================================================
--- xen-4.0.0-testing.orig/tools/ioemu-remote/block.c
+++ xen-4.0.0-testing/tools/ioemu-remote/block.c
@@ -350,7 +350,7 @@ int bdrv_file_open(BlockDriverState **pb
int bdrv_open(BlockDriverState *bs, const char *filename, int flags)
{
- return bdrv_open2(bs, filename, flags, NULL);
+ return bdrv_open2(bs, filename, flags|BDRV_O_RDWR, NULL);
}
int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
@@ -419,12 +419,13 @@ int bdrv_open2(BlockDriverState *bs, con
}
bs->drv = drv;
bs->opaque = qemu_mallocz(drv->instance_size);
- /* Note: for compatibility, we open disk image files as RDWR, and
- RDONLY as fallback */
if (!(flags & BDRV_O_FILE))
- open_flags = BDRV_O_RDWR | (flags & BDRV_O_CACHE_MASK);
+ open_flags = flags;
else
open_flags = flags & ~(BDRV_O_FILE | BDRV_O_SNAPSHOT);
+ if (!(open_flags & BDRV_O_RDWR))
+ bs->read_only = 1;
+
ret = drv->bdrv_open(bs, filename, open_flags);
if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) {
ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR);
Index: xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c
===================================================================
--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/usb-msd.c
+++ xen-4.0.0-testing/tools/ioemu-remote/hw/usb-msd.c
@@ -551,7 +551,7 @@ USBDevice *usb_msd_init(const char *file
s = qemu_mallocz(sizeof(MSDState));
bdrv = bdrv_new("usb");
- if (bdrv_open2(bdrv, filename, 0, drv) < 0)
+ if (bdrv_open2(bdrv, filename, BDRV_O_RDWR, drv) < 0)
goto fail;
s->bs = bdrv;
*pbs = bdrv;
Index: xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c
===================================================================
--- xen-4.0.0-testing.orig/tools/ioemu-remote/qemu-img.c
+++ xen-4.0.0-testing/tools/ioemu-remote/qemu-img.c
@@ -32,7 +32,7 @@
#endif
/* Default to cache=writeback as data integrity is not important for qemu-tcg. */
-#define BRDV_O_FLAGS BDRV_O_CACHE_WB
+#define BDRV_O_FLAGS BDRV_O_CACHE_WB
static void QEMU_NORETURN error(const char *fmt, ...)
{
@@ -185,7 +185,7 @@ static int read_password(char *buf, int
#endif
static BlockDriverState *bdrv_new_open(const char *filename,
- const char *fmt)
+ const char *fmt, int flags)
{
BlockDriverState *bs;
BlockDriver *drv;
@@ -201,7 +201,7 @@ static BlockDriverState *bdrv_new_open(c
} else {
drv = &bdrv_raw;
}
- if (bdrv_open2(bs, filename, BRDV_O_FLAGS, drv) < 0) {
+ if (bdrv_open2(bs, filename, flags, drv) < 0) {
error("Could not open '%s'", filename);
}
if (bdrv_is_encrypted(bs)) {
@@ -253,7 +253,7 @@ static int img_create(int argc, char **a
size = 0;
if (base_filename) {
BlockDriverState *bs;
- bs = bdrv_new_open(base_filename, NULL);
+ bs = bdrv_new_open(base_filename, NULL, BDRV_O_RDWR);
bdrv_get_geometry(bs, &size);
size *= 512;
bdrv_delete(bs);
@@ -332,7 +332,7 @@ static int img_commit(int argc, char **a
} else {
drv = NULL;
}
- if (bdrv_open2(bs, filename, BRDV_O_FLAGS, drv) < 0) {
+ if (bdrv_open2(bs, filename, BDRV_O_RDWR, drv) < 0) {
error("Could not open '%s'", filename);
}
ret = bdrv_commit(bs);
@@ -455,7 +455,8 @@ static int img_convert(int argc, char **
total_sectors = 0;
for (bs_i = 0; bs_i < bs_n; bs_i++) {
- bs[bs_i] = bdrv_new_open(argv[optind + bs_i], fmt);
+ bs[bs_i] = bdrv_new_open(argv[optind + bs_i], fmt,
+ BDRV_O_CACHE_WB|BDRV_O_RDONLY);
if (!bs[bs_i])
error("Could not open '%s'", argv[optind + bs_i]);
bdrv_get_geometry(bs[bs_i], &bs_sectors);
@@ -483,7 +484,7 @@ static int img_convert(int argc, char **
}
}
- out_bs = bdrv_new_open(out_filename, out_fmt);
+ out_bs = bdrv_new_open(out_filename, out_fmt, BDRV_O_CACHE_WB|BDRV_O_RDWR);
bs_i = 0;
bs_offset = 0;
@@ -706,7 +707,7 @@ static int img_info(int argc, char **arg
} else {
drv = NULL;
}
- if (bdrv_open2(bs, filename, BRDV_O_FLAGS, drv) < 0) {
+ if (bdrv_open2(bs, filename, BDRV_O_FLAGS|BDRV_O_RDWR, drv) < 0) {
error("Could not open '%s'", filename);
}
bdrv_get_format(bs, fmt_name, sizeof(fmt_name));
@@ -810,7 +811,7 @@ static void img_snapshot(int argc, char
if (!bs)
error("Not enough memory");
- if (bdrv_open2(bs, filename, 0, NULL) < 0) {
+ if (bdrv_open2(bs, filename, BDRV_O_RDWR, NULL) < 0) {
error("Could not open '%s'", filename);
}