Author: baggins Date: Thu Feb 23 12:49:57 2012 GMT Module: packages Tag: HEAD ---- Log message: - replace patchset with a single diff between qemu 1.0 and 1.0.1
---- Files affected: packages/qemu-kvm: qemu-kvm.spec (1.27 -> 1.28) , qemu-1.0.1.patch (NONE -> 1.1) (NEW), 0001-malta-Fix-regression-i8259-interrupts-did-not-work.patch (1.1 -> NONE) (REMOVED), 0002-exec.c-Fix-subpage-memory-access-to-RAM-MemoryRegion.patch (1.1 -> NONE) (REMOVED), 0003-hw-9pfs-Improve-portability-to-older-systems.patch (1.1 -> NONE) (REMOVED), 0004-hw-9pfs-use-migration-blockers-to-prevent-live-migra.patch (1.1 -> NONE) (REMOVED), 0005-hw-9pfs-Reset-server-state-during-TVERSION.patch (1.1 -> NONE) (REMOVED), 0006-hw-9pfs-Add-qdev.reset-callback-for-virtio-9p-pci-de.patch (1.1 -> NONE) (REMOVED), 0007-hw-9pfs-Use-the-correct-file-descriptor-in-Fsdriver-.patch (1.1 -> NONE) (REMOVED), 0008-hw-9pfs-replace-iovec-manipulation-with-QEMUIOVector.patch (1.1 -> NONE) (REMOVED), 0009-hw-9pfs-Use-the-correct-signed-type-for-different-va.patch (1.1 -> NONE) (REMOVED), 0010-target-i386-fix-cmpxchg-instruction-emulation.patch (1.1 -> NONE) (REMOVED), 0011-configure-Enable-build-by-default-PIE-r ead-only-relo.patch (1.1 -> NONE) (REMOVED), 0012-cris-Handle-conditional-stores-on-CRISv10.patch (1.1 -> NONE) (REMOVED), 0013-pc-add-pc-0.15.patch (1.1 -> NONE) (REMOVED), 0014-pc-fix-event_idx-compatibility-for-virtio-devices.patch (1.1 -> NONE) (REMOVED), 0015-Fix-parse-of-usb-device-description-with-multiple-co.patch (1.1 -> NONE) (REMOVED), 0016-usb-storage-cancel-I-O-on-reset.patch (1.1 -> NONE) (REMOVED), 0017-usb-host-properly-release-port-on-unplug-exit.patch (1.1 -> NONE) (REMOVED), 0018-usb-ohci-td.cbp-incorrectly-updated-near-page-end.patch (1.1 -> NONE) (REMOVED), 0019-target-sh4-ignore-ocbp-and-ocbwb-instructions.patch (1.1 -> NONE) (REMOVED), 0020-PPC-Fix-linker-scripts-on-ppc-hosts.patch (1.1 -> NONE) (REMOVED), 0021-qiov-prevent-double-free-or-use-after-free.patch (1.1 -> NONE) (REMOVED), 0022-coroutine-switch-per-thread-free-pool-to-a-global-po.patch (1.1 -> NONE) (REMOVED), 0023-qemu-img-rebase-Fix-for-undersized-backing-files.patch (1.1 -> NO NE) (REMOVED), 0024-Documentation-Add-qemu-img-t-parameter-in-man-page.patch (1.1 -> NONE) (REMOVED), 0025-rbd-always-set-out-parameter-in-qemu_rbd_snap_list.patch (1.1 -> NONE) (REMOVED), 0026-e1000-bounds-packet-size-against-buffer-size.patch (1.1 -> NONE) (REMOVED), virtio-blk_refuse_SG_IO_requests_with_scsi_off.patch (1.1 -> NONE) (REMOVED) ---- Diffs: ================================================================ Index: packages/qemu-kvm/qemu-kvm.spec diff -u packages/qemu-kvm/qemu-kvm.spec:1.27 packages/qemu-kvm/qemu-kvm.spec:1.28 --- packages/qemu-kvm/qemu-kvm.spec:1.27 Thu Feb 23 13:04:35 2012 +++ packages/qemu-kvm/qemu-kvm.spec Thu Feb 23 13:49:51 2012 @@ -34,34 +34,8 @@ Patch2: enable_architectural_PMU_cpuid_leaf.patch Patch3: qemu_virtio-scsi_support.patch Patch4: qemu-kvm-cflags.patch -# Patches queued for 1.0.1 stable -Patch101: 0001-malta-Fix-regression-i8259-interrupts-did-not-work.patch -Patch102: 0002-exec.c-Fix-subpage-memory-access-to-RAM-MemoryRegion.patch -Patch103: 0003-hw-9pfs-Improve-portability-to-older-systems.patch -Patch104: 0004-hw-9pfs-use-migration-blockers-to-prevent-live-migra.patch -Patch105: 0005-hw-9pfs-Reset-server-state-during-TVERSION.patch -Patch106: 0006-hw-9pfs-Add-qdev.reset-callback-for-virtio-9p-pci-de.patch -Patch107: 0007-hw-9pfs-Use-the-correct-file-descriptor-in-Fsdriver-.patch -Patch108: 0008-hw-9pfs-replace-iovec-manipulation-with-QEMUIOVector.patch -Patch109: 0009-hw-9pfs-Use-the-correct-signed-type-for-different-va.patch -Patch110: 0010-target-i386-fix-cmpxchg-instruction-emulation.patch -Patch111: 0011-configure-Enable-build-by-default-PIE-read-only-relo.patch -Patch112: 0012-cris-Handle-conditional-stores-on-CRISv10.patch -Patch113: 0013-pc-add-pc-0.15.patch -Patch114: 0014-pc-fix-event_idx-compatibility-for-virtio-devices.patch -Patch115: 0015-Fix-parse-of-usb-device-description-with-multiple-co.patch -Patch116: 0016-usb-storage-cancel-I-O-on-reset.patch -Patch117: 0017-usb-host-properly-release-port-on-unplug-exit.patch -Patch118: 0018-usb-ohci-td.cbp-incorrectly-updated-near-page-end.patch -Patch119: 0019-target-sh4-ignore-ocbp-and-ocbwb-instructions.patch -Patch120: 0020-PPC-Fix-linker-scripts-on-ppc-hosts.patch -Patch121: 0021-qiov-prevent-double-free-or-use-after-free.patch -Patch122: 0022-coroutine-switch-per-thread-free-pool-to-a-global-po.patch -Patch123: 0023-qemu-img-rebase-Fix-for-undersized-backing-files.patch -Patch124: 0024-Documentation-Add-qemu-img-t-parameter-in-man-page.patch -Patch125: 0025-rbd-always-set-out-parameter-in-qemu_rbd_snap_list.patch -Patch126: 0026-e1000-bounds-packet-size-against-buffer-size.patch -Patch127: virtio-blk_refuse_SG_IO_requests_with_scsi_off.patch +# Update to qemu 1.0.1 +Patch100: qemu-1.0.1.patch URL: http://www.linux-kvm.org/ BuildRequires: SDL-devel >= 1.2.1 BuildRequires: alsa-lib-devel @@ -353,33 +327,7 @@ %patch3 -p1 %patch4 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 -%patch115 -p1 -%patch116 -p1 -%patch117 -p1 -%patch118 -p1 -%patch119 -p1 -%patch120 -p1 -%patch121 -p1 -%patch122 -p1 -%patch123 -p1 -%patch124 -p1 -%patch125 -p1 -%patch126 -p1 -%patch127 -p1 +%patch100 -p1 cp -a %{SOURCE1} pc-bios/bios.bin @@ -707,6 +655,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.28 2012/02/23 12:49:51 baggins +- replace patchset with a single diff between qemu 1.0 and 1.0.1 + Revision 1.27 2012/02/23 12:04:35 baggins - rel 3 ================================================================ Index: packages/qemu-kvm/qemu-1.0.1.patch diff -u /dev/null packages/qemu-kvm/qemu-1.0.1.patch:1.1 --- /dev/null Thu Feb 23 13:49:57 2012 +++ packages/qemu-kvm/qemu-1.0.1.patch Thu Feb 23 13:49:51 2012 @@ -0,0 +1,2131 @@ +diff -urN qemu-1.0/block/rbd.c qemu-1.0.1/block/rbd.c +--- qemu-1.0/block/rbd.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/block/rbd.c 2012-02-17 20:45:39.000000000 +0100 +@@ -808,7 +808,7 @@ + } while (snap_count == -ERANGE); + + if (snap_count <= 0) { +- return snap_count; ++ goto done; + } + + sn_tab = g_malloc0(snap_count * sizeof(QEMUSnapshotInfo)); +@@ -827,6 +827,7 @@ + } + rbd_snap_list_end(snaps); + ++ done: + *psn_tab = sn_tab; + return snap_count; + } +diff -urN qemu-1.0/configure qemu-1.0.1/configure +--- qemu-1.0/configure 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/configure 2012-02-17 20:45:39.000000000 +0100 +@@ -1116,7 +1116,7 @@ + + if test "$pie" = ""; then + case "$cpu-$targetos" in +- i386-Linux|x86_64-Linux) ++ i386-Linux|x86_64-Linux|i386-OpenBSD|x86_64-OpenBSD) + ;; + *) + pie="no" +diff -urN qemu-1.0/console.c qemu-1.0.1/console.c +--- qemu-1.0/console.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/console.c 2012-02-17 20:45:39.000000000 +0100 +@@ -186,7 +186,9 @@ + consoles[0]->hw_screen_dump(consoles[0]->hw, filename); + } + +- console_select(previous_active_console->index); ++ if (previous_active_console) { ++ console_select(previous_active_console->index); ++ } + } + + void vga_hw_text_update(console_ch_t *chardata) +diff -urN qemu-1.0/coroutine-ucontext.c qemu-1.0.1/coroutine-ucontext.c +--- qemu-1.0/coroutine-ucontext.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/coroutine-ucontext.c 2012-02-17 20:45:39.000000000 +0100 +@@ -35,6 +35,10 @@ + POOL_MAX_SIZE = 64, + }; + ++/** Free list to speed up creation */ ++static QLIST_HEAD(, Coroutine) pool = QLIST_HEAD_INITIALIZER(pool); ++static unsigned int pool_size; ++ + typedef struct { + Coroutine base; + void *stack; +@@ -48,10 +52,6 @@ + /** Currently executing coroutine */ + Coroutine *current; + +- /** Free list to speed up creation */ +- QLIST_HEAD(, Coroutine) pool; +- unsigned int pool_size; +- + /** The default coroutine */ + CoroutineUContext leader; + } CoroutineThreadState; +@@ -75,7 +75,6 @@ + if (!s) { + s = g_malloc0(sizeof(*s)); + s->current = &s->leader.base; +- QLIST_INIT(&s->pool); + pthread_setspecific(thread_state_key, s); + } + return s; +@@ -84,14 +83,19 @@ + static void qemu_coroutine_thread_cleanup(void *opaque) + { + CoroutineThreadState *s = opaque; ++ ++ g_free(s); ++} ++ ++static void __attribute__((destructor)) coroutine_cleanup(void) ++{ + Coroutine *co; + Coroutine *tmp; + +- QLIST_FOREACH_SAFE(co, &s->pool, pool_next, tmp) { ++ QLIST_FOREACH_SAFE(co, &pool, pool_next, tmp) { + g_free(DO_UPCAST(CoroutineUContext, base, co)->stack); + g_free(co); + } +- g_free(s); + } + + static void __attribute__((constructor)) coroutine_init(void) +@@ -169,13 +173,12 @@ + + Coroutine *qemu_coroutine_new(void) + { +- CoroutineThreadState *s = coroutine_get_thread_state(); + Coroutine *co; + +- co = QLIST_FIRST(&s->pool); ++ co = QLIST_FIRST(&pool); + if (co) { + QLIST_REMOVE(co, pool_next); +- s->pool_size--; ++ pool_size--; + } else { + co = coroutine_new(); + } +@@ -184,13 +187,12 @@ + + void qemu_coroutine_delete(Coroutine *co_) + { +- CoroutineThreadState *s = coroutine_get_thread_state(); + CoroutineUContext *co = DO_UPCAST(CoroutineUContext, base, co_); + +- if (s->pool_size < POOL_MAX_SIZE) { +- QLIST_INSERT_HEAD(&s->pool, &co->base, pool_next); ++ if (pool_size < POOL_MAX_SIZE) { ++ QLIST_INSERT_HEAD(&pool, &co->base, pool_next); + co->base.caller = NULL; +- s->pool_size++; ++ pool_size++; + return; + } + +diff -urN qemu-1.0/cpu-common.h qemu-1.0.1/cpu-common.h +--- qemu-1.0/cpu-common.h 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/cpu-common.h 2012-02-17 20:45:39.000000000 +0100 +@@ -172,6 +172,7 @@ + #define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */ + #define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT) + #define IO_MEM_NOTDIRTY (3 << IO_MEM_SHIFT) ++#define IO_MEM_SUBPAGE_RAM (4 << IO_MEM_SHIFT) + + /* Acts like a ROM when read and like a device when written. */ + #define IO_MEM_ROMD (1) +diff -urN qemu-1.0/cutils.c qemu-1.0.1/cutils.c +--- qemu-1.0/cutils.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/cutils.c 2012-02-17 20:45:39.000000000 +0100 +@@ -217,7 +217,10 @@ + { + assert(qiov->nalloc != -1); + ++ qemu_iovec_reset(qiov); + g_free(qiov->iov); ++ qiov->nalloc = 0; ++ qiov->iov = NULL; + } + + void qemu_iovec_reset(QEMUIOVector *qiov) +diff -urN qemu-1.0/exec.c qemu-1.0.1/exec.c +--- qemu-1.0/exec.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/exec.c 2012-02-17 20:45:39.000000000 +0100 +@@ -3570,6 +3570,63 @@ + &subpage_writel, + }; + ++static uint32_t subpage_ram_readb(void *opaque, target_phys_addr_t addr) ++{ ++ ram_addr_t raddr = addr; ++ void *ptr = qemu_get_ram_ptr(raddr); ++ return ldub_p(ptr); ++} ++ ++static void subpage_ram_writeb(void *opaque, target_phys_addr_t addr, ++ uint32_t value) ++{ ++ ram_addr_t raddr = addr; ++ void *ptr = qemu_get_ram_ptr(raddr); ++ stb_p(ptr, value); ++} ++ ++static uint32_t subpage_ram_readw(void *opaque, target_phys_addr_t addr) ++{ ++ ram_addr_t raddr = addr; ++ void *ptr = qemu_get_ram_ptr(raddr); ++ return lduw_p(ptr); ++} ++ ++static void subpage_ram_writew(void *opaque, target_phys_addr_t addr, ++ uint32_t value) ++{ ++ ram_addr_t raddr = addr; ++ void *ptr = qemu_get_ram_ptr(raddr); ++ stw_p(ptr, value); ++} ++ ++static uint32_t subpage_ram_readl(void *opaque, target_phys_addr_t addr) ++{ ++ ram_addr_t raddr = addr; ++ void *ptr = qemu_get_ram_ptr(raddr); ++ return ldl_p(ptr); ++} ++ ++static void subpage_ram_writel(void *opaque, target_phys_addr_t addr, ++ uint32_t value) ++{ ++ ram_addr_t raddr = addr; ++ void *ptr = qemu_get_ram_ptr(raddr); ++ stl_p(ptr, value); ++} ++ ++static CPUReadMemoryFunc * const subpage_ram_read[] = { ++ &subpage_ram_readb, ++ &subpage_ram_readw, ++ &subpage_ram_readl, ++}; ++ ++static CPUWriteMemoryFunc * const subpage_ram_write[] = { ++ &subpage_ram_writeb, ++ &subpage_ram_writew, ++ &subpage_ram_writel, ++}; ++ + static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end, + ram_addr_t memory, ram_addr_t region_offset) + { +@@ -3583,8 +3640,9 @@ + printf("%s: %p start %08x end %08x idx %08x eidx %08x mem %ld\n", __func__, + mmio, start, end, idx, eidx, memory); + #endif +- if ((memory & ~TARGET_PAGE_MASK) == IO_MEM_RAM) +- memory = IO_MEM_UNASSIGNED; ++ if ((memory & ~TARGET_PAGE_MASK) == IO_MEM_RAM) { ++ memory = IO_MEM_SUBPAGE_RAM; ++ } + memory = (memory >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1); + for (; idx <= eidx; idx++) { + mmio->sub_io_index[idx] = memory; +@@ -3817,6 +3875,9 @@ + cpu_register_io_memory_fixed(IO_MEM_NOTDIRTY, error_mem_read, + notdirty_mem_write, NULL, + DEVICE_NATIVE_ENDIAN); ++ cpu_register_io_memory_fixed(IO_MEM_SUBPAGE_RAM, subpage_ram_read, ++ subpage_ram_write, NULL, ++ DEVICE_NATIVE_ENDIAN); + for (i=0; i<5; i++) + io_mem_used[i] = 1; + +diff -urN qemu-1.0/fsdev/file-op-9p.h qemu-1.0.1/fsdev/file-op-9p.h +--- qemu-1.0/fsdev/file-op-9p.h 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/fsdev/file-op-9p.h 2012-02-17 20:45:39.000000000 +0100 +@@ -74,7 +74,7 @@ + } FsContext; + + typedef struct V9fsPath { +- int16_t size; ++ uint16_t size; + char *data; + } V9fsPath; + +@@ -112,10 +112,10 @@ + ssize_t (*pwritev)(FsContext *, V9fsFidOpenState *, + const struct iovec *, int, off_t); + int (*mkdir)(FsContext *, V9fsPath *, const char *, FsCred *); +- int (*fstat)(FsContext *, V9fsFidOpenState *, struct stat *); ++ int (*fstat)(FsContext *, int, V9fsFidOpenState *, struct stat *); + int (*rename)(FsContext *, const char *, const char *); + int (*truncate)(FsContext *, V9fsPath *, off_t); +- int (*fsync)(FsContext *, V9fsFidOpenState *, int); ++ int (*fsync)(FsContext *, int, V9fsFidOpenState *, int); + int (*statfs)(FsContext *s, V9fsPath *path, struct statfs *stbuf); + ssize_t (*lgetxattr)(FsContext *, V9fsPath *, + const char *, void *, size_t); +diff -urN qemu-1.0/fsdev/qemu-fsdev.c qemu-1.0.1/fsdev/qemu-fsdev.c +--- qemu-1.0/fsdev/qemu-fsdev.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/fsdev/qemu-fsdev.c 2012-02-17 20:45:39.000000000 +0100 +@@ -23,7 +23,9 @@ + + static FsDriverTable FsDrivers[] = { + { .name = "local", .ops = &local_ops}, ++#ifdef CONFIG_OPEN_BY_HANDLE + { .name = "handle", .ops = &handle_ops}, ++#endif + { .name = "synth", .ops = &synth_ops}, + }; + +diff -urN qemu-1.0/hw/9pfs/cofile.c qemu-1.0.1/hw/9pfs/cofile.c +--- qemu-1.0/hw/9pfs/cofile.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/hw/9pfs/cofile.c 2012-02-17 20:45:39.000000000 +0100 +@@ -71,7 +71,7 @@ + } + v9fs_co_run_in_worker( + { +- err = s->ops->fstat(&s->ctx, &fidp->fs, stbuf); ++ err = s->ops->fstat(&s->ctx, fidp->fid_type, &fidp->fs, stbuf); + if (err < 0) { + err = -errno; + } +@@ -192,7 +192,7 @@ + } + v9fs_co_run_in_worker( + { +- err = s->ops->fsync(&s->ctx, &fidp->fs, datasync); ++ err = s->ops->fsync(&s->ctx, fidp->fid_type, &fidp->fs, datasync); + if (err < 0) { + err = -errno; + } +diff -urN qemu-1.0/hw/9pfs/virtio-9p.c qemu-1.0.1/hw/9pfs/virtio-9p.c +--- qemu-1.0/hw/9pfs/virtio-9p.c 2011-12-01 21:07:34.000000000 +0100 ++++ qemu-1.0.1/hw/9pfs/virtio-9p.c 2012-02-17 20:45:39.000000000 +0100 +@@ -23,6 +23,7 @@ + #include "virtio-9p-xattr.h" + #include "virtio-9p-coth.h" + #include "trace.h" ++#include "migration.h" + + int open_fd_hw; + int total_open_fd; +@@ -373,6 +374,19 @@ + * Don't free the fid if it is in reclaim list + */ + if (!fidp->ref && fidp->clunked) { ++ if (fidp->fid == pdu->s->root_fid) { ++ /* ++ * if the clunked fid is root fid then we ++ * have unmounted the fs on the client side. ++ * delete the migration blocker. Ideally, this ++ * should be hooked to transport close notification ++ */ ++ if (pdu->s->migration_blocker) { ++ migrate_del_blocker(pdu->s->migration_blocker); ++ error_free(pdu->s->migration_blocker); ++ pdu->s->migration_blocker = NULL; ++ } ++ } + free_fid(pdu, fidp); + } + } +@@ -509,6 +523,30 @@ + return 0; + } + ++static void virtfs_reset(V9fsPDU *pdu) ++{ ++ V9fsState *s = pdu->s; ++ V9fsFidState *fidp = NULL; ++ ++ /* Free all fids */ ++ while (s->fid_list) { ++ fidp = s->fid_list; ++ s->fid_list = fidp->next; ++ ++ if (fidp->ref) { ++ fidp->clunked = 1; ++ } else { ++ free_fid(pdu, fidp); ++ } ++ } ++ if (fidp) { ++ /* One or more unclunked fids found... */ ++ error_report("9pfs:%s: One or more uncluncked fids " ++ "found during reset", __func__); ++ } ++ return; ++} ++ + #define P9_QID_TYPE_DIR 0x80 + #define P9_QID_TYPE_SYMLINK 0x02 + +@@ -636,40 +674,6 @@ + offset, size, 1); + } + +-static int pdu_copy_sg(V9fsPDU *pdu, size_t offset, int rx, struct iovec *sg) +-{ +- size_t pos = 0; +- int i, j; +- struct iovec *src_sg; +- unsigned int num; +- +- if (rx) { +- src_sg = pdu->elem.in_sg; +- num = pdu->elem.in_num; +- } else { +- src_sg = pdu->elem.out_sg; +- num = pdu->elem.out_num; +- } +- +- j = 0; +- for (i = 0; i < num; i++) { +- if (offset <= pos) { +- sg[j].iov_base = src_sg[i].iov_base; +- sg[j].iov_len = src_sg[i].iov_len; +- j++; +- } else if (offset < (src_sg[i].iov_len + pos)) { +- sg[j].iov_base = src_sg[i].iov_base; +- sg[j].iov_len = src_sg[i].iov_len; +- sg[j].iov_base += (offset - pos); +- sg[j].iov_len -= (offset - pos); +- j++; +- } +- pos += src_sg[i].iov_len; +- } +- +- return j; +-} +- + static size_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...) + { + size_t old_offset = offset; +@@ -705,12 +709,6 @@ + *valp = le64_to_cpu(val); + break; + } +- case 'v': { +- struct iovec *iov = va_arg(ap, struct iovec *); +- int *iovcnt = va_arg(ap, int *); +- *iovcnt = pdu_copy_sg(pdu, offset, 0, iov); +- break; +- } + case 's': { + V9fsString *str = va_arg(ap, V9fsString *); + offset += pdu_unmarshal(pdu, offset, "w", &str->size); +@@ -789,12 +787,6 @@ + offset += pdu_pack(pdu, offset, &val, sizeof(val)); + break; + } +- case 'v': { +- struct iovec *iov = va_arg(ap, struct iovec *); +- int *iovcnt = va_arg(ap, int *); +- *iovcnt = pdu_copy_sg(pdu, offset, 1, iov); +- break; +- } + case 's': { + V9fsString *str = va_arg(ap, V9fsString *); + offset += pdu_marshal(pdu, offset, "w", str->size); +@@ -1105,42 +1097,6 @@ + stat_to_qid(stbuf, &v9lstat->qid); + } + +-static struct iovec *adjust_sg(struct iovec *sg, int len, int *iovcnt) +-{ +- while (len && *iovcnt) { +- if (len < sg->iov_len) { +- sg->iov_len -= len; +- sg->iov_base += len; +- len = 0; +- } else { +- len -= sg->iov_len; +- sg++; +- *iovcnt -= 1; +- } +- } +- +- return sg; +-} +- +-static struct iovec *cap_sg(struct iovec *sg, int cap, int *cnt) +-{ +- int i; +- int total = 0; +- +- for (i = 0; i < *cnt; i++) { +- if ((total + sg[i].iov_len) > cap) { +- sg[i].iov_len -= ((total + sg[i].iov_len) - cap); +- i++; +- break; +- } +- total += sg[i].iov_len; +- } +- +- *cnt = i; +- +- return sg; +-} +- + static void print_sg(struct iovec *sg, int cnt) + { + int i; +@@ -1182,6 +1138,8 @@ + pdu_unmarshal(pdu, offset, "ds", &s->msize, &version); + trace_v9fs_version(pdu->tag, pdu->id, s->msize, version.data); + ++ virtfs_reset(pdu); ++ + if (!strcmp(version.data, "9P2000.u")) { + s->proto_version = V9FS_PROTO_2000U; + } else if (!strcmp(version.data, "9P2000.L")) { +@@ -1235,6 +1193,11 @@ + err = offset; + trace_v9fs_attach_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path); ++ s->root_fid = fid; ++ /* disable migration */ ++ error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION, ++ s->ctx.fs_root, s->tag); ++ migrate_add_blocker(s->migration_blocker); + out: + put_fid(pdu, fidp); + out_nofid: +@@ -1731,8 +1694,8 @@ + complete_pdu(s, pdu, err); + } + <<Diff was trimmed, longer than 597 lines>> ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/qemu-kvm/qemu-kvm.spec?r1=1.27&r2=1.28&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
