Commit Graph

14860 Commits

Author SHA1 Message Date
Gerd Hoffmann 42138043f2 qxl: add to the list of devices which disable the default vga
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-06-06 09:14:42 +02:00
Hans de Goede d4970b071f spice: add option for disabling copy paste support
Some people want to be able disable spice's guest <-> client copy paste support
because of security considerations.

[ kraxel: drop old-version error message ]
2011-06-06 09:14:42 +02:00
Hans de Goede 35106c2df2 spice-qemu-char: Fix flow control in client -> guest direction
In the old spice-vmc device we used to have:
last_out = virtio_serial_write(&svc->port, p, MIN(len, VMC_MAX_HOST_WRITE));
if (last_out > 0)
   ...

Now in the chardev backend we have:
last_out = MIN(len, VMC_MAX_HOST_WRITE);
qemu_chr_read(scd->chr, p, last_out);
if (last_out > 0) {
   ...

Which causes us to no longer detect if the virtio port is not ready
to receive data from us. chardev actually has a mechanism to detect this,
but it requires a separate call to qemu_chr_can_read, before calling
qemu_chr_read (which return void).

This patch uses qemu_chr_can_read to fix the flow control from client to
guest.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-06-06 09:14:42 +02:00
Paolo Bonzini d800040fb4 scsi: fix tracing of scsi requests with simple backend
The simple backend only supports a maximum of 6 arguments.  Split the
scsi_req_parsed event in two parts to cope with the limit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-05 15:05:35 +00:00
Mike Frysinger f9188227a4 configure: check for -Wendif-labels support
Older gcc compilers do not support -Wendif-labels, so move it from the
hardcoded list to the dynamically detected list.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 23:50:04 +02:00
Stefan Weil 9694b5d11a virtio-9p: Remove statement without effect (fix warning from cppcheck)
cppcheck report:
virtio-9p.c:197: warning: Redundant assignment of "flags" to itself

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Reviewed-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 23:39:28 +02:00
Alex Williamson 1f2e98b62d exec: Implement qemu_ram_free_from_ptr()
Required for regions mapped via qemu_ram_alloc_from_ptr().  VFIO
and ivshmem will make use of this to remove mappings when devices
are hot unplugged.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 22:59:15 +02:00
Arun Thomas c83066d4c4 multiboot: set boot_device to first partition
The multiboot info struct's 'boot_device' field has 'part1' set to 0x01, which
maps to the second primary partition. To specify the first primary partition,
'part1' should be set to 0x00, since partition numbers start from zero
according to the multiboot spec.

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 22:12:40 +02:00
Alex Zuepke 81c05daf08 target-arm: BKPT instructions should raise prefetch aborts with IFSR type 00010
Signed-off-by: Alex Zuepke <azuepke@sysgo.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 18:42:17 +02:00
Christophe Fergeau 568fffe353 tcg: Fix unused-but-set-variable warning
Based on a patch from Hans de Goede <hdegoede@redhat.com>

This warning is new in gcc 4.6.

Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 18:32:46 +02:00
Peter Maydell ebecf36381 tcg: If DEBUG_TCGV, distinguish TCGv_ptr from TCGv_i32/TCGv_i64
When compiling with DEBUG_TCGV enabled, make the TCGv_ptr type distinct
from TCGv_i32/TCGv_i64. This means that using an i32 or i64 TCG op to
manipulate a TCGv_ptr will always be detected at compile time, rather
than only if compiling on a host system with the other word size.

NB: the tcg_add_ptr and tcg_sub_ptr macros have been removed as they
were not used anywhere.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 18:26:21 +02:00
Peter Maydell 6bd4b08ab2 tcg/tcg-op.h: Fix prototypes for ld/st functions on 64 bit hosts
The prototypes for the ld/st functions on a 64 bit host declared
the address parameter as a TCGv_i64 rather than a TCGv_ptr. This
worked OK (since the two are aliases), but needs to be fixed to
allow extension of TCG type debugging to i64/i32/ptr mismatches.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 18:26:20 +02:00
Brad 03938c133e Use the correct header in the TCG MIPS code to find cacheflush() on OpenBSD.
Use the correct header in the TCG MIPS code to find cacheflush() on OpenBSD
to fix compilation of the MIPS host support for OpenBSD/mips64 based architecures.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 18:23:53 +02:00
Peter Maydell b7fa9214d8 target-arm: Fix compilation failure for 64 bit hosts
Use the correct _ptr aliases for manipulating the pointer to
the fp_status; this fixes a compilation failure on 64 bit hosts.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 18:13:13 +02:00
Aurelien Jarno 47ba198454 Merge branch 's390-next' of git://repo.or.cz/qemu/agraf
* 's390-next' of git://repo.or.cz/qemu/agraf:
  s390x: implement lrvgr
  s390x: fix cksm instruction
  s390x: free tmp explicitly in every opcode for disas_a5()
  target-s390x: Add missing tcg_temp_free_i32()
  target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x90
  target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x8e
  target-s390x: Add missing tcg_temp_free_i64() in disas_b2()
  target-s390x: Add missing tcg_temp_free_i64() in do_mh()
  target-s390x: Add missing tcg_temp_free_i64() in gen_jcc()
  target-s390x: Fix duplicate call of tcg_temp_new_i64
  target-s390x: Fix wrong argument in call of tcg_gen_shl_i64()
  target-s390x: Fix build for non-linux hosts
  s390x: update zipl rom
2011-06-03 17:47:04 +02:00
Aurelien Jarno 594caf07ce Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
* 'ppc-next' of git://repo.or.cz/qemu/agraf:
  PPC: fix mpc8544ds pci default devices
  Fix segfault on screendump with -nographic
  PPC: install mpc8544ds.dtb
  PPC: fix sregs usage on booke
  ppc: Fix compilation for ppc64-softmmu
2011-06-03 17:45:19 +02:00
Aurelien Jarno 587eabfafc softfloat: add float*_is_zero_or_denormal()
float*_is_zero_or_denormal() is available for float32, but not for
float64, floatx80 and float128. Fix that.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:53 +02:00
Aurelien Jarno 66fcf8ffcf target-i386: use floatx80 constants in helper_fld*_ST0()
Instead of using a table which doesn't correspond to anything from
physical in the CPU, use directly the constants in helper_fld*_ST0().

Cc: Andreas Färber <andreas.faerber@web.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:52 +02:00
Aurelien Jarno be22a9abc0 softfloat: always enable floatx80 and float128 support
Now that softfloat-native is gone, there is no real point on not always
enabling floatx80 and float128 support.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:51 +02:00
Aurelien Jarno cf67c6bad5 softfloat-native: remove
Remove softfloat-native support, all targets are now using softfloat
instead.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:51 +02:00
Aurelien Jarno c31da136a0 target-i386: remove old code handling float64
Now that target-i386 uses softfloat, floatx80 is always available and
there is no need anymore to have code handling both float64 and floax80.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:50 +02:00
Aurelien Jarno 142ab5bb87 target-mips/gdbstub: remove old CONFIG_SOFTFLOAT #ifndef
target-mips has been switched to softfloat only long ago, but
a #ifndef CONFIG_SOFTFLOAT has been forgotten. Remove it.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:49 +02:00
Aurelien Jarno 2c0d18ddd9 target-ppc: remove old CONFIG_SOFTFLOAT #ifdef
target-ppc has been switched to softfloat only long ago, but a
few #ifdef CONFIG_SOFTFLOAT have been forgotten. Remove them.

Cc: Alexander Graf <agraf@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-06-03 16:07:48 +02:00
Alexander Graf e1b45cca62 s390x: implement lrvgr
The LRVGR instruction was missing. Implement it, so everyone's happy.

Reported-by: Balazs Kutil <bkutil@novell.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:02 +02:00
Alexander Graf 5b185639c5 s390x: fix cksm instruction
The cksm instruction was implemented incorrectly, rendering UDP and TCP
checksum calculation wrong, making an emulated s390x Linux guest break
in most networking operations.

This patch fixes odd end checksum calculation, takes the input register
as input for the checksum and optimizes the overflow pieces by a bit.

Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:02 +02:00
Alexander Graf 87b0b70513 s390x: free tmp explicitly in every opcode for disas_a5()
The disas_a5() function provided a TCG tmp variable which was populated
by the respective opcode implementations, but freed at the end of the
function in generic code.

That makes it really hard for code review, so let's move the freeing
to the same scope as the actual allocation.

Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:02 +02:00
Stefan Weil 2497a67fed target-s390x: Add missing tcg_temp_free_i32()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:02 +02:00
Stefan Weil bbf9f3b4d4 target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x90
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:02 +02:00
Stefan Weil 225b6af7cd target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x8e
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:02 +02:00
Stefan Weil e32a18320a target-s390x: Add missing tcg_temp_free_i64() in disas_b2()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Stefan Weil 21de37a778 target-s390x: Add missing tcg_temp_free_i64() in do_mh()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Stefan Weil a825aefbc2 target-s390x: Add missing tcg_temp_free_i64() in gen_jcc()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Stefan Weil 640239b26d target-s390x: Fix duplicate call of tcg_temp_new_i64
tmp2 = tcg_temp_new_i64() is already executed unconditionally,
so there is no need to call it a second time for 64 bit hosts.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Stefan Weil be82ee2aca target-s390x: Fix wrong argument in call of tcg_gen_shl_i64()
tcg_gen_shl_i64 needs a 3rd argument of type TCGv_i64.
Set tmp4 so it can be used here.

v2:
Don't call tcg_const_i64() inside of the loop
because it creates additional code.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Stefan Weil d4a3ef6970 target-s390x: Fix build for non-linux hosts
linux/kvm.h is not always available for compilation.

Neither linux/kvm.h nor kvm.h are needed, so remove both
which also fixes the build problem for non-linux hosts.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Alexander Graf 39f4107981 s390x: update zipl rom
The zipl bootloader rom we have has seen some dramatic speedups upstream,
so let's update it to improve the experience when booting a guest image.

This binary is based on commit id 9a0842dd9823d529f721b418d554f17c72e009e3.

Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 13:34:01 +02:00
Alexander Graf d461e3b929 PPC: fix mpc8544ds pci default devices
After the Qdev'ification of the MPC8544DS board and PCI bus, the internal
PCI bus name changed from "pci" to "pci.0". Reflect this change in the
search for that bus.

This patch enables networking on e500 guests again.

Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 12:42:19 +02:00
Alexander Graf e34b12ae98 Fix segfault on screendump with -nographic
When running -nographic and calling "screendump" on the monitor, qemu
segfaults. Fix the invalid pointer dereference by checking for NULL.

Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 12:42:19 +02:00
Alexander Graf fbd659b76c PPC: install mpc8544ds.dtb
We don't install mpc8544ds.dtb, which means that -M mpc8544ds doesn't
work when installed. Fix it by installing the file.

Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 12:42:19 +02:00
Alexander Graf fafc0b6afe PPC: fix sregs usage on booke
When compiling qemu with kvm support on BookE PPC machines, I get
the following error:

  cc1: warnings being treated as errors
  /tmp/qemu/target-ppc/kvm.c: In function 'kvm_arch_get_registers':
  /tmp/qemu/target-ppc/kvm.c:188: error: unused variable 'sregs'

This is due to overly ambitious #ifdef'ery introduced in 90dc88.
Fix it by keeping code that doesn't depend on new headers alive
for the compiler, but never executed due to failing capability
checks.

CC: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 12:42:19 +02:00
Stefan Weil 1ff7854e88 ppc: Fix compilation for ppc64-softmmu
When QEMU was configured with --enable-debug-tcg,
compilation fails in spr_write_booke206_mmucsr0() and in
spr_write_booke_pid(). Similar changes are also needed
in conditional code which is normally unused.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-03 12:42:19 +02:00
Juha Riihim?ki 578c7b2ca8 audio: fix integer overflow expression
Fix an integer overflow that can happen for signed 32 bit types
when using FLOAT_MIXENG. (Note that at the moment this is only true
when using the MacOSX coreaudio audio driver.)

Signed-off-by: Juha Riihim?ki <juha.riihimaki@nokia.com>
[Peter Maydell: Removed unnecessary casts]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: malc <av1474@comtv.ru>
2011-06-01 00:14:07 +04:00
Anthony Liguori b1d7d2b93a Merge remote-tracking branch 'stefanha/trivial-patches' into staging 2011-05-31 08:23:11 -05:00
Anthony Liguori ede77d297f Merge remote-tracking branch 'amit/for-anthony' into staging 2011-05-31 08:22:03 -05:00
Anthony Liguori ed7ec84007 Merge remote-tracking branch 'bonzini/scsi.2' into staging
Conflicts:
	hw/usb-msd.c
2011-05-31 08:20:56 -05:00
Anthony Liguori f590f4c4b6 Merge remote-tracking branch 'kraxel/usb.14.pull' into staging 2011-05-31 08:17:15 -05:00
Stefan Weil 06ea77bc50 Fix spelling in comment (additon -> addition)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-05-29 11:58:28 +01:00
Stefan Weil b9055c3cca pflash_cfi02: Fix a typo in debug code (TARGET_FMT_pld -> TARGET_FMT_plx)
Thanks to Tobias Hoffmann <th55@gmx.de> for this patch.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-05-29 11:58:28 +01:00
Marcus Comstedt 2eb9f24182 bitbang_i2c: Fix spurious slave read after NACK
After NACKing a read operation, a raising SCL should not trigger a new
read from the slave.  Introduce a new state which just waits for a stop
or start condition after NACK.

Signed-off-by: Marcus Comstedt <marcus@mc.pp.se>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-05-28 16:20:43 +02:00
Blue Swirl 42a623c7db Move user emulator stuff from cpu-exec.c to user-exec.c
Simplify cpu-exec.c by refactoring.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-05-28 06:26:00 +00:00