* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 2:27 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 2:27 UTC (permalink / raw
To: gentoo-commits
commit: 1bdf9ca5a7de88ec43c5b7aa997941de73f81401
Author: Richard Henderson <rth <AT> twiddle <DOT> net>
AuthorDate: Mon Nov 19 20:43:14 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 21:31:59 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=1bdf9ca5
tci: Fix type of tci_read_label
Fixes the pointer truncation that was occurring for branches.
Cc: Stefan Weil <sw <AT> weilnetz.de>
Cc: Blue Swirl <blauwirbel <AT> gmail.com>
Signed-off-by: Richard Henderson <rth <AT> twiddle.net>
Reviewed-by: Stefan Weil <sw <AT> weilnetz.de>
Tested-by: Stefan Weil <sw <AT> weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel <AT> gmail.com>
(cherry picked from commit c6c5063c7a5bb1d3fe6b9931a1ec15294e39b8b1)
Signed-off-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
(cherry picked from commit 38c6d17e75f83363ef92582dd366a4b1d936dc2f)
---
tci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tci.c b/tci.c
index a4f7b78..bb456d2 100644
--- a/tci.c
+++ b/tci.c
@@ -338,9 +338,9 @@ static uint64_t tci_read_ri64(uint8_t **tb_ptr)
}
#endif
-static target_ulong tci_read_label(uint8_t **tb_ptr)
+static tcg_target_ulong tci_read_label(uint8_t **tb_ptr)
{
- target_ulong label = tci_read_i(tb_ptr);
+ tcg_target_ulong label = tci_read_i(tb_ptr);
assert(label != 0);
return label;
}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 2:27 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 2:27 UTC (permalink / raw
To: gentoo-commits
commit: f480621e34775647c8f2cf1a9721a50a46cd4f24
Author: Stefan Weil <sw <AT> weilnetz <DOT> de>
AuthorDate: Thu Nov 22 06:25:48 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 21:31:59 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=f480621e
block: Fix regression for MinGW (assertion caused by short string)
The local string tmp_filename is passed to function get_tmp_filename
which expects a string with minimum size MAX_PATH for w32 hosts.
MAX_PATH is 260 and PATH_MAX is 259, so tmp_filename was too short.
Commit eba25057b9a5e19d10ace2bc7716667a31297169 introduced this
regression.
Signed-off-by: Stefan Weil <sw <AT> weilnetz.de>
Reviewed-by: Stefan Hajnoczi <stefanha <AT> redhat.com>
Signed-off-by: Blue Swirl <blauwirbel <AT> gmail.com>
(cherry picked from commit 89c9bc3d147fdaa932db99b0463b4af1d3e7cda1)
Signed-off-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
(cherry picked from commit 4fb9656b9d62ce348656a7184ac7861d70c490a7)
---
block.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block.c b/block.c
index 4c0e7f5..e49a999 100644
--- a/block.c
+++ b/block.c
@@ -739,7 +739,8 @@ int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv)
{
int ret;
- char tmp_filename[PATH_MAX];
+ /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
+ char tmp_filename[PATH_MAX + 1];
if (flags & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 2:27 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 2:27 UTC (permalink / raw
To: gentoo-commits
commit: b84e5c849e560248426ead7b7772a1efcb1e7615
Author: Eduardo Otubo <otubo <AT> linux <DOT> vnet <DOT> ibm <DOT> com>
AuthorDate: Thu Nov 29 15:56:41 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sun Jan 13 02:39:15 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=b84e5c84
seccomp: adding new syscalls (bugzilla 855162)
According to the bug 855162[0] - there's the need of adding new syscalls
to the whitelist when using Qemu with Libvirt.
[0] - https://bugzilla.redhat.com/show_bug.cgi?id=855162
Reported-by: Paul Moore <pmoore <AT> redhat.com>
Tested-by: Paul Moore <pmoore <AT> redhat.com>
Signed-off-by: Eduardo Otubo <otubo <AT> linux.vnet.ibm.com>
Signed-off-by: Corey Bryant <coreyb <AT> linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori <AT> us.ibm.com>
(cherry picked from commit fe512d65e0b752dfa7af6cfb374a0820d35040d0)
---
qemu-seccomp.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 139 insertions(+), 17 deletions(-)
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 64329a3..2a71d6f 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -26,8 +26,12 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(timer_gettime), 254 },
{ SCMP_SYS(futex), 253 },
{ SCMP_SYS(select), 252 },
+#if defined(__x86_64__)
{ SCMP_SYS(recvfrom), 251 },
{ SCMP_SYS(sendto), 250 },
+#elif defined(__i386__)
+ { SCMP_SYS(socketcall), 250 },
+#endif
{ SCMP_SYS(read), 249 },
{ SCMP_SYS(brk), 248 },
{ SCMP_SYS(clone), 247 },
@@ -36,15 +40,30 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(execve), 245 },
{ SCMP_SYS(open), 245 },
{ SCMP_SYS(ioctl), 245 },
+#if defined(__x86_64__)
+ { SCMP_SYS(socket), 245 },
+ { SCMP_SYS(setsockopt), 245 },
{ SCMP_SYS(recvmsg), 245 },
{ SCMP_SYS(sendmsg), 245 },
{ SCMP_SYS(accept), 245 },
{ SCMP_SYS(connect), 245 },
+ { SCMP_SYS(socketpair), 245 },
+ { SCMP_SYS(bind), 245 },
+ { SCMP_SYS(listen), 245 },
+ { SCMP_SYS(semget), 245 },
+#elif defined(__i386__)
+ { SCMP_SYS(ipc), 245 },
+#endif
{ SCMP_SYS(gettimeofday), 245 },
{ SCMP_SYS(readlink), 245 },
{ SCMP_SYS(access), 245 },
{ SCMP_SYS(prctl), 245 },
{ SCMP_SYS(signalfd), 245 },
+ { SCMP_SYS(getrlimit), 245 },
+ { SCMP_SYS(set_tid_address), 245 },
+ { SCMP_SYS(statfs), 245 },
+ { SCMP_SYS(unlink), 245 },
+ { SCMP_SYS(wait4), 245 },
#if defined(__i386__)
{ SCMP_SYS(fcntl64), 245 },
{ SCMP_SYS(fstat64), 245 },
@@ -56,30 +75,33 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(sigreturn), 245 },
{ SCMP_SYS(_newselect), 245 },
{ SCMP_SYS(_llseek), 245 },
- { SCMP_SYS(mmap2), 245},
+ { SCMP_SYS(mmap2), 245 },
{ SCMP_SYS(sigprocmask), 245 },
-#elif defined(__x86_64__)
- { SCMP_SYS(sched_getparam), 245},
- { SCMP_SYS(sched_getscheduler), 245},
- { SCMP_SYS(fstat), 245},
- { SCMP_SYS(clock_getres), 245},
- { SCMP_SYS(sched_get_priority_min), 245},
- { SCMP_SYS(sched_get_priority_max), 245},
- { SCMP_SYS(stat), 245},
- { SCMP_SYS(socket), 245},
- { SCMP_SYS(setsockopt), 245},
- { SCMP_SYS(uname), 245},
- { SCMP_SYS(semget), 245},
#endif
+ { SCMP_SYS(sched_getparam), 245 },
+ { SCMP_SYS(sched_getscheduler), 245 },
+ { SCMP_SYS(fstat), 245 },
+ { SCMP_SYS(clock_getres), 245 },
+ { SCMP_SYS(sched_get_priority_min), 245 },
+ { SCMP_SYS(sched_get_priority_max), 245 },
+ { SCMP_SYS(stat), 245 },
+ { SCMP_SYS(uname), 245 },
{ SCMP_SYS(eventfd2), 245 },
{ SCMP_SYS(dup), 245 },
+ { SCMP_SYS(dup2), 245 },
+ { SCMP_SYS(dup3), 245 },
{ SCMP_SYS(gettid), 245 },
+ { SCMP_SYS(getgid), 245 },
+ { SCMP_SYS(getegid), 245 },
+ { SCMP_SYS(getuid), 245 },
+ { SCMP_SYS(geteuid), 245 },
{ SCMP_SYS(timer_create), 245 },
{ SCMP_SYS(exit), 245 },
{ SCMP_SYS(clock_gettime), 245 },
{ SCMP_SYS(time), 245 },
{ SCMP_SYS(restart_syscall), 245 },
{ SCMP_SYS(pwrite64), 245 },
+ { SCMP_SYS(nanosleep), 245 },
{ SCMP_SYS(chown), 245 },
{ SCMP_SYS(openat), 245 },
{ SCMP_SYS(getdents), 245 },
@@ -93,8 +115,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(lseek), 245 },
{ SCMP_SYS(pselect6), 245 },
{ SCMP_SYS(fork), 245 },
- { SCMP_SYS(bind), 245 },
- { SCMP_SYS(listen), 245 },
{ SCMP_SYS(eventfd), 245 },
{ SCMP_SYS(rt_sigprocmask), 245 },
{ SCMP_SYS(write), 244 },
@@ -104,10 +124,112 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(pipe2), 242 },
{ SCMP_SYS(munmap), 242 },
{ SCMP_SYS(mremap), 242 },
+ { SCMP_SYS(fdatasync), 242 },
+ { SCMP_SYS(close), 242 },
+ { SCMP_SYS(rt_sigpending), 242 },
+ { SCMP_SYS(rt_sigtimedwait), 242 },
+ { SCMP_SYS(readv), 242 },
+ { SCMP_SYS(writev), 242 },
+ { SCMP_SYS(preadv), 242 },
+ { SCMP_SYS(pwritev), 242 },
+ { SCMP_SYS(setrlimit), 242 },
+ { SCMP_SYS(ftruncate), 242 },
+ { SCMP_SYS(lstat), 242 },
+ { SCMP_SYS(pipe), 242 },
+ { SCMP_SYS(umask), 242 },
+ { SCMP_SYS(chdir), 242 },
+ { SCMP_SYS(setitimer), 242 },
+ { SCMP_SYS(setsid), 242 },
+ { SCMP_SYS(poll), 242 },
+ { SCMP_SYS(epoll_create), 242 },
+ { SCMP_SYS(epoll_ctl), 242 },
+ { SCMP_SYS(epoll_wait), 242 },
+#if defined(__i386__)
+ { SCMP_SYS(waitpid), 242 },
+#elif defined(__x86_64__)
{ SCMP_SYS(getsockname), 242 },
{ SCMP_SYS(getpeername), 242 },
- { SCMP_SYS(fdatasync), 242 },
- { SCMP_SYS(close), 242 }
+ { SCMP_SYS(accept4), 242 },
+ { SCMP_SYS(newfstatat), 241 },
+ { SCMP_SYS(shutdown), 241 },
+ { SCMP_SYS(getsockopt), 241 },
+ { SCMP_SYS(semctl), 241 },
+ { SCMP_SYS(semop), 241 },
+ { SCMP_SYS(semtimedop), 241 },
+ { SCMP_SYS(epoll_ctl_old), 241 },
+ { SCMP_SYS(epoll_wait_old), 241 },
+#endif
+ { SCMP_SYS(epoll_pwait), 241 },
+ { SCMP_SYS(epoll_create1), 241 },
+ { SCMP_SYS(ppoll), 241 },
+ { SCMP_SYS(creat), 241 },
+ { SCMP_SYS(link), 241 },
+ { SCMP_SYS(getpid), 241 },
+ { SCMP_SYS(getppid), 241 },
+ { SCMP_SYS(getpgrp), 241 },
+ { SCMP_SYS(getpgid), 241 },
+ { SCMP_SYS(getsid), 241 },
+ { SCMP_SYS(getdents64), 241 },
+ { SCMP_SYS(getresuid), 241 },
+ { SCMP_SYS(getresgid), 241 },
+ { SCMP_SYS(getgroups), 241 },
+#if defined(__i386__)
+ { SCMP_SYS(getresuid32), 241 },
+ { SCMP_SYS(getresgid32), 241 },
+ { SCMP_SYS(getgroups32), 241 },
+ { SCMP_SYS(signal), 241 },
+ { SCMP_SYS(sigaction), 241 },
+ { SCMP_SYS(sigsuspend), 241 },
+ { SCMP_SYS(sigpending), 241 },
+ { SCMP_SYS(truncate64), 241 },
+ { SCMP_SYS(ftruncate64), 241 },
+ { SCMP_SYS(fchown32), 241 },
+ { SCMP_SYS(chown32), 241 },
+ { SCMP_SYS(lchown32), 241 },
+ { SCMP_SYS(statfs64), 241 },
+ { SCMP_SYS(fstatfs64), 241 },
+ { SCMP_SYS(fstatat64), 241 },
+ { SCMP_SYS(lstat64), 241 },
+ { SCMP_SYS(sendfile64), 241 },
+ { SCMP_SYS(ugetrlimit), 241 },
+#endif
+ { SCMP_SYS(alarm), 241 },
+ { SCMP_SYS(rt_sigsuspend), 241 },
+ { SCMP_SYS(rt_sigqueueinfo), 241 },
+ { SCMP_SYS(rt_tgsigqueueinfo), 241 },
+ { SCMP_SYS(sigaltstack), 241 },
+ { SCMP_SYS(signalfd4), 241 },
+ { SCMP_SYS(truncate), 241 },
+ { SCMP_SYS(fchown), 241 },
+ { SCMP_SYS(lchown), 241 },
+ { SCMP_SYS(fchownat), 241 },
+ { SCMP_SYS(fstatfs), 241 },
+ { SCMP_SYS(sendfile), 241 },
+ { SCMP_SYS(getitimer), 241 },
+ { SCMP_SYS(syncfs), 241 },
+ { SCMP_SYS(fsync), 241 },
+ { SCMP_SYS(fchdir), 241 },
+ { SCMP_SYS(flock), 241 },
+ { SCMP_SYS(msync), 241 },
+ { SCMP_SYS(sched_setparam), 241 },
+ { SCMP_SYS(sched_setscheduler), 241 },
+ { SCMP_SYS(sched_yield), 241 },
+ { SCMP_SYS(sched_rr_get_interval), 241 },
+ { SCMP_SYS(sched_setaffinity), 241 },
+ { SCMP_SYS(sched_getaffinity), 241 },
+ { SCMP_SYS(readahead), 241 },
+ { SCMP_SYS(timer_getoverrun), 241 },
+ { SCMP_SYS(unlinkat), 241 },
+ { SCMP_SYS(readlinkat), 241 },
+ { SCMP_SYS(faccessat), 241 },
+ { SCMP_SYS(get_robust_list), 241 },
+ { SCMP_SYS(splice), 241 },
+ { SCMP_SYS(vmsplice), 241 },
+ { SCMP_SYS(getcpu), 241 },
+ { SCMP_SYS(sendmmsg), 241 },
+ { SCMP_SYS(recvmmsg), 241 },
+ { SCMP_SYS(prlimit64), 241 },
+ { SCMP_SYS(waitid), 241 }
};
int seccomp_start(void)
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 2:27 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 2:27 UTC (permalink / raw
To: gentoo-commits
commit: b44cb429c7aef7dbb1b63fc9949fd2728d7d1512
Author: Michael Roth <mdroth <AT> linux <DOT> vnet <DOT> ibm <DOT> com>
AuthorDate: Tue Dec 11 21:09:44 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Thu Dec 13 21:32:00 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=b44cb429
update VERSION for v1.2.2
Signed-off-by: Michael Roth <mdroth <AT> linux.vnet.ibm.com>
(cherry picked from commit ff0245dea25937a93878069b15eee245344eb6b9)
---
VERSION | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/VERSION b/VERSION
index 6085e94..23aa839 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.1
+1.2.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 2:27 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 2:27 UTC (permalink / raw
To: gentoo-commits
commit: b6773f5e8e8d9a9cf79f5fb34b78ae76589d6e2e
Author: Doug Goldstein <cardoe <AT> cardoe <DOT> com>
AuthorDate: Mon Oct 29 05:55:53 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sun Jan 13 02:39:15 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=b6773f5e
migrate: error message for ram_load size
Report an error when ramblock's sizes mismatch with a suggestion to the
user as to what went wrong. If a user has a managedsave state by
libvirt, which is the default now, and upgrades their distro, which in
turn upgrades QEMU, they will be surprised by the fact that their VMs fail
to start. The reason for this is that the default ROM sizes changed
recently which makes it not possible to migrate from that saved state.
However the error message really does not provide details as to what
went wrong. This patch attempts to provide more details
see:
http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg03746.html
http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg04108.html
Signed-off-by: Doug Goldstein <cardoe <AT> cardoe.com>
(cherry picked from commit 4a9f00c12caa9e28992d76c18aeec468295bb157)
---
arch_init.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index f849f9b..d38cd53 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -732,6 +732,11 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (!strncmp(id, block->idstr, sizeof(id))) {
if (block->length != length) {
+ fprintf(stderr, "qemu: warning: error ramblock "
+ "'%s' length %ld != %ld. Did you "
+ "change the ROM/BIOS or RAM size "
+ "between restarts?\n", id,
+ block->length, length);
ret = -EINVAL;
goto done;
}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 2:27 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 2:27 UTC (permalink / raw
To: gentoo-commits
commit: 4024fd17b2db5450c7e464135ea9ee517dcee526
Author: Luiz Capitulino <lcapitulino <AT> redhat <DOT> com>
AuthorDate: Fri Oct 5 19:47:57 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sun Jan 13 02:39:15 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=4024fd17
Call MADV_HUGEPAGE for guest RAM allocations
This makes it possible for QEMU to use transparent huge pages (THP)
when transparent_hugepage/enabled=madvise. Otherwise THP is only
used when it's enabled system wide.
Signed-off-by: Luiz Capitulino <lcapitulino <AT> redhat.com>
Signed-off-by: Anthony Liguori <aliguori <AT> us.ibm.com>
(cherry picked from commit ad0b5321f1f797274603ebbe20108b0750baee94)
---
exec.c | 1 +
osdep.h | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/exec.c b/exec.c
index 3fdbbde..0ebdb4b 100644
--- a/exec.c
+++ b/exec.c
@@ -2571,6 +2571,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
cpu_physical_memory_set_dirty_range(new_block->offset, size, 0xff);
qemu_ram_setup_dump(new_block->host, size);
+ qemu_madvise(new_block->host, size, QEMU_MADV_HUGEPAGE);
if (kvm_enabled())
kvm_setup_guest_memory(new_block->host, size);
diff --git a/osdep.h b/osdep.h
index cb213e0..c5fd3d9 100644
--- a/osdep.h
+++ b/osdep.h
@@ -108,6 +108,11 @@ void qemu_vfree(void *ptr);
#else
#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
#endif
+#ifdef MADV_HUGEPAGE
+#define QEMU_MADV_HUGEPAGE MADV_HUGEPAGE
+#else
+#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
+#endif
#elif defined(CONFIG_POSIX_MADVISE)
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 3:48 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 3:48 UTC (permalink / raw
To: gentoo-commits
commit: 79d7f8f70d79b94e175d8d2cb36dc1f2f222563c
Author: Paolo Bonzini <pbonzini <AT> redhat <DOT> com>
AuthorDate: Tue Nov 20 11:48:19 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 03:02:08 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=79d7f8f7
buffered_file: do not send more than s->bytes_xfer bytes per tick
Sending more was possible if the buffer was large.
Cc: qemu-stable <AT> nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini <AT> redhat.com>
Signed-off-by: Juan Quintela <quintela <AT> redhat.com>
(cherry picked from commit bde54c08b4854aceee3dee25121a2b835cb81166)
Conflicts:
buffered_file.c
---
buffered_file.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/buffered_file.c b/buffered_file.c
index f170aa0..1e9b050 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -85,6 +85,7 @@ static void buffered_flush(QEMUFileBuffered *s)
while (offset < s->buffer_size) {
ssize_t ret;
+ size_t to_send = MIN(s->buffer_size - offset, s->xfer_limit - offset);
ret = s->put_buffer(s->opaque, s->buffer + offset,
s->buffer_size - offset);
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 3:48 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 3:48 UTC (permalink / raw
To: gentoo-commits
commit: 18fad4723e8c220c2825b9975e6c7913085336a2
Author: Luiz Capitulino <lcapitulino <AT> redhat <DOT> com>
AuthorDate: Fri Oct 5 19:47:57 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 03:02:09 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=18fad472
Call MADV_HUGEPAGE for guest RAM allocations
This makes it possible for QEMU to use transparent huge pages (THP)
when transparent_hugepage/enabled=madvise. Otherwise THP is only
used when it's enabled system wide.
Signed-off-by: Luiz Capitulino <lcapitulino <AT> redhat.com>
Signed-off-by: Anthony Liguori <aliguori <AT> us.ibm.com>
(cherry picked from commit ad0b5321f1f797274603ebbe20108b0750baee94)
---
exec.c | 1 +
osdep.h | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/exec.c b/exec.c
index 3fdbbde..0ebdb4b 100644
--- a/exec.c
+++ b/exec.c
@@ -2571,6 +2571,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
cpu_physical_memory_set_dirty_range(new_block->offset, size, 0xff);
qemu_ram_setup_dump(new_block->host, size);
+ qemu_madvise(new_block->host, size, QEMU_MADV_HUGEPAGE);
if (kvm_enabled())
kvm_setup_guest_memory(new_block->host, size);
diff --git a/osdep.h b/osdep.h
index cb213e0..c5fd3d9 100644
--- a/osdep.h
+++ b/osdep.h
@@ -108,6 +108,11 @@ void qemu_vfree(void *ptr);
#else
#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
#endif
+#ifdef MADV_HUGEPAGE
+#define QEMU_MADV_HUGEPAGE MADV_HUGEPAGE
+#else
+#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
+#endif
#elif defined(CONFIG_POSIX_MADVISE)
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 3:48 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 3:48 UTC (permalink / raw
To: gentoo-commits
commit: 9489a8c013cb96f6dc8b4fd3f8fe63d0afe9f8dd
Author: Doug Goldstein <cardoe <AT> cardoe <DOT> com>
AuthorDate: Mon Oct 29 05:55:53 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 03:02:09 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=9489a8c0
migrate: error message for ram_load size
Report an error when ramblock's sizes mismatch with a suggestion to the
user as to what went wrong. If a user has a managedsave state by
libvirt, which is the default now, and upgrades their distro, which in
turn upgrades QEMU, they will be surprised by the fact that their VMs fail
to start. The reason for this is that the default ROM sizes changed
recently which makes it not possible to migrate from that saved state.
However the error message really does not provide details as to what
went wrong. This patch attempts to provide more details
see:
http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg03746.html
http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg04108.html
Signed-off-by: Doug Goldstein <cardoe <AT> cardoe.com>
(cherry picked from commit 4a9f00c12caa9e28992d76c18aeec468295bb157)
---
arch_init.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 5c91294..9befdb7 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -732,6 +732,11 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (!strncmp(id, block->idstr, sizeof(id))) {
if (block->length != length) {
+ fprintf(stderr, "qemu: warning: error ramblock "
+ "'%s' length %ld != %ld. Did you "
+ "change the ROM/BIOS or RAM size "
+ "between restarts?\n", id,
+ block->length, length);
ret = -EINVAL;
goto done;
}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: /
@ 2013-01-19 3:48 Doug Goldstein
0 siblings, 0 replies; 10+ messages in thread
From: Doug Goldstein @ 2013-01-19 3:48 UTC (permalink / raw
To: gentoo-commits
commit: 8a4cb5fcb0f746bb8d7b8ac7c50327a5c70abb98
Author: David Gibson <david <AT> gibson <DOT> dropbear <DOT> id <DOT> au>
AuthorDate: Tue Dec 4 00:38:39 2012 +0000
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 03:02:09 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=8a4cb5fc
migration: Fix madvise breakage if host and guest have different page sizes
madvise(DONTNEED) will throw away the contents of the whole page at the
given address, even if the given length is less than the page size. One
can argue about whether that's the correct behaviour, but that's what it's
done for a long time in Linux at least.
That means that the madvise() in ram_load(), on a setup where
TARGET_PAGE_SIZE is smaller than the host page size, can throw away data
in guest pages adjacent to the one it's actually processing right now,
leading to guest memory corruption on an incoming migration.
This patch therefore, disables the madvise() if the host page size is
larger than TARGET_PAGE_SIZE. This means we don't get the benefits of that
madvise() in this case, but a more complete fix is more difficult to
accomplish. This at least fixes the guest memory corruption.
Signed-off-by: David Gibson <david <AT> gibson.dropbear.id.au>
Reported-by: Alexey Kardashevskiy <aik <AT> ozlabs.ru>
Signed-off-by: Anthony Liguori <aliguori <AT> us.ibm.com>
(cherry picked from commit 45e6cee42b98d10e2e14885ab656541a9ffd5187)
---
arch_init.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index f849f9b..5c91294 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -764,7 +764,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
memset(host, ch, TARGET_PAGE_SIZE);
#ifndef _WIN32
if (ch == 0 &&
- (!kvm_enabled() || kvm_has_sync_mmu())) {
+ (!kvm_enabled() || kvm_has_sync_mmu()) &&
+ getpagesize() <= TARGET_PAGE_SIZE) {
qemu_madvise(host, TARGET_PAGE_SIZE, QEMU_MADV_DONTNEED);
}
#endif
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-01-19 3:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-19 3:48 [gentoo-commits] proj/qemu-kvm:qemu-kvm-1.2.0-gentoo commit in: / Doug Goldstein
-- strict thread matches above, loose matches on Subject: below --
2013-01-19 3:48 Doug Goldstein
2013-01-19 3:48 Doug Goldstein
2013-01-19 3:48 Doug Goldstein
2013-01-19 2:27 Doug Goldstein
2013-01-19 2:27 Doug Goldstein
2013-01-19 2:27 Doug Goldstein
2013-01-19 2:27 Doug Goldstein
2013-01-19 2:27 Doug Goldstein
2013-01-19 2:27 Doug Goldstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox