RELEASE=3.2
# also update debian/changelog
-KVMVER=2.0
-KVMPKGREL=2
+KVMVER=2.1
+KVMPKGREL=1
KVMPACKAGE=pve-qemu-kvm
KVMDIR=qemu-kvm
download:
rm -rf ${KVMDIR} ${KVMSRC}
git clone git://git.qemu-project.org/qemu.git -b master ${KVMDIR}
- #cd ${KVMDIR}; git checkout v2.0.0
+ cd ${KVMDIR}; git checkout v2.1.0-rc2
tar czf ${KVMSRC} --exclude CVS --exclude .git --exclude .svn ${KVMDIR}
${KVM_DEB} kvm: ${KVMSRC}
+pve-qemu-kvm (2.1-1) unstable; urgency=low
+
+ * update to v2.1.0-rc2
+
+ -- Proxmox Support Team <support@proxmox.com> Wed, 16 Jul 2014 11:55:13 +0200
+
pve-qemu-kvm (2.0-2) unstable; urgency=low
* update to latest qemu (commit 2a2c4830c0068d70443f3dddc4cc668f0c601b5c)
Index: new/blockdev.c
===================================================================
---- new.orig/blockdev.c 2014-06-17 06:15:06.000000000 +0200
-+++ new/blockdev.c 2014-06-17 06:15:07.000000000 +0200
+--- new.orig/blockdev.c 2014-07-16 11:10:45.000000000 +0200
++++ new/blockdev.c 2014-07-16 11:25:41.000000000 +0200
@@ -44,6 +44,7 @@
#include "qmp-commands.h"
#include "trace.h"
static QTAILQ_HEAD(drivelist, DriveInfo) drives = QTAILQ_HEAD_INITIALIZER(drives);
-@@ -1556,7 +1557,6 @@
+@@ -1546,7 +1547,6 @@
}
}
static void eject_device(BlockDriverState *bs, int force, Error **errp)
{
if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_EJECT, errp)) {
-@@ -1878,6 +1878,436 @@
+@@ -1871,6 +1871,437 @@
bdrv_put_ref_bh_schedule(bs);
}
+ qemu_coroutine_enter(co, NULL);
+
+ while (backup_state.vmaw) {
-+ qemu_aio_wait();
++ /* vma writer use main aio context */
++ aio_poll(qemu_get_aio_context(), true);
+ }
+}
+
+ return info;
+}
+
- void qmp_block_stream(const char *device, bool has_base,
- const char *base, bool has_speed, int64_t speed,
- bool has_on_error, BlockdevOnError on_error,
+ void qmp_block_stream(const char *device,
+ bool has_base, const char *base,
+ bool has_backing_file, const char *backing_file,
Index: new/hmp-commands.hx
===================================================================
---- new.orig/hmp-commands.hx 2014-06-17 06:14:27.000000000 +0200
-+++ new/hmp-commands.hx 2014-06-17 06:15:07.000000000 +0200
+--- new.orig/hmp-commands.hx 2014-07-16 10:22:25.000000000 +0200
++++ new/hmp-commands.hx 2014-07-16 11:17:01.000000000 +0200
@@ -88,6 +88,35 @@
Copy data from a backing file into a block device.
ETEXI
@item info migrate_capabilities
Index: new/hmp.c
===================================================================
---- new.orig/hmp.c 2014-06-17 06:14:58.000000000 +0200
-+++ new/hmp.c 2014-06-17 06:15:07.000000000 +0200
-@@ -135,6 +135,44 @@
+--- new.orig/hmp.c 2014-07-16 10:22:25.000000000 +0200
++++ new/hmp.c 2014-07-16 11:17:01.000000000 +0200
+@@ -137,6 +137,44 @@
qapi_free_MouseInfoList(mice_list);
}
void hmp_info_migrate(Monitor *mon, const QDict *qdict)
{
MigrationInfo *info;
-@@ -1206,6 +1244,29 @@
+@@ -1210,6 +1248,29 @@
hmp_handle_error(mon, &error);
}
{
Index: new/hmp.h
===================================================================
---- new.orig/hmp.h 2014-06-17 06:14:27.000000000 +0200
-+++ new/hmp.h 2014-06-17 06:15:07.000000000 +0200
+--- new.orig/hmp.h 2014-07-16 10:22:25.000000000 +0200
++++ new/hmp.h 2014-07-16 11:17:01.000000000 +0200
@@ -29,6 +29,7 @@
void hmp_info_migrate(Monitor *mon, const QDict *qdict);
void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
void hmp_block_job_pause(Monitor *mon, const QDict *qdict);
Index: new/monitor.c
===================================================================
---- new.orig/monitor.c 2014-06-17 06:14:27.000000000 +0200
-+++ new/monitor.c 2014-06-17 06:15:07.000000000 +0200
-@@ -2897,6 +2897,13 @@
+--- new.orig/monitor.c 2014-07-16 10:22:25.000000000 +0200
++++ new/monitor.c 2014-07-16 11:17:01.000000000 +0200
+@@ -2848,6 +2848,13 @@
},
#endif
{
.params = "",
Index: new/qapi-schema.json
===================================================================
---- new.orig/qapi-schema.json 2014-06-17 06:15:00.000000000 +0200
-+++ new/qapi-schema.json 2014-06-17 06:15:07.000000000 +0200
-@@ -340,6 +340,95 @@
+--- new.orig/qapi-schema.json 2014-07-16 10:22:25.000000000 +0200
++++ new/qapi-schema.json 2014-07-16 11:17:01.000000000 +0200
+@@ -349,6 +349,95 @@
##
{ 'command': 'query-events', 'returns': ['EventInfo'] }
#
Index: new/qmp-commands.hx
===================================================================
---- new.orig/qmp-commands.hx 2014-06-17 06:14:58.000000000 +0200
-+++ new/qmp-commands.hx 2014-06-17 06:15:07.000000000 +0200
-@@ -1080,6 +1080,24 @@
+--- new.orig/qmp-commands.hx 2014-07-16 10:22:25.000000000 +0200
++++ new/qmp-commands.hx 2014-07-16 11:17:01.000000000 +0200
+@@ -1098,6 +1098,24 @@
EQMP
{
Index: new/Makefile
===================================================================
---- new.orig/Makefile 2014-06-17 06:14:27.000000000 +0200
-+++ new/Makefile 2014-06-17 06:15:02.000000000 +0200
+--- new.orig/Makefile 2014-07-16 10:40:17.000000000 +0200
++++ new/Makefile 2014-07-16 10:51:34.000000000 +0200
@@ -146,7 +146,7 @@
include $(SRC_PATH)/libcacard/Makefile
endif
Index: new/vma-reader.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/vma-reader.c 2014-06-17 06:15:02.000000000 +0200
++++ new/vma-reader.c 2014-07-16 10:51:34.000000000 +0200
@@ -0,0 +1,799 @@
+/*
+ * VMA: Virtual Machine Archive
Index: new/vma-writer.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/vma-writer.c 2014-06-17 06:15:02.000000000 +0200
-@@ -0,0 +1,875 @@
++++ new/vma-writer.c 2014-07-16 11:03:00.000000000 +0200
+@@ -0,0 +1,876 @@
+/*
+ * VMA: Virtual Machine Archive
+ *
+#include "vma.h"
+#include "block/block.h"
+#include "monitor/monitor.h"
++#include "qemu/main-loop.h"
+
+#define DEBUG_VMA 0
+
+
+ vmaw->co_writer = qemu_coroutine_self();
+
-+ qemu_aio_set_fd_handler(vmaw->fd, NULL, vma_co_continue_write, vmaw);
++ aio_set_fd_handler(qemu_get_aio_context(), vmaw->fd, NULL, vma_co_continue_write, vmaw);
+
+ DPRINTF("vma_co_write wait until writable\n");
+ qemu_coroutine_yield();
+ }
+ }
+
-+ qemu_aio_set_fd_handler(vmaw->fd, NULL, NULL, NULL);
++ aio_set_fd_handler(qemu_get_aio_context(), vmaw->fd, NULL, NULL, NULL);
+
+ vmaw->co_writer = NULL;
+
Index: new/vma.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/vma.c 2014-06-17 06:15:02.000000000 +0200
++++ new/vma.c 2014-07-16 10:51:34.000000000 +0200
@@ -0,0 +1,583 @@
+/*
+ * VMA: Virtual Machine Archive
Index: new/vma.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/vma.h 2014-06-17 06:15:02.000000000 +0200
++++ new/vma.h 2014-07-16 10:51:34.000000000 +0200
@@ -0,0 +1,146 @@
+/*
+ * VMA: Virtual Machine Archive
+#endif /* BACKUP_VMA_H */
Index: new/Makefile.objs
===================================================================
---- new.orig/Makefile.objs 2014-06-17 06:14:27.000000000 +0200
-+++ new/Makefile.objs 2014-06-17 06:15:02.000000000 +0200
+--- new.orig/Makefile.objs 2014-07-16 10:40:17.000000000 +0200
++++ new/Makefile.objs 2014-07-16 10:51:34.000000000 +0200
@@ -14,6 +14,7 @@
block-obj-y += block/
- block-obj-y += qapi-types.o qapi-visit.o
+ block-obj-y += qapi-types.o qapi-visit.o qapi-event.o
block-obj-y += qemu-io-cmds.o
+block-obj-y += vma-writer.o
Index: new/block/backup.c
===================================================================
---- new.orig/block/backup.c 2014-06-17 06:14:27.000000000 +0200
-+++ new/block/backup.c 2014-06-17 06:15:06.000000000 +0200
+--- new.orig/block/backup.c 2014-07-16 11:09:01.000000000 +0200
++++ new/block/backup.c 2014-07-16 11:16:47.000000000 +0200
@@ -39,6 +39,7 @@
BlockDriverState *target;
MirrorSyncMode sync_mode;
return block_job_error_action(&job->common, job->target,
job->on_target_error, false, error);
+ } else {
-+ return BDRV_ACTION_REPORT;
++ return BLOCK_ERROR_ACTION_REPORT;
}
}
qemu_coroutine_enter(job->common.co, job);
Index: new/blockdev.c
===================================================================
---- new.orig/blockdev.c 2014-06-17 06:14:27.000000000 +0200
-+++ new/blockdev.c 2014-06-17 06:15:06.000000000 +0200
-@@ -2089,7 +2089,7 @@
+--- new.orig/blockdev.c 2014-07-16 11:09:01.000000000 +0200
++++ new/blockdev.c 2014-07-16 11:10:45.000000000 +0200
+@@ -2115,7 +2115,7 @@
}
backup_start(bs, target_bs, speed, sync, on_source_error, on_target_error,
error_propagate(errp, local_err);
Index: new/include/block/block_int.h
===================================================================
---- new.orig/include/block/block_int.h 2014-06-17 06:14:27.000000000 +0200
-+++ new/include/block/block_int.h 2014-06-17 06:15:06.000000000 +0200
-@@ -55,6 +55,9 @@
- #define BLOCK_OPT_ADAPTER_TYPE "adapter_type"
+--- new.orig/include/block/block_int.h 2014-07-16 11:09:01.000000000 +0200
++++ new/include/block/block_int.h 2014-07-16 11:10:45.000000000 +0200
+@@ -56,6 +56,9 @@
#define BLOCK_OPT_REDUNDANCY "redundancy"
+ #define BLOCK_OPT_NOCOW "nocow"
+typedef int BackupDumpFunc(void *opaque, BlockDriverState *bs,
+ int64_t sector_num, int n_sectors, unsigned char *buf);
typedef struct BdrvTrackedRequest {
BlockDriverState *bs;
int64_t offset;
-@@ -532,7 +535,9 @@
+@@ -539,7 +542,9 @@
int64_t speed, MirrorSyncMode sync_mode,
BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
Index: new/vma-writer.c
===================================================================
---- new.orig/vma-writer.c 2014-06-17 06:15:09.000000000 +0200
-+++ new/vma-writer.c 2014-06-17 06:15:10.000000000 +0200
-@@ -33,14 +33,8 @@
+--- new.orig/vma-writer.c 2014-07-16 11:35:17.000000000 +0200
++++ new/vma-writer.c 2014-07-16 11:49:27.000000000 +0200
+@@ -34,14 +34,8 @@
do { if (DEBUG_VMA) { printf("vma: " fmt, ## __VA_ARGS__); } } while (0)
#define WRITE_BUFFERS 5
struct VmaWriter {
int fd;
-@@ -52,16 +46,14 @@
+@@ -53,16 +47,14 @@
bool closed;
/* we always write extents */
CoMutex flush_lock;
Coroutine *co_writer;
-@@ -222,38 +214,39 @@
+@@ -223,38 +215,39 @@
}
static ssize_t coroutine_fn
vmaw->co_writer = qemu_coroutine_self();
-- qemu_aio_set_fd_handler(vmaw->fd, NULL, vma_co_continue_write, vmaw);
+- aio_set_fd_handler(qemu_get_aio_context(), vmaw->fd, NULL, vma_co_continue_write, vmaw);
-
- DPRINTF("vma_co_write wait until writable\n");
- qemu_coroutine_yield();
- DPRINTF("vma_co_write starting %zd\n", bytes);
-
while (done < bytes) {
-+ qemu_aio_set_fd_handler(vmaw->fd, NULL, vma_co_continue_write, vmaw);
++ aio_set_fd_handler(qemu_get_aio_context(), vmaw->fd, NULL, vma_co_continue_write, vmaw);
+ qemu_coroutine_yield();
-+ qemu_aio_set_fd_handler(vmaw->fd, NULL, NULL, NULL);
++ aio_set_fd_handler(qemu_get_aio_context(), vmaw->fd, NULL, NULL, NULL);
+ if (vmaw->status < 0) {
+ DPRINTF("vma_queue_write detected canceled backup\n");
+ done = -1;
g_strerror(errno));
done = -1; /* always return failure for partial writes */
break;
-@@ -263,102 +256,9 @@
+@@ -264,102 +257,9 @@
}
}
-- qemu_aio_set_fd_handler(vmaw->fd, NULL, NULL, NULL);
+- aio_set_fd_handler(qemu_get_aio_context(), vmaw->fd, NULL, NULL, NULL);
-
vmaw->co_writer = NULL;
-
}
VmaWriter *vma_writer_create(const char *filename, uuid_t uuid, Error **errp)
-@@ -425,20 +325,16 @@
+@@ -426,20 +326,16 @@
}
/* we use O_DIRECT, so we need to align IO buffers */
uuid_copy(vmaw->uuid, uuid);
-@@ -465,8 +361,7 @@
+@@ -466,8 +362,7 @@
static int coroutine_fn vma_write_header(VmaWriter *vmaw)
{
assert(vmaw);
VmaHeader *head = (VmaHeader *)buf;
int i;
-@@ -477,7 +372,7 @@
+@@ -478,7 +373,7 @@
return vmaw->status;
}
head->magic = VMA_MAGIC;
head->version = GUINT32_TO_BE(1); /* v1 */
-@@ -512,7 +407,7 @@
+@@ -513,7 +408,7 @@
uint32_t header_size = sizeof(VmaHeader) + vmaw->header_blob_table_size;
head->header_size = GUINT32_TO_BE(header_size);
return -1; /* just to be sure */
}
-@@ -810,13 +705,7 @@
+@@ -811,13 +706,7 @@
int i;
if (vmaw->cmd) {
if (pclose(vmaw->cmd) < 0) {
-@@ -874,9 +763,5 @@
+@@ -875,9 +764,5 @@
g_checksum_free(vmaw->md5csum);
}
}
Index: new/blockdev.c
===================================================================
---- new.orig/blockdev.c 2014-06-17 06:15:09.000000000 +0200
-+++ new/blockdev.c 2014-06-17 06:15:10.000000000 +0200
-@@ -2017,6 +2017,11 @@
+--- new.orig/blockdev.c 2014-07-16 11:35:17.000000000 +0200
++++ new/blockdev.c 2014-07-16 11:45:01.000000000 +0200
+@@ -2010,6 +2010,11 @@
error_setg(&backup_state.error, "backup cancelled");
}
/* drain all i/o (awake jobs waiting for aio) */
bdrv_drain_all();
-@@ -2029,6 +2034,7 @@
+@@ -2022,6 +2027,7 @@
if (job) {
if (!di->completed) {
block_job_cancel_sync(job);
Index: new/qemu-options.hx
===================================================================
---- new.orig/qemu-options.hx 2014-06-17 06:14:28.000000000 +0200
-+++ new/qemu-options.hx 2014-06-17 06:14:52.000000000 +0200
-@@ -366,6 +366,12 @@
+--- new.orig/qemu-options.hx 2014-07-16 09:54:13.000000000 +0200
++++ new/qemu-options.hx 2014-07-16 09:55:58.000000000 +0200
+@@ -379,6 +379,12 @@
@table @option
ETEXI
DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
Index: new/vl.c
===================================================================
---- new.orig/vl.c 2014-06-17 06:14:28.000000000 +0200
-+++ new/vl.c 2014-06-17 06:14:52.000000000 +0200
-@@ -102,6 +102,8 @@
+--- new.orig/vl.c 2014-07-16 09:54:13.000000000 +0200
++++ new/vl.c 2014-07-16 10:01:14.000000000 +0200
+@@ -101,6 +101,8 @@
#endif
#include "sysemu/qtest.h"
#include "disas/disas.h"
-@@ -152,6 +154,7 @@
+@@ -153,6 +155,7 @@
CharDriverState *sclp_hds[MAX_SCLP_CONSOLES];
int win2k_install_hack = 0;
int singlestep = 0;
int smp_cpus = 1;
int max_cpus = 0;
int smp_cores = 1;
-@@ -2956,6 +2959,9 @@
+@@ -2897,6 +2900,9 @@
int main(int argc, char **argv, char **envp)
{
int i;
int snapshot, linux_boot;
const char *icount_option = NULL;
const char *initrd_filename;
-@@ -3731,6 +3737,21 @@
+@@ -3717,6 +3723,21 @@
exit(1);
}
break;
case QEMU_OPTION_vnc:
#ifdef CONFIG_VNC
display_remote++;
-@@ -4332,6 +4353,39 @@
- }
- }
-
+@@ -3992,6 +4013,40 @@
+ OBJECT_CLASS(machine_class))));
+ object_property_add_child(object_get_root(), "machine",
+ OBJECT(current_machine), &error_abort);
++
+ if (cpuunits && !fairsched_id) {
-+ fprintf(stderr, "cpuunits specified without -id");
-+ exit (1);
++ fprintf(stderr, "cpuunits specified without -id");
++ exit(1);
+ }
+
+ if (fairsched_id && cpuunits) {
+
cpu_exec_init_all();
- blk_mig_init();
+ if (machine_class->hw_version) {
Index: new/vzsyscalls.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/vzsyscalls.h 2014-06-17 06:14:52.000000000 +0200
++++ new/vzsyscalls.h 2014-07-16 09:55:58.000000000 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2000-2008, Parallels, Inc. All rights reserved.