xen/xen-qemu-iscsi-fix.patch
Charles Arnold 898ade9d0e - bnc#787169 - L3: Marvell 88SE9125 disk controller not detecting
disk in Xen kernel
  26133-IOMMU-defer-BM-disable.patch
  26324-IOMMU-assign-params.patch
  26325-IOMMU-add-remove-params.patch
  26326-VT-d-context-map-params.patch
  26327-AMD-IOMMU-flush-params.patch
  26328-IOMMU-pdev-type.patch
  26329-IOMMU-phantom-dev.patch
  26330-VT-d-phantom-MSI.patch
  26331-IOMMU-phantom-dev-quirk.patch
- Upstream patches from Jan
  26294-x86-AMD-Fam15-way-access-filter.patch
  26320-IOMMU-domctl-assign-seg.patch
  26332-x86-compat-show-guest-stack-mfn.patch
  26333-x86-get_page_type-assert.patch

- bnc#794316 - VUL-0: CVE-2012-5634: xen: VT-d interrupt remapping
  source validation flaw (XSA-33)
  CVE-2012-5634-xsa33.patch

- Update to Xen 4.2.1 c/s 25952

- Upstream patches from Jan
  26195-x86-compat-atp-gmfn-range-cont.patch
  26196-ACPI-set-PDC-bits-rc.patch
  26200-IOMMU-debug-verbose.patch
  26203-x86-HAP-dirty-vram-leak.patch
  26229-gnttab-version-switch.patch (Replaces CVE-2012-5510-xsa26.patch)
  26230-x86-HVM-limit-batches.patch (Replaces CVE-2012-5511-xsa27.patch)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=220
2013-01-14 17:52:04 +00:00

77 lines
2.8 KiB
Diff

Index: xen-4.2.0-testing/tools/qemu-xen-traditional-dir-remote/xenstore.c
===================================================================
--- xen-4.2.0-testing.orig/tools/qemu-xen-traditional-dir-remote/xenstore.c
+++ xen-4.2.0-testing/tools/qemu-xen-traditional-dir-remote/xenstore.c
@@ -449,7 +449,7 @@ void xenstore_parse_domain_config(int hv
char *buf = NULL;
char *fpath = NULL, *bpath = NULL, *btype = NULL,
*dev = NULL, *params = NULL, *drv = NULL;
- int i, ret, is_tap;
+ int i, j, ret, is_tap;
unsigned int len, num, hd_index, pci_devid = 0;
BlockDriverState *bs;
BlockDriver *format;
@@ -533,12 +533,7 @@ void xenstore_parse_domain_config(int hv
continue;
free(danger_type);
danger_type = xs_read(xsh, XBT_NULL, danger_buf, &len);
- if (pasprintf(&buf, "%s/params", bpath) == -1)
- continue;
- free(params);
- params = xs_read(xsh, XBT_NULL, buf, &len);
- if (params == NULL)
- continue;
+
/* read the name of the device */
if (pasprintf(&buf, "%s/type", bpath) == -1)
continue;
@@ -546,6 +541,35 @@ void xenstore_parse_domain_config(int hv
drv = xs_read(xsh, XBT_NULL, buf, &len);
if (drv == NULL)
continue;
+
+ free(params);
+ if (!strcmp(drv,"iscsi") || !strcmp(drv, "npiv") ||
+ !strcmp(drv,"dmmd")) {
+ if (pasprintf(&buf, "%s/node", bpath) == -1)
+ continue;
+
+ /* wait for block-[iscsi|npiv|dmmd] script to complete and populate the
+ * node entry. try 30 times (30 secs) */
+ for (j = 0; j < 30; j++) {
+ params = xs_read(xsh, XBT_NULL, buf, &len);
+ if (params != NULL)
+ break;
+ sleep(1);
+ }
+ if (params == NULL) {
+ fprintf(stderr, "qemu: %s device not found -- timed out \n", drv);
+ continue;
+ }
+ }
+ else
+ {
+ if (pasprintf(&buf, "%s/params", bpath) == -1)
+ continue;
+ params = xs_read(xsh, XBT_NULL, buf, &len);
+ if (params == NULL)
+ continue;
+ }
+
/* Obtain blktap sub-type prefix */
if ((!strcmp(drv, "tap") || !strcmp(drv, "qdisk")) && params[0]) {
char *offset = strchr(params, ':');
@@ -663,6 +687,12 @@ void xenstore_parse_domain_config(int hv
format = &bdrv_host_device;
else
format = &bdrv_raw;
+ } else if (!strcmp(drv,"iscsi")) {
+ format = &bdrv_raw;
+ } else if (!strcmp(drv,"npiv")) {
+ format = &bdrv_raw;
+ } else if (!strcmp(drv,"dmmd")) {
+ format = &bdrv_raw;
} else {
format = bdrv_find_format(drv);
if (!format) {