KONRAD Frederic [Tue, 23 Apr 2013 09:08:41 +0000 (11:08 +0200)]
virtio-9p-pci: switch to the new API.
Here the virtio-9p-pci is modified for the new API. The device
virtio-9p-pci extends virtio-pci. It creates and connects a
virtio-9p-device during the init. The properties are not changed.
Anthony Liguori [Tue, 23 Apr 2013 15:33:45 +0000 (10:33 -0500)]
Merge remote-tracking branch 'kraxel/usb.81' into staging
# By Gerd Hoffmann (3) and Hans de Goede (1)
# Via Gerd Hoffmann
* kraxel/usb.81:
usb-host: raise libusbx minimum version to 1.0.13
usb: better speed mismatch error reporting
ehci_free_packet: Discard finished packets when the queue is halted
xhci: remove XHCIRing->base (unused)
Allows to remove one FIXME. Makes LIBUSB_LOG_LEVEL_WARNING build errors
go away. And starting with that version libusb has a LIBUSBX_API_VERSION
define which allows to easily #ifdef version dependencies should that
need arrive in the future.
Report the supported speeds for device and port in the error message.
Also add the speeds to the tracepoint. And while being at it drop
the redundant error message in usb_desc_attach, usb_device_attach will
report the error anyway.
Hans de Goede [Tue, 9 Apr 2013 08:24:22 +0000 (10:24 +0200)]
ehci_free_packet: Discard finished packets when the queue is halted
With pipelining it is possible to encounter a finished packet when cleaning
the queue due to a halt. This happens when a non stall error happens while
talking to a real device. In this case the queue on the usb-host side will
continue processing packets, and we can have completed packets waiting in
the queue after an error condition packet causing a halt.
There are 2 reasons to discard the completed packets at this point, rather
then trying to writing them back to the guest:
1) The guest expect to be able to cancel and/or change packets after the
packet with the error without doing an unlink, so writing them back may
confuse the guest.
2) Since the queue does not advance when halted, the writing back of these
packets will fail anyways since p->qtdaddr != q->qtdaddr, so the
ehci_verify_qtd call in ehci_writeback_async_complete_packet will fail.
Note that 2) means that then only functional change this patch introduces
is the printing of a warning when this scenario happens.
Note that discarding these packets means that the guest driver and the device
will get out of sync! This is unfortunate, but should not be a problem since
with a non stall error (iow an io-error) the 2 are out of sync already anyways.
Still this patch adds a warning to signal this happening.
Note that sofar this has only been seen with a DVB-T receiver, which gives
of a MPEG-2 stream, which allows for recovering from lost packets, see:
https://bugzilla.redhat.com/show_bug.cgi?id=890320
Kevin Wolf [Mon, 22 Apr 2013 15:48:40 +0000 (17:48 +0200)]
block: Fix build with tracing enabled
filename was still uninitialised when it's used as a parameter to a
tracing function, so let's move the initialisation. Also, commit c2ad1b0c
forgot to add a NULL check, which this patch adds while we're at it.
Peter Maydell [Sun, 21 Apr 2013 13:30:03 +0000 (14:30 +0100)]
qtest: Handle addresses and values for {in, out}[bwl] as unsigned
Handle the addresses and values for {in,out}[bwl] as unsigned (ie
with strtoul), as per the protocol specification comment. This fixes
a test failure in test_i440fx_defaults on 32-bit hosts where the test
tries to write 0x80000000 and qtest was instead writing 0x7fffffff.
In certain scenario, latency induced by paging is significant and
memory locking is needed. Also, in the scenario with untrusted
guests, latency improvement due to mlock is desired.
This patch introduces a following new option to mlock guest and
qemu memory:
Paolo Bonzini [Fri, 19 Apr 2013 15:32:09 +0000 (17:32 +0200)]
qemu-char: do not operate on sources from finalize callbacks
Due to a glib bug, the finalize callback is called with the GMainContext
lock held. Thus, any operation on the context from the callback will
cause recursive locking and a deadlock. This happens, for example,
when a client disconnects from a socket chardev.
The fix for this is somewhat ugly, because we need to forego polymorphism
and implement our own function to destroy IOWatchPoll sources. The
right thing to do here would be child sources, but we support older
glib versions that do not have them. Not coincidentially, glib developers
found and fixed the deadlock as part of implementing child sources.
Paolo Bonzini [Fri, 19 Apr 2013 15:32:08 +0000 (17:32 +0200)]
qemu-char: correct return value from chr_read functions
Even if a CharDriverState's source is blocked by the front-end,
it must not be dropped. The IOWatchPoll that wraps it will take
care of adding and removing it to the main loop. Only remove
the source when the channel is closed; and in that case, make sure
that the wrapping IOWatchPoll is removed too.
Paolo Bonzini [Fri, 19 Apr 2013 15:32:07 +0000 (17:32 +0200)]
qemu-char: simplify pty polling
There is no need to use a timer and pty_chr_read to detect a connected
pty. It is simpler to just call g_poll periodically and check for POLLHUP.
It is done once per second, and only if the pty is disconnected, so it
is cheap enough.
Tested with "-monitor pty" and "-serial mon:pty", both of which work
correctly and do not freeze QEMU. (How to test ptys? "socat -,raw,echo=0
/dev/pts/4,raw").
Anthony Liguori [Mon, 22 Apr 2013 13:08:22 +0000 (08:08 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging
# By Kevin Wolf (16) and Stefan Hajnoczi (4)
# Via Kevin Wolf
* kwolf/for-anthony:
qemu-iotests: add 053 unaligned compressed image size test
block: Allow overriding backing.file.filename
block: Remove filename parameter from .bdrv_file_open()
vvfat: Use bdrv_open options instead of filename
sheepdog: Use bdrv_open options instead of filename
rbd: Use bdrv_open options instead of filename
iscsi: Use bdrv_open options instead of filename
gluster: Use bdrv_open options instead of filename
curl: Use bdrv_open options instead of filename
blkverify: Use bdrv_open options instead of filename
blkdebug: Use bdrv_open options instead of filename
raw-win32: Use bdrv_open options instead of filename
raw-posix: Use bdrv_open options instead of filename
block: Enable filename option
block: Add driver-specific options for backing files
block: Fail gracefully when using a format driver on protocol level
qemu-iotests: Fix _filter_qemu
qemu-img: do not zero-pad the compressed write buffer
qcow: allow sub-cluster compressed write to last cluster
qcow2: allow sub-cluster compressed write to last cluster
Anthony Liguori [Mon, 22 Apr 2013 13:05:14 +0000 (08:05 -0500)]
Merge remote-tracking branch 'bonzini/nbd-next' into staging
# By Stefan Hajnoczi
# Via Paolo Bonzini
* bonzini/nbd-next:
nbd: set TCP_NODELAY
nbd: use TCP_CORK in nbd_co_send_request()
nbd: unlock mutex in nbd_co_send_request() error path
Anthony Liguori [Mon, 22 Apr 2013 13:05:05 +0000 (08:05 -0500)]
Merge remote-tracking branch 'bonzini/scsi-next' into staging
# By Paolo Bonzini (5) and others
# Via Paolo Bonzini
* bonzini/scsi-next:
vhost-scsi-s390: new device supporting the tcm_vhost Linux kernel module
vhost-scsi-ccw: new device supporting the tcm_vhost Linux kernel module
vhost-scsi-pci: new device supporting the tcm_vhost Linux kernel module
vhost-scsi: new device supporting the tcm_vhost Linux kernel module
virtio: simplify Makefile conditionals
virtio-scsi: create VirtIOSCSICommon
vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping
scsi: VMWare PVSCSI paravirtual device implementation
scsi: avoid assertion failure on VERIFY command
Anthony Liguori [Mon, 22 Apr 2013 13:04:21 +0000 (08:04 -0500)]
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Amos Kong (1) and Luiz Capitulino (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event
monitor: fix the wrong order of releasing keys
Kevin Wolf [Fri, 12 Apr 2013 16:10:49 +0000 (18:10 +0200)]
sheepdog: Use bdrv_open options instead of filename
This is only to convert the internal interface that is used for passing
the "filename" to be parsed, but converting to actual fine grained
options is left for another day, as it doesn't look trivial.
Kevin Wolf [Fri, 12 Apr 2013 16:05:35 +0000 (18:05 +0200)]
rbd: Use bdrv_open options instead of filename
This is only to convert the internal interface that is used for passing
the "filename" to be parsed, but converting to actual fine grained
options is left for another day, as it doesn't look trivial.
Kevin Wolf [Fri, 12 Apr 2013 15:59:59 +0000 (17:59 +0200)]
iscsi: Use bdrv_open options instead of filename
This is only to convert the internal interface that is used for passing
the "filename" to be parsed, but converting to actual fine grained
options is left for another day, as it doesn't look trivial.
Kevin Wolf [Fri, 12 Apr 2013 15:50:16 +0000 (17:50 +0200)]
gluster: Use bdrv_open options instead of filename
This is only to convert the internal interface that is used for passing
the "filename" to be parsed, but converting to actual fine grained
options is left for another day, as it doesn't look trivial.
Kevin Wolf [Wed, 10 Apr 2013 13:31:33 +0000 (15:31 +0200)]
curl: Use bdrv_open options instead of filename
As a bonus, going through the QemuOpts QEMU_OPT_SIZE parser for the
readahead option gives us proper error reporting that the previous use
of atoi() lacked.
Kevin Wolf [Tue, 9 Apr 2013 12:34:19 +0000 (14:34 +0200)]
block: Enable filename option
This allows using the file.filename option instead of the string that
comes from -drive file=... and is passed around as a separate parameter.
The goal is to get rid of this parameter and use the options QDict more
consistently.
With this option you can access not only the top-level image, but
specify a filename for the backing file (currently only if no backing
file exists, but we'll allow overriding it later)
Kevin Wolf [Thu, 28 Mar 2013 14:29:24 +0000 (15:29 +0100)]
block: Add driver-specific options for backing files
Options starting in "backing." are passed to the backing file now. If
you don't need to specify the filename for the backing file, you can add
it on the command line instead of in the image file:
Note that this doesn't override the backing filename from the image. If
the image has one, this will fail because NBD doesn't want the options
and a filename at the same time.
Kevin Wolf [Tue, 16 Apr 2013 09:22:36 +0000 (11:22 +0200)]
qemu-iotests: Fix _filter_qemu
$QEMU_PROG happens to be 'qemu' in my setup, so this sed command
replaces a bit too much. Restrict it to the start of the line and to
when it's followed by a colon, i.e. the form used by error messages.
Stefan Hajnoczi [Mon, 15 Apr 2013 15:17:33 +0000 (17:17 +0200)]
qemu-img: do not zero-pad the compressed write buffer
bdrv_write_compressed() does not allow requests that span the end of the
device. Therefore it is useless to zero-pad the last cluster and
thereby exceed the end of the device.
Let image formats handle zero-padding the final compressed cluster, if
necessary.
Stefan Hajnoczi [Mon, 15 Apr 2013 15:17:32 +0000 (17:17 +0200)]
qcow: allow sub-cluster compressed write to last cluster
Compression in qcow requires image length to be a multiple of the
cluster size. Lift this requirement by zero-padding the final cluster
when necessary. The virtual disk size is still not cluster-aligned, so
the guest cannot access the zero sectors.
Note that this is almost identical to the qcow2 version of this code.
qcow2's compression code is drawn from qcow.
Stefan Hajnoczi [Mon, 15 Apr 2013 15:17:31 +0000 (17:17 +0200)]
qcow2: allow sub-cluster compressed write to last cluster
Compression in qcow2 requires image length to be a multiple of the
cluster size. Lift this requirement by zero-padding the final cluster
when necessary. The virtual disk size is still not cluster-aligned, so
the guest cannot access the zero sectors.
Peter Maydell [Wed, 17 Apr 2013 09:16:35 +0000 (09:16 +0000)]
ui/cocoa.m: Fix recent compile breakage
Fix failures to compile introduced by recent console commits 1dbfa00503, 81c0d5a6) which removed is_graphic_console() and
vga_hw_update() without updating the cocoa UI backend to match.
Peter Maydell [Sat, 20 Apr 2013 13:48:28 +0000 (14:48 +0100)]
qdev: Drop taddr properties
Drop all the infrastructure for taddr properties (ie ones which
are 'hwaddr' sized). These are now unused, and any further desired
use would be rather questionable since device properties shouldn't
generally depend on a type that is conceptually variable based on
the target CPU. 32 or 64 bit integer properties should be used instead
as appropriate for the specific device.
Blue Swirl [Sat, 20 Apr 2013 11:39:08 +0000 (11:39 +0000)]
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
* 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm:
hw/versatile_pci: Drop unnecessary vpb_pci_config_addr()
versatile_pci: Expose PCI memory space to system
arm/realview: Fix mapping of PCI regions
versatile_pci: Implement the PCI controller's control registers
versatile_pci: Implement the correct PCI IRQ mapping
versatile_pci: Put the host bridge PCI device at slot 29
versatile_pci: Use separate PCI I/O space rather than system I/O space
versatile_pci: Change to subclassing TYPE_PCI_HOST_BRIDGE
versatile_pci: Update to realize and instance init functions
versatile_pci: Expose PCI I/O region on Versatile PB
versatile_pci: Fix hardcoded tabs
Blue Swirl [Sat, 20 Apr 2013 11:38:48 +0000 (11:38 +0000)]
Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm
* 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm:
target-arm: Correctly restore FPSCR
target-arm: Add some missing CPU state fields to VMState
target-arm: port ARM CPU save/load to use VMState
target-arm: Reinsert missing return statement in ARM mode SRS decode
Blue Swirl [Sat, 20 Apr 2013 11:38:29 +0000 (11:38 +0000)]
Merge branch 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu
* 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu:
linux-user: fix setgroups/getgroups for non-UID16 archs
linux-user: fix undefined shift in copy_to_user_fdset
linux-user: change do_semop to return target errno when unsuccessful
vhost-scsi: new device supporting the tcm_vhost Linux kernel module
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".
The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not
available from the QEMU command-line. Instead, I hardcode it to zero.
Changes in Patch-v2:
- Add vhost_scsi_get_features() in order to determine feature bits
supports by host kernel (mst + nab)
- Re-enable usage of DEFINE_VIRTIO_COMMON_FEATURES, and allow
EVENT_IDX to be disabled by host in vhost_scsi_get_features()
- Drop unused hotplug bit in DEFINE_VHOST_SCSI_PROPERTIES
Changes in Patch-v1:
- Set event_idx=off by default (nab, thanks asias)
- Disable hotplug feature bit for v3.9 tcm_vhost kernel code, need to
re-enable in v3.10 (nab)
- Update to latest qemu.git/master HEAD
Changes in WIP-V3:
- Drop ioeventfd vhost_scsi_properties (asias, thanks stefanha)
- Add CONFIG_VHOST_SCSI (asias, thanks stefanha)
- Add hotplug feature bit
Changes in WIP-V2:
- Add backend guest masking support (nab)
- Bump ABI_VERSION to 1 (nab)
- Set up set_guest_notifiers (asias)
- Set up vs->dev.vq_index (asias)
- Drop vs->vs.vdev.{set,clear}_vhost_endpoint (asias)
- Drop VIRTIO_CONFIG_S_DRIVER check in vhost_scsi_set_status (asias)
Howto:
Use the latest seabios, at least commit b44a7be17b
git clone git://git.seabios.org/seabios.git
make
cp out/bios.bin /usr/share/qemu/bios.bin
qemu -device vhost-scsi-pci,wwpn=naa.6001405bd4e8476d,event_idx=off
...
Cc: Michael S. Tsirkin <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]> Signed-off-by: Asias He <[email protected]>
[ Rebase on top of VirtIOSCSICommon patch, fix bugs in feature
negotiation and irqfd masking - Paolo ] Signed-off-by: Paolo Bonzini <[email protected]>
Paolo Bonzini [Fri, 29 Mar 2013 01:08:15 +0000 (01:08 +0000)]
virtio-scsi: create VirtIOSCSICommon
This patch refactors existing virtio-scsi code into VirtIOSCSICommon
in order to allow virtio_scsi_init_common() to be used by both internal
virtio_scsi_init() and external vhost-scsi-pci code.
Anthony Liguori [Fri, 19 Apr 2013 13:38:16 +0000 (08:38 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
# By Stefan Weil (3) and others
# Via Stefan Hajnoczi
* stefanha/trivial-patches:
m25p80: Remove bogus include of devices.h
ssh: Remove unnecessary use of strlen function.
block/ssh: Add missing gcc format attributes
linux-user: change do_semop to return target errno when unsuccessful
w64: Fix compiler warnings (wrong format specifier)
Remove unneeded type casts
virtio.h: drop unused function prototypes
bswap: fix compiler warning
Anthony Liguori [Fri, 19 Apr 2013 13:38:05 +0000 (08:38 -0500)]
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci: add pci test device
This adds a new device that we can use for testing PCI PIO and MMIO, with and
without ioeventfd in different configurations. FAST_MMIO will be added if/when
kvm supports it. Also included are minor cleanups in kvm APIs that it needs.
Signed-off-by: Michael S. Tsirkin <[email protected]>
# gpg: Signature made Mon 15 Apr 2013 05:42:24 PM CDT using RSA key ID D28D5469
# gpg: Can't check signature: public key not found
# By Michael S. Tsirkin
# Via Michael S. Tsirkin
* mst/tags/for_anthony:
pci: add pci test device
kvm: support non datamatch ioeventfd
kvm: support any size for pio eventfd
kvm: remove unused APIs
Anthony Liguori [Fri, 19 Apr 2013 13:37:58 +0000 (08:37 -0500)]
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
# By Jan Kiszka (4) and Marcelo Tosatti (1)
# Via Marcelo Tosatti
* qemu-kvm/uq/master:
vmxcap: Update according to SDM of January 2013
target-i386: kvm: save/restore steal time MSR
vmxcap: Report APIC register emulation and RDTSCP control
vmxcap: Augment reported information
vmxcap: Open MSR file in unbuffered mode
virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event
Because dev->actual is uint32_t, the expression 'dev->actual <<
VIRTIO_BALLOON_PFN_SHIFT' is truncated to 32 bits. This overflows when
dev->actual >= 1048576.
To reproduce:
1. Start a VM with a QMP socket and 5G of RAM
2. Connect to the QMP socket, negotiate capabilities and issue:
Amos Kong [Tue, 16 Apr 2013 05:47:32 +0000 (13:47 +0800)]
monitor: fix the wrong order of releasing keys
(qemu) sendkey ctrl_r-scroll_lock-scroll_lock
Executing this command could not let Windows guest panic, it caused by
the wrong order of releasing keys. This problem was introduced by
commit e4c8f004c55d9da3eae3e14df740238bf805b5d6.
The right release order should be starting from last item.
Peter Maydell [Fri, 19 Apr 2013 11:24:19 +0000 (12:24 +0100)]
target-arm: Correctly restore FPSCR
Use the helper functions to save and restore the FPSCR, so that
we correctly propagate rounding mode and flushing behaviour into
the float_status fields. This also allows us to stop saving the
vector length/stride fields separately.
Peter Maydell [Fri, 19 Apr 2013 11:24:19 +0000 (12:24 +0100)]
target-arm: Add some missing CPU state fields to VMState
A number of CPU state fields were accidentally omitted from
our migration state: some OMAP specific cp15 registers, and
some related to state for load/store exclusive insns. Add them.
Juan Quintela [Fri, 19 Apr 2013 11:24:19 +0000 (12:24 +0100)]
target-arm: port ARM CPU save/load to use VMState
Port the ARM CPU save/load code to use VMState. Some state is
saved in a slightly different order to simplify things -- for
example arrays are saved one after the other rather than 'striped',
and we always save all 32 VFP registers even if the CPU happens
to only have 16.
Use one subsection for each feature. This means that we don't need to
bump the version field each time that a new feature gets introduced.
Signed-off-by: Juan Quintela <[email protected]>
[PMM: fixed conflicts, updated to use cpu_class_set_vmsd(), updated
with new/removed fields since original patch, changed to use custom
VMStateInfo for cpsr rather than presave/postload hooks, corrected
subsection names so vmload doesn't fail] Signed-off-by: Peter Maydell <[email protected]>
The problem is a missing return directive that was removed in the
refactoring, so after decoding the instruction, qemu would fall through
to generate an UNDEF exception for an illegal instruction.
Peter Maydell [Fri, 19 Apr 2013 10:15:21 +0000 (11:15 +0100)]
hw/versatile_pci: Drop unnecessary vpb_pci_config_addr()
Drop the vpb_pci_config_addr() function -- it is unnecessary since
the size of the memory regions means the hwaddr is always within
the 24 bit size. (This function was probably a leftover from when
read/write functions were called with absolute addresses rather
than relative ones.)
Peter Maydell [Fri, 19 Apr 2013 10:15:20 +0000 (11:15 +0100)]
versatile_pci: Expose PCI memory space to system
The VersatilePB's PCI controller exposes the PCI memory space to the
system via three regions controlled by the mapping control registers.
Implement this so that guests can actually use MMIO-BAR PCI cards.
Peter Maydell [Fri, 19 Apr 2013 10:15:20 +0000 (11:15 +0100)]
arm/realview: Fix mapping of PCI regions
Fix the mapping of the PCI regions for the realview board, which were
all incorrect. (This was never noticed because the Linux kernel
doesn't actually include a PCI driver for the realview boards.)
Peter Maydell [Fri, 19 Apr 2013 10:15:20 +0000 (11:15 +0100)]
versatile_pci: Implement the PCI controller's control registers
The versatile_pci PCI controller has a set of control registers which
handle the mapping between PCI and system address spaces. Implement
these registers (though for now they have no effect since we don't
implement mapping PCI space into system memory at all).
The most natural order for our sysbus regions has the control
registers at the start, so move all the others down one.
Peter Maydell [Fri, 19 Apr 2013 10:15:19 +0000 (11:15 +0100)]
versatile_pci: Implement the correct PCI IRQ mapping
Implement the correct IRQ mapping for the Versatile PCI controller; it
differs between realview and versatile boards, but the previous QEMU
implementation was correct only for the first PCI card on a versatile
board, since we weren't swizzling IRQs based on the slot number.
Since this change would otherwise break any uses of PCI on Linux kernels
which have an equivalent bug (since they have effectively only been
tested against QEMU, not real hardware), we implement a mechanism
for automatically detecting those broken kernels and switching back
to the old mapping. This works by looking at the values the kernel
writes to the PCI_INTERRUPT_LINE register in the config space, which
is effectively the interrupt number the kernel expects the device
to be using.
Peter Maydell [Fri, 19 Apr 2013 10:15:18 +0000 (11:15 +0100)]
versatile_pci: Use separate PCI I/O space rather than system I/O space
Rather than overloading the system I/O space (which doesn't even make
any sense on ARM) for PCI I/O, create an memory region in the PCI
controller and use that to represent the I/O space.
Peter Maydell [Fri, 19 Apr 2013 10:15:18 +0000 (11:15 +0100)]
versatile_pci: Update to realize and instance init functions
Update the Versatile PCI controller to use a realize function rather
than SysBusDevice::init. To reflect the fact that the 'realview_pci'
class is taking most of its implementation from 'versatile_pci' (and
to make the QOM casts work) we make 'realview_pci' a subclass of
'versatile_pci'.
Peter Maydell [Fri, 19 Apr 2013 10:15:17 +0000 (11:15 +0100)]
versatile_pci: Expose PCI I/O region on Versatile PB
Comments in the QEMU source code claim that the version of the PCI
controller on the VersatilePB board doesn't support the PCI I/O
region, but this is incorrect; expose that region, map it in the
correct location, and drop the misleading comments.
This change removes the only currently implemented difference
between the realview-pci and versatile-pci models; however there
are other differences in not-yet-implemented functionality, so we
retain the distinction between the two device types.
I think in the early revisions of this we had an instantiation helper
for the device in devices.h. This was later removed and this header was
left over. Removed
Petar Jovanovic [Thu, 21 Mar 2013 17:57:36 +0000 (18:57 +0100)]
linux-user: change do_semop to return target errno when unsuccessful
do_semop() is called from two places, and one of these fails to convert
return error to target errno when semop fails. This patch changes the
function to always return target errno in case of an unsuccessful call.
The bswap functions use memcpy but the bswap.h header itself does not seem to
include it in some configuration such as cross compiling for powerpc64
on x86_64 machine.
vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping
This patch follows MST's recommendation to move checks for
vhost_verify_ring_mappings() -> cpu_physical_memory_map() operations
from MemoryListener->region_[add,del]() -> vhost_set_memory() into
final MemoryListener->commit() -> vhost_commit() callback.
It addresses the case where virtio-scsi vq ioport RAM re-mapping
to read-only SeaBIOS ROM triggers a cpu_physical_memory_map()
NIL MemoryRegionSection pointer failure.
Also save vhost_dev->mem_changed_[start,end]_addr values in
vhost_set_memory() for final ranges_overlap checks. (Thanks Paolo!)
Signed-off-by: Dmitry Fleytman <[email protected]> Signed-off-by: Yan Vugenfirer <[email protected]>
[ Rename files to vmw_pvscsi, fix setting of hostStatus in
pvscsi_request_cancelled - Paolo ] Signed-off-by: Paolo Bonzini <[email protected]>
Petar Jovanovic [Thu, 21 Mar 2013 07:57:36 +0000 (07:57 +0000)]
linux-user: change do_semop to return target errno when unsuccessful
do_semop() is called from two places, and one of these fails to convert
return error to target errno when semop fails. This patch changes the
function to always return target errno in case of an unsuccessful call.
Paolo Bonzini [Wed, 17 Apr 2013 14:26:41 +0000 (16:26 +0200)]
elfload: only give abi_long/ulong the alignment specified by the target
Previously, this was done for target_long/ulong, and propagated to
abi_long/ulong via a typedef. But target_long/ulong should not
have any specific alignment, it is never used to access guest
memory.