]> git.proxmox.com Git - qemu.git/log
qemu.git
14 years agochange while to if
Paolo Bonzini [Fri, 15 Jan 2010 08:42:09 +0000 (09:42 +0100)]
change while to if

The while loop will be executed exactly 0 or 1 times, depending on
env->exit_request.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoadd assertions about env->current_tb
Paolo Bonzini [Fri, 15 Jan 2010 08:42:08 +0000 (09:42 +0100)]
add assertions about env->current_tb

By virtue of the previous patch env->current_tb will always be NULL at
the top of cpu_exec's outermost for loop, and at the end of the innermost
while loop.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoclean up env->current_tb
Paolo Bonzini [Fri, 15 Jan 2010 08:42:07 +0000 (09:42 +0100)]
clean up env->current_tb

There are three paths from the innermost while loop of cpu_exec
to the top of the outermost for loop.  Two do not reset
env->current_tb.  Fix this.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix wrong indentation
Paolo Bonzini [Fri, 15 Jan 2010 07:56:36 +0000 (08:56 +0100)]
fix wrong indentation

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokill regs_to_env and env_to_regs
Paolo Bonzini [Fri, 15 Jan 2010 07:56:35 +0000 (08:56 +0100)]
kill regs_to_env and env_to_regs

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoremove dead code from target-i386/exec.h
Paolo Bonzini [Fri, 15 Jan 2010 07:56:34 +0000 (08:56 +0100)]
remove dead code from target-i386/exec.h

These are unused since edea5f0 (no need to define global registers in
cpu-exec.c, 2008-05-10).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agortl8139: fix clang reporting unused assignment of VLAN tagging data
Igor V. Kovalenko [Wed, 13 Jan 2010 22:53:25 +0000 (01:53 +0300)]
rtl8139: fix clang reporting unused assignment of VLAN tagging data

Currently we do not implement VLAN tagging for rtl8139(C+),
still data is read from ring buffer headers.

- augment unused assignment with TODO item
- cast txdw1 to void for now

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoeepro100: Fix multicast support
Stefan Weil [Sun, 20 Dec 2009 15:52:24 +0000 (16:52 +0100)]
eepro100: Fix multicast support

* Handling of multicast list was missing.
* Multicast all was missing.
* Promiscuous mode for multicast frames was wrong.

This patch is a step to synchronize my maintainer version
of eepro100.c (git://repo.or.cz/qemu/ar7.git) with the
version integrated in QEMU.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoeepro100: Restructure code (new function tx_command)
Stefan Weil [Sun, 20 Dec 2009 15:52:22 +0000 (16:52 +0100)]
eepro100: Restructure code (new function tx_command)

Handling of transmit commands is rather complex,
so about 80 lines of code were moved from function
action_command to the new function tx_command.

The two new values "tx" and "cb_address" in the
eepro100 status structure made this possible without
passing too many parameters.

In addition, the moved code was cleaned a little bit:
old comments marked with //~ were removed, C++ style
comments were replaced by C style comments, C++ like
variable declarations after code were reordered.

Simplified mode is still broken. Nor did I fix
endianess issues. Both problems will be fixed in
additional patches (which need this one).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoSparc32: Update OpenBIOS image to r666
Blue Swirl [Sun, 17 Jan 2010 20:36:13 +0000 (20:36 +0000)]
Sparc32: Update OpenBIOS image to r666

Fixes the boot problem introduced by r665 image in
694b9309462f07307d16f492961f01271f10c245.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc: improve CPU register dump
Blue Swirl [Sun, 17 Jan 2010 16:51:57 +0000 (16:51 +0000)]
Sparc: improve CPU register dump

Common:
 * Remove unnecessary 0x prefix
 * Print %y
 * Fix NZVC flag print order to match CPU bit order

Sparc64 specific:
 * Print registers without line wrapping
 * Print %f40-%f63
 * Pretty print CCR flags
 * Print %fsr and %fprs in full precision
 * More consistent formatting

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agofix linux-user microblaze ELF_ARCH definition
Mike Frysinger [Sun, 17 Jan 2010 06:15:05 +0000 (01:15 -0500)]
fix linux-user microblaze ELF_ARCH definition

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agoaudio: include more information into audio_bug's output
malc [Sat, 16 Jan 2010 23:03:30 +0000 (02:03 +0300)]
audio: include more information into audio_bug's output

Signed-off-by: malc <av1474@comtv.ru>
14 years agoRevert "sdlaudio: make it suck less"
malc [Sat, 16 Jan 2010 21:25:29 +0000 (00:25 +0300)]
Revert "sdlaudio: make it suck less"

This reverts commit 4839abe78fd466a3cf06faa7c362154afd5404f1.

The commit was badly broken, Gentoo has sdl as the default driver,
consequently 5 gentoo users have hit the breakage and were kind enough
to report, so thank you:

Claes Gyllenswrd
vekin
Chris

But above all thanks to Toralf Foerster who actually provied enough
information to pinpoint the breakage to sdlaudio.

http://bugs.gentoo.org/show_bug.cgi?id=294269

14 years agoSparc32: improve DMA controller IRQ debugging
Blue Swirl [Sat, 16 Jan 2010 09:06:35 +0000 (09:06 +0000)]
Sparc32: improve DMA controller IRQ debugging

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoESP: improve IRQ debugging
Blue Swirl [Sat, 16 Jan 2010 09:06:34 +0000 (09:06 +0000)]
ESP: improve IRQ debugging

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosparc32 do not clear interrupts when masking
Artyom Tarasenko [Sat, 16 Jan 2010 09:06:32 +0000 (09:06 +0000)]
sparc32 do not clear interrupts when masking

Don't clear interrupts on disabling, because
* Sun4M_SystemArchitecture_edited2.pdf doesn't describe
  that masking or un-masking IRQ shall clear pending ones.

* Field tests also show that SPARCstation-20 doesn't
  clear them.

* The patch makes Solaris 2.5.1/2.6 boot ~1500 times
  faster (~20 seconds instead of ~8 hours)

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoUpdate Sparc OpenBIOS images to r665
Blue Swirl [Sat, 16 Jan 2010 09:05:21 +0000 (09:05 +0000)]
Update Sparc OpenBIOS images to r665

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosparc32 do_unassigned_access overhaul v2
Artyom Tarasenko [Fri, 15 Jan 2010 21:28:56 +0000 (22:28 +0100)]
sparc32 do_unassigned_access overhaul v2

According to pages 9-31 - 9-34 of "SuperSPARC & MultiCache Controller
User's Manual":

1. "A lower priority fault may not overwrite the
    MFSR status of a higher priority fault."
2. The MFAR is overwritten according to the policy defined for the MFSR
3. The overwrite bit is asserted if the fault status register (MFSR)
   has been written more than once by faults of the same class
4. SuperSPARC will never place instruction fault addresses in the MFAR.

Implementation of points 1-3 allows booting Solaris 2.6 and 2.5.1.

v2: CODING_STYLE fixes

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg/x86_64: Avoid unnecessary REX.B prefixes.
Richard Henderson [Thu, 14 Jan 2010 22:59:51 +0000 (14:59 -0800)]
tcg/x86_64: Avoid unnecessary REX.B prefixes.

The existing P_REXB internal opcode flag unconditionally emits
the REX prefix.  Technically it's not needed if the register in
question is %al, %bl, %cl, %dl.

Eliding the prefix requires splitting the P_REXB flag into two,
in order to indicate whether the byte register in question is
in the REG or the R/M field.  Within TCG, the byte register is
in the REG field only for stores.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agonand: Correct random data reads.
Edgar E. Iglesias [Tue, 12 Jan 2010 13:48:19 +0000 (14:48 +0100)]
nand: Correct random data reads.

Random reading depends on having the last row/page latched and not beeing
clobbered between read and any following random reads.

Also, s->iolen must be updated when loading the io/data register with
randomly accessed flash data.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agoMakefile: Fix message for missing configure
Stefan Weil [Thu, 14 Jan 2010 17:11:43 +0000 (18:11 +0100)]
Makefile: Fix message for missing configure

When make is called without a valid configuration,
it should tell the user what to do.

Revision 0e8c9214ba1d4128cf92442cd343bc3733478261
was a regression which resulted in a message
which was no longer user friendly
(reported by Aurelien Jarno).

This patch restores the old behaviour.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Andreas Färber <afaerber@opensolaris.org>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-m68k: fix a typo in 'P' packet processing
Kazu Hirata [Thu, 14 Jan 2010 17:08:00 +0000 (09:08 -0800)]
target-m68k: fix a typo in 'P' packet processing

Attached is a patch to fix a typo in 'P' packet processing for M68K.

Without this patch, QEMU fails to honor GDB's P packets from GDB
(writing to registers) for the address registers (A0 - A7).

The problem is because of an obvious typo.  Notice that the second
"if" condition is meant to be n < 16 in:

  if (n < 8) {
    :
  } else if (n < 8) {

Signed-off-by: Kazu Hirata <kazu@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg/x86_64: Special-case all 32-bit AND operands.
Richard Henderson [Wed, 6 Jan 2010 00:03:00 +0000 (16:03 -0800)]
tcg/x86_64: Special-case all 32-bit AND operands.

This avoids an unnecessary REX.W prefix when dealing with AND
operands that fit into a 32-bit quantity.  The most common change
actually seen is movz[wb]q -> movz[wb]l.

Similarly, avoid REXW in ext{8,16}u_i64 tcg opcodes.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agosh: sm501: Add hardware cursor feature
Shin-ichiro KAWASAKI [Fri, 1 Jan 2010 06:59:39 +0000 (15:59 +0900)]
sh: sm501: Add hardware cursor feature

This patch adds hardware cursor feature to SM501 graphics chip emulation,
to make the graphic console more useful for QEMU SH4 users.

Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoalpha: fix stat64 issue
Vince Weaver [Tue, 29 Dec 2009 05:01:22 +0000 (00:01 -0500)]
alpha: fix stat64 issue

The stat64/fstat64 syscalls are broken for alpha linux-user.

This is because Alpha, even though it is native 64-bits, has a stat64
syscall that is different than regular stat.  This means that the
"TARGET_LONG_BITS==64" check in syscall.c isn't enough.  Below is
a patch that fixes things for me, although it might not be the cleanest
fix.

This issue keeps sixtrack and fma3d spec2k benchmarks from running.

Signed-off-by: Vince Weaver <vince@csl.cornell.edu>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoppc-40x: Correct ESR for zone protection faults.
Edgar E. Iglesias [Mon, 11 Jan 2010 14:32:47 +0000 (15:32 +0100)]
ppc-40x: Correct ESR for zone protection faults.

Raise the zone protection fault in ESR for TLB faults caused by
zone protection bits.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agoppc-40x: Correct decoding of zone protection bits.
Edgar E. Iglesias [Mon, 11 Jan 2010 14:23:58 +0000 (15:23 +0100)]
ppc-40x: Correct decoding of zone protection bits.

The 40x MMU has 15 zones in the ZPR register.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agoppc-40x: Correct check for Endian swapping TLB entries.
Edgar E. Iglesias [Mon, 11 Jan 2010 13:41:53 +0000 (14:41 +0100)]
ppc-40x: Correct check for Endian swapping TLB entries.

Bailout on 40x TLB entries with endianess swapping only if the entry
is valid.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agoppc-40x: Get TLB attributes from TLBLO.
Edgar E. Iglesias [Mon, 11 Jan 2010 13:21:58 +0000 (14:21 +0100)]
ppc-40x: Get TLB attributes from TLBLO.

The ZSEL was incorrectly beeing decoded from TLBHI. Decode it from
TLBLO instead.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agodocs: New qdev-device-use.txt
Markus Armbruster [Thu, 17 Dec 2009 16:19:17 +0000 (17:19 +0100)]
docs: New qdev-device-use.txt

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQemu's internal TFTP server breaks lock-step-iness of TFTP
Milan Plzik [Thu, 7 Jan 2010 12:39:43 +0000 (13:39 +0100)]
Qemu's internal TFTP server breaks lock-step-iness of TFTP

According to RFC 1350 and RFC 2347, TFTP server should answer RRQ by
either OACK or DATA packet. Qemu's internal TFTP server answers RRQ with
additional options by sending both OACK and DATA packet, thus breaking
the "lock-step" feature of the protocol, and also confuses client.

  Proposed solution would be to, in case of OACK packet, wait for ACK
from client and just then start sending data. Attached patch implements
this.

Signed-off-by: Thomas Horsten <thomas@horsten.com>
Signed-off-by: Milan Plzik <milan.plzik@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd KVM paravirt cpuid leaf
Gleb Natapov [Wed, 13 Jan 2010 13:25:06 +0000 (15:25 +0200)]
Add KVM paravirt cpuid leaf

Initialize KVM paravirt cpuid leaf and allow user to control guest
visible PV features through -cpu flag.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio-blk: remove dead variable in virtio_blk_handle_scsi
Christoph Hellwig [Wed, 13 Jan 2010 12:30:32 +0000 (13:30 +0100)]
virtio-blk: remove dead variable in virtio_blk_handle_scsi

As pointed out by clang size is only ever written to, but never actually
used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqcow/qcow2: implement bdrv_aio_flush
Kevin Wolf [Tue, 12 Jan 2010 12:49:43 +0000 (13:49 +0100)]
qcow/qcow2: implement bdrv_aio_flush

Now that we do not have to flush the backing device anymore implementing
the bdrv_aio_flush method for image formats is trivial.

[hch: forward ported to qemu mainline from a product tree]

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock: flush backing_hd in the right place
Christoph Hellwig [Tue, 12 Jan 2010 12:49:23 +0000 (13:49 +0100)]
block: flush backing_hd in the right place

The backing device is only modified from bdrv_commit.  So instead of
flushing it every time bdrv_flush is called for the front-end device
only flush it after we're written data to it in bdrv_commit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agojson-parser: remove dead increment
Amit Shah [Wed, 13 Jan 2010 10:54:47 +0000 (16:24 +0530)]
json-parser: remove dead increment

clang-analyzer points out a redundant increment.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqcow2-refcount: remove dead assignment
Amit Shah [Wed, 13 Jan 2010 10:54:46 +0000 (16:24 +0530)]
qcow2-refcount: remove dead assignment

clang-analyzer points out a redundant assignment.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agohw/vga.c: remove dead assignment
Amit Shah [Wed, 13 Jan 2010 10:54:45 +0000 (16:24 +0530)]
hw/vga.c: remove dead assignment

clang-analyzer points out a redundant assignment.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agox86: translate.c: remove dead assignment
Amit Shah [Wed, 13 Jan 2010 10:54:44 +0000 (16:24 +0530)]
x86: translate.c: remove dead assignment

clang-analyzer points out a redundant assignment.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio: net: remove dead assignment
Amit Shah [Wed, 13 Jan 2010 10:54:43 +0000 (16:24 +0530)]
virtio: net: remove dead assignment

clang-analyzer points out value assigned to 'len' is not used.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovl.c: Remove dead assignment
Amit Shah [Wed, 13 Jan 2010 10:54:42 +0000 (16:24 +0530)]
vl.c: Remove dead assignment

clang-analyzer pointed out the value of 'sockets' is never reused.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoosdep.c: Fix accept4 fallback
Kevin Wolf [Wed, 13 Jan 2010 15:20:56 +0000 (16:20 +0100)]
osdep.c: Fix accept4 fallback

Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is older
than the kernel of the build system. Unfortunately, v1 was committed instead of
v2, so the code has a bug that was revealed in the review (checking for the
wrong error code).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-img rebase
Kevin Wolf [Tue, 12 Jan 2010 11:55:18 +0000 (12:55 +0100)]
qemu-img rebase

This adds a rebase subcommand to qemu-img which allows to change the backing
file of an image.

In default mode, both the current and the new backing file need to exist, and
after the rebase, the COW image is guaranteed to have the same guest visible
content as before. To achieve this, old and new backing file are compared and,
if necessary, data is copied from the old backing file into the COW image.

With -u an unsafe mode is enabled that doesn't require the backing files to
exist. It merely changes the backing file reference in the COW image. This is
useful for renaming or moving the backing file. The user is responsible to make
sure that the new backing file has no changes compared to the old one, or
corruption may occur.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock: Add bdrv_change_backing_file
Kevin Wolf [Tue, 12 Jan 2010 11:55:17 +0000 (12:55 +0100)]
block: Add bdrv_change_backing_file

Introduce the functions needed to change the backing file of an image. The
function is implemented for qcow2.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock: Introduce BDRV_O_NO_BACKING
Kevin Wolf [Tue, 12 Jan 2010 11:55:16 +0000 (12:55 +0100)]
block: Introduce BDRV_O_NO_BACKING

If an image references a backing file that doesn't exist, qemu-img info fails
to open this image. Exactly in this case the info would be valuable, though:
the user might want to find out which file is missing.

This patch introduces a BDRV_O_NO_BACKING flag to ignore the backing file when
opening the image. qemu-img info is the first user and provides info now even
if the backing file is invalid.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomove kbd/mouse handling to input.c
Paolo Bonzini [Wed, 13 Jan 2010 13:05:34 +0000 (14:05 +0100)]
move kbd/mouse handling to input.c

Move 200 lines out of vl.c already into common code that only needs to
be compiled once.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agouse pkg-config for libcurl whenever available
Paolo Bonzini [Wed, 13 Jan 2010 08:52:56 +0000 (09:52 +0100)]
use pkg-config for libcurl whenever available

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agouse pkg-config for sdl whenever available
Paolo Bonzini [Wed, 13 Jan 2010 08:52:55 +0000 (09:52 +0100)]
use pkg-config for sdl whenever available

Together with the first patch this enables using the prefixed
pkg-config, thus picking up the correct flags for SDL.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofixes to the static compilation case for sdl
Paolo Bonzini [Wed, 13 Jan 2010 08:52:54 +0000 (09:52 +0100)]
fixes to the static compilation case for sdl

After the next commit, pkg-config could be used for the shared library
configuration case and sdl-config for static libraries.  So I prepare
the test here by doing two changes:

at the same time I remove useless backslashes from the invocation of
grep;

1) fixing a typo ($sd_cflags).  The typo has been there since commit
1ac88f2 (remove sdl_static. Just do the right thing if static is yes,
2009-07-27).

2) fixing an erroneous "test `... | grep > /dev/null`" idiom that would
never succeed since grep's output would be empty;

3) checking the status code after executing sdl-config --static --libs;
this is needed for the next patch only.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agouse cross-prefix for pkgconfig
Paolo Bonzini [Wed, 13 Jan 2010 08:52:53 +0000 (09:52 +0100)]
use cross-prefix for pkgconfig

Since pkgconfig can give different output for different targets,
it should be tried with the cross-compilation prefix first.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agopcnet: remove dead nested assignment, spotted by clang
Blue Swirl [Wed, 13 Jan 2010 18:59:54 +0000 (18:59 +0000)]
pcnet: remove dead nested assignment, spotted by clang

Although the value stored to 'addr' is used in the enclosing expression,
the value is never actually read from 'addr'.

Probably a typo.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: remove dead increment, spotted by clang
Blue Swirl [Wed, 13 Jan 2010 18:58:51 +0000 (18:58 +0000)]
Sparc32: remove dead increment, spotted by clang

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: remove a variable used only for debugging to avoid a clang warning
Blue Swirl [Wed, 13 Jan 2010 18:55:11 +0000 (18:55 +0000)]
Sparc32: remove a variable used only for debugging to avoid a clang warning

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc: comment out unused variable, spotted by clang
Blue Swirl [Wed, 13 Jan 2010 18:54:54 +0000 (18:54 +0000)]
Sparc: comment out unused variable, spotted by clang

The variable is_annulled is referenced in a FIXME comment, so instead
of removing the variable, comment out the lines so that the FIXME
can be understood.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: remove unused env/envs variables, spotted by clang
Blue Swirl [Wed, 13 Jan 2010 18:52:50 +0000 (18:52 +0000)]
Sparc32: remove unused env/envs variables, spotted by clang

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: remove unused variable, spotted by clang
Blue Swirl [Wed, 13 Jan 2010 18:49:40 +0000 (18:49 +0000)]
Sparc32: remove unused variable, spotted by clang

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agopci: Add missing 'const' in argument to pci_get_xxx
Stefan Weil [Mon, 11 Jan 2010 20:20:13 +0000 (21:20 +0100)]
pci: Add missing 'const' in argument to pci_get_xxx

pci_get_byte, pci_get_word, pci_get_long and pci_get_quad
all take a const uint8_t pointer, because they only read
the configuration data.

Their prototypes should reflect this fact.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoeepro100: Update ROM file support
Stefan Weil [Thu, 7 Jan 2010 16:13:30 +0000 (17:13 +0100)]
eepro100: Update ROM file support

Use new way to associate ROM files to devices.

Currently, there is only a ROM file for i82559er
included in QEMU, so the patch does not add
.romfile for the other devices.

When flexible mode is fixed in eepro100, adding
more ROM files will be possible. It should be
possible to create them from pxe-i82559er.bin,
because etherboot uses the same driver for all
eepro100 devices (only PCI ids differ).

Maybe it is even possible to create a single
pxe-i8255x.bin which supports all eepro100 devices
(not supported with current etherboot).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoeepro100: Fix initial value for PCI_STATUS
Stefan Weil [Thu, 7 Jan 2010 11:15:25 +0000 (12:15 +0100)]
eepro100: Fix initial value for PCI_STATUS

The numerical value was wrong (0x2800 instead of 0x0280)
which indeed did not make sense.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoWorkaround for broken OSS_GETVERSION on FreeBSD, part two
Juergen Lock [Tue, 12 Jan 2010 22:48:04 +0000 (23:48 +0100)]
Workaround for broken OSS_GETVERSION on FreeBSD, part two

Turns out on those versions of FreeBSD (>= 7.x) that know OSS_GETVERSION
the ioctl doesn't actually work yet (except in the Linuxolator), so if
building on FreeBSD assume the sound drivers are new enough if the ioctl
returns the errno it does currently on FreeBSD.

(Rev 2 after private discussion with malc.)

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: malc <av1474@comtv.ru>
14 years agovirtio-net: mac property is mandatory
Michael S. Tsirkin [Tue, 12 Jan 2010 18:50:17 +0000 (20:50 +0200)]
virtio-net: mac property is mandatory

Mac feature bit isn't going to work as all network cards already have a
'mac' property to set the mac address.  Remove it from mask and add in
get_features.

Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: Detect availability of kvm_para.h
Jan Kiszka [Tue, 12 Jan 2010 18:53:48 +0000 (19:53 +0100)]
kvm: Detect availability of kvm_para.h

Will be required for upcoming KVM cpuid leaf. Host kernels >= 2.6.32 as
well as future kvm-kmod releases (more recent than kvm-kmod-2.6.32.3)
do/will provide them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: Use kvm-kmod headers if available
Jan Kiszka [Tue, 12 Jan 2010 18:53:45 +0000 (19:53 +0100)]
kvm: Use kvm-kmod headers if available

Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM
kernel headers. Use it when available and not overruled by --kerneldir.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomonitor: fix dead assignment spotted by clang
Blue Swirl [Tue, 12 Jan 2010 20:27:43 +0000 (20:27 +0000)]
monitor: fix dead assignment spotted by clang

Value stored to 'nb_per_line' is never read.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc64: Fix PCI config accessor order
Blue Swirl [Tue, 12 Jan 2010 20:04:53 +0000 (20:04 +0000)]
Sparc64: Fix PCI config accessor order

Fix by Igor Kovalenko.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Implement ext32[su]_i64
Richard Henderson [Tue, 12 Jan 2010 19:59:34 +0000 (19:59 +0000)]
tcg-sparc: Implement ext32[su]_i64

The 32-bit right-shift instructions is defined to extend the shifted
output to 64-bits.  A shift count of zero therefore is a simple
extension without actually shifting.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Implement division properly.
Richard Henderson [Tue, 12 Jan 2010 19:59:33 +0000 (19:59 +0000)]
tcg-sparc: Implement division properly.

The {div,divu}2 opcodes are intended for systems for which the
division instruction produces both quotient and remainder.  Sparc
is not such a system.  Indeed, the remainder must be computed as

  quot = a / b
  rem = a - (quot * b)

Split out a tcg_out_div32 function that properly initializes Y
with the extension of the input to 64-bits.  Discard the code
that used the 64-bit DIVX on sparc9/sparcv8plus without extending
the inputs to 64-bits.  Implement remainders in terms of division
followed by multiplication.

Signed-off-by: Richard Henderson <rth@twiddle.net>
[blauwirbel@gmail.com: applied rth's typo fix in tcg_out_div32]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Do not remove %o[012] from 'r' constraint.
Richard Henderson [Tue, 12 Jan 2010 19:59:32 +0000 (19:59 +0000)]
tcg-sparc: Do not remove %o[012] from 'r' constraint.

Only 'L' constraint needs that.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Implement add2, sub2, mulu2.
Richard Henderson [Tue, 12 Jan 2010 19:59:31 +0000 (19:59 +0000)]
tcg-sparc: Implement add2, sub2, mulu2.

Add missing 32-bit double-word support opcodes.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Add tcg_out_arithc.
Richard Henderson [Tue, 12 Jan 2010 19:59:29 +0000 (19:59 +0000)]
tcg-sparc: Add tcg_out_arithc.

Add a function to handle the register-vs-immediate test for arithmetic.

Also, adjust the OP_32_64 macro so that it auto-indents properly.
Rename the gen_arith32 label to gen_arith, since it handles 64-bit
arithmetic as well.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agovnc_refresh: return if vd->timer is NULL
Stefano Stabellini [Mon, 11 Jan 2010 17:30:50 +0000 (17:30 +0000)]
vnc_refresh: return if vd->timer is NULL

Hi all,
calling vnc_update_client in vnc_refresh might have the unlikely side
effect of setting vd->timer = NULL, if the last vnc client disconnected.
In this case we have to return from vnc_refresh without updating the
timer, otherwise we cause a segfault.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: fix thinko leading to guest crashes
Michael S. Tsirkin [Tue, 12 Jan 2010 19:16:59 +0000 (21:16 +0200)]
qdev: fix thinko leading to guest crashes

Without this fix, guest crashes with drive=virtio.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: Don't free async event's 'data'
Luiz Capitulino [Fri, 8 Jan 2010 18:45:53 +0000 (16:45 -0200)]
QMP: Don't free async event's 'data'

The monitor_protocol_event() function will free the
event's data, this is wrong as 'data' management is up
to the caller.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agodma/sb16: make clang analyzer not complain
malc [Tue, 12 Jan 2010 18:55:45 +0000 (21:55 +0300)]
dma/sb16: make clang analyzer not complain

Signed-off-by: malc <av1474@comtv.ru>
14 years agoSparc64: enable real access to PCI configuration space
Blue Swirl [Mon, 11 Jan 2010 21:20:53 +0000 (21:20 +0000)]
Sparc64: enable real access to PCI configuration space

Leave the bogus access method used by OpenBIOS in place for now.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoUpdate to SeaBIOS 0.5.1
Anthony Liguori [Mon, 11 Jan 2010 19:27:35 +0000 (13:27 -0600)]
Update to SeaBIOS 0.5.1

  5da6833 Update version to 0.5.1
  669c991 Fix sign error preventing incorrect memory over 4gig calculation.
  7e6bd3e Minor - better indent assembler in int1587.
  48cf232 Add comment explaining why mptable is in low memory.
  643062f Add int1589 support.
  085debd Set FDPT in irq table even for small drives.
  7c1b186 Reduce #ifs by weeding out some cross-chunk function definitions.
  f9b25d3 Fix vgahook sign issue; add warning to build to catch future cases.
  3862b2d vgabios: Fix compile error due to fixed prototypes.
  1ca05b0 Be sure to add "void" to all function prototypes that take no args.
  b5bb9db mptable: Reset pinmask on new bus or device.
  8918989 Detect latest FC12 gcc -combine breakage.
  c9d3c2d Minor vga binary cleanups.
  9a8609f Make MTRR region 0xc0000-0x100000 be cached.
  fdca418 Force a link error if a function is used from the wrong code chunk.
  dad41d9 Add __noreturn define for __attribute__((noreturn)).
  c003148 Implement native 32bit APM support.
  5c99b6c Commit compiled dsdt file; misc comment updates.
  29f4b91 prevent acpi from rerouting SCI interrupt
  4c94b7e enumerate all PCI buses in mptable
  871e0a0 Add support for 32bit PCI BIOS entry.
  eda2c83 Only add "addr32" to memory accesses that require them.
  52a300f Introduce MODESEGMENT define; rename VISIBLE32 to VISIBLE32FLAT.
  fe2c3ee Allocate smbios in temp space and copy into final location.
  b164d2c Clear user reserved interrupts (0x60-0x66).
  d9104ff Remove pci_bios_bigmem_addr; set pci_bios_mem_addr=0xe0000000
  14021f2 Add initial support for ATA DMA.
  8362699 Allocate mptable in temp space and copy into final location.
  979862e Also report memory over 4G during init.
  928d4df provide correct pci routing information in mptable
  afc02da Add symbolic definitions for MTRR code.
  fb214dc Fix yield() so it works from boot code.
  2ceeec9 Fix potential build failure due to text16 section being too large.
  a2195e4 Increase version in preparation for next release.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomake help output be a little more self-consistent
Bruce Rogers [Wed, 6 Jan 2010 19:33:57 +0000 (12:33 -0700)]
make help output be a little more self-consistent

Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agopc: add rombar to compat properties for pc-0.10 and pc-0.11
Gerd Hoffmann [Fri, 8 Jan 2010 14:25:42 +0000 (15:25 +0100)]
pc: add rombar to compat properties for pc-0.10 and pc-0.11

So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load method
by default.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agopci: allow loading roms via fw_cfg.
Gerd Hoffmann [Fri, 8 Jan 2010 14:25:41 +0000 (15:25 +0100)]
pci: allow loading roms via fw_cfg.

This patch adds a pci bus property 'rombar' which specifies whenever
the pci rom should be loaded via pci rom bar (default) or via fw_cfg.
The later can be used for compatibility with older qemu versions where
no pci rom bar is present.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoroms: rework rom loading via fw
Gerd Hoffmann [Fri, 8 Jan 2010 14:25:40 +0000 (15:25 +0100)]
roms: rework rom loading via fw

This patch changes the way rom loading via fw_cfg is handled.
Instead of having pc_init1() call a function which passed all
roms to the firmware config we simply pass a pointer to fw_cfg
to the rom loader.

Advantage: loading roms via firmware works also for devices which
are initialized after pc_init1(), i.e. everyting added via -device.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofw_cfg: rom loader tweaks.
Gerd Hoffmann [Fri, 8 Jan 2010 14:25:39 +0000 (15:25 +0100)]
fw_cfg: rom loader tweaks.

Changes:
 - make dir argument mandatory, we allways have one anyway
   (vgaroms or genroms).
 - check for duplicates, skip loading if found.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoroms: minor fixes and cleanups.
Gerd Hoffmann [Fri, 8 Jan 2010 14:25:38 +0000 (15:25 +0100)]
roms: minor fixes and cleanups.

Changes:
  - Drop extra file argument from rom_add_file().
  - Drop fw_dir check in do_info_roms, we allways have a dir name.
  - code style fixes.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agopc: add machine type for 0.12
Gerd Hoffmann [Fri, 8 Jan 2010 14:25:37 +0000 (15:25 +0100)]
pc: add machine type for 0.12

Add a new machine type for qemu 0.12.

Also fixup the 0.11 machine type: msi for virtio-blk-pci was enabled
after the 0.11 release, so turn it off in the 0.11 machine type.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHandle TFTP ERROR from client
Thomas Horsten [Thu, 7 Jan 2010 17:01:28 +0000 (17:01 +0000)]
Handle TFTP ERROR from client

If a PXE client only wants to find out the size of a file, it will
open the file and then abort the transfer by sending a TFTP ERROR packet.

The ERROR packet should cause qemu to terminate the session. If not,
the sessions will soon run out and cause timeouts in the client.

Also, if a TFTP session already exists with same IP/UDP port, it
should be terminated when a new RRQ is received, instead of creating a
duplicate (which will never be used).

A patch for gPXE to send the ERROR packet is also being submitted to
gPXE. Together they resolve slowness/hanging when booting pxegrub from
qemu's internal TFTP server. The patch from Milan Plzik to return
after sending OACK is also required for a complete fix.

Signed-off-by: Thomas Horsten <thomas@horsten.com>
Signed-off-by: Milan Plzik <milan.plzik@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agodmg: fix ->open failure
Christoph Hellwig [Mon, 11 Jan 2010 13:06:54 +0000 (14:06 +0100)]
dmg: fix ->open failure

Currently the dmg image format driver simply opens the images as raw
if any kind of failure happens.  This is contrarty to the behaviour
of all other image formats which just return an error and let the
block core deal with it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio-pci: thinko fix
Michael S. Tsirkin [Mon, 11 Jan 2010 15:57:41 +0000 (17:57 +0200)]
virtio-pci: thinko fix

Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio will
sometimes clear all status registers on bus master disable, which loses
information such as VIRTIO_CONFIG_S_FAILED bit.  This is a result of
a patch being misapplied: code uses !  instead of ~ for bit
operations as in Yan's original patch.  This obviously does not make
sense.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio: add features as qdev properties
Michael S. Tsirkin [Sun, 10 Jan 2010 11:52:53 +0000 (13:52 +0200)]
virtio: add features as qdev properties

Add feature bits as properties to virtio. This makes it possible to e.g. define
machine without indirect buffer support, which is required for 0.10
compatibility, or without hardware checksum support, which is required for 0.11
compatibility.  Since default values for optional features are now set by qdev,
get_features callback has been modified: it sets non-optional bits, and clears
bits not supported by host.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio: rename features -> guest_features
Michael S. Tsirkin [Sun, 10 Jan 2010 11:52:47 +0000 (13:52 +0200)]
virtio: rename features -> guest_features

Rename features->guest_features. This is
what they are, avoid confusion with
host features which we also need to keep around.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: add bit property type
Michael S. Tsirkin [Sun, 10 Jan 2010 11:52:41 +0000 (13:52 +0200)]
qdev: add bit property type

This adds "bit" property type, which is a boolean stored in a 32 bit
integer field, with legal values on and off.  Will be used by virtio for
feature bits.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agopc-bios: Update README (SeaBIOS)
Stefan Weil [Thu, 7 Jan 2010 18:27:49 +0000 (19:27 +0100)]
pc-bios: Update README (SeaBIOS)

The PC BIOS no longer comes from Bochs.
This patch updates the related entry.

V2 - Modify SeaBIOS description and URL
     (Thanks to Gleb Natapov for the hint).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agolsi: pass lsi_request to lsi_reselect
Gerd Hoffmann [Wed, 6 Jan 2010 16:08:04 +0000 (17:08 +0100)]
lsi: pass lsi_request to lsi_reselect

All callers of lsi_reselect have a lsi_request struct at hand anyway.
So just pass it directly instead of having lsi_reselect search for it
using the tag.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agolsi: move dma_len+dma_buf into lsi_request
Gerd Hoffmann [Wed, 6 Jan 2010 16:08:03 +0000 (17:08 +0100)]
lsi: move dma_len+dma_buf into lsi_request

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agolsi: move current_dev into lsi_request
Gerd Hoffmann [Wed, 6 Jan 2010 16:08:02 +0000 (17:08 +0100)]
lsi: move current_dev into lsi_request

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agolsi: have lsi_request for the whole life time of the request.
Gerd Hoffmann [Wed, 6 Jan 2010 16:08:01 +0000 (17:08 +0100)]
lsi: have lsi_request for the whole life time of the request.

Right now lsi_request is allocated when a request is queued and released
when a request is unqueued.  With this patch applied the lsi_request is
kept for the whole lifetime of the scsi request.

Rationale: We can use it for per-request data then.  The patch does that
already for the request tag.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agolsi: use QTAILQ for lsi_queue
Gerd Hoffmann [Wed, 6 Jan 2010 16:08:00 +0000 (17:08 +0100)]
lsi: use QTAILQ for lsi_queue

Replace the funky array logic for queued commands with standard
qemu list functions.  Also rename lsi_queue to lsi_request.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow
Roland Dreier [Wed, 6 Jan 2010 04:43:34 +0000 (20:43 -0800)]
vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow

Check that the cursor dimensions passed from the guest for the
DEFINE_CURSOR command don't overflow the available space in the
cursor.image[] or cursor.mask[] arrays before copying data from the
guest into those arrays.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoremove pending exception on vcpu reset.
Gleb Natapov [Wed, 6 Jan 2010 14:30:10 +0000 (16:30 +0200)]
remove pending exception on vcpu reset.

Without this qemu can even start on kvm modules with events support
since default value of exception_injected in zero and this is #DE
exception.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix CPU topology initialization
Jiri Denemark [Tue, 5 Jan 2010 16:26:34 +0000 (17:26 +0100)]
Fix CPU topology initialization

Late initialization of CPU topology in CPUState prevents KVM guests to
actually see the topology.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMCE: Fix bug of IA32_MCG_STATUS after system reset
Huang Ying [Tue, 5 Jan 2010 08:32:24 +0000 (16:32 +0800)]
MCE: Fix bug of IA32_MCG_STATUS after system reset

Now, if we inject a fatal MCE into guest OS, for example Linux, Linux
will go panic and then reboot. But if we inject another MCE now,
system will reset directly instead of go panic firstly, because
MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does
not follow the behavior in real hardware.

This patch fixes this via set env->mcg_status to 0 during system reset.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>