Hello community,
here is the log from the commit of package kvm for openSUSE:Factory
checked in at Fri Aug 26 09:40:22 CEST 2011.
--------
--- kvm/kvm.changes 2011-08-05 15:17:20.000000000 +0200
+++ /mounts/work_src_done/STABLE/kvm/kvm.changes 2011-08-26 00:25:05.000000000 +0200
@@ -1,0 +2,15 @@
+Thu Aug 25 22:12:00 UTC 2011 - brogers@novell.com
+
+- update to v0.15.0
+ for details, see: http://wiki.qemu.org/ChangeLog/0.15
+- update to latest seabios (ahci is enabled there now)
+- fix failures migrating or saving large memory vms when remaining
+ host memory is insuffienct (bnc#705095)
+- fix for creating 1MB vm
+
+-------------------------------------------------------------------
+Thu Aug 25 20:57:01 UTC 2011 - brogers@novell.com
+
+- fix build: don't use deprecated functions
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
kvm-seabios-enable-ahci.patch
qemu-kvm-0.15.rc1.tar.bz2
seabios-git-e0f87ce.tar.bz2
New:
----
kvm-qemu-fix-1mb-memory-assert.patch
kvm-qemu-madvise-DONTFORK-for-tight-memory-migration.patch
kvm-qemu-preXX-ui-avoid-deprecated-gnutls_-_set_priority-functions.patch
qemu-kvm-0.15.0.tar.bz2
seabios-git-8e30147.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kvm.spec ++++++
--- /var/tmp/diff_new_pack.WFAvFp/_old 2011-08-26 09:35:51.000000000 +0200
+++ /var/tmp/diff_new_pack.WFAvFp/_new 2011-08-26 09:35:51.000000000 +0200
@@ -20,9 +20,9 @@
%bcond_with spice
-%define package_true_version 0.15.rc1
+%define package_true_version 0.15.0
%define package_base_version 0.15.0
-%define bios_id seabios-git-e0f87ce
+%define bios_id seabios-git-8e30147
%define pxe_rom_id ipxe-git-149b502
%define vgabios_id vgabios-0.6c
@@ -73,6 +73,8 @@
%endif
%endif
%endif
+BuildRequires: pwdutils
+Requires: pwdutils
Requires: virt-utils
Requires: python-curses
%if 0%{?suse_version} < 1110
@@ -101,14 +103,16 @@
Patch04: qemu-datadir.diff
Patch05: kvm-qemu-default-memsize.patch
Patch06: kvm-qemu-user-space-tool-name.patch
-Patch07: kvm-seabios-enable-ahci.patch
-Patch08: kvm-qemu-fix-unused-but-set.patch
+Patch07: kvm-qemu-fix-unused-but-set.patch
+Patch08: kvm-qemu-madvise-DONTFORK-for-tight-memory-migration.patch
+Patch09: kvm-qemu-fix-1mb-memory-assert.patch
# Post-release upstream patches
Patch100: kvm-qemu-preXX-dictzip1.patch
Patch101: kvm-qemu-preXX-dictzip2.patch
Patch102: kvm-qemu-preXX-report-default-mac-used.patch
Patch103: kvm-qemu-preXX-console.patch
+Patch104: kvm-qemu-preXX-ui-avoid-deprecated-gnutls_-_set_priority-functions.patch
Patch155: qemu-kvm-common-code-fixes-for-s390-build.patch
@@ -190,11 +194,13 @@
%patch06 -p1
%patch07 -p1
%patch08 -p1
+%patch09 -p1
# Post-release patches
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
+%patch104 -p1
%patch155 -p1
@@ -225,7 +231,7 @@
echo "kvm-%{version}-%{release}" > KVM_VERSION
./configure \
--prefix=%{_prefix} \
- --sysconfdir=/etc \
+ --sysconfdir=%{_sysconfdir} \
--extra-cflags="%{optflags}" \
--disable-debug-tcg \
--disable-sparse \
@@ -285,7 +291,8 @@
sed -i 's/CFLAGS =/CFLAGS +=/' roms/vgabios/Makefile
# userspace:
-make %{?jobs:-j%jobs}
+make
+#make %{?jobs:-j%jobs}
# Firmware
%ifarch %ix86 x86_64
@@ -370,7 +377,7 @@
%attr(755,root,kvm) %{_bindir}/qemu-ga
%attr(755,root,kvm) %{_bindir}/kvm_stat
%{_datadir}/qemu-kvm
-%dir %attr(0700, root, kvm) %{_sysconfdir}/qemu-kvm/
+%dir %attr(0755, root, kvm) %{_sysconfdir}/qemu-kvm/
%config %attr(644,root,kvm) %{_sysconfdir}/qemu-kvm/target-x86_64.conf
%config %{_sysconfdir}/udev/rules.d/60-kvm.rules
%_mandir/man1/qemu-kvm.1.gz
++++++ kvm-qemu-fix-1mb-memory-assert.patch ++++++
diff --git a/hw/pc.c b/hw/pc.c
index c0a88e1..3412bfa 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -978,9 +978,10 @@ void pc_memory_init(const char *kernel_filename,
ram_addr = qemu_ram_alloc(NULL, "pc.ram",
below_4g_mem_size + above_4g_mem_size);
cpu_register_physical_memory(0, 0xa0000, ram_addr);
- cpu_register_physical_memory(0x100000,
- below_4g_mem_size - 0x100000,
- ram_addr + 0x100000);
+ if (below_4g_mem_size > 0x100000) {
+ cpu_register_physical_memory(0x100000, below_4g_mem_size - 0x100000,
+ ram_addr + 0x100000);
+ }
if (above_4g_mem_size > 0) {
cpu_register_physical_memory(0x100000000ULL, above_4g_mem_size,
ram_addr + below_4g_mem_size);
++++++ kvm-qemu-madvise-DONTFORK-for-tight-memory-migration.patch ++++++
Index: qemu-kvm-0.15.0/exec.c
===================================================================
--- qemu-kvm-0.15.0.orig/exec.c
+++ qemu-kvm-0.15.0/exec.c
@@ -2941,6 +2941,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(Devic
if (!new_block->host) {
new_block->host = qemu_vmalloc(size);
qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE);
+ qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK);
}
#else
fprintf(stderr, "-mem-path option unsupported\n");
@@ -2968,6 +2969,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(Devic
}
#endif
qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE);
+ qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK);
}
}
new_block->length = size;
++++++ kvm-qemu-preXX-ui-avoid-deprecated-gnutls_-_set_priority-functions.patch ++++++
From: Raghavendra D Prabhu
The gnutls_*_set_priority family of functions has been marked deprecated
in 2.12.x. These functions have been superceded by
gnutls_priority_set_direct().
Signed-off-by: Raghavendra D Prabhu
Signed-off-by: Daniel P. Berrange
Signed-off-by: Stefan Hajnoczi
---
Re-sending as a top-level patch because the other patches in the series have
other issues/discussions. Let's get this independent patch in.
ui/vnc-tls.c | 20 +-------------------
1 files changed, 1 insertions(+), 19 deletions(-)
diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c
index 2e2456e..48c818a 100644
--- a/ui/vnc-tls.c
+++ b/ui/vnc-tls.c
@@ -286,10 +286,6 @@ int vnc_tls_validate_certificate(struct VncState *vs)
int vnc_tls_client_setup(struct VncState *vs,
int needX509Creds) {
- static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
- static const int protocol_priority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 };
- static const int kx_anon[] = {GNUTLS_KX_ANON_DH, 0};
- static const int kx_x509[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0};
VNC_DEBUG("Do TLS setup\n");
if (vnc_tls_initialize() < 0) {
@@ -310,21 +306,7 @@ int vnc_tls_client_setup(struct VncState *vs,
return -1;
}
- if (gnutls_kx_set_priority(vs->tls.session, needX509Creds ? kx_x509 : kx_anon) < 0) {
- gnutls_deinit(vs->tls.session);
- vs->tls.session = NULL;
- vnc_client_error(vs);
- return -1;
- }
-
- if (gnutls_certificate_type_set_priority(vs->tls.session, cert_type_priority) < 0) {
- gnutls_deinit(vs->tls.session);
- vs->tls.session = NULL;
- vnc_client_error(vs);
- return -1;
- }
-
- if (gnutls_protocol_set_priority(vs->tls.session, protocol_priority) < 0) {
+ if (gnutls_priority_set_direct(vs->tls.session, needX509Creds ? "NORMAL" : "NORMAL:+ANON-DH", NULL) < 0) {
gnutls_deinit(vs->tls.session);
vs->tls.session = NULL;
vnc_client_error(vs);
--
1.7.5.4
++++++ qemu-datadir.diff ++++++
--- /var/tmp/diff_new_pack.WFAvFp/_old 2011-08-26 09:35:51.000000000 +0200
+++ /var/tmp/diff_new_pack.WFAvFp/_new 2011-08-26 09:35:51.000000000 +0200
@@ -1,8 +1,8 @@
-Index: qemu-kvm-0.15.rc0/configure
+Index: qemu-kvm-0.15.0/configure
===================================================================
---- qemu-kvm-0.15.rc0.orig/configure
-+++ qemu-kvm-0.15.rc0/configure
-@@ -152,7 +152,7 @@ mingw32="no"
+--- qemu-kvm-0.15.0.orig/configure
++++ qemu-kvm-0.15.0/configure
+@@ -152,12 +152,12 @@ mingw32="no"
EXESUF=""
prefix="/usr/local"
mandir="\${prefix}/share/man"
@@ -11,10 +11,16 @@
docdir="\${prefix}/share/doc/qemu"
bindir="\${prefix}/bin"
libdir="\${prefix}/lib"
-Index: qemu-kvm-0.15.rc0/os-posix.c
+ sysconfdir="\${prefix}/etc"
+-confsuffix="/qemu"
++confsuffix="/qemu-kvm"
+ slirp="yes"
+ fmod_lib=""
+ fmod_inc=""
+Index: qemu-kvm-0.15.0/os-posix.c
===================================================================
---- qemu-kvm-0.15.rc0.orig/os-posix.c
-+++ qemu-kvm-0.15.rc0/os-posix.c
+--- qemu-kvm-0.15.0.orig/os-posix.c
++++ qemu-kvm-0.15.0/os-posix.c
@@ -83,7 +83,7 @@ void os_setup_signal_handling(void)
/* Find a likely location for support files using the location of the binary.
For installed binaries this will be "$bindir/../share/qemu". When
@@ -24,11 +30,11 @@
#define BUILD_SUFFIX "/pc-bios"
char *os_find_datadir(const char *argv0)
{
-Index: qemu-kvm-0.15.rc0/Makefile
+Index: qemu-kvm-0.15.0/Makefile
===================================================================
---- qemu-kvm-0.15.rc0.orig/Makefile
-+++ qemu-kvm-0.15.rc0/Makefile
-@@ -261,8 +261,8 @@ ifdef CONFIG_POSIX
+--- qemu-kvm-0.15.0.orig/Makefile
++++ qemu-kvm-0.15.0/Makefile
+@@ -263,8 +263,8 @@ ifdef CONFIG_POSIX
endif
install-sysconfig:
++++++ qemu-kvm-0.15.rc1.tar.bz2 -> qemu-kvm-0.15.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/Makefile new/qemu-kvm-0.15.0/Makefile
--- old/qemu-kvm-0.15.rc1/Makefile 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/Makefile 2011-08-09 14:40:29.000000000 +0200
@@ -192,8 +192,10 @@
test-qmp-commands: test-qmp-commands.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
QGALIB=qga/guest-agent-command-state.o qga/guest-agent-commands.o
+QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c)
-qemu-ga.o: $(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) $(qapi-obj-y)
+$(QGALIB_GEN): $(GENERATED_HEADERS)
+$(QGALIB) qemu-ga.o: $(QGALIB_GEN) $(qapi-obj-y)
qemu-ga$(EXESUF): qemu-ga.o $(QGALIB) qemu-tool.o qemu-error.o error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) $(qapi-obj-y) qemu-timer-common.o qemu-sockets.o module.o qapi/qmp-dispatch.o qapi/qmp-registry.o $(qapi-dir)/qga-qapi-visit.o $(qapi-dir)/qga-qapi-types.o $(qapi-dir)/qga-qmp-marshal.o
QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/VERSION new/qemu-kvm-0.15.0/VERSION
--- old/qemu-kvm-0.15.rc1/VERSION 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/VERSION 2011-08-09 14:40:29.000000000 +0200
@@ -1 +1 @@
-0.14.91
+0.15.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/block/qcow2-snapshot.c new/qemu-kvm-0.15.0/block/qcow2-snapshot.c
--- old/qemu-kvm-0.15.rc1/block/qcow2-snapshot.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/block/qcow2-snapshot.c 2011-08-09 14:40:29.000000000 +0200
@@ -317,7 +317,8 @@
{
BDRVQcowState *s = bs->opaque;
QCowSnapshot *sn;
- int i, snapshot_index, l1_size2;
+ int i, snapshot_index;
+ int cur_l1_bytes, sn_l1_bytes;
snapshot_index = find_snapshot_by_id_or_name(bs, snapshot_id);
if (snapshot_index < 0)
@@ -330,14 +331,19 @@
if (qcow2_grow_l1_table(bs, sn->l1_size, true) < 0)
goto fail;
- s->l1_size = sn->l1_size;
- l1_size2 = s->l1_size * sizeof(uint64_t);
+ cur_l1_bytes = s->l1_size * sizeof(uint64_t);
+ sn_l1_bytes = sn->l1_size * sizeof(uint64_t);
+
+ if (cur_l1_bytes > sn_l1_bytes) {
+ memset(s->l1_table + sn->l1_size, 0, cur_l1_bytes - sn_l1_bytes);
+ }
+
/* copy the snapshot l1 table to the current l1 table */
if (bdrv_pread(bs->file, sn->l1_table_offset,
- s->l1_table, l1_size2) != l1_size2)
+ s->l1_table, sn_l1_bytes) < 0)
goto fail;
if (bdrv_pwrite_sync(bs->file, s->l1_table_offset,
- s->l1_table, l1_size2) < 0)
+ s->l1_table, cur_l1_bytes) < 0)
goto fail;
for(i = 0;i < s->l1_size; i++) {
be64_to_cpus(&s->l1_table[i]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/bsd-user/main.c new/qemu-kvm-0.15.0/bsd-user/main.c
--- old/qemu-kvm-0.15.rc1/bsd-user/main.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/bsd-user/main.c 2011-08-09 14:40:29.000000000 +0200
@@ -856,9 +856,6 @@
usage();
}
}
- if (optind >= argc)
- usage();
- filename = argv[optind];
/* init debug */
cpu_set_log_filename(log_file);
@@ -877,6 +874,11 @@
cpu_set_log(mask);
}
+ if (optind >= argc) {
+ usage();
+ }
+ filename = argv[optind];
+
/* Zero out regs */
memset(regs, 0, sizeof(struct target_pt_regs));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/configure new/qemu-kvm-0.15.0/configure
--- old/qemu-kvm-0.15.rc1/configure 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/configure 2011-08-09 14:40:29.000000000 +0200
@@ -192,6 +192,7 @@
smartcard_nss=""
usb_redir=""
opengl=""
+guest_agent="yes"
# parse CC options first
for opt do
@@ -781,6 +782,10 @@
;;
--enable-usb-redir) usb_redir="yes"
;;
+ --enable-guest-agent) guest_agent="yes"
+ ;;
+ --disable-guest-agent) guest_agent="no"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -870,7 +875,6 @@
default_target_list="\
i386-softmmu \
x86_64-softmmu \
-alpha-softmmu \
arm-softmmu \
cris-softmmu \
lm32-softmmu \
@@ -1064,6 +1068,8 @@
echo " --enable-smartcard-nss enable smartcard nss support"
echo " --disable-usb-redir disable usb network redirection support"
echo " --enable-usb-redir enable usb network redirection support"
+echo " --disable-guest-agent disable building of the QEMU Guest Agent"
+echo " --enable-guest-agent enable building of the QEMU Guest Agent"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
@@ -1123,11 +1129,13 @@
fi
fi
-if has $python; then
- :
-else
- echo "Python not found. Use --python=/path/to/python"
- exit 1
+if test "$guest_agent" != "no" ; then
+ if has $python; then
+ :
+ else
+ echo "Python not found. Use --python=/path/to/python"
+ exit 1
+ fi
fi
if test -z "$target_list" ; then
@@ -1857,14 +1865,16 @@
##########################################
# glib support probe
-if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
- glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
- glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
- libs_softmmu="$glib_libs $libs_softmmu"
- libs_tools="$glib_libs $libs_tools"
-else
- echo "glib-2.0 required to compile QEMU"
- exit 1
+if test "$guest_agent" != "no" ; then
+ if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
+ glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
+ glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
+ libs_softmmu="$glib_libs $libs_softmmu"
+ libs_tools="$glib_libs $libs_tools"
+ else
+ echo "glib-2.0 required to compile QEMU"
+ exit 1
+ fi
fi
##########################################
@@ -2566,6 +2576,29 @@
fi
##########################################
+# __sync_fetch_and_and requires at least -march=i486. Many toolchains
+# use i686 as default anyway, but for those that don't, an explicit
+# specification is necessary
+if test $vhost_net = "yes" && test $cpu = "i386"; then
+ cat > $TMPC << EOF
+int sfaa(unsigned *ptr)
+{
+ return __sync_fetch_and_and(ptr, 0);
+}
+
+int main(int argc, char **argv)
+{
+ int val = 42;
+ sfaa(&val);
+ return val;
+}
+EOF
+ if ! compile_prog "" "" ; then
+ CFLAGS+="-march=i486"
+ fi
+fi
+
+##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -2622,7 +2655,9 @@
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) $tools"
+ if [ "$guest_agent" = "yes" ]; then
tools="qemu-ga\$(EXESUF) $tools"
+ fi
if [ "$check_utests" = "yes" ]; then
tools="check-qint check-qstring check-qdict check-qlist $tools"
tools="check-qfloat check-qjson $tools"
@@ -2726,6 +2761,7 @@
echo "nss used $smartcard_nss"
echo "usb net redir $usb_redir"
echo "OpenGL support $opengl"
+echo "build guest agent $guest_agent"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/darwin-user/main.c new/qemu-kvm-0.15.0/darwin-user/main.c
--- old/qemu-kvm-0.15.rc1/darwin-user/main.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/darwin-user/main.c 2011-08-09 14:40:29.000000000 +0200
@@ -809,9 +809,6 @@
usage();
}
}
- if (optind >= argc)
- usage();
- filename = argv[optind];
/* init debug */
cpu_set_log_filename(log_file);
@@ -830,6 +827,11 @@
cpu_set_log(mask);
}
+ if (optind >= argc) {
+ usage();
+ }
+ filename = argv[optind];
+
/* Zero out regs */
memset(regs, 0, sizeof(struct target_pt_regs));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/hw/fdc.c new/qemu-kvm-0.15.0/hw/fdc.c
--- old/qemu-kvm-0.15.rc1/hw/fdc.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/hw/fdc.c 2011-08-09 14:40:29.000000000 +0200
@@ -36,7 +36,6 @@
#include "qdev-addr.h"
#include "blockdev.h"
#include "sysemu.h"
-#include "block_int.h"
/********************************************************/
/* debug Floppy devices */
@@ -83,7 +82,6 @@
uint8_t max_track; /* Nb of tracks */
uint16_t bps; /* Bytes per sector */
uint8_t ro; /* Is read-only */
- uint8_t media_changed; /* Is media changed */
} FDrive;
static void fd_init(FDrive *drv)
@@ -535,63 +533,16 @@
NULL,
};
-static void fdrive_media_changed_pre_save(void *opaque)
-{
- FDrive *drive = opaque;
-
- drive->media_changed = drive->bs->media_changed;
-}
-
-static int fdrive_media_changed_post_load(void *opaque, int version_id)
-{
- FDrive *drive = opaque;
-
- if (drive->bs != NULL) {
- drive->bs->media_changed = drive->media_changed;
- }
-
- /* User ejected the floppy when drive->bs == NULL */
- return 0;
-}
-
-static bool fdrive_media_changed_needed(void *opaque)
-{
- FDrive *drive = opaque;
-
- return (drive->bs != NULL && drive->bs->media_changed != 1);
-}
-
-static const VMStateDescription vmstate_fdrive_media_changed = {
- .name = "fdrive/media_changed",
- .version_id = 1,
- .minimum_version_id = 1,
- .minimum_version_id_old = 1,
- .pre_save = fdrive_media_changed_pre_save,
- .post_load = fdrive_media_changed_post_load,
- .fields = (VMStateField[]) {
- VMSTATE_UINT8(media_changed, FDrive),
- VMSTATE_END_OF_LIST()
- }
-};
-
static const VMStateDescription vmstate_fdrive = {
.name = "fdrive",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
- .fields = (VMStateField[]) {
+ .fields = (VMStateField []) {
VMSTATE_UINT8(head, FDrive),
VMSTATE_UINT8(track, FDrive),
VMSTATE_UINT8(sect, FDrive),
VMSTATE_END_OF_LIST()
- },
- .subsections = (VMStateSubsection[]) {
- {
- .vmsd = &vmstate_fdrive_media_changed,
- .needed = &fdrive_media_changed_needed,
- } , {
- /* empty */
- }
}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/hw/milkymist-softusb.c new/qemu-kvm-0.15.0/hw/milkymist-softusb.c
--- old/qemu-kvm-0.15.rc1/hw/milkymist-softusb.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/hw/milkymist-softusb.c 2011-08-09 14:40:29.000000000 +0200
@@ -310,10 +310,12 @@
usb_bus_new(&s->usbbus, &softusb_bus_ops, NULL);
/* our two ports */
+ /* FIXME: claim to support full speed devices. qemu mouse and keyboard
+ * report themselves as full speed devices. */
usb_register_port(&s->usbbus, &s->usbport[0], NULL, 0, &softusb_ops,
- USB_SPEED_MASK_LOW);
+ USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
usb_register_port(&s->usbbus, &s->usbport[1], NULL, 1, &softusb_ops,
- USB_SPEED_MASK_LOW);
+ USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
/* and finally create an usb keyboard */
s->usbdev = usb_create_simple(&s->usbbus, "usb-kbd");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/linux-user/main.c new/qemu-kvm-0.15.0/linux-user/main.c
--- old/qemu-kvm-0.15.rc1/linux-user/main.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/linux-user/main.c 2011-08-09 14:40:29.000000000 +0200
@@ -3048,11 +3048,6 @@
usage();
}
}
- if (optind >= argc)
- usage();
- filename = argv[optind];
- exec_path = argv[optind];
-
/* init debug */
cpu_set_log_filename(log_file);
if (log_mask) {
@@ -3070,6 +3065,12 @@
cpu_set_log(mask);
}
+ if (optind >= argc) {
+ usage();
+ }
+ filename = argv[optind];
+ exec_path = argv[optind];
+
/* Zero out regs */
memset(regs, 0, sizeof(struct target_pt_regs));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qemu-kvm-0.15.rc1/vl.c new/qemu-kvm-0.15.0/vl.c
--- old/qemu-kvm-0.15.rc1/vl.c 2011-07-31 11:01:56.000000000 +0200
+++ new/qemu-kvm-0.15.0/vl.c 2011-08-09 14:40:29.000000000 +0200
@@ -1953,8 +1953,13 @@
}
if (p == NULL) {
+#ifdef CONFIG_KVM
/* Use the default "accelerator", kvm */
p = "kvm";
+#else
+ /* Use the default "accelerator", tcg */
+ p = "tcg";
+#endif
}
while (!accel_initalised && *p != '\0') {
++++++ seabios-git-e0f87ce.tar.bz2 -> seabios-git-8e30147.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/Kconfig new/roms/seabios/src/Kconfig
--- old/roms/seabios/src/Kconfig 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/Kconfig 2011-08-10 04:54:35.000000000 +0200
@@ -104,7 +104,7 @@
config AHCI
depends on DRIVES
bool "AHCI controllers"
- default n
+ default y
help
Support for AHCI disk code.
config VIRTIO_BLK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/ahci.c new/roms/seabios/src/ahci.c
--- old/roms/seabios/src/ahci.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/ahci.c 2011-08-10 04:54:35.000000000 +0200
@@ -24,7 +24,6 @@
/****************************************************************
* these bits must run in both 16bit and 32bit modes
****************************************************************/
-u8 *ahci_buf_fl VAR16VISIBLE;
// prepare sata command fis
static void sata_prep_simple(struct sata_cmd_fis *fis, u8 command)
@@ -269,7 +268,7 @@
// Use a word aligned buffer for AHCI I/O
int rc;
struct disk_op_s localop = *op;
- u8 *alignedbuf_fl = GET_GLOBAL(ahci_buf_fl);
+ u8 *alignedbuf_fl = GET_GLOBAL(bounce_buf_fl);
u8 *position = op->buf_fl;
localop.buf_fl = alignedbuf_fl;
@@ -384,7 +383,7 @@
static struct ahci_port_s*
ahci_port_alloc(struct ahci_ctrl_s *ctrl, u32 pnr)
{
- struct ahci_port_s *port = malloc_fseg(sizeof(*port));
+ struct ahci_port_s *port = malloc_tmp(sizeof(*port));
if (!port) {
warn_noalloc();
@@ -408,10 +407,16 @@
return port;
}
-static void ahci_port_realloc(struct ahci_port_s *port)
+static struct ahci_port_s* ahci_port_realloc(struct ahci_port_s *port)
{
+ struct ahci_port_s *tmp;
u32 cmd;
+ tmp = malloc_fseg(sizeof(*port));
+ *tmp = *port;
+ free(port);
+ port = tmp;
+
ahci_port_reset(port->ctrl, port->pnr);
free(port->list);
@@ -427,6 +432,8 @@
cmd = ahci_port_readl(port->ctrl, port->pnr, PORT_CMD);
cmd |= (PORT_CMD_FIS_RX|PORT_CMD_START);
ahci_port_writel(port->ctrl, port->pnr, PORT_CMD, cmd);
+
+ return port;
}
static void ahci_port_release(struct ahci_port_s *port)
@@ -532,62 +539,54 @@
adjsize >>= 10;
adjprefix = 'G';
}
- char *desc = znprintf(MAXDESCSIZE
+ port->desc = znprintf(MAXDESCSIZE
, "AHCI/%d: %s ATA-%d Hard-Disk (%u %ciBytes)"
, port->pnr
, ata_extract_model(model, MAXMODEL, buffer)
, ata_extract_version(buffer)
, (u32)adjsize, adjprefix);
- dprintf(1, "%s\n", desc);
-
- // Register with bcv system.
- int prio = bootprio_find_ata_device(ctrl->pci_tmp, pnr, 0);
- boot_add_hd(&port->drive, desc, prio);
+ port->prio = bootprio_find_ata_device(ctrl->pci_tmp, pnr, 0);
} else {
// found cdrom (atapi)
port->drive.blksize = CDROM_SECTOR_SIZE;
port->drive.sectors = (u64)-1;
u8 iscd = ((buffer[0] >> 8) & 0x1f) == 0x05;
- char *desc = znprintf(MAXDESCSIZE
- , "DVD/CD [AHCI/%d: %s ATAPI-%d %s]"
+ if (!iscd) {
+ dprintf(1, "AHCI/%d: atapi device is'nt a cdrom\n", port->pnr);
+ return -1;
+ }
+ port->desc = znprintf(MAXDESCSIZE
+ , "DVD/CD [AHCI/%d: %s ATAPI-%d DVD/CD]"
, port->pnr
, ata_extract_model(model, MAXMODEL, buffer)
- , ata_extract_version(buffer)
- , (iscd ? "DVD/CD" : "Device"));
- dprintf(1, "%s\n", desc);
-
- // fill cdidmap
- if (iscd) {
- int prio = bootprio_find_ata_device(ctrl->pci_tmp, pnr, 0);
- boot_add_cd(&port->drive, desc, prio);
- }
+ , ata_extract_version(buffer));
+ port->prio = bootprio_find_ata_device(ctrl->pci_tmp, pnr, 0);
}
return 0;
}
// Detect any drives attached to a given controller.
static void
-ahci_detect(void *data)
+ahci_port_detect(void *data)
{
- struct ahci_ctrl_s *ctrl = data;
- struct ahci_port_s *port;
- u32 pnr, max;
+ struct ahci_port_s *port = data;
int rc;
- max = ctrl->caps & 0x1f;
- for (pnr = 0; pnr <= max; pnr++) {
- if (!(ctrl->ports & (1 << pnr)))
- continue;
- dprintf(2, "AHCI/%d: probing\n", pnr);
- ahci_port_reset(ctrl, pnr);
- port = ahci_port_alloc(ctrl, pnr);
- if (port == NULL)
- continue;
- rc = ahci_port_init(port);
- if (rc < 0)
- ahci_port_release(port);
- else
- ahci_port_realloc(port);
+ dprintf(2, "AHCI/%d: probing\n", port->pnr);
+ ahci_port_reset(port->ctrl, port->pnr);
+ rc = ahci_port_init(port);
+ if (rc < 0)
+ ahci_port_release(port);
+ else {
+ port = ahci_port_realloc(port);
+ dprintf(1, "AHCI/%d: registering: \"%s\"\n", port->pnr, port->desc);
+ if (!port->atapi) {
+ // Register with bcv system.
+ boot_add_hd(&port->drive, port->desc, port->prio);
+ } else {
+ // fill cdidmap
+ boot_add_cd(&port->drive, port->desc, port->prio);
+ }
}
}
@@ -596,17 +595,18 @@
ahci_init_controller(struct pci_device *pci)
{
struct ahci_ctrl_s *ctrl = malloc_fseg(sizeof(*ctrl));
+ struct ahci_port_s *port;
u16 bdf = pci->bdf;
- u32 val;
+ u32 val, pnr, max;
if (!ctrl) {
warn_noalloc();
return;
}
- ahci_buf_fl = malloc_low(DISK_SECTOR_SIZE);
- if (!ahci_buf_fl) {
+ if (bounce_buf_init() < 0) {
warn_noalloc();
+ free(ctrl);
return;
}
@@ -628,7 +628,15 @@
dprintf(2, "AHCI: cap 0x%x, ports_impl 0x%x\n",
ctrl->caps, ctrl->ports);
- run_thread(ahci_detect, ctrl);
+ max = ctrl->caps & 0x1f;
+ for (pnr = 0; pnr <= max; pnr++) {
+ if (!(ctrl->ports & (1 << pnr)))
+ continue;
+ port = ahci_port_alloc(ctrl, pnr);
+ if (port == NULL)
+ continue;
+ run_thread(ahci_port_detect, port);
+ }
}
// Locate and init ahci controllers.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/ahci.h new/roms/seabios/src/ahci.h
--- old/roms/seabios/src/ahci.h 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/ahci.h 2011-08-10 04:54:35.000000000 +0200
@@ -75,6 +75,8 @@
struct ahci_cmd_s *cmd;
u32 pnr;
u32 atapi;
+ char *desc;
+ int prio;
};
void ahci_setup(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/block.c new/roms/seabios/src/block.c
--- old/roms/seabios/src/block.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/block.c 2011-08-10 04:54:35.000000000 +0200
@@ -17,6 +17,7 @@
u8 FloppyCount VAR16VISIBLE;
u8 CDCount;
struct drive_s *IDMap[3][CONFIG_MAX_EXTDRIVE] VAR16VISIBLE;
+u8 *bounce_buf_fl VAR16VISIBLE;
struct drive_s *
getDrive(u8 exttype, u8 extdriveoffset)
@@ -38,6 +39,19 @@
return -1;
}
+int bounce_buf_init(void)
+{
+ if (bounce_buf_fl)
+ return 0;
+
+ u8 *buf = malloc_low(CDROM_SECTOR_SIZE);
+ if (!buf) {
+ warn_noalloc();
+ return -1;
+ }
+ bounce_buf_fl = buf;
+ return 0;
+}
/****************************************************************
* Disk geometry translation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/cdrom.c new/roms/seabios/src/cdrom.c
--- old/roms/seabios/src/cdrom.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/cdrom.c 2011-08-10 04:54:35.000000000 +0200
@@ -18,7 +18,6 @@
****************************************************************/
struct drive_s *cdemu_drive_gf VAR16VISIBLE;
-u8 *cdemu_buf_fl VAR16VISIBLE;
static int
cdemu_read(struct disk_op_s *op)
@@ -33,7 +32,7 @@
int count = op->count;
op->count = 0;
- u8 *cdbuf_fl = GET_GLOBAL(cdemu_buf_fl);
+ u8 *cdbuf_fl = GET_GLOBAL(bounce_buf_fl);
if (op->lba & 3) {
// Partial read of first block.
@@ -111,17 +110,16 @@
return;
if (!CDCount)
return;
+ if (bounce_buf_init() < 0)
+ return;
struct drive_s *drive_g = malloc_fseg(sizeof(*drive_g));
- u8 *buf = malloc_low(CDROM_SECTOR_SIZE);
- if (!drive_g || !buf) {
+ if (!drive_g) {
warn_noalloc();
free(drive_g);
- free(buf);
return;
}
cdemu_drive_gf = drive_g;
- cdemu_buf_fl = buf;
memset(drive_g, 0, sizeof(*drive_g));
drive_g->type = DTYPE_CDEMU;
drive_g->blksize = DISK_SECTOR_SIZE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/config.h new/roms/seabios/src/config.h
--- old/roms/seabios/src/config.h 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/config.h 2011-08-10 04:54:35.000000000 +0200
@@ -51,6 +51,8 @@
#define BUILD_SMM_ADDR 0xa8000
#define BUILD_SMM_SIZE 0x8000
+#define BUILD_MAX_SMBIOS_FSEG 600
+
// Important real-mode segments
#define SEG_IVT 0x0000
#define SEG_BDA 0x0040
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/disk.h new/roms/seabios/src/disk.h
--- old/roms/seabios/src/disk.h 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/disk.h 2011-08-10 04:54:35.000000000 +0200
@@ -229,6 +229,7 @@
// block.c
extern u8 FloppyCount, CDCount;
+extern u8 *bounce_buf_fl;
struct drive_s *getDrive(u8 exttype, u8 extdriveoffset);
int getDriveId(u8 exttype, struct drive_s *drive_g);
void map_floppy_drive(struct drive_s *drive_g);
@@ -236,6 +237,7 @@
void map_cd_drive(struct drive_s *drive_g);
int process_op(struct disk_op_s *op);
int send_disk_op(struct disk_op_s *op);
+int bounce_buf_init(void);
// floppy.c
extern struct floppy_ext_dbt_s diskette_param_table2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/optionroms.c new/roms/seabios/src/optionroms.c
--- old/roms/seabios/src/optionroms.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/optionroms.c 2011-08-10 04:54:35.000000000 +0200
@@ -483,7 +483,7 @@
init_optionrom((void*)BUILD_ROM_START, 0, 1);
} else {
// Clear option rom memory
- memset((void*)RomEnd, 0, _max_rom() - RomEnd);
+ memset((void*)RomEnd, 0, max_rom() - RomEnd);
// Find and deploy PCI VGA rom.
struct pci_device *pci;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/pciinit.c new/roms/seabios/src/pciinit.c
--- old/roms/seabios/src/pciinit.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/pciinit.c 2011-08-10 04:54:35.000000000 +0200
@@ -607,6 +607,11 @@
pci_bios_init_device_in_bus(0 /* host bus */);
+ struct pci_device *pci;
+ foreachpci(pci) {
+ pci_init_device(pci_isa_bridge_tbl, pci, NULL);
+ }
+
free(busses);
busses_count = 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/pmm.c new/roms/seabios/src/pmm.c
--- old/roms/seabios/src/pmm.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/pmm.c 2011-08-10 04:54:35.000000000 +0200
@@ -216,6 +216,13 @@
struct zone_s *zone = Zones[i];
zone->info->pprev = &zone->info;
}
+
+ // Add space free'd during relocation in f-segment to ZoneFSeg
+ extern u8 code32init_end[];
+ if ((u32)code32init_end > BUILD_BIOS_ADDR) {
+ memset((void*)BUILD_BIOS_ADDR, 0, (u32)code32init_end - BUILD_BIOS_ADDR);
+ addSpace(&ZoneFSeg, (void*)BUILD_BIOS_ADDR, code32init_end);
+ }
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/seabios/src/smbios.c new/roms/seabios/src/smbios.c
--- old/roms/seabios/src/smbios.c 2011-07-30 01:21:07.000000000 +0200
+++ new/roms/seabios/src/smbios.c 2011-08-10 04:54:35.000000000 +0200
@@ -17,7 +17,13 @@
u16 number_of_structures)
{
struct smbios_entry_point *ep = malloc_fseg(sizeof(*ep));
- void *finaltable = malloc_high(structure_table_length);
+ void *finaltable;
+ if (structure_table_length <= BUILD_MAX_SMBIOS_FSEG)
+ // Table is small enough for f-seg - allocate there. This
+ // works around a bug in JunOS (at least for small SMBIOS tables).
+ finaltable = malloc_fseg(structure_table_length);
+ else
+ finaltable = malloc_high(structure_table_length);
if (!ep || !finaltable) {
warn_noalloc();
free(ep);
@@ -44,7 +50,8 @@
ep->intermediate_checksum -= checksum((void*)ep + 0x10, ep->length - 0x10);
- dprintf(1, "SMBIOS ptr=%p table=%p\n", ep, finaltable);
+ dprintf(1, "SMBIOS ptr=%p table=%p size=%d\n"
+ , ep, finaltable, structure_table_length);
}
#define load_str_field_with_default(type, field, def) \
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org