Hello community,
here is the log from the commit of package qemu for openSUSE:Factory
checked in at Tue Jun 21 09:48:16 CEST 2011.
--------
--- qemu/qemu.changes 2011-02-21 11:48:22.000000000 +0100
+++ /mounts/work_src_done/STABLE/qemu/qemu.changes 2011-06-20 11:26:04.000000000 +0200
@@ -1,0 +2,31 @@
+Mon Jun 20 09:25:59 UTC 2011 - aj@suse.de
+
+- Add BuildRequires: glibc-devel-static
+
+-------------------------------------------------------------------
+Thu May 19 15:49:45 UTC 2011 - andrea@opensuse.org
+
+- removed un-required vde buildrequires
+
+-------------------------------------------------------------------
+Tue May 17 03:29:17 UTC 2011 - brogers@novell.com
+
+- build correctly for SLE11
+- reset revision to zero after version change
+
+-------------------------------------------------------------------
+Wed May 11 13:47:03 UTC 2011 - andrea@opensuse.org
+
+- added 0018-qemu-0.14.1-mcast-udp.patch to enable multicast and
+ udp tunneling support
+
+-------------------------------------------------------------------
+Tue May 10 15:09:50 UTC 2011 - andrea@opensuse.org
+
+- New Upstream version 0.14.1
+ See http://wiki.qemu.org/Changelog/0.14 for changes in 0.14
+- removed 0014-qemu-0.11-git-ioctl_mount.patch not required anymore
+- enabled vde support
+- some spec clean up
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
0014-qemu-0.11-git-ioctl_mount.patch
qemu-0.14.0-rc1.tar.bz2
New:
----
0018-qemu-0.14.1-mcast-udp.patch
qemu-0.14.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qemu.spec ++++++
--- /var/tmp/diff_new_pack.J2aWYa/_old 2011-06-21 09:39:04.000000000 +0200
+++ /var/tmp/diff_new_pack.J2aWYa/_new 2011-06-21 09:39:04.000000000 +0200
@@ -19,14 +19,13 @@
Name: qemu
-BuildRequires: SDL-devel bison bluez-devel curl-devel cyrus-sasl-devel e2fsprogs-devel libaio libaio-devel libgnutls-devel libpcap-devel ncurses-devel zlib-devel-static
Url: http://fabrice.bellard.free.fr/qemu/
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+ ; MIT License (or similar)
Group: System/Emulators/PC
Summary: Universal CPU emulator
-Version: 0.14.0_rc1
-Release: 2
-Source: %name-0.14.0-rc1.tar.bz2
+Version: 0.14.1
+Release: 1
+Source: %name-%version.tar.bz2
Patch1: 0001-qemu-0.7.0-amd64.patch
Patch2: 0002-qemu-0.9.0.cvs-binfmt.patch
Patch3: 0003-qemu-cvs-alsa_bitfield.patch
@@ -40,14 +39,34 @@
Patch11: 0011-qemu-img-vmdk-scsi.patch
Patch12: 0012-qemu-nonvoid_return.patch
Patch13: 0013-i386-linux-user-NPTL-support.patch
-Patch14: 0014-qemu-0.11-git-ioctl_mount.patch
Patch15: 0015-S-390-support.patch
Patch16: 0016-fix-mipsn32-linux-user-builds.patch
Patch17: 0017-S-390-build-fix.patch
+Patch18: 0018-qemu-0.14.1-mcast-udp.patch
# this is to make lint happy
Source300: rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 ppc sparc %arm x86_64 s390x
+BuildRequires: SDL-devel
+BuildRequires: bison
+BuildRequires: bluez-devel
+BuildRequires: curl-devel
+BuildRequires: cyrus-sasl-devel
+BuildRequires: e2fsprogs-devel
+BuildRequires: libaio
+BuildRequires: libaio-devel
+BuildRequires: libgnutls-devel
+BuildRequires: libpcap-devel
+BuildRequires: ncurses-devel
+%if 0%{?suse_version} >= 1120
+BuildRequires: zlib-devel-static
+%else
+BuildRequires: zlib-devel
+%endif
+%if 0%{?suse_version} >= 1210
+BuildRequires: glibc-devel-static
+%endif
+BuildRequires: libvdeplug3-devel
Requires: timezone virt-utils
%description
@@ -64,7 +83,7 @@
Fabrice Bellard
%prep
-%setup -q -n %name-0.14.0-rc1
+%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
@@ -78,22 +97,22 @@
%patch11 -p1
%patch12 -p1
%patch13 -p1
-%patch14 -p1
%ifarch s390x ppc64 x86_64
# s390 target only builds on 64-bit machines
%patch15 -p1
%patch17 -p1
%endif
%patch16 -p1
+%patch18 -p1
%build
# build QEMU
mkdir -p dynamic
# build qemu-system
-./configure --prefix=/usr --sysconfdir=%_sysconfdir \
- --interp-prefix=/usr/share/qemu/qemu-i386 \
+./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --interp-prefix=%_datadir/%name/qemu-i386 \
--audio-card-list="ac97 es1370 sb16 cs4231a adlib gus" \
- --audio-drv-list="alsa sdl" --enable-mixemu \
+ --audio-drv-list="alsa sdl" --enable-mixemu --enable-vde \
--extra-cflags="$QEMU_OPT_FLAGS" --enable-system --disable-linux-user \
%ifarch ppc
--disable-kvm
@@ -107,8 +126,8 @@
mv */qemu */qemu-* qemu-io dynamic || true
make clean
# build userland emus
-./configure --prefix=/usr --sysconfdir=%_sysconfdir \
- --interp-prefix=/usr/share/qemu/qemu-i386 \
+./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --interp-prefix=%_datadir/%name/qemu-i386 \
--enable-linux-user \
--disable-system \
--static --disable-linux-aio \
@@ -117,14 +136,14 @@
%install
make install DESTDIR=$RPM_BUILD_ROOT
-rm -f $RPM_BUILD_ROOT/usr/share/man/man1/qemu-img.1
-rm -f $RPM_BUILD_ROOT/usr/share/man/man8/qemu-nbd.8
-rm -fr $RPM_BUILD_ROOT/usr/share/doc
-install -m 755 */qemu $RPM_BUILD_ROOT/usr/bin
-ln -sf qemu $RPM_BUILD_ROOT/usr/bin/qemu-system-i386
-install -m 755 */qemu-*[^.]? $RPM_BUILD_ROOT/usr/bin
-install -d -m 755 $RPM_BUILD_ROOT/usr/sbin
-install -m 755 dynamic/qemu-binfmt-conf.sh $RPM_BUILD_ROOT/usr/sbin
+rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1
+rm -f $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8
+rm -fr $RPM_BUILD_ROOT/%_datadir/doc
+install -m 755 */qemu $RPM_BUILD_ROOT/%_bindir
+ln -sf qemu $RPM_BUILD_ROOT/%_bindir/qemu-system-i386
+install -m 755 */qemu-*[^.]? $RPM_BUILD_ROOT/%_bindir
+install -d -m 755 $RPM_BUILD_ROOT/%_sbindir
+install -m 755 dynamic/qemu-binfmt-conf.sh $RPM_BUILD_ROOT/%_sbindir
%ifnarch %ix86 x86_64
ln -sf ../../../emul/ia32-linux $RPM_BUILD_ROOT/usr/share/qemu/qemu-i386
%endif
@@ -138,15 +157,15 @@
%files
%defattr(-, root, root)
%doc COPYING COPYING.LIB Changelog README TODO VERSION qemu-doc.html qemu-tech.html
-/usr/bin/qemu
-/usr/bin/qemu-*
-/usr/sbin/qemu*
-%doc %{_mandir}/man[18]/qemu*.[18].gz
-/usr/share/qemu
+%_bindir/qemu
+%_bindir/qemu-*
+%_sbindir/qemu*
+%doc %_mandir/man[18]/qemu*.[18].gz
+%_datadir/%name
%ifnarch %ix86 x86_64 ia64
%dir /emul/ia32-linux
%endif
-%dir %_sysconfdir/qemu
-%config %_sysconfdir/qemu/target-x86_64.conf
+%dir %_sysconfdir/%name
+%config %_sysconfdir/%name/target-x86_64.conf
%changelog
++++++ 0018-qemu-0.14.1-mcast-udp.patch ++++++
diff -uNr old-qemu-0.14.1//block/raw-win32.c qemu-0.14.1/block/raw-win32.c
--- old-qemu-0.14.1//block/raw-win32.c 2011-05-06 21:01:43.000000000 +0200
+++ qemu-0.14.1/block/raw-win32.c 2011-05-11 15:41:45.744749392 +0200
@@ -93,7 +93,7 @@
else if (!(flags & BDRV_O_CACHE_WB))
overlapped |= FILE_FLAG_WRITE_THROUGH;
s->hfile = CreateFile(filename, access_flags,
- FILE_SHARE_READ, NULL,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, overlapped, NULL);
if (s->hfile == INVALID_HANDLE_VALUE) {
int err = GetLastError();
@@ -354,7 +354,7 @@
else if (!(flags & BDRV_O_CACHE_WB))
overlapped |= FILE_FLAG_WRITE_THROUGH;
s->hfile = CreateFile(filename, access_flags,
- FILE_SHARE_READ, NULL,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
create_flags, overlapped, NULL);
if (s->hfile == INVALID_HANDLE_VALUE) {
int err = GetLastError();
diff -uNr old-qemu-0.14.1//hw/e1000.c qemu-0.14.1/hw/e1000.c
--- old-qemu-0.14.1//hw/e1000.c 2011-05-06 21:01:43.000000000 +0200
+++ qemu-0.14.1/hw/e1000.c 2011-05-11 15:41:45.744749392 +0200
@@ -573,7 +573,7 @@
if (rctl & E1000_RCTL_UPE) // promiscuous
return 1;
- if ((buf[0] & 1) && (rctl & E1000_RCTL_MPE)) // promiscuous mcast
+ if ((buf[0] & 1)) //&& (rctl & E1000_RCTL_MPE)) // promiscuous mcast
return 1;
if ((rctl & E1000_RCTL_BAM) && !memcmp(buf, bcast, sizeof bcast))
diff -uNr old-qemu-0.14.1//Makefile.objs qemu-0.14.1/Makefile.objs
--- old-qemu-0.14.1//Makefile.objs 2011-05-06 21:01:43.000000000 +0200
+++ qemu-0.14.1/Makefile.objs 2011-05-11 15:41:45.751749392 +0200
@@ -34,6 +34,7 @@
net-nested-y = queue.o checksum.o util.o
net-nested-y += socket.o
net-nested-y += dump.o
+net-nested-y += udp.o
net-nested-$(CONFIG_POSIX) += tap.o
net-nested-$(CONFIG_LINUX) += tap-linux.o
net-nested-$(CONFIG_WIN32) += tap-win32.o
diff -uNr old-qemu-0.14.1//net/udp.c qemu-0.14.1/net/udp.c
--- old-qemu-0.14.1//net/udp.c 1970-01-01 01:00:00.000000000 +0100
+++ qemu-0.14.1/net/udp.c 2011-05-11 15:41:45.752749392 +0200
@@ -0,0 +1,138 @@
+/*
+ * QEMU System Emulator
+ *
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#include "net/udp.h"
+
+#include "config-host.h"
+
+#ifndef _WIN32
+#include
+#include
+#include
+#endif
+
+#include "net.h"
+#include "qemu-char.h"
+#include "qemu-common.h"
+#include "qemu-option.h"
+#include "qemu_socket.h"
+#include "sysemu.h"
+
+
+typedef struct UDPState {
+ VLANClientState nc;
+ int rfd;
+ struct sockaddr_in sender;
+} UDPState;
+
+static void udp_to_qemu(void *opaque)
+{
+ UDPState *s = opaque;
+ uint8_t buf[4096];
+ int size;
+
+ size = recvfrom(s->rfd, (char *)buf, sizeof(buf), 0, NULL, NULL);
+ if (size > 0) {
+ qemu_send_packet(&s->nc, buf, size);
+ }
+}
+
+static ssize_t udp_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
+{
+ UDPState *s = DO_UPCAST(UDPState, nc, nc);
+ int ret;
+
+ do {
+ ret = sendto(s->rfd, (const char *)buf, size, 0, (struct sockaddr *)&s->sender, sizeof (s->sender));
+ } while (ret < 0 && errno == EINTR);
+
+ return ret;
+}
+
+static void udp_cleanup(VLANClientState *nc)
+{
+ UDPState *s = DO_UPCAST(UDPState, nc, nc);
+ qemu_set_fd_handler(s->rfd, NULL, NULL, NULL);
+ close(s->rfd);
+}
+
+static NetClientInfo net_udp_info = {
+ .type = NET_CLIENT_TYPE_UDP,
+ .size = sizeof(UDPState),
+ .receive = udp_receive,
+ .cleanup = udp_cleanup,
+};
+
+static int net_udp_init(VLANState *vlan, const char *model,
+ const char *name, int sport,
+ const char *daddr, int dport)
+{
+ VLANClientState *nc;
+ UDPState *s;
+ struct sockaddr_in receiver;
+ int ret;
+
+ nc = qemu_new_net_client(&net_udp_info, vlan, NULL, model, name);
+
+ snprintf(nc->info_str, sizeof(nc->info_str),"udp: %i->%s:%i",
+ sport, daddr, dport);
+
+ s = DO_UPCAST(UDPState, nc, nc);
+
+ s->rfd = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
+ receiver.sin_family = AF_INET;
+ receiver.sin_addr.s_addr = INADDR_ANY;
+ receiver.sin_port = htons(sport);
+ ret = bind(s->rfd, (struct sockaddr *)&receiver, sizeof(receiver));
+
+ if (ret == -1) {
+ fprintf (stderr, "bind error:%s\n", strerror(errno));
+ return ret;
+ }
+
+ memset((char*)&s->sender, 0,sizeof(s->sender));
+ s->sender.sin_family = AF_INET;
+ s->sender.sin_port = htons(dport);
+ inet_aton(daddr, &s->sender.sin_addr);
+
+ qemu_set_fd_handler(s->rfd, udp_to_qemu, NULL, s);
+
+ return 0;
+}
+
+int net_init_udp(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
+{
+ const char *daddr;
+ int sport, dport;
+
+ daddr = qemu_opt_get(opts, "daddr");
+
+ sport = qemu_opt_get_number(opts, "sport", 0);
+ dport = qemu_opt_get_number(opts, "dport", 0);
+
+ if (net_udp_init(vlan, "udp", name, sport, daddr, dport) == -1) {
+ return -1;
+ }
+
+ return 0;
+}
diff -uNr old-qemu-0.14.1//net/udp.h qemu-0.14.1/net/udp.h
--- old-qemu-0.14.1//net/udp.h 1970-01-01 01:00:00.000000000 +0100
+++ qemu-0.14.1/net/udp.h 2011-05-11 15:41:45.752749392 +0200
@@ -0,0 +1,32 @@
+/*
+ * QEMU System Emulator
+ *
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef QEMU_NET_UDP_H
+#define QEMU_NET_UDP_H
+
+#include "qemu-common.h"
+#include "qemu-option.h"
+
+int net_init_udp(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
+
+#endif /* QEMU_NET_UDP_H */
diff -uNr old-qemu-0.14.1//net.c qemu-0.14.1/net.c
--- old-qemu-0.14.1//net.c 2011-05-06 21:01:44.000000000 +0200
+++ qemu-0.14.1/net.c 2011-05-11 15:42:53.145749408 +0200
@@ -30,6 +30,7 @@
#include "net/dump.h"
#include "net/slirp.h"
#include "net/vde.h"
+#include "net/udp.h"
#include "net/util.h"
#include "monitor.h"
#include "sysemu.h"
@@ -1085,9 +1086,31 @@
.help = "permissions for socket",
},
{ /* end of list */ }
- },
+ },
#endif
}, {
+
+ .type = "udp",
+ .init = net_init_udp,
+ .desc = {
+ NET_COMMON_PARAMS_DESC,
+ {
+ .name = "sport",
+ .type = QEMU_OPT_NUMBER,
+
+ .help = "source port number",
+ }, {
+ .name = "daddr",
+ .type = QEMU_OPT_STRING,
+ .help = "destination IP address",
+ }, {
+ .name = "dport",
+ .type = QEMU_OPT_NUMBER,
+ .help = "destination port number",
+ },
+ { /* end of list */ }
+ },
+ }, {
.type = "dump",
.init = net_init_dump,
.desc = {
diff -uNr old-qemu-0.14.1//net.h qemu-0.14.1/net.h
--- old-qemu-0.14.1//net.h 2011-05-06 21:01:44.000000000 +0200
+++ qemu-0.14.1/net.h 2011-05-11 15:41:45.754749392 +0200
@@ -35,6 +35,7 @@
NET_CLIENT_TYPE_TAP,
NET_CLIENT_TYPE_SOCKET,
NET_CLIENT_TYPE_VDE,
+ NET_CLIENT_TYPE_UDP,
NET_CLIENT_TYPE_DUMP
} net_client_type;
diff -uNr old-qemu-0.14.1//qemu-options.hx qemu-0.14.1/qemu-options.hx
--- old-qemu-0.14.1//qemu-options.hx 2011-05-06 21:01:44.000000000 +0200
+++ qemu-0.14.1/qemu-options.hx 2011-05-11 15:41:45.755749392 +0200
@@ -1070,6 +1070,8 @@
"-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port[,localaddr=addr]]\n"
" connect the vlan 'n' to multicast maddr and port\n"
" use 'localaddr=addr' to specify the host address to send packets from\n"
+ "-net udp[,vlan=n]sport=sport,dport=dport,daddr=host\n"
+ " connect the vlan 'n' to a UDP tunnel (for Dynamips/GNS3)\n"
#ifdef CONFIG_VDE
"-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n"
" connect the vlan 'n' to port 'n' of a vde switch running\n"
++++++ qemu-0.14.0-rc1.tar.bz2 -> qemu-0.14.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/.gitignore new/qemu-0.14.1/.gitignore
--- old/qemu-0.14.0-rc1/.gitignore 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-config-devices.*
-config-all-devices.*
-config-host.*
-config-target.*
-trace.h
-trace.c
-trace-dtrace.h
-trace-dtrace.dtrace
-*-timestamp
-*-softmmu
-*-darwin-user
-*-linux-user
-*-bsd-user
-libdis*
-libhw32
-libhw64
-libuser
-qemu-doc.html
-qemu-tech.html
-qemu-doc.info
-qemu-tech.info
-qemu.1
-qemu.pod
-qemu-img.1
-qemu-img.pod
-qemu-img
-qemu-nbd
-qemu-nbd.8
-qemu-nbd.pod
-qemu-options.def
-qemu-options.texi
-qemu-img-cmds.texi
-qemu-img-cmds.h
-qemu-io
-qemu-monitor.texi
-QMP/qmp-commands.txt
-.gdbinit
-*.a
-*.aux
-*.cp
-*.dvi
-*.exe
-*.fn
-*.ky
-*.log
-*.pdf
-*.pg
-*.pyc
-*.toc
-*.tp
-*.vr
-*.d
-*.o
-.pc
-patches
-pc-bios/bios-pq/status
-pc-bios/vgabios-pq/status
-pc-bios/optionrom/linuxboot.bin
-pc-bios/optionrom/multiboot.bin
-pc-bios/optionrom/multiboot.raw
-.stgit-*
-cscope.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/.gitmodules new/qemu-0.14.1/.gitmodules
--- old/qemu-0.14.0-rc1/.gitmodules 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/.gitmodules 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-[submodule "roms/vgabios"]
- path = roms/vgabios
- url = git://git.qemu.org/vgabios.git/
-[submodule "roms/seabios"]
- path = roms/seabios
- url = git://git.qemu.org/seabios.git/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/VERSION new/qemu-0.14.1/VERSION
--- old/qemu-0.14.0-rc1/VERSION 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/VERSION 2011-05-06 21:01:43.000000000 +0200
@@ -1 +1 @@
-0.13.91
+0.14.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block/qcow2-cluster.c new/qemu-0.14.1/block/qcow2-cluster.c
--- old/qemu-0.14.0-rc1/block/qcow2-cluster.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block/qcow2-cluster.c 2011-05-06 21:01:43.000000000 +0200
@@ -515,13 +515,16 @@
return ret;
}
} else {
- /* FIXME Order */
- if (l2_offset)
- qcow2_free_clusters(bs, l2_offset, s->l2_size * sizeof(uint64_t));
+ /* First allocate a new L2 table (and do COW if needed) */
ret = l2_allocate(bs, l1_index, &l2_table);
if (ret < 0) {
return ret;
}
+
+ /* Then decrease the refcount of the old table */
+ if (l2_offset) {
+ qcow2_free_clusters(bs, l2_offset, s->l2_size * sizeof(uint64_t));
+ }
l2_offset = s->l1_table[l1_index] & ~QCOW_OFLAG_COPIED;
}
@@ -878,11 +881,11 @@
BLKDBG_EVENT(bs->file, BLKDBG_READ_COMPRESSED);
ret = bdrv_read(bs->file, coffset >> 9, s->cluster_data, nb_csectors);
if (ret < 0) {
- return -1;
+ return ret;
}
if (decompress_buffer(s->cluster_cache, s->cluster_size,
s->cluster_data + sector_offset, csize) < 0) {
- return -1;
+ return -EIO;
}
s->cluster_cache_offset = coffset;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block/qcow2.c new/qemu-0.14.1/block/qcow2.c
--- old/qemu-0.14.0-rc1/block/qcow2.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block/qcow2.c 2011-05-06 21:01:43.000000000 +0200
@@ -28,6 +28,7 @@
#include "aes.h"
#include "block/qcow2.h"
#include "qemu-error.h"
+#include "qerror.h"
/*
Differences with QCOW:
@@ -59,7 +60,7 @@
if (buf_size >= sizeof(QCowHeader) &&
be32_to_cpu(cow_header->magic) == QCOW_MAGIC &&
- be32_to_cpu(cow_header->version) == QCOW_VERSION)
+ be32_to_cpu(cow_header->version) >= QCOW_VERSION)
return 100;
else
return 0;
@@ -163,10 +164,18 @@
be64_to_cpus(&header.snapshots_offset);
be32_to_cpus(&header.nb_snapshots);
- if (header.magic != QCOW_MAGIC || header.version != QCOW_VERSION) {
+ if (header.magic != QCOW_MAGIC) {
ret = -EINVAL;
goto fail;
}
+ if (header.version != QCOW_VERSION) {
+ char version[64];
+ snprintf(version, sizeof(version), "QCOW version %d", header.version);
+ qerror_report(QERR_UNKNOWN_BLOCK_FORMAT_FEATURE,
+ bs->device_name, "qcow2", version);
+ ret = -ENOTSUP;
+ goto fail;
+ }
if (header.cluster_bits < MIN_CLUSTER_BITS ||
header.cluster_bits > MAX_CLUSTER_BITS) {
ret = -EINVAL;
@@ -355,7 +364,7 @@
else
n1 = bs->total_sectors - sector_num;
- qemu_iovec_memset(qiov, 0, 512 * (nb_sectors - n1));
+ qemu_iovec_memset_skip(qiov, 0, 512 * (nb_sectors - n1), 512 * n1);
return n1;
}
@@ -478,10 +487,11 @@
if (n1 > 0) {
BLKDBG_EVENT(bs->file, BLKDBG_READ_BACKING_AIO);
acb->hd_aiocb = bdrv_aio_readv(bs->backing_hd, acb->sector_num,
- &acb->hd_qiov, acb->cur_nr_sectors,
- qcow2_aio_read_cb, acb);
- if (acb->hd_aiocb == NULL)
+ &acb->hd_qiov, n1, qcow2_aio_read_cb, acb);
+ if (acb->hd_aiocb == NULL) {
+ ret = -EIO;
goto done;
+ }
} else {
ret = qcow2_schedule_bh(qcow2_aio_read_bh, acb);
if (ret < 0)
@@ -496,8 +506,10 @@
}
} else if (acb->cluster_offset & QCOW_OFLAG_COMPRESSED) {
/* add AIO support for compressed blocks ? */
- if (qcow2_decompress_cluster(bs, acb->cluster_offset) < 0)
+ ret = qcow2_decompress_cluster(bs, acb->cluster_offset);
+ if (ret < 0) {
goto done;
+ }
qemu_iovec_from_buffer(&acb->hd_qiov,
s->cluster_cache + index_in_cluster * 512,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block/qed-check.c new/qemu-0.14.1/block/qed-check.c
--- old/qemu-0.14.0-rc1/block/qed-check.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block/qed-check.c 2011-05-06 21:01:43.000000000 +0200
@@ -18,7 +18,7 @@
BdrvCheckResult *result;
bool fix; /* whether to fix invalid offsets */
- size_t nclusters;
+ uint64_t nclusters;
uint32_t *used_clusters; /* referenced cluster bitmap */
QEDRequest request;
@@ -176,7 +176,7 @@
static void qed_check_for_leaks(QEDCheck *check)
{
BDRVQEDState *s = check->s;
- size_t i;
+ uint64_t i;
for (i = s->header.header_size; i < check->nclusters; i++) {
if (!qed_test_bit(check->used_clusters, i)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block/qed.c new/qemu-0.14.1/block/qed.c
--- old/qemu-0.14.0-rc1/block/qed.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block/qed.c 2011-05-06 21:01:43.000000000 +0200
@@ -14,6 +14,7 @@
#include "trace.h"
#include "qed.h"
+#include "qerror.h"
static void qed_aio_cancel(BlockDriverAIOCB *blockacb)
{
@@ -311,7 +312,13 @@
return -EINVAL;
}
if (s->header.features & ~QED_FEATURE_MASK) {
- return -ENOTSUP; /* image uses unsupported feature bits */
+ /* image uses unsupported feature bits */
+ char buf[64];
+ snprintf(buf, sizeof(buf), "%" PRIx64,
+ s->header.features & ~QED_FEATURE_MASK);
+ qerror_report(QERR_UNKNOWN_BLOCK_FORMAT_FEATURE,
+ bs->device_name, "QED", buf);
+ return -ENOTSUP;
}
if (!qed_is_cluster_size_valid(s->header.cluster_size)) {
return -EINVAL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block/qed.h new/qemu-0.14.1/block/qed.h
--- old/qemu-0.14.0-rc1/block/qed.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block/qed.h 2011-05-06 21:01:43.000000000 +0200
@@ -251,7 +251,7 @@
return offset & (s->header.cluster_size - 1);
}
-static inline unsigned int qed_bytes_to_clusters(BDRVQEDState *s, size_t bytes)
+static inline uint64_t qed_bytes_to_clusters(BDRVQEDState *s, uint64_t bytes)
{
return qed_start_of_cluster(s, bytes + (s->header.cluster_size - 1)) /
(s->header.cluster_size - 1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block.c new/qemu-0.14.1/block.c
--- old/qemu-0.14.0-rc1/block.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block.c 2011-05-06 21:01:43.000000000 +0200
@@ -697,14 +697,22 @@
}
}
+/* make a BlockDriverState anonymous by removing from bdrv_state list.
+ Also, NULL terminate the device_name to prevent double remove */
+void bdrv_make_anon(BlockDriverState *bs)
+{
+ if (bs->device_name[0] != '\0') {
+ QTAILQ_REMOVE(&bdrv_states, bs, list);
+ }
+ bs->device_name[0] = '\0';
+}
+
void bdrv_delete(BlockDriverState *bs)
{
assert(!bs->peer);
/* remove from list, if necessary */
- if (bs->device_name[0] != '\0') {
- QTAILQ_REMOVE(&bdrv_states, bs, list);
- }
+ bdrv_make_anon(bs);
bdrv_close(bs);
if (bs->file != NULL) {
@@ -2295,6 +2303,14 @@
MultiwriteCB *mcb;
int i;
+ /* don't submit writes if we don't have a medium */
+ if (bs->drv == NULL) {
+ for (i = 0; i < num_reqs; i++) {
+ reqs[i].error = -ENOMEDIUM;
+ }
+ return -1;
+ }
+
if (num_reqs == 0) {
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/block.h new/qemu-0.14.1/block.h
--- old/qemu-0.14.0-rc1/block.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/block.h 2011-05-06 21:01:43.000000000 +0200
@@ -66,6 +66,7 @@
QEMUOptionParameter *options);
int bdrv_create_file(const char* filename, QEMUOptionParameter *options);
BlockDriverState *bdrv_new(const char *device_name);
+void bdrv_make_anon(BlockDriverState *bs);
void bdrv_delete(BlockDriverState *bs);
int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags);
int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/blockdev.c new/qemu-0.14.1/blockdev.c
--- old/qemu-0.14.0-rc1/blockdev.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/blockdev.c 2011-05-06 21:01:43.000000000 +0200
@@ -182,6 +182,7 @@
{
qemu_opts_del(dinfo->opts);
bdrv_delete(dinfo->bdrv);
+ qemu_free(dinfo->id);
QTAILQ_REMOVE(&drives, dinfo, next);
qemu_free(dinfo);
}
@@ -525,7 +526,7 @@
} else if (ro == 1) {
if (type != IF_SCSI && type != IF_VIRTIO && type != IF_FLOPPY && type != IF_NONE) {
error_report("readonly not supported by this bus type");
- return NULL;
+ goto err;
}
}
@@ -535,12 +536,19 @@
if (ret < 0) {
error_report("could not open disk image %s: %s",
file, strerror(-ret));
- return NULL;
+ goto err;
}
if (bdrv_key_required(dinfo->bdrv))
autostart = 0;
return dinfo;
+
+err:
+ bdrv_delete(dinfo->bdrv);
+ qemu_free(dinfo->id);
+ QTAILQ_REMOVE(&drives, dinfo, next);
+ qemu_free(dinfo);
+ return NULL;
}
void do_commit(Monitor *mon, const QDict *qdict)
@@ -718,8 +726,6 @@
{
const char *id = qdict_get_str(qdict, "id");
BlockDriverState *bs;
- BlockDriverState **ptr;
- Property *prop;
bs = bdrv_find(id);
if (!bs) {
@@ -736,24 +742,17 @@
bdrv_flush(bs);
bdrv_close(bs);
- /* clean up guest state from pointing to host resource by
- * finding and removing DeviceState "drive" property */
+ /* if we have a device associated with this BlockDriverState (bs->peer)
+ * then we need to make the drive anonymous until the device
+ * can be removed. If this is a drive with no device backing
+ * then we can just get rid of the block driver state right here.
+ */
if (bs->peer) {
- for (prop = bs->peer->info->props; prop && prop->name; prop++) {
- if (prop->info->type == PROP_TYPE_DRIVE) {
- ptr = qdev_get_prop_ptr(bs->peer, prop);
- if (*ptr == bs) {
- bdrv_detach(bs, bs->peer);
- *ptr = NULL;
- break;
- }
- }
- }
+ bdrv_make_anon(bs);
+ } else {
+ drive_uninit(drive_get_by_blockdev(bs));
}
- /* clean up host side */
- drive_uninit(drive_get_by_blockdev(bs));
-
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/configure new/qemu-0.14.1/configure
--- old/qemu-0.14.0-rc1/configure 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/configure 2011-05-06 21:01:43.000000000 +0200
@@ -1795,7 +1795,7 @@
#include
int main(void) { rados_initialize(0, NULL); return 0; }
EOF
- rbd_libs="-lrados -lcrypto"
+ rbd_libs="-lrados"
if compile_prog "" "$rbd_libs" ; then
librados_too_old=no
cat > $TMPC <niov) && (done != count); i++) {
+ if (skip >= qiov->iov[i].iov_len) {
+ /* Skip the whole iov */
+ skip -= qiov->iov[i].iov_len;
+ continue;
+ } else {
+ /* Skip only part (or nothing) of the iov */
+ iov_base = (uint8_t*) qiov->iov[i].iov_base + skip;
+ iov_len = qiov->iov[i].iov_len - skip;
+ skip = 0;
+ }
+
+ if (done + iov_len > count) {
+ memset(iov_base, c, count - done);
+ break;
+ } else {
+ memset(iov_base, c, iov_len);
+ }
+ done += iov_len;
+ }
+}
+
#ifndef _WIN32
/* Sets a specific flag */
int fcntl_setfl(int fd, int flag)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hmp-commands.hx new/qemu-0.14.1/hmp-commands.hx
--- old/qemu-0.14.0-rc1/hmp-commands.hx 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hmp-commands.hx 2011-05-06 21:01:43.000000000 +0200
@@ -822,7 +822,7 @@
{
.name = "snapshot_blkdev",
- .args_type = "device:s,snapshot_file:s?,format:s?",
+ .args_type = "device:B,snapshot_file:s?,format:s?",
.params = "device [new-image-file] [format]",
.help = "initiates a live snapshot\n\t\t\t"
"of device. If a new image file is specified, the\n\t\t\t"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/apic.c new/qemu-0.14.1/hw/apic.c
--- old/qemu-0.14.0-rc1/hw/apic.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/apic.c 2011-05-06 21:01:43.000000000 +0200
@@ -372,19 +372,36 @@
return 0;
}
-/* signal the CPU if an irq is pending */
-static void apic_update_irq(APICState *s)
+
+/*
+ * <0 - low prio interrupt,
+ * 0 - no interrupt,
+ * >0 - interrupt number
+ */
+static int apic_irq_pending(APICState *s)
{
int irrv, ppr;
- if (!(s->spurious_vec & APIC_SV_ENABLE))
- return;
irrv = get_highest_priority_int(s->irr);
- if (irrv < 0)
- return;
+ if (irrv < 0) {
+ return 0;
+ }
ppr = apic_get_ppr(s);
- if (ppr && (irrv & 0xf0) <= (ppr & 0xf0))
+ if (ppr && (irrv & 0xf0) <= (ppr & 0xf0)) {
+ return -1;
+ }
+
+ return irrv;
+}
+
+/* signal the CPU if an irq is pending */
+static void apic_update_irq(APICState *s)
+{
+ if (!(s->spurious_vec & APIC_SV_ENABLE)) {
return;
- cpu_interrupt(s->cpu_env, CPU_INTERRUPT_HARD);
+ }
+ if (apic_irq_pending(s) > 0) {
+ cpu_interrupt(s->cpu_env, CPU_INTERRUPT_HARD);
+ }
}
void apic_reset_irq_delivered(void)
@@ -590,12 +607,13 @@
if (!(s->spurious_vec & APIC_SV_ENABLE))
return -1;
- /* XXX: spurious IRQ handling */
- intno = get_highest_priority_int(s->irr);
- if (intno < 0)
+ intno = apic_irq_pending(s);
+
+ if (intno == 0) {
return -1;
- if (s->tpr && intno <= s->tpr)
+ } else if (intno < 0) {
return s->spurious_vec & 0xff;
+ }
reset_bit(s->irr, intno);
set_bit(s->isr, intno);
apic_update_irq(s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/applesmc.c new/qemu-0.14.1/hw/applesmc.c
--- old/qemu-0.14.0-rc1/hw/applesmc.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/applesmc.c 2011-05-06 21:01:43.000000000 +0200
@@ -188,7 +188,7 @@
QLIST_REMOVE(d, node);
}
- applesmc_add_key(s, "REV ", 6, "\0x01\0x13\0x0f\0x00\0x00\0x03");
+ applesmc_add_key(s, "REV ", 6, "\x01\x13\x0f\x00\x00\x03");
applesmc_add_key(s, "OSK0", 32, s->osk);
applesmc_add_key(s, "OSK1", 32, s->osk + 32);
applesmc_add_key(s, "NATJ", 1, "\0");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/hpet.c new/qemu-0.14.1/hw/hpet.c
--- old/qemu-0.14.0-rc1/hw/hpet.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/hpet.c 2011-05-06 21:01:43.000000000 +0200
@@ -715,7 +715,6 @@
s->capability |= (s->num_timers - 1) << HPET_ID_NUM_TIM_SHIFT;
s->capability |= ((HPET_CLK_PERIOD) << 32);
- isa_reserve_irq(RTC_ISA_IRQ);
qdev_init_gpio_in(&dev->qdev, hpet_handle_rtc_irq, 1);
/* HPET Area */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/ide/piix.c new/qemu-0.14.1/hw/ide/piix.c
--- old/qemu-0.14.0-rc1/hw/ide/piix.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/ide/piix.c 2011-05-06 21:01:43.000000000 +0200
@@ -122,7 +122,7 @@
for (i = 0; i < 2; i++) {
ide_bus_new(&d->bus[i], &d->dev.qdev, i);
ide_init_ioport(&d->bus[i], port_info[i].iobase, port_info[i].iobase2);
- ide_init2(&d->bus[i], isa_reserve_irq(port_info[i].isairq));
+ ide_init2(&d->bus[i], isa_get_irq(port_info[i].isairq));
bmdma_init(&d->bus[i], &d->bmdma[i]);
d->bmdma[i].bus = &d->bus[i];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/ide/via.c new/qemu-0.14.1/hw/ide/via.c
--- old/qemu-0.14.0-rc1/hw/ide/via.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/ide/via.c 2011-05-06 21:01:43.000000000 +0200
@@ -145,7 +145,7 @@
for (i = 0; i < 2; i++) {
ide_bus_new(&d->bus[i], &d->dev.qdev, i);
ide_init_ioport(&d->bus[i], port_info[i].iobase, port_info[i].iobase2);
- ide_init2(&d->bus[i], isa_reserve_irq(port_info[i].isairq));
+ ide_init2(&d->bus[i], isa_get_irq(port_info[i].isairq));
bmdma_init(&d->bus[i], &d->bmdma[i]);
d->bmdma[i].bus = &d->bus[i];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/isa-bus.c new/qemu-0.14.1/hw/isa-bus.c
--- old/qemu-0.14.0-rc1/hw/isa-bus.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/isa-bus.c 2011-05-06 21:01:43.000000000 +0200
@@ -25,7 +25,6 @@
struct ISABus {
BusState qbus;
qemu_irq *irqs;
- uint32_t assigned;
};
static ISABus *isabus;
target_phys_addr_t isa_mem_base = 0;
@@ -61,33 +60,24 @@
}
/*
- * isa_reserve_irq() reserves the ISA irq and returns the corresponding
- * qemu_irq entry for the i8259.
+ * isa_get_irq() returns the corresponding qemu_irq entry for the i8259.
*
* This function is only for special cases such as the 'ferr', and
* temporary use for normal devices until they are converted to qdev.
*/
-qemu_irq isa_reserve_irq(int isairq)
+qemu_irq isa_get_irq(int isairq)
{
if (isairq < 0 || isairq > 15) {
hw_error("isa irq %d invalid", isairq);
}
- if (isabus->assigned & (1 << isairq)) {
- hw_error("isa irq %d already assigned", isairq);
- }
- isabus->assigned |= (1 << isairq);
return isabus->irqs[isairq];
}
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq)
{
assert(dev->nirqs < ARRAY_SIZE(dev->isairq));
- if (isabus->assigned & (1 << isairq)) {
- hw_error("isa irq %d already assigned", isairq);
- }
- isabus->assigned |= (1 << isairq);
dev->isairq[dev->nirqs] = isairq;
- *p = isabus->irqs[isairq];
+ *p = isa_get_irq(isairq);
dev->nirqs++;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/isa.h new/qemu-0.14.1/hw/isa.h
--- old/qemu-0.14.0-rc1/hw/isa.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/isa.h 2011-05-06 21:01:43.000000000 +0200
@@ -26,7 +26,7 @@
ISABus *isa_bus_new(DeviceState *dev);
void isa_bus_irqs(qemu_irq *irqs);
-qemu_irq isa_reserve_irq(int isairq);
+qemu_irq isa_get_irq(int isairq);
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
void isa_init_ioport(ISADevice *dev, uint16_t ioport);
void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/lan9118.c new/qemu-0.14.1/hw/lan9118.c
--- old/qemu-0.14.0-rc1/hw/lan9118.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/lan9118.c 2011-05-06 21:01:43.000000000 +0200
@@ -785,6 +785,12 @@
case MAC_FLOW:
s->mac_flow = val & 0xffff0000;
break;
+ case MAC_VLAN1:
+ /* Writing to this register changes a condition for
+ * FrameTooLong bit in rx_status. Since we do not set
+ * FrameTooLong anyway, just ignore write to this.
+ */
+ break;
default:
hw_error("lan9118: Unimplemented MAC register write: %d = 0x%x\n",
s->mac_cmd & 0xf, val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/lsi53c895a.c new/qemu-0.14.1/hw/lsi53c895a.c
--- old/qemu-0.14.0-rc1/hw/lsi53c895a.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/lsi53c895a.c 2011-05-06 21:01:43.000000000 +0200
@@ -842,10 +842,29 @@
return data;
}
+/* Skip the next n bytes during a MSGOUT phase. */
+static void lsi_skip_msgbytes(LSIState *s, unsigned int n)
+{
+ s->dnad += n;
+ s->dbc -= n;
+}
+
static void lsi_do_msgout(LSIState *s)
{
uint8_t msg;
int len;
+ uint32_t current_tag;
+ SCSIDevice *current_dev;
+ lsi_request *p, *p_next;
+ int id;
+
+ if (s->current) {
+ current_tag = s->current->tag;
+ } else {
+ current_tag = s->select_tag;
+ }
+ id = (current_tag >> 8) & 0xf;
+ current_dev = s->bus.devs[id];
DPRINTF("MSG out len=%d\n", s->dbc);
while (s->dbc) {
@@ -869,11 +888,11 @@
switch (msg) {
case 1:
DPRINTF("SDTR (ignored)\n");
- s->dbc -= 2;
+ lsi_skip_msgbytes(s, 2);
break;
case 3:
DPRINTF("WDTR (ignored)\n");
- s->dbc -= 1;
+ lsi_skip_msgbytes(s, 1);
break;
default:
goto bad;
@@ -891,6 +910,51 @@
BADF("ORDERED queue not implemented\n");
s->select_tag |= lsi_get_msgbyte(s) | LSI_TAG_VALID;
break;
+ case 0x0d:
+ /* The ABORT TAG message clears the current I/O process only. */
+ DPRINTF("MSG: ABORT TAG tag=0x%x\n", current_tag);
+ current_dev->info->cancel_io(current_dev, current_tag);
+ lsi_disconnect(s);
+ break;
+ case 0x06:
+ case 0x0e:
+ case 0x0c:
+ /* The ABORT message clears all I/O processes for the selecting
+ initiator on the specified logical unit of the target. */
+ if (msg == 0x06) {
+ DPRINTF("MSG: ABORT tag=0x%x\n", current_tag);
+ }
+ /* The CLEAR QUEUE message clears all I/O processes for all
+ initiators on the specified logical unit of the target. */
+ if (msg == 0x0e) {
+ DPRINTF("MSG: CLEAR QUEUE tag=0x%x\n", current_tag);
+ }
+ /* The BUS DEVICE RESET message clears all I/O processes for all
+ initiators on all logical units of the target. */
+ if (msg == 0x0c) {
+ DPRINTF("MSG: BUS DEVICE RESET tag=0x%x\n", current_tag);
+ }
+
+ /* clear the current I/O process */
+ current_dev->info->cancel_io(current_dev, current_tag);
+
+ /* As the current implemented devices scsi_disk and scsi_generic
+ only support one LUN, we don't need to keep track of LUNs.
+ Clearing I/O processes for other initiators could be possible
+ for scsi_generic by sending a SG_SCSI_RESET to the /dev/sgX
+ device, but this is currently not implemented (and seems not
+ to be really necessary). So let's simply clear all queued
+ commands for the current device: */
+ id = current_tag & 0x0000ff00;
+ QTAILQ_FOREACH_SAFE(p, &s->queue, next, p_next) {
+ if ((p->tag & 0x0000ff00) == id) {
+ current_dev->info->cancel_io(current_dev, p->tag);
+ QTAILQ_REMOVE(&s->queue, p, next);
+ }
+ }
+
+ lsi_disconnect(s);
+ break;
default:
if ((msg & 0x80) == 0) {
goto bad;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/mips_fulong2e.c new/qemu-0.14.1/hw/mips_fulong2e.c
--- old/qemu-0.14.0-rc1/hw/mips_fulong2e.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/mips_fulong2e.c 2011-05-06 21:01:43.000000000 +0200
@@ -369,7 +369,7 @@
qdev_init_nofail(eeprom);
/* init other devices */
- pit = pit_init(0x40, isa_reserve_irq(0));
+ pit = pit_init(0x40, isa_get_irq(0));
cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
DMA_init(0, cpu_exit_irq);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/mips_malta.c new/qemu-0.14.1/hw/mips_malta.c
--- old/qemu-0.14.0-rc1/hw/mips_malta.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/mips_malta.c 2011-05-06 21:01:43.000000000 +0200
@@ -919,7 +919,7 @@
isa_bus_irqs(i8259);
pci_piix4_ide_init(pci_bus, hd, piix4_devfn + 1);
usb_uhci_piix4_init(pci_bus, piix4_devfn + 2);
- smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100, isa_reserve_irq(9),
+ smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100, isa_get_irq(9),
NULL, NULL, 0);
eeprom_buf = qemu_mallocz(8 * 256); /* XXX: make this persistent */
for (i = 0; i < 8; i++) {
@@ -930,7 +930,7 @@
qdev_prop_set_ptr(eeprom, "data", eeprom_buf + (i * 256));
qdev_init_nofail(eeprom);
}
- pit = pit_init(0x40, isa_reserve_irq(0));
+ pit = pit_init(0x40, isa_get_irq(0));
cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
DMA_init(0, cpu_exit_irq);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/pc.c new/qemu-0.14.1/hw/pc.c
--- old/qemu-0.14.0-rc1/hw/pc.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/pc.c 2011-05-06 21:01:43.000000000 +0200
@@ -1110,7 +1110,7 @@
qemu_register_boot_set(pc_boot_set, *rtc_state);
- pit = pit_init(0x40, isa_reserve_irq(0));
+ pit = pit_init(0x40, isa_get_irq(0));
pcspk_init(pit);
for(i = 0; i < MAX_SERIAL_PORTS; i++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/pc_piix.c new/qemu-0.14.1/hw/pc_piix.c
--- old/qemu-0.14.0-rc1/hw/pc_piix.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/pc_piix.c 2011-05-06 21:01:43.000000000 +0200
@@ -110,7 +110,7 @@
}
isa_bus_irqs(isa_irq);
- pc_register_ferr_irq(isa_reserve_irq(13));
+ pc_register_ferr_irq(isa_get_irq(13));
pc_vga_init(pci_enabled? pci_bus: NULL);
@@ -166,7 +166,7 @@
smi_irq = qemu_allocate_irqs(pc_acpi_smi_interrupt, first_cpu, 1);
/* TODO: Populate SPD eeprom data. */
smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
- isa_reserve_irq(9), *cmos_s3, *smi_irq,
+ isa_get_irq(9), *cmos_s3, *smi_irq,
kvm_enabled());
for (i = 0; i < 8; i++) {
DeviceState *eeprom;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/ppc_prep.c new/qemu-0.14.1/hw/ppc_prep.c
--- old/qemu-0.14.0-rc1/hw/ppc_prep.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/ppc_prep.c 2011-05-06 21:01:43.000000000 +0200
@@ -690,7 +690,7 @@
hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS);
}
- for(i = 0; i < 1/*MAX_IDE_BUS*/; i++) {
+ for(i = 0; i < MAX_IDE_BUS; i++) {
isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i],
hd[2 * i],
hd[2 * i + 1]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/sd.c new/qemu-0.14.1/hw/sd.c
--- old/qemu-0.14.0-rc1/hw/sd.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/sd.c 2011-05-06 21:01:43.000000000 +0200
@@ -1168,6 +1168,7 @@
case 13: /* ACMD13: SD_STATUS */
switch (sd->state) {
case sd_transfer_state:
+ sd->state = sd_sendingdata_state;
sd->data_start = 0;
sd->data_offset = 0;
return sd_r1;
@@ -1182,6 +1183,7 @@
case sd_transfer_state:
*(uint32_t *) sd->data = sd->blk_written;
+ sd->state = sd_sendingdata_state;
sd->data_start = 0;
sd->data_offset = 0;
return sd_r1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/vhost.c new/qemu-0.14.1/hw/vhost.c
--- old/qemu-0.14.0-rc1/hw/vhost.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/vhost.c 2011-05-06 21:01:43.000000000 +0200
@@ -47,8 +47,10 @@
log = __sync_fetch_and_and(from, 0);
while ((bit = sizeof(log) > sizeof(int) ?
ffsll(log) : ffs(log))) {
+ ram_addr_t ram_addr;
bit -= 1;
- cpu_physical_memory_set_dirty(addr + bit * VHOST_LOG_PAGE);
+ ram_addr = cpu_get_physical_page_desc(addr + bit * VHOST_LOG_PAGE);
+ cpu_physical_memory_set_dirty(ram_addr);
log &= ~(0x1ull << bit);
}
addr += VHOST_LOG_CHUNK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/virtio-blk.c new/qemu-0.14.1/hw/virtio-blk.c
--- old/qemu-0.14.0-rc1/hw/virtio-blk.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/virtio-blk.c 2011-05-06 21:01:43.000000000 +0200
@@ -290,6 +290,10 @@
virtio_blk_rw_complete(req, -EIO);
return;
}
+ if (req->qiov.size % req->dev->conf->logical_block_size) {
+ virtio_blk_rw_complete(req, -EIO);
+ return;
+ }
if (mrb->num_writes == 32) {
virtio_submit_multiwrite(req->dev->bs, mrb);
@@ -317,6 +321,10 @@
virtio_blk_rw_complete(req, -EIO);
return;
}
+ if (req->qiov.size % req->dev->conf->logical_block_size) {
+ virtio_blk_rw_complete(req, -EIO);
+ return;
+ }
acb = bdrv_aio_readv(req->dev->bs, sector, &req->qiov,
req->qiov.size / BDRV_SECTOR_SIZE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/virtio-net.c new/qemu-0.14.1/hw/virtio-net.c
--- old/qemu-0.14.0-rc1/hw/virtio-net.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/virtio-net.c 2011-05-06 21:01:43.000000000 +0200
@@ -79,7 +79,7 @@
VirtIONet *n = to_virtio_net(vdev);
struct virtio_net_config netcfg;
- netcfg.status = lduw_p(&n->status);
+ stw_p(&netcfg.status, n->status);
memcpy(netcfg.mac, n->mac, ETH_ALEN);
memcpy(config, &netcfg, sizeof(netcfg));
}
@@ -678,7 +678,7 @@
}
if (mhdr) {
- mhdr->num_buffers = lduw_p(&i);
+ stw_p(&mhdr->num_buffers, i);
}
virtqueue_flush(n->rx_vq, i);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/virtio-pci.c new/qemu-0.14.1/hw/virtio-pci.c
--- old/qemu-0.14.0-rc1/hw/virtio-pci.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/virtio-pci.c 2011-05-06 21:01:43.000000000 +0200
@@ -160,13 +160,6 @@
if (proxy->vdev->config_vector != VIRTIO_NO_VECTOR) {
return msix_vector_use(&proxy->pci_dev, proxy->vdev->config_vector);
}
-
- /* Try to find out if the guest has bus master disabled, but is
- in ready state. Then we have a buggy guest OS. */
- if ((proxy->vdev->status & VIRTIO_CONFIG_S_DRIVER_OK) &&
- !(proxy->pci_dev.config[PCI_COMMAND] & PCI_COMMAND_MASTER)) {
- proxy->flags |= VIRTIO_PCI_FLAG_BUS_MASTER_BUG;
- }
return 0;
}
@@ -651,6 +644,12 @@
VirtIOPCIProxy *proxy = opaque;
if (running) {
+ /* Try to find out if the guest has bus master disabled, but is
+ in ready state. Then we have a buggy guest OS. */
+ if ((proxy->vdev->status & VIRTIO_CONFIG_S_DRIVER_OK) &&
+ !(proxy->pci_dev.config[PCI_COMMAND] & PCI_COMMAND_MASTER)) {
+ proxy->flags |= VIRTIO_PCI_FLAG_BUS_MASTER_BUG;
+ }
virtio_pci_start_ioeventfd(proxy);
} else {
virtio_pci_stop_ioeventfd(proxy);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/hw/virtio.h new/qemu-0.14.1/hw/virtio.h
--- old/qemu-0.14.0-rc1/hw/virtio.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/hw/virtio.h 2011-05-06 21:01:43.000000000 +0200
@@ -92,6 +92,7 @@
void (*save_queue)(void * opaque, int n, QEMUFile *f);
int (*load_config)(void * opaque, QEMUFile *f);
int (*load_queue)(void * opaque, int n, QEMUFile *f);
+ int (*load_done)(void * opaque, QEMUFile *f);
unsigned (*get_features)(void * opaque);
bool (*query_guest_notifiers)(void * opaque);
int (*set_guest_notifiers)(void * opaque, bool assigned);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/linux-user/elfload.c new/qemu-0.14.1/linux-user/elfload.c
--- old/qemu-0.14.0-rc1/linux-user/elfload.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/linux-user/elfload.c 2011-05-06 21:01:44.000000000 +0200
@@ -1481,7 +1481,7 @@
struct elf_shdr *shdr;
char *strings;
struct syminfo *s;
- struct elf_sym *syms;
+ struct elf_sym *syms, *new_syms;
shnum = hdr->e_shnum;
i = shnum * sizeof(struct elf_shdr);
@@ -1550,12 +1550,14 @@
that we threw away. Whether or not this has any effect on the
memory allocation depends on the malloc implementation and how
many symbols we managed to discard. */
- syms = realloc(syms, nsyms * sizeof(*syms));
- if (syms == NULL) {
+ new_syms = realloc(syms, nsyms * sizeof(*syms));
+ if (new_syms == NULL) {
free(s);
+ free(syms);
free(strings);
return;
}
+ syms = new_syms;
qsort(syms, nsyms, sizeof(*syms), symcmp);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/linux-user/ioctls.h new/qemu-0.14.1/linux-user/ioctls.h
--- old/qemu-0.14.0-rc1/linux-user/ioctls.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/linux-user/ioctls.h 2011-05-06 21:01:44.000000000 +0200
@@ -312,10 +312,8 @@
IOCTL(LOOP_CLR_FD, 0, TYPE_INT)
IOCTL(LOOP_SET_STATUS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info)))
IOCTL(LOOP_GET_STATUS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info)))
-#if 0 /* These have some problems - not fully tested */
IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
IOCTL(LOOP_GET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
-#endif
IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT)
IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/net.c new/qemu-0.14.1/net.c
--- old/qemu-0.14.0-rc1/net.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/net.c 2011-05-06 21:01:44.000000000 +0200
@@ -1025,7 +1025,11 @@
.name = "vhostfd",
.type = QEMU_OPT_STRING,
.help = "file descriptor of an already opened vhost net device",
- },
+ }, {
+ .name = "vhostforce",
+ .type = QEMU_OPT_BOOL,
+ .help = "force vhost on for non-MSIX virtio guests",
+ },
#endif /* _WIN32 */
{ /* end of list */ }
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/qemu-char.c new/qemu-0.14.1/qemu-char.c
--- old/qemu-0.14.0-rc1/qemu-char.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/qemu-char.c 2011-05-06 21:01:44.000000000 +0200
@@ -2506,6 +2506,11 @@
return NULL;
}
+ if (qemu_opt_get(opts, "backend") == NULL) {
+ fprintf(stderr, "chardev: \"%s\" missing backend\n",
+ qemu_opts_id(opts));
+ return NULL;
+ }
for (i = 0; i < ARRAY_SIZE(backend_table); i++) {
if (strcmp(backend_table[i].name, qemu_opt_get(opts, "backend")) == 0)
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/qemu-common.h new/qemu-0.14.1/qemu-common.h
--- old/qemu-0.14.0-rc1/qemu-common.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/qemu-common.h 2011-05-06 21:01:44.000000000 +0200
@@ -322,6 +322,8 @@
void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf);
void qemu_iovec_from_buffer(QEMUIOVector *qiov, const void *buf, size_t count);
void qemu_iovec_memset(QEMUIOVector *qiov, int c, size_t count);
+void qemu_iovec_memset_skip(QEMUIOVector *qiov, int c, size_t count,
+ size_t skip);
struct Monitor;
typedef struct Monitor Monitor;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/qemu-img.c new/qemu-0.14.1/qemu-img.c
--- old/qemu-0.14.0-rc1/qemu-img.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/qemu-img.c 2011-05-06 21:01:44.000000000 +0200
@@ -213,8 +213,9 @@
BlockDriverState *bs;
BlockDriver *drv;
char password[256];
+ int ret;
- bs = bdrv_new("");
+ bs = bdrv_new("image");
if (fmt) {
drv = bdrv_find_format(fmt);
@@ -225,10 +226,13 @@
} else {
drv = NULL;
}
- if (bdrv_open(bs, filename, flags, drv) < 0) {
- error_report("Could not open '%s'", filename);
+
+ ret = bdrv_open(bs, filename, flags, drv);
+ if (ret < 0) {
+ error_report("Could not open '%s': %s", filename, strerror(-ret));
goto fail;
}
+
if (bdrv_is_encrypted(bs)) {
printf("Disk image '%s' is encrypted.\n", filename);
if (read_password(password, sizeof(password)) < 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/qemu-timer.c new/qemu-0.14.1/qemu-timer.c
--- old/qemu-0.14.0-rc1/qemu-timer.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/qemu-timer.c 2011-05-06 21:01:44.000000000 +0200
@@ -708,8 +708,6 @@
return delta;
}
-#ifndef _WIN32
-
static int64_t qemu_next_alarm_deadline(void)
{
int64_t delta;
@@ -922,6 +920,8 @@
#endif /* defined(__linux__) */
+#if !defined(_WIN32)
+
static int unix_start_timer(struct qemu_alarm_timer *t)
{
struct sigaction act;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/qerror.c new/qemu-0.14.1/qerror.c
--- old/qemu-0.14.0-rc1/qerror.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/qerror.c 2011-05-06 21:01:44.000000000 +0200
@@ -201,6 +201,11 @@
.desc = "An undefined error has ocurred",
},
{
+ .error_fmt = QERR_UNKNOWN_BLOCK_FORMAT_FEATURE,
+ .desc = "'%(device)' uses a %(format) feature which is not "
+ "supported by this qemu version: %(feature)",
+ },
+ {
.error_fmt = QERR_VNC_SERVER_FAILED,
.desc = "Could not start VNC server on %(target)",
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/qerror.h new/qemu-0.14.1/qerror.h
--- old/qemu-0.14.0-rc1/qerror.h 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/qerror.h 2011-05-06 21:01:44.000000000 +0200
@@ -165,6 +165,9 @@
#define QERR_UNDEFINED_ERROR \
"{ 'class': 'UndefinedError', 'data': {} }"
+#define QERR_UNKNOWN_BLOCK_FORMAT_FEATURE \
+ "{ 'class': 'UnknownBlockFormatFeature', 'data': { 'device': %s, 'format': %s, 'feature': %s } }"
+
#define QERR_VNC_SERVER_FAILED \
"{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/roms/seabios/.gitignore new/qemu-0.14.1/roms/seabios/.gitignore
--- old/qemu-0.14.0-rc1/roms/seabios/.gitignore 2011-02-07 20:37:49.000000000 +0100
+++ new/qemu-0.14.1/roms/seabios/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-out
-*.pyc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/slirp/mbuf.c new/qemu-0.14.1/slirp/mbuf.c
--- old/qemu-0.14.0-rc1/slirp/mbuf.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/slirp/mbuf.c 2011-05-06 21:01:44.000000000 +0200
@@ -23,7 +23,7 @@
* Find a nice value for msize
* XXX if_maxlinkhdr already in mtu
*/
-#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6)
+#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + offsetof(struct mbuf, m_dat) + 6)
void
m_init(Slirp *slirp)
@@ -65,7 +65,7 @@
m->m_flags = (flags | M_USEDLIST);
/* Initialise it */
- m->m_size = SLIRP_MSIZE - sizeof(struct m_hdr);
+ m->m_size = SLIRP_MSIZE - offsetof(struct mbuf, m_dat);
m->m_data = m->m_dat;
m->m_len = 0;
m->m_nextpkt = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/target-i386/helper.c new/qemu-0.14.1/target-i386/helper.c
--- old/qemu-0.14.0-rc1/target-i386/helper.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/target-i386/helper.c 2011-05-06 21:01:44.000000000 +0200
@@ -1147,8 +1147,8 @@
if (cenv == env) {
continue;
}
-
- qemu_inject_x86_mce(env, 1, 0xa000000000000000, 0, 0, 0);
+ qemu_inject_x86_mce(env, 1, MCI_STATUS_VAL | MCI_STATUS_UC,
+ MCG_STATUS_MCIP | MCG_STATUS_RIPV, 0, 0);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/ui/vnc-enc-tight.c new/qemu-0.14.1/ui/vnc-enc-tight.c
--- old/qemu-0.14.0-rc1/ui/vnc-enc-tight.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/ui/vnc-enc-tight.c 2011-05-06 21:01:44.000000000 +0200
@@ -848,8 +848,8 @@
zstream->avail_in = vs->tight.tight.offset;
zstream->next_out = vs->tight.zlib.buffer + vs->tight.zlib.offset;
zstream->avail_out = vs->tight.zlib.capacity - vs->tight.zlib.offset;
+ previous_out = zstream->avail_out;
zstream->data_type = Z_BINARY;
- previous_out = zstream->total_out;
/* start encoding */
if (deflate(zstream, Z_SYNC_FLUSH) != Z_OK) {
@@ -858,7 +858,8 @@
}
vs->tight.zlib.offset = vs->tight.zlib.capacity - zstream->avail_out;
- bytes = zstream->total_out - previous_out;
+ /* ...how much data has actually been produced by deflate() */
+ bytes = previous_out - zstream->avail_out;
tight_send_compact_size(vs, bytes);
vnc_write(vs, vs->tight.zlib.buffer, bytes);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/ui/vnc-enc-zlib.c new/qemu-0.14.1/ui/vnc-enc-zlib.c
--- old/qemu-0.14.0-rc1/ui/vnc-enc-zlib.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/ui/vnc-enc-zlib.c 2011-05-06 21:01:44.000000000 +0200
@@ -103,8 +103,8 @@
zstream->avail_in = vs->zlib.zlib.offset;
zstream->next_out = vs->output.buffer + vs->output.offset;
zstream->avail_out = vs->output.capacity - vs->output.offset;
+ previous_out = zstream->avail_out;
zstream->data_type = Z_BINARY;
- previous_out = zstream->total_out;
// start encoding
if (deflate(zstream, Z_SYNC_FLUSH) != Z_OK) {
@@ -113,7 +113,7 @@
}
vs->output.offset = vs->output.capacity - zstream->avail_out;
- return zstream->total_out - previous_out;
+ return previous_out - zstream->avail_out;
}
int vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/ui/vnc.c new/qemu-0.14.1/ui/vnc.c
--- old/qemu-0.14.0-rc1/ui/vnc.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/ui/vnc.c 2011-05-06 21:01:44.000000000 +0200
@@ -2349,6 +2349,7 @@
vd->timer_interval = VNC_REFRESH_INTERVAL_BASE;
if (vd->timer == NULL && !QTAILQ_EMPTY(&vd->clients)) {
vd->timer = qemu_new_timer(rt_clock, vnc_refresh, vd);
+ vnc_dpy_resize(vd->ds);
vnc_refresh(vd);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-0.14.0-rc1/vl.c new/qemu-0.14.1/vl.c
--- old/qemu-0.14.0-rc1/vl.c 2011-02-07 20:36:53.000000000 +0100
+++ new/qemu-0.14.1/vl.c 2011-05-06 21:01:44.000000000 +0200
@@ -2066,7 +2066,9 @@
HD_OPTS);
break;
case QEMU_OPTION_drive:
- drive_def(optarg);
+ if (drive_def(optarg) == NULL) {
+ exit(1);
+ }
break;
case QEMU_OPTION_set:
if (qemu_set_option(optarg) != 0)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org