sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

10360 Commits

Author SHA1 Message Date
Markus Armbruster 96560cb34c docs: New qdev-device-use.txt
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13 17:14:16 -06:00
Milan Plzik 1cb1a66aed 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>
2010-01-13 17:14:16 -06:00
Gleb Natapov bb0300dc57 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>
2010-01-13 17:14:16 -06:00
Christoph Hellwig 4277906d28 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>
2010-01-13 17:14:15 -06:00
Kevin Wolf f8012c135e 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>
2010-01-13 17:14:15 -06:00
Christoph Hellwig 3f5075ae63 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>
2010-01-13 17:14:15 -06:00
Amit Shah 2da69c8d12 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>
2010-01-13 17:14:15 -06:00
Amit Shah f7dcfac024 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>
2010-01-13 17:14:15 -06:00
Amit Shah c4af120f5f 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>
2010-01-13 17:14:15 -06:00
Amit Shah d7209371b1 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>
2010-01-13 17:14:15 -06:00
Amit Shah 22c253d9d6 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>
2010-01-13 17:14:15 -06:00
Amit Shah 5cdc9b76e3 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>
2010-01-13 17:14:15 -06:00
Kevin Wolf 347ed55cd1 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>
2010-01-13 17:14:15 -06:00
Kevin Wolf 3e85c6fd71 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>
2010-01-13 17:14:15 -06:00
Kevin Wolf 756e6736a1 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>
2010-01-13 17:14:15 -06:00
Kevin Wolf b783e409bf 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>
2010-01-13 17:14:15 -06:00
Paolo Bonzini 8f0056b763 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>
2010-01-13 17:14:14 -06:00
Paolo Bonzini 4e2b0658f6 use pkg-config for libcurl whenever available
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-13 17:14:14 -06:00
Paolo Bonzini 9316f80399 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>
2010-01-13 17:14:14 -06:00
Paolo Bonzini 67c274d3c7 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>
2010-01-13 17:14:14 -06:00
Paolo Bonzini f91672e564 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>
2010-01-13 17:14:14 -06:00
Blue Swirl 884a0c7677 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>
2010-01-13 18:59:54 +00:00
Blue Swirl f7e683b8c3 Sparc32: remove dead increment, spotted by clang
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13 18:58:51 +00:00
Blue Swirl f368a3cea4 Sparc32: remove a variable used only for debugging to avoid a clang warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13 18:55:11 +00:00
Blue Swirl a9be79d65f 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>
2010-01-13 18:54:54 +00:00
Blue Swirl 8983536388 Sparc32: remove unused env/envs variables, spotted by clang
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13 18:52:50 +00:00
Blue Swirl 701eed4bf9 Sparc32: remove unused variable, spotted by clang
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-13 18:49:40 +00:00
Stefan Weil cb95c2e44e 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>
2010-01-13 14:50:34 +02:00
Stefan Weil 938a632402 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>
2010-01-13 14:50:18 +02:00
Stefan Weil 61702408c7 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>
2010-01-13 14:28:31 +02:00
Juergen Lock 72ff25e4e9 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>
2010-01-13 01:59:03 +03:00
Michael S. Tsirkin c9f79a3f79 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>
2010-01-12 14:32:19 -06:00
Jan Kiszka dae5079aca 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>
2010-01-12 14:32:19 -06:00
Jan Kiszka ffd8b67f5d 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>
2010-01-12 14:32:19 -06:00
Blue Swirl 23842aabe6 monitor: fix dead assignment spotted by clang
Value stored to 'nb_per_line' is never read.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-12 20:27:43 +00:00
Blue Swirl 3eb26cc216 Sparc64: Fix PCI config accessor order
Fix by Igor Kovalenko.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-12 20:04:53 +00:00
Richard Henderson cc6dfecf02 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>
2010-01-12 19:59:34 +00:00
Richard Henderson 583d121520 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>
2010-01-12 19:59:33 +00:00
Richard Henderson 5e143c43a6 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>
2010-01-12 19:59:32 +00:00
Richard Henderson 7a3766f390 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>
2010-01-12 19:59:31 +00:00
Richard Henderson ba225198d0 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>
2010-01-12 19:59:29 +00:00
Stefano Stabellini 83755c173f 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>
2010-01-12 13:24:52 -06:00
Michael S. Tsirkin dbd483242c 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>
2010-01-12 13:24:52 -06:00
Luiz Capitulino 3d72f9a2be 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>
2010-01-12 13:24:52 -06:00
malc 514d97dea6 dma/sb16: make clang analyzer not complain
Signed-off-by: malc <av1474@comtv.ru>
2010-01-12 21:55:53 +03:00
Blue Swirl 5a5d4a7651 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>
2010-01-11 21:20:53 +00:00
Anthony Liguori c3863f2544 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>
2010-01-11 13:41:00 -06:00
Bruce Rogers ca1a8a0658 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>
2010-01-11 13:41:00 -06:00
Gerd Hoffmann 20a86364c9 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>
2010-01-11 13:41:00 -06:00
Gerd Hoffmann 88169ddf82 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>
2010-01-11 13:41:00 -06:00