Commit graph

9611 commits

Author SHA1 Message Date
Anthony Liguori 95de21a430 Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Christophe Lyon (1) and others
# Via Michael Tokarev
* mjt/trivial-patches:
  target-moxie: replace target_phys_addr_t with hwaddr
  Rename hexdump to avoid FreeBSD libutil conflict
  remove some double-includes
  translate: remove redundantly included qemu/timer.h
  Remove twice include of qemu-common.h
  fix /proc/self/maps output

Message-id: 51977B44.1000302@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22 08:22:36 -05:00
Alex Williamson 3459f01b2d pci-assign: Add MSI affinity support
To support guest MSI affinity changes update the MSI message any time
the guest writes to the address or data fields.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20130513201840.5430.86331.stgit@bling.home
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22 07:40:10 -05:00
Dmitry Fleytman 644c98587d virtio-net: dynamic network offloads configuration
Virtio-net driver currently negotiates network offloads
on startup via features mechanism and have no ability to
disable and re-enable offloads later.
This patch introduced a new control command that allows
to configure device network offloads state dynamically.
The patch also introduces a new feature flag
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20130520081814.GA8162@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22 07:40:10 -05:00
Peter Crosthwaite 3d1bba2091 glib: Fix some misuses of gsize/size_t types
This unbreaks cross compile builds:

configure --target-list="i386-softmmu" --cpu=i386

When building on a 64bit machine.

Reported-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: 926326e96fd8685d74e9d5bf430fe4ad97a55289.1369191585.git.peter.crosthwaite@xilinx.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22 07:40:09 -05:00
Ed Maste 3568ac2a6e Rename hexdump to avoid FreeBSD libutil conflict
On FreeBSD libutil is used for openpty(), but it also provides a hexdump()
which conflicts with QEMU's.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1368718348-15199-1-git-send-email-emaste@freebsd.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-20 08:20:08 -05:00
Aurelien Jarno b9b5df6f0c ide/macio: fix wrong opaque with TRIM support
Commit 215e47b9 enabled TRIM by default, which revealed a bug in TRIM
support for the IDE macio emulation driver, introduced in d353fb72.

The call to dma_bdrv_io() is using a wrong opaque of type IDEState
instead of DBDMA_io. This patch fixes that.

Fixes LP#1179104

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-05-20 01:54:14 +02:00
Ed Maste 3a8ae21bd0 Rename hexdump to avoid FreeBSD libutil conflict
On FreeBSD libutil is used for openpty(), but it also provides a hexdump()
which conflicts with QEMU's.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-18 16:35:12 +04:00
Michael Tokarev 997aba8e25 remove some double-includes
Some source files #include the same header more than
once for no good reason.  Remove second #includes in
such cases.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-18 16:35:12 +04:00
KONRAD Frederic 6d46895b51 virtio: add virtio_bus_get_dev_path.
This adds virtio_bus_get_dev_path to fix migration id string which is wrong
since the virtio refactoring.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1368723967-21050-1-git-send-email-fred.konrad@greensocs.com
Cc: mdroth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-16 14:18:38 -05:00
Peter Maydell 913b4b6bf3 hw/pci-host/versatile.c: Provide property for forcing broken IRQ mapping
Although we try our best to automatically detect broken versions
of Linux which assume the old broken IRQ mapping we used to implement
for our model of the Versatile PCI controller, it turns out that
some particularly new kernels manage to outwit the autodetection.

We therefore provide a property for enabling the old broken IRQ
mapping, so that if users happen to have such a kernel they can
work around its deficiencies with the command line option:
  -global versatile_pci.broken-irq-mapping=1

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1368545616-22344-4-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:49:59 -05:00
Peter Maydell bc04d89165 hw/pci-host/versatile.c: Update autodetect to detect newer kernels
Newer versatilepb kernels still don't get the IRQ mapping right
for the PCI controller, but they get it differently wrong (they add
a fixed +64 offset to everything they write to PCI_INTERRUPT_LINE).
Update the autodetection to handle these too, and include a more
detailed comment on the various different behaviours that might
be present.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1368545616-22344-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:49:59 -05:00
Peter Maydell 33201b51cb Revert "versatile_pci: Put the host bridge PCI device at slot 29"
This reverts commit 5f37ef92b7.
It turns out that some kernels incorrectly depend on the
old QEMU behaviour of not putting the host PCI bridge device
where the hardware puts it, because they use a swizzling IRQ
mapping which is incorrect but happens to match up with old
broken QEMU when the slot number mod 4 is zero. Since we
start PCI devices at 11, if we put the host bridge at 29
then the first real PCI device goes at 11 and doesn't work.
Not putting the host bridge at 29 means it defaults to 11,
so the first real PCI device is at 12 and works.

Since continuing with the old behaviour doesn't cause problems
for kernels which do work with hardware, the simplest fix for
this is to revert the change.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1368545616-22344-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:49:59 -05:00
KONRAD Frederic 800ced8cac virtio-net-x: forward the netclient name and type.
This forwards the name and the type of virtio-net-x to fix the bad
behaviour of "info network" command.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1368619970-23892-3-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:48:25 -05:00
KONRAD Frederic 8a253ec26e virtio-net: add virtio_net_set_netclient_name.
This adds virtio_net_set_netclient_name, which is used to set the
name and type shown in "info network" command.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1368619970-23892-2-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15 08:48:25 -05:00
Paolo Bonzini d8e846e17c spitz: fix compilation failure due to pty.h namespace pollution
pty.h is polluting the global namespace with a CTRL macro.  spitz
thus fails compilation with the patch at
http://article.gmane.org/gmane.comp.emulators.qemu/211337 and
this patch fixes it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1368533545-650-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-14 08:53:16 -05:00
Gerd Hoffmann 2d3b989529 acpi: add dummy write function for acpi timer
Otherwise the guest can crash qemu (NULL pointer dereference).

https://bugzilla.redhat.com/show_bug.cgi?id=947691

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1368534544-11826-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-14 08:53:09 -05:00
Paolo Bonzini 9e1c2ec8fd Revert "pc: Kill the "use flash device for BIOS unless KVM" misfeature"
This reverts commit 9953f8822c.
While Markus's analysis is entirely correct, there are 1.6 patches
that fix the bug for real and without requiring machine type hacks.
Let's think of the children who will have to read this code, and
avoid a complicated mess of semantics that differ between <1.5,
1.5, and >1.5.

Conflicts:
	hw/i386/pc_piix.c
	hw/i386/pc_q35.c
	include/hw/i386/pc.h

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1368189483-7915-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-13 09:52:43 -05:00
Anthony Liguori f6e136e47a Merge remote-tracking branch 'mjt/trivial-patches-next' into staging
# By Dong Xu Wang (2) and others
# Via Michael Tokarev
* mjt/trivial-patches-next:
  osdep.h: include sys/types.h for ssize_t definition
  remove double semicolons
  clean unnecessary code: don't check g_strdup arg for NULL
  docs: mention AddressSpaces in docs/memory.txt
  audio: update documentation after removing --audio-card-list option
  m25p80.c: Sync Flash chip list with Linux
  bsd-user: OS-agnostic 64-bit SYSCTL types

Message-id: 518F61B9.9050803@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-13 09:44:25 -05:00
Dong Xu Wang c7e775e4dd remove double semicolons
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-12 13:25:55 +04:00
Ed Maste 3e758c1df0 m25p80.c: Sync Flash chip list with Linux
Add new devices for various manufacturers, and re-sort Spansion list to
match the order in Linux, which requires chips with a non-zero extended ID
to come first.

With this commit the outstanding differences to Linux rev 55bf75b are:

- Erase size flag differences in s25sl032p, s25sl064p, s25fl016k, s25fl064k
  (These devices have only some blocks that support small erase sizes.)
- Linux lacks n25q128
- Devices without a Jedec ID have been excluded

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-12 13:25:55 +04:00
Hans de Goede 0a2b5e3a78 qxl: Call spice_qxl_driver_unload from qxl_enter_vga_mode
With a SPICE_DISPLAY_CAP_MONITORS_CONFIG capable client, the client needs to
know what part of the primary to use for each monitor. If the guest driver
does not support this, the server sends messages to the client for a
single monitor spanning the entire primary.

As soon as the guest calls spice_qxl_monitors_config_async once, the server
sets the red_worker driver_has_monitors_config flag and stops doing this.

This is a problem when the driver gets unloaded, for example after a reboot
or when switching to a text vc with usermode mode-setting under Linux.

To reproduce this start a multi-mon capable Linux guest which uses
usermode mode-setting and then once X has started switch to a text vc. Note
how the client window does not only not resize, if you try to resize it
manually you always keep blackborders since the aspect is wrong.

This patch calls a new spice-server method called spice_qxl_driver_unload
which clears the driver_has_monitors_config flag inside the server, thereby
fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-09 11:46:53 +02:00
Anthony Liguori cad2b59c19 Merge remote-tracking branch 'kwolf/for-anthony' into staging
# By Kevin Wolf (7) and Fam Zheng (3)
# Via Kevin Wolf
* kwolf/for-anthony:
  qemu-iotests: fix 017 018 for vmdk
  qemu-iotests: exclude vmdk and qcow from 043
  qemu-iotests: exclude vmdk for test 042
  qtest/ide-test: Test short and long PRDTs
  qtest/ide-test: Add simple DMA read/write test case
  qtest: Add IDE test case
  libqos/pci: Enable bus mastering
  ide: Reset BMIDEA bit when the bus master is stopped
  de_DE.po: Add missing leading spaces
  ahci: Don't allow creating slave drives

Message-id: 1368023344-29731-1-git-send-email-kwolf@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-08 15:54:36 -05:00
Jason Wang 5f5a131865 virtio: properly validate address before accessing config
There are several several issues in the current checking:

- The check was based on the minus of unsigned values which can overflow
- It was done after .{set|get}_config() which can lead crash when config_len
  is zero since vdev->config is NULL

Fix this by:

- Validate the address in virtio_pci_config_{read|write}() before
  .{set|get}_config
- Use addition instead minus to do the validation

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Petr Matousek <pmatouse@redhat.com>
Message-id: 1367905369-10765-1-git-send-email-jasowang@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-08 15:54:21 -05:00
Michael S. Tsirkin 62c96360ae virtio-pci: fix level interrupts
mask notifiers are never called without msix,
so devices with backend masking like vhost don't work.
Call mask notifiers explicitly at
startup/cleanup to make it work.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-08 15:54:21 -05:00
Kevin Wolf b39f961265 ide: Reset BMIDEA bit when the bus master is stopped
The device is supposed to reset the Bus Master IDE Active bit in the
status register when 0 is written to the Start/Stop Bus Master bit in
the command register.

In the common cases this happens automatically because bdrv_drain_all()
flushes the requests, but with a large PRDT it could remain set.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-05-08 15:28:49 +02:00
Kevin Wolf 0ee20e6658 ahci: Don't allow creating slave drives
An IDE bus provided by AHCI can only take a single IDE drive. If you add
a drive as slave, qemu used to accept the command line but the device
wouldn't be actually usable. Catch the situation instead and error out.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-05-08 15:28:49 +02:00
Anthony Liguori b174de51ae Merge remote-tracking branch 'kraxel/usb.82' into staging
# By Gerd Hoffmann (3) and Hans de Goede (1)
# Via Gerd Hoffmann
* kraxel/usb.82:
  xhci: handle USB_RET_BABBLE
  uhci: Use an intermediate buffer for usb packet data
  usb-host: add usb_host_full_speed_compat
  usb-host: live migration support for the libusb version

Message-id: 1367920207-1404-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-07 06:48:31 -05:00
Jason Wang d7108d9010 virtio-net: properly check the vhost status during status set
Commit 32993698 (vhost: disable on tap link down) tries to disable the vhost
also when the peer's link is down. But the check was not done properly, the
vhost were only started when:

1) peer's link is not down
2) virtio-net has already been started.

Since == have a higher precedence than &&, place a brace to make sure both the
conditions were met then does the check. This fixes the crash when doing a savem
after set the link off which let qemu crash and complains:

virtio_net_save: Assertion `!n->vhost_started' failed.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-id: 1366972060-21606-1-git-send-email-jasowang@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-07 06:43:09 -05:00
Anthony Liguori fd8192a5a8 Merge remote-tracking branch 'afaerber/qom-cpu' into staging
# By Eduardo Habkost (6) and others
# Via Andreas Färber
* afaerber/qom-cpu:
  target-i386: n270 can MOVBE
  target-i386: Introduce generic CPUID feature compat function
  target-i386: Change CPUID model of 486 to 8
  target-i386: Emulate X86CPU subclasses for global properties
  qdev: Introduce qdev_prop_set_globals_for_type()
  qdev: Let qdev_prop_parse() pass through Error
  target-i386: Add "filtered-features" property to X86CPU
  target-i386: Introduce X86CPU::filtered_features field
  target-i386: Add "feature-words" property to X86CPU
  target-i386: Use FeatureWord loop on filter_features_for_kvm()
  target-i386: Add ECX information to FeatureWordInfo
2013-05-07 06:32:00 -05:00
Gerd Hoffmann 4e906d567a xhci: handle USB_RET_BABBLE
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07 11:34:03 +02:00
Hans de Goede 9822261ce3 uhci: Use an intermediate buffer for usb packet data
Due to various unfortunate reasons we cannot reliable detect a guest
cancelling a packet as soon as it happens, instead we detect cancels
with some delay.

When packets are handled async, and we directly pass the guest memory for
the packet to the usb-device as iovec, this means that the usb-device can
write to guest-memory which the guest has already re-used for other purposes
-> not good!

This patch fixes this by adding an intermediate buffer and writing back not
only the result, but also the data, of async completed packets when scanning
the schedule.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07 11:34:03 +02:00
Gerd Hoffmann c3268cc113 usb-host: add usb_host_full_speed_compat
Alloes to pass through usb2 devices on usb1 host controllers if possible.
Brings the libusb implementation to feature-parity with the linux usbfs
code, so the usb-host implementation in 1.5 (libusb) doesn't regress
compared to 1.4 (usbfs).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07 11:34:02 +02:00
Gerd Hoffmann 95efb20c71 usb-host: live migration support for the libusb version
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07 08:19:14 +02:00
Anthony Liguori b5803aa358 Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
# By Marcelo Tosatti
# Via Gleb Natapov
* qemu-kvm/uq/master:
  kvmvapic: add ioport read accessor

Message-id: cover.1367844188.git.gleb@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06 15:45:08 -05:00
Borislav Petkov 4458c23672 target-i386: n270 can MOVBE
The Atom core (cpu name "n270" in QEMU speak) supports MOVBE. This is
needed when booting 3.8 and later linux kernels built with the MATOM
target because we require MOVBE in order to boot properly now.

Signed-off-by: Borislav Petkov <bp@suse.de>
[ehabkost: added compat code to disable MOVBE on pc-*-1.4 and older]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06 22:27:49 +02:00
Aurelien Jarno fe677fd1b3 Merge branch 's390-for-upstream' of git://github.com/agraf/qemu
* 's390-for-upstream' of git://github.com/agraf/qemu:
  s390: update s390-ccw.img
  S390: BIOS boot from given device
  S390: Add virtio-blk boot
  S390: Merging s390_ipl_cpu and s390_ipl_reset
  S390: BIOS create link to src folder for .img file
  S390: BIOS check for file
2013-05-06 19:56:27 +02:00
Andreas Färber 868d378bb0 qdev: Introduce qdev_prop_set_globals_for_type()
Reuse it in qdev_prop_set_globals().

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
[AF: Renamed from qdev_prop_set_custom_globals()]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06 19:50:52 +02:00
Andreas Färber b1fe9bcbce qdev: Let qdev_prop_parse() pass through Error
Move error reporting to callers.

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06 19:40:44 +02:00
Dominik Dingel ba1509c0a9 S390: Add virtio-blk boot
If no kernel IPL entry is specified, boot the bios and pass if available
device information for the first boot device (as given by the boot index).

The provided information will be used in the next commit from the BIOS.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:30:01 +02:00
Dominik Dingel 2c4c71ee3a S390: Merging s390_ipl_cpu and s390_ipl_reset
There is no use in have this splitted in two functions.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:30:01 +02:00
Dominik Dingel 1f7de85330 S390: BIOS check for file
Add a check if the BIOS blob exists before trying to load.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:30:00 +02:00
Alexey Kardashevskiy e0ff466c86 spapr_llan: fix device reenabling
Normally, the "tap" device is polled by QEMU if a guest NIC can
receive packets. If a guest NIC is stopped during transfer (rmmod or
ifdown), it may still have packets in a queue which have to be send
to the guest before QEMU enables polling of a "tap" interface via
tap_update_fd_handler().

However the spapr_llan device was missing the qemu_flush_queued_packets()
call so the tap_send_completed() callback was never called and therefore
"tap" interface polling was not enabled ever.

The patch fixes this problem.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:22:48 +02:00
Tiejun Chen 43d03f299a PPC: e500: correct params->ram_size with ram_size
We should sync params->ram_size after we fixup memory size on
a alignment boundary. Otherwise Guest would exceed the actual
memory region.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:22:48 +02:00
Bharat Bhushan cefd3cdbdd PPC: e500: initialize GPRs as per epapr
ePAPR defines the initial values of cpu registers.
This patch initialize the GPRs as per ePAPR specification.

This resolves the issue of guest reboot/reset (guest hang on reboot).

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
[agraf: add whitespace line]
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:22:47 +02:00
David Gibson b55519a0f2 pseries: Fix debug message for out-of-bounds address in H_PUT_TCE
Due to a brain outage, this message says "out-of-boards" instead of
"out-of-bounds".

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:22:47 +02:00
David Gibson d4261662b6 pseries: Factor out check for out-of-bounds LIOBN
PAPR defines LIOBNs (Logical IO Bus Numbers) to be 32-bit, and we check for
values that aren't in the code for H_PUT_TCE.  This patch factors the check
into spapr_tce_find_by_liobn(), which already checks if a 32-bit LIOBN
actually exists.  This will become more important as future patches add
other hypercalls which need to look up a LIOBN.

At the same time we fix the typo in the message.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06 17:22:47 +02:00
Marcelo Tosatti 0c1cd0ae2a kvmvapic: add ioport read accessor
Necessary since memory region accessor assumes read and write
methods are registered. Otherwise reading I/O port 0x7e segfaults.

https://bugzilla.redhat.com/show_bug.cgi?id=954306

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-05-06 14:52:26 +03:00
Anthony Liguori e4b006b7a5 Merge remote-tracking branch 'afaerber-or/prep-up' into staging
# By Andreas Färber (1) and others
# Via Andreas Färber
* afaerber-or/prep-up:
  prep: Make System I/O port 0092 read/write
  prep: Add ELF support for -bios
  prep: Fix NIP reset value
2013-05-06 06:49:51 -05:00
Anthony Liguori 1e65fe5367 Merge remote-tracking branch 'pmaydell/arm-devs.next' into staging
# By Jean-Christophe DUBOIS
# Via Peter Maydell
* pmaydell/arm-devs.next:
  i.MX: implement a more correct version of EPIT timer.

Message-id: 1367603215-5120-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06 06:47:28 -05:00
Julio Guerra b6f54b31e7 prep: Make System I/O port 0092 read/write
Port 0x0092 is documented as read/write, so for now return the
endianness state instead of hardcoded 0x00.

Signed-off-by: Julio Guerra <guerr@julio.in>
[AF: Extracted from larger port 0092 patch]
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-06 02:27:06 +02:00