Commit graph

11844 commits

Author SHA1 Message Date
Michael S. Tsirkin 940cda94dc virtio-net: truncating packet
virtio net attempts to peek into virtio queue to
determine that we have enough space for the complete
packet to fit. However, it fails to account for space
consumed by virtio net header when it does this,
under stress this results in a failure
with the message 'truncating packet'.

redhat bz 591494.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-06-07 17:23:04 +03:00
Michael S. Tsirkin 7f97448122 virtio-net: stop vhost backend on vmstop
vhost net currently keeps running after vmstop,
which causes trouble as qemy does not check
for dirty pages anymore.
The fix is to simply keep vm and vhost running/stopped
status in sync.

Tested-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-06-02 11:54:45 +03:00
Isaku Yamahata e075e788c9 pci-hotplug: make them aware of pci domain.
add helper function which converts root bus to pci domain.
make them aware of pci domain.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31 16:39:55 +03:00
Isaku Yamahata 1b4e8f732d msix: remove duplicated defines.
remove defines which are already defined in pci_regs.h

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31 16:33:52 +03:00
Isaku Yamahata 0c6fcb6210 pci.h: remove unused constants.
So remove unused constants,
PCI_STATUS_RESERVED_MASK_LO, PCI_STATUS_RESERVED_MASK_HI,
PCI_COMMAND_RESERVED, PCI_COMMAND_RESERVED_MASK_HI.
They were used once, but they aren't used anymore.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31 16:33:52 +03:00
Isaku Yamahata 3c18685f43 pci: add const to pci_is_express(), pci_config_size().
add const to pci_is_express(), pci_config_size().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31 16:33:52 +03:00
Isaku Yamahata 5e434f4e60 pci: clean up of pci_set_default_subsystem_id().
Use pci accessor function.
don't return value because it always return 0 and
the caller doesn't check the return value.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31 16:33:52 +03:00
Blue Swirl aa6f63fff6 mc146818rtc: improve debugging
Add a separate flag for debugging coalesced interrupts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-30 19:20:07 +00:00
Artyom Tarasenko da7ed37955 sparc32 SuperSPARC MMU Breakpoint Action register (SS-20 OBP fix)
SuperSPARC MMU Breakpoint Action register is used by OBP at boot

The patch allows booting Solaris and some other OS with
SPARCStation-20 OBP.

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 21:22:02 +00:00
Blue Swirl 471fd34221 pc: improve debugging
Add a DPRINTF macro and use it for ISA and PIC interrupts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 20:23:49 +00:00
Blue Swirl 0a3c592166 apic: improve debugging
Add a DPRINTF macro. Use TARGET_FMT_plx for printing target_phys_addr_t
items. Add a separate flag for debugging coalescing interrupts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 20:23:48 +00:00
Blue Swirl 8ac02ff882 i8259: improve debugging
Add a DPRINTF macro.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 20:23:19 +00:00
Blue Swirl 03ae77d6d2 sparc64: fix user emulator build
Accesses with _nucleus prefix are not available when building user
emulators:
  CC    sparc64-linux-user/op_helper.o
cc1: warnings being treated as errors
/src/qemu/target-sparc/op_helper.c: In function 'helper_ldda_asi':
/src/qemu/target-sparc/op_helper.c:3063: error: implicit declaration of function 'ldq_nucleus'

Avoid making such accesses. Fixes breakage by 54a3c0f032.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 10:20:44 +00:00
Artyom Tarasenko 3386376c04 Pad iommu with an empty slot (necessary for SunOS 4.1.4)
On the real hardware (SS-5, LX) the MMU is not padded, but aliased.
Software shouldn't use aliased addresses, neither should it crash
when it uses (on the real hardware it wouldn't). Using empty_slot
instead of aliasing can help with debugging such accesses.

Signed-off-by: Artyom Tarasenko <atar4qemu@googlemail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 08:20:55 +00:00
Igor V. Kovalenko 54a3c0f032 sparc64: fix 128-bit atomic load from nucleus context v1
- change 128-bit atomic loads to reference nucleus context
v0->v1: dropped disassembler change
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29 07:26:57 +00:00
Paul Brook 68a1c81686 Pre-allocate guest address space
Allow pre-allocation of the guest virtual address space in usermode emulation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-05-29 02:27:35 +01:00
Richard Henderson 0be1d07c0e alpha-linux-user: Fill in SI_CODE for SIGSEGV.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 23:27:20 +02:00
Richard Henderson 680c877af4 linux-user: Use qemu-malloc.c.
Since we're no longer setting PAGE_RESERVED, there's no need to
implement qemu_malloc via mmap.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 23:27:19 +02:00
Richard Henderson 50401022d8 Use calloc in qemu_mallocz.
Avoids the memset if the allocator has gotten new zeroed
storage from the operating system.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 23:27:19 +02:00
Riccardo Magliocchetti 564e2fe8cd linux-user: Fix compilation with DEBUG defined
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 23:20:34 +02:00
Riccardo Magliocchetti 82f24fccaa Fix hw/gt64xxx.c compilation with DEBUG defined
Use TARGET_FMT_plx as format placeholder for target_phys_addr_t

Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 22:08:54 +02:00
Riccardo Magliocchetti 3c05613a6a Fix typo in balloon help
Fix launchpad #563883

Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 22:08:53 +02:00
Jan Kiszka c1735af1df musicpal: Drop redundant reset call
Reset is now triggered after init, no need for explicit calls anymore.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 21:48:47 +02:00
Stefan Hajnoczi d8e06f973c doc: Update monitor info subcommands
The "info blockstats" documentation was copy-pasted as "info block"
instead of "info blockstats".  The documentation for "commands", "jit",
"numa", "qdm", and "roms" is missing.  This patch resolves these issues
in qemu-monitor.hx.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 21:47:34 +02:00
Avi Kivity 97679527bf Fix overflow in i440fx_init()
The ram_size parameter can be larger than an int, so it may be truncated.

Fix by using the correct type.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 21:33:59 +02:00
Lars Munch 9ba8c3f41d arm: prevent coprocessor IO reset
This prevent coprocessor IO structure from being reset on cpu reset. This was
a problem for PXA which uses coprocessor 6 and 14.

Signed-off-by: Lars Munch <lars@segv.dk>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 21:25:16 +02:00
Richard Henderson 3e1dbaddbf tcg: Use INDEX_op_qemu_ld32 for 32-bit results.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 20:54:34 +02:00
Jes Sorensen 29f91781bd vhost_net.c: v2 Fix build failure introduced by 0bfcd599e3
Fix build failure introduced by 0bfcd599e3

The format statement expects unsigned long on x86_64, but receives
unsigned long long, so gcc exits with an error.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-27 18:57:31 +00:00
Alexander Graf c317728872 Make cache=unsafe the default for -snapshot
When using -snapshot we don't care about data integrity of the cow file
at all, so let's disable flushing there and squeeze out the last drop
of performance we could possibly get.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-27 00:08:09 +02:00
Igor V. Kovalenko d63baf92e3 sparc64: clean up pci bridge map
- remove unused host state and store pci bus pointer only
- do not map host state access into unused 1fe.10000000 range
- reorder pci region registration
- assign pci i/o region to isa_mem_base

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-26 19:14:21 +00:00
Igor V. Kovalenko 5910b047a0 sparc64: rename sun4u cpu to Ultrasparc IIi
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-26 19:13:36 +00:00
Alexander Graf 016f5cf6ff Add cache=unsafe parameter to -drive
Usually the guest can tell the host to flush data to disk. In some cases we
don't want to flush though, but try to keep everything in cache.

So let's add a new cache value to -drive that allows us to set the cache
policy to most aggressive, disabling flushes. We call this mode "unsafe",
as guest data is not guaranteed to survive host crashes anymore.

This patch also adds a noop function for aio, so we can do nothing in AIO
fashion.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-26 20:05:14 +02:00
Gerd Hoffmann d467b679f2 vnc: rich cursor support.
Uses VNC_ENCODING_RICH_CURSOR.  Adding XCURSOR support should be
possible without much trouble.  Shouldn't be needed though as
RICH_CURSOR is a superset of XCURSOR.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:24 -05:00
Gerd Hoffmann fbe6d7a48d use new cursor struct + functions for vmware vga and sdl.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:24 -05:00
Gerd Hoffmann 254e59506e cursor: add cursor functions.
Add a new cursor type to console.h and a bunch of functions to
deal with cursors the (new) cursor.c file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:23 -05:00
Kevin Wolf 019e78ba6e Fix error handling in qemu_read_config_file
We need to close the file even in error case. While at it, make the callers
catch all kind of errors. ENOENT is allowed for default config files, they
are optional.

Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:23 -05:00
Amos Kong ebbeb78935 Virtio-net: Replace the hardcode 6 with defined ETN_ALEN
hw/virtio-net.h:
    #define ETH_ALEN    6
ETH_ALEN was defined by commit 7967406801

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:23 -05:00
Jan Kiszka 111f8ec99b sdl: Do not disable screensaver by default
Unless we are running in full-screen mode, QEMU's SDL window should not
disable the host's screensaver. The user can still change this behaviour
by setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as
desired.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24 15:18:23 -05:00
Anthony Liguori 9c678ccd15 Merge remote branch 'kwolf/for-anthony' into staging 2010-05-24 10:53:41 -05:00
Anthony Liguori 3853528a91 Merge remote branch 'qmp/for-anthony' into staging 2010-05-24 09:00:24 -05:00
Edgar E. Iglesias 16f0441617 microblaze: Handle new elf mach nr for sysemu.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-05-24 11:14:04 +02:00
Jan Kiszka 259d5577ae lsi: Fix value overflow in request tag processing
This fixes a mismerge of 64d564094c (wrong
patch version): We need to mask the tag value properly to obtain its
device ID.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-22 15:32:32 +02:00
Igor V. Kovalenko 664a65b0db sparc64: flush translations on mmu context change
- two pairs of softmmu indexes bind softmmu tlb to cpu tlb in fault handlers
  using value of DMMU primary and secondary context registers, so we need to
  flush softmmu translations when context registers are changed

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 12:52:38 +00:00
Igor V. Kovalenko 9fd1ae3a0e sparc64: fix mmu context at trap levels above zero
- cpu_mmu_index return MMU_NUCLEUS_IDX if trap level is not zero
- cpu_get_tb_cpu_state: store trap level and primary context in flags
  this allows to restart code translation when address translation is changed
- stop translation block after writing to pstate and tl registers
- stop translation block after writing to alternate space
  this can be optimized to stop only if address translation can be changed
  by write operation (e.g. by comparing with MMU ASI values)

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 12:51:48 +00:00
Igor V. Kovalenko e212958608 sparc64: fix dump_mmu to look for global bit in tte value instead of tag
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 12:50:57 +00:00
Igor V. Kovalenko 2aae2b8e0a sparc64: fix pstate privilege bits
- refactor code to handle hpstate only if available for current cpu
- conditionally set hypervisor bit in hpstate register
- reorder softmmu indices so user accessable ones go first, translation context
  macros supervisor() and hypervisor() adjusted as well
- disable sparcv8 registers for TARGET_SPARC64
- fix cpu_mmu_index to use sparcv9 bits only

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 12:48:52 +00:00
Igor V. Kovalenko b8e9fc0625 sparc64: generate data access exception on RW violation
- separate PRIV and PROT handling
- DPRINTF_MMU macro to clean up debug code
- dump mmu_idx, trap level and mmu context registers
  along with address translation values

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 12:34:09 +00:00
Artyom Tarasenko 65899fe34b sparc32 protect read-only bits in DMA CSR registers
On a real hardware changing read-only bits has no effect
Use a mask common for SCSI and Ethernet registers. The crucial
bit is DMA_INTR, because setting or clearing it may produce
spurious interrupts.

This patch allows booting Solaris 2.3

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 09:07:46 +00:00
TeLeMan ae6b2c4ed9 vmstate: fix breakage by 7e72abc382
cirrus_post_load() will be executed twice when loading vm states and then the
wrong physical memory will be registered. This issue may lead to crash qemu.

Signed-off-by: TeLeMan <geleman@gmail.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:39:13 +00:00
Markus Armbruster 9848bbf1a8 Fix -device help and documentation
Commit 6616b2ad reverted commit 40ea285c.  Looks like a mismerge to
me.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:37:48 +00:00