Commit Graph

3681 Commits

Author SHA1 Message Date
Edgar E. Iglesias 7375c86f0b petlogix-3adsp: Tweak displacement of cmdline and fdt blob.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-06-07 11:53:09 +02:00
Luiz Capitulino 637503d122 Monitor: Drop QMP documentation from code
Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we
don't expect client writers to consult the code to find how to
use a QMP command.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01 13:48:43 -05:00
Anthony Liguori 3814109714 Merge remote branch 'mst/for_anthony' into HEAD 2010-06-01 13:34:20 -05:00
Alon Levy a132a679c3 virtio-serial-bus: fix ports_map allocation on init
Fix for too small allocation to ports_map

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01 12:53:09 -05:00
Blue Swirl 9af9b330c5 ioapic: improve debugging
Add a DPRINTF macro, use it also to see irq deliveries.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-31 18:59:45 +00:00
Lars Munch e03c22a98c arm: fix arm kernel boot for non zero start addr
Booting an arm kernel has been broken a while when booting from non zero start
address. This is due to the order of events: board init loads the kernel and
sets register 15 to the start address and then qemu_system_reset reset the cpu
making register 15 zero again.

This patch fixes the usage of the register 15 start address trick in
combination with arm_load_kernel.

Signed-off-by: Lars Munch <lars@segv.dk>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-31 19:40:41 +02: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
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
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
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
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
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
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
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
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
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
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
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
Blue Swirl 0bfcd599e3 Fix %lld or %llx printf format use
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:02:12 +00:00
Blue Swirl 4556bd8b25 Compile dma only once
Use a qemu_irq to request CPU exit.

7 compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:00:52 +00:00
Blue Swirl c86d2c2387 pckbd: improve debugging
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 07:59:06 +00:00
Blue Swirl 956a3e6bb7 Compile pckbd only once
Use a qemu_irq to indicate A20 line changes. Move I/O port 92
to pckbd.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 07:59:01 +00:00
Edgar E. Iglesias a9456998e9 axisdev88: Fix passing of kernel cmdline.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-05-21 16:09:10 +02:00
Rabin Vincent a9cf98d939 arm_timer: fix oneshot mode
In oneshot mode, the delta needs to come from the TimerLoad register,
not the maximum limit.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21 12:00:22 +02:00
Rabin Vincent d6759902cb arm_timer: reload timer when enabled
Reload the timer when TimerControl is written, if the timer is to be
enabled.  Otherwise, if an earlier write to TimerLoad was done while
periodic mode was not set, s->delta may incorrectly still have the value
of the maximum limit instead of the value written to TimerLoad.

This problem is evident on versatileap on current linux-next, which
enables TIMER_CTRL_32BIT before writing to TimerLoad and then enabling
periodic mode and starting the timer.  This causes the first periodic
tick to be scheduled to occur after 0xffffffff periods, leading to a
perceived hang while the kernel waits for the first timer tick.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21 12:00:22 +02:00
Michael Walle 0b2ec6fcfd pflash_cfi01: add device ID read command
Add support to read manufacturer and device ID. For everything else (eg.
lock bits) 0 is returned.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21 11:52:08 +02:00
Christoph Hellwig 618fbb8429 virtio-blk: fix barrier support
Before issuing the barrier to the block driver we need to flush our oustanding
queue of write requests, as the flush is supposed to be issued after them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-21 11:49:19 +02:00
Stefan Hajnoczi de6c8042ec virtio-blk: Avoid zeroing every request structure
The VirtIOBlockRequest structure is about 40 KB in size.  This patch
avoids zeroing every request by only initializing fields that are read.
The other fields are either written to or may not be used at all.

Oprofile shows about 10% of CPU samples in memset called by
virtio_blk_alloc_request().  The workload is
dd if=/dev/vda of=/dev/null iflag=direct bs=8k running concurrently 4
times.  This patch makes memset disappear to the bottom of the profile.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-21 11:49:18 +02:00
Eduard - Gabriel Munteanu 81a204e443 pc: fix segfault introduced by 3d53f5c36f
Commit 3d53f5c36f introduced a segfault by erroneously making fw_cfg a
'void **' and passing it around in different ways.

Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-20 20:37:04 +00:00
Markus Armbruster b752daf030 Revert "monitor: Convert do_pci_device_hot_remove() to QObject"
We don't want pci_del in QMP.  Use device_del instead.

This reverts commit 6848d82716.

Conflicts:

	hw/pci-hotplug.c
	sysemu.h

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2010-05-19 12:04:08 -03:00
Markus Armbruster 6c6a58aee4 Revert "PCI: Convert pci_device_hot_add() to QObject"
Short story: We don't want pci_add in QMP.  Long story follows.

pci_add can do two things:

* Hot plug a PCI NIC.  device_add is more general.

* Hot plug a PCI disk controller, and a drive connected to it.

  The controller is either virtio-blk-pci (if=virtio) or lsi53c895a
  (if=scsi).  With the latter, the drive is optional.  Use drive_add to
  hotplug additional SCSI drives.  Except drive_add is not available in
  QMP.

  device_add is more general for controllers and the guest part of
  drives.  I'm working on a more general alternative for the host part
  of drives.

Why am I proposing to remove pci_add from QMP before its replacement is
ready?  I want it out sooner rather than later, because it isn't fully
functional (errors and drive_add are missing), and we do not plan to
complete the job.  In other words, it's not really usable over QMP now,
and it's not what we want for QMP anyway.  Since we don't want it to be
used over QMP, we should take it out, not leave it around as a trap for
the uninitiated.

Dan Berrange confirmed that libvirt has no need for pci_add & friends
over QMP.

This reverts commit 7a344f7ac7.

Conflicts:

	hw/pci-hotplug.c
	sysemu.h

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2010-05-19 12:04:08 -03:00
Thomas Monjalon 3d78499a49 target-ppc: remove dead code
This function had been disabled from the beginning:
see 9fddaa0c0c

cpu_reset() function is in target-ppc/helper.c

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-18 21:12:54 +02:00
Alexander Graf fe270d044d target-s390: add firmware code
This patch adds a firmware blob to the S390 target. The blob is a simple
implementation of a virtio client that tries to read the second stage
bootloader from sectors described as of offset 0x20 in the MBR.

In combination with an updated zipl this allows for booting from virtio
block devices. This firmware is built from the same sources as the second
stage bootloader. You can find a virtio capable s390-tools in this repo:

git://repo.or.cz/s390-tools.git

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-18 21:12:48 +02:00
Anthony Liguori 129414184e Merge remote branch 'kwolf/for-anthony' into staging 2010-05-17 13:17:34 -05:00
Anthony Liguori f7ce72878c Merge remote branch 'mst/for_anthony' into staging 2010-05-17 12:41:39 -05:00
Kevin Wolf 38d8dfa193 ide: Fix ide_dma_cancel
When cancelling a request, bdrv_aio_cancel may decide that it waits for
completion of a request rather than for cancellation. IDE therefore can't
abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback
of a completed request would use invalid data.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-17 10:20:04 +02:00
Blue Swirl 1012e960c7 Update to a hopefully more future proof FSF address
See also 70539e1850,
8167ee8839,
530e7615ce and
fad6cb1a56.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15 17:52:49 +00:00
Blue Swirl 0b8f9be61c Trim unnecessary includes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15 17:36:13 +00:00