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
Message-id:
1366381460-6041-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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
Message-id:
1366375833-995-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Pavel Dovgaluk [Mon, 15 Apr 2013 06:59:15 +0000 (10:59 +0400)]
i386 ROR r8/r16 instruction fix
Fixed EFLAGS corruption by ROR r8/r16 instruction located at the end of the TB.
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Peter Maydell [Sat, 20 Apr 2013 13:48:27 +0000 (14:48 +0100)]
hw/sm501: Use correct setter for sysbus-ohci dma-address property
The sysbus-ohci dma-address property is declared as a HEX64
property, not a TADDR, so use the correct setter for it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Andreas Färber <afaerber@suse.de>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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
Paolo Bonzini [Fri, 29 Mar 2013 01:08:16 +0000 (01:08 +0000)]
vhost-scsi-s390: new device supporting the tcm_vhost Linux kernel module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Asias He <asias@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Fri, 19 Apr 2013 14:16:50 +0000 (16:16 +0200)]
vhost-scsi-ccw: new device supporting the tcm_vhost Linux kernel module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Nicholas Bellinger [Fri, 29 Mar 2013 01:08:16 +0000 (01:08 +0000)]
vhost-scsi-pci: new device supporting the tcm_vhost Linux kernel module
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Nicholas Bellinger [Fri, 29 Mar 2013 01:08:16 +0000 (01:08 +0000)]
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 <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Asias He <asias@redhat.com>
[ Rebase on top of VirtIOSCSICommon patch, fix bugs in feature
negotiation and irqfd masking - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Fri, 19 Apr 2013 08:45:25 +0000 (10:45 +0200)]
virtio: simplify Makefile conditionals
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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.
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Asias He <asias@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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
Message-id:
1366371241-23430-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 <mst@redhat.com>
# 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
Message-id: cover.
1366272004.git.mst@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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
Message-id: cover.
1366253306.git.mtosatti@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 18 Apr 2013 15:53:32 +0000 (11:53 -0400)]
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:
{ "execute":"balloon", "arguments": { "value":
1073741824 } }
3. Watch for BALLOON_CHANGE QMP events, the last one will incorretly be:
{ "timestamp": { "seconds":
1366228965, "microseconds": 245466 },
"event": "BALLOON_CHANGE", "data": { "actual":
5368709120 } }
To fix it this commit casts it to ram_addr_t, which is ram_size's type.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
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.
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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 <quintela@redhat.com>
[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 <peter.maydell@linaro.org>
Peter Chubb [Fri, 19 Apr 2013 11:24:18 +0000 (12:24 +0100)]
target-arm: Reinsert missing return statement in ARM mode SRS decode
Since patch
81465888c5306cd94abb9847e560796fd13d3c2f
target-arm: factor out handling of SRS instruction
the ARM mode SRS instruction has not worked in QEMU.
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.
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Fri, 19 Apr 2013 10:15:19 +0000 (11:15 +0100)]
versatile_pci: Put the host bridge PCI device at slot 29
On real hardware the host bridge appears as a PCI device in slot 29,
so make QEMU put its host bridge in that slot too.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
Peter Maydell [Fri, 19 Apr 2013 10:15:18 +0000 (11:15 +0100)]
versatile_pci: Change to subclassing TYPE_PCI_HOST_BRIDGE
Change versatile_pci to subclass TYPE_PCI_HOST_BRIDGE and generally
handle PCI in a more QOM-like fashion.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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'.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
Peter Maydell [Fri, 19 Apr 2013 10:15:17 +0000 (11:15 +0100)]
versatile_pci: Fix hardcoded tabs
There is just one line in this source file with a hardcoded tab
indent, so just fix it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paul Brook <paul@codesourcery.com>
Peter Crosthwaite [Fri, 19 Apr 2013 02:18:05 +0000 (12:18 +1000)]
m25p80: Remove bogus include of devices.h
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
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Richard W.M. Jones [Thu, 18 Apr 2013 21:09:33 +0000 (22:09 +0100)]
ssh: Remove unnecessary use of strlen function.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Weil [Thu, 18 Apr 2013 20:21:05 +0000 (22:21 +0200)]
block/ssh: Add missing gcc format attributes
Now gcc will check whether format string and variable arguments match.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
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.
Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Weil [Sat, 13 Apr 2013 20:45:50 +0000 (22:45 +0200)]
w64: Fix compiler warnings (wrong format specifier)
GetLastError() returns a DWORD value which is unsigned long,
so the correct format specifier is %lu.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Weil [Fri, 12 Apr 2013 18:53:58 +0000 (20:53 +0200)]
Remove unneeded type casts
cpu_physical_memory_read, cpu_physical_memory_write take any pointer
as 2nd argument without needing a type cast.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Luiz Capitulino [Fri, 12 Apr 2013 13:12:55 +0000 (09:12 -0400)]
virtio.h: drop unused function prototypes
They are unused since commit
5c7d0962f60498c3f11d402e1c857cb9d5d8568d.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Alexey Kardashevskiy [Mon, 15 Apr 2013 01:47:56 +0000 (11:47 +1000)]
bswap: fix compiler warning
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.
The patch explicitly includes string.h.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Nicholas Bellinger [Wed, 3 Apr 2013 09:15:11 +0000 (09:15 +0000)]
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!)
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Dmitry Fleytman [Fri, 19 Apr 2013 07:05:46 +0000 (10:05 +0300)]
scsi: VMWare PVSCSI paravirtual device implementation
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Yan Vugenfirer <yan@daynix.com>
[ Rename files to vmw_pvscsi, fix setting of hostStatus in
pvscsi_request_cancelled - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Mon, 8 Apr 2013 16:50:15 +0000 (18:50 +0200)]
scsi: avoid assertion failure on VERIFY command
A verify command is not an actual read (we do not implement
compare mode) and thus does not have an AIOCB attached. Do
not crash in scsi_dma_complete.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Andreas Schwab [Tue, 9 Apr 2013 05:41:33 +0000 (05:41 +0000)]
linux-user: fix setgroups/getgroups for non-UID16 archs
Don't assume target_id is a short.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Andreas Schwab [Tue, 9 Apr 2013 01:02:34 +0000 (01:02 +0000)]
linux-user: fix undefined shift in copy_to_user_fdset
If TARGET_ABI_BITS is bigger than 32 we shift by more than the size of int.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
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.
Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:47 +0000 (16:26 +0200)]
configure: remove duplicate test
We already had a test to add -march=i486 when needed. Make the
existing test independent of vhost-net, so that it is also used
under Win32.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:46 +0000 (16:26 +0200)]
configure: CONFIG_NO_XEN is duplicated
We already define it in Makefile.target. But we need to avoid a
curious double negation in order to eliminate it.
Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:45 +0000 (16:26 +0200)]
configure: eliminate target_libs_softmmu
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:44 +0000 (16:26 +0200)]
configure: move common libraries to config-host.mak
Move -lm to the end of the line, so that it can be picked up as a
dependency by pixman in the static build case.
Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:43 +0000 (16:26 +0200)]
configure: move CONFIG_QEMU_LDST_OPTIMIZATION to config-host.mak
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:42 +0000 (16:26 +0200)]
elfload: use abi_llong/ullong instead of target_llong/ullong
The alignment is a characteristic of the ABI, not the CPU.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:40 +0000 (16:26 +0200)]
elfload: use abi_int/uint instead of target_int/uint
The alignment is a characteristic of the ABI, not the CPU.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:39 +0000 (16:26 +0200)]
elfload: use abi_short/ushort instead of target_short/ushort
The alignment is a characteristic of the ABI, not the CPU.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:38 +0000 (16:26 +0200)]
elfload: use tswapreg consistently in elf_core_copy_regs
Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:37 +0000 (16:26 +0200)]
elfload: fix size of registers for N32
Registers are 64-bit in size for the MIPS n32 ABI. Define
target_elf_greg_t accordingly, and use the correct function
to do endian swaps.
Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:36 +0000 (16:26 +0200)]
elfload: fix size of ABI-dependent fields in core dumps
Some fields in core dumps are 32-bit in 32-or-64 environments (ppc64abi32,
sparc32plus). Use abi_long/ulong for those.
Also, the fields of target_elf_siginfo are ints. Use tswap32 to convert them.
Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Paolo Bonzini [Wed, 17 Apr 2013 14:26:35 +0000 (16:26 +0200)]
configure: QEMU_INCLUDES are the same for all subtargets
Reviewed-by: Peter Maydell <peter.maydell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Peter Crosthwaite [Thu, 18 Apr 2013 04:47:31 +0000 (14:47 +1000)]
configure/Make: Build libfdt from submodule DTC
Configure to use the DTC submodule to build libfdt when no system libfdt
is found. Prompt to install the DTC submodule if --enable-fdt is set but
no DTC can be found.
DTC has no out-of-tree build capability, so the configure will symlink
the Makefile and scripts directory in the out of tree build directory
and pass in all the needed DTC arguments to make out of tree build happen.
Ideally we fix the DTC make to support out of tree, but did it this way to
avoid commits to DTC.
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Peter Crosthwaite [Thu, 18 Apr 2013 04:46:53 +0000 (14:46 +1000)]
dtc: add submodule
Add dtc submodule as a fallback for old distros.
Picking version 1.3.0. as this is the most recently tagged stable version.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Peter Crosthwaite [Thu, 18 Apr 2013 04:46:14 +0000 (14:46 +1000)]
configure: Put cross compile flags in EXTRA_CFLAGS
The cross compile CFLAGS are needed to properly build pixman (and any other
submodules). Only the EXTRA_CFLAGS set is passed to submodules not QEMU_CFLAGS,
so put the cross compile flags in EXTRA_CFLAGS instead.
Signed-off-by: Peter Crosthwaite peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Jan Kiszka [Sun, 17 Mar 2013 10:45:50 +0000 (11:45 +0100)]
vmxcap: Update according to SDM of January 2013
This adds reporting of VMCS shadowing, #VE, IA32_SMBASE, unrestricted
VMWRITE and fixes the range of the MSEG revision ID.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Marcelo Tosatti [Wed, 20 Feb 2013 02:27:20 +0000 (23:27 -0300)]
target-i386: kvm: save/restore steal time MSR
Read and write steal time MSR, so that reporting is functional across
migration.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Jan Kiszka [Mon, 18 Feb 2013 06:56:54 +0000 (07:56 +0100)]
vmxcap: Report APIC register emulation and RDTSCP control
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Wed, 13 Feb 2013 11:44:06 +0000 (12:44 +0100)]
vmxcap: Augment reported information
Parse the Basic VMX Information MSR and add the bit for the new posted
interrupts.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Jan Kiszka [Wed, 13 Feb 2013 11:43:10 +0000 (12:43 +0100)]
vmxcap: Open MSR file in unbuffered mode
Python may otherwise decide to to read larger chunks, applying the seek
only on the software buffer. This will return results from the wrong
MSRs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:30:02 +0000 (16:30 +0200)]
virtio-net: cleanup: init and exit function.
This remove old init and exit function as they are no longer needed.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-8-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:30:01 +0000 (16:30 +0200)]
virtio-net: cleanup: use QOM cast.
As the virtio-net-pci and virtio-net-s390 are switched to the new API,
we can use QOM casts.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-7-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:30:00 +0000 (16:30 +0200)]
virtio-net-ccw: switch to the new API.
Here the virtio-net-ccw is modified for the new API. The device
virtio-net-ccw extends virtio-ccw-device as before. It creates and
connects a virtio-net-device during the init. The properties are not modified.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-6-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:29:59 +0000 (16:29 +0200)]
virtio-net-s390: switch to the new API.
Here the virtio-net-s390 is modified for the new API. The device
virtio-net-s390 extends virtio-s390-device as before. It creates and
connects a virtio-net-device during the init. The properties are not modified.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-5-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:29:58 +0000 (16:29 +0200)]
virtio-net-pci: switch to the new API.
Here the virtio-net-pci is modified for the new API. The device
virtio-net-pci extends virtio-pci. It creates and connects a
virtio-net-device during the init. The properties are not changed.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-4-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:29:57 +0000 (16:29 +0200)]
virtio-net: add the virtio-net device.
Create virtio-net-device which extends virtio-device, so it can be connected on
virtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-3-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
KONRAD Frederic [Thu, 11 Apr 2013 14:29:56 +0000 (16:29 +0200)]
virtio: add two functions to VirtioDeviceClass.
Recent changes need two functions to VirtioDevice. This just add them
into VirtioDeviceClass.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id:
1365690602-22729-2-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Tue, 16 Apr 2013 11:51:06 +0000 (13:51 +0200)]
Fix warnings suppressors to honor --disable-werror
Replace
#pragma GCC diagnostic ignored FOO
[Troublesome code...]
#pragma GCC diagnostic error FOO
by
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored FOO
[Troublesome code...]
#pragma GCC diagnostic pop
Broken in commit 3f4349d, commit 092bb30, and commit c95e308.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1366113066-1340-1-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Tue, 16 Apr 2013 14:45:21 +0000 (09:45 -0500)]
fw_cfg: add qtest test case
This validates some basic characteristics of fw_cfg.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-8-git-send-email-aliguori@us.ibm.com
Anthony Liguori [Tue, 16 Apr 2013 14:45:20 +0000 (09:45 -0500)]
i440fx-test: add test for PAM functionality
This tests PAM settings for the i440fx. This test does a lot of
byte MMIO which is fairly slow with qtest today. But the test
does complete in under 2 seconds.
We don't fully emulate PAM largely because of limitations with
KVM so we #if 0 that part of the test case.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-7-git-send-email-aliguori@us.ibm.com
Anthony Liguori [Tue, 16 Apr 2013 14:45:19 +0000 (09:45 -0500)]
i440fx-test: add test to compare default register values
This test compares all of the default register values against the
spec. It turns out we deviate in quite a few places. These
places are really only visible to the BIOS though which is why
this hasn't created any problems.
The deviation actually happens in the core PCI layer so I suspect
it's not a simple fix if we really care to fix it. For now, just
disable the affected checks.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-6-git-send-email-aliguori@us.ibm.com
Anthony Liguori [Tue, 16 Apr 2013 14:45:18 +0000 (09:45 -0500)]
libqos: add malloc support
This is a very simple allocator for the PC platform. It should
be possible to add backends for other platforms.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-5-git-send-email-aliguori@us.ibm.com
Anthony Liguori [Tue, 16 Apr 2013 14:45:17 +0000 (09:45 -0500)]
libqos: add fw_cfg support
fw_cfg is needed to get the top of memory which is necessary for
doing PCI allocation and allocating RAM for DMA.
Add a PC version of fw_cfg and enough abstraction to support other
platforms.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-4-git-send-email-aliguori@us.ibm.com
Anthony Liguori [Tue, 16 Apr 2013 14:45:16 +0000 (09:45 -0500)]
qtest: add libqos including PCI support
This includes basic PCI support for the PC platform. Enough
abstraction should be present to support non-PC platforms too.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-3-git-send-email-aliguori@us.ibm.com
Anthony Liguori [Tue, 16 Apr 2013 14:45:15 +0000 (09:45 -0500)]
qtest: don't use system command to avoid double fork
Currently we waitpid on the child process we spawn off that does
nothing more than system() another process. While this does not
appear to be incorrect, it's wasteful and confusing so get rid of
it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id:
1366123521-4330-2-git-send-email-aliguori@us.ibm.com
Eric Blake [Tue, 16 Apr 2013 21:50:41 +0000 (15:50 -0600)]
migration: reflect incoming failure to shell
Management apps like libvirt don't know to pay attention to
stderr unless there is a non-zero exit status.
* migration.c (process_incoming_migration_co): Exit with non-zero
status on failure.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-id:
1366149041-626-1-git-send-email-eblake@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alexey Kardashevskiy [Wed, 17 Apr 2013 07:49:00 +0000 (17:49 +1000)]
qbus: remove wrong error messages
The existing code shows the "Bus '%s' is full" message even if name
is specified and different from bus->name (i.e. match=0).
The patch excludes unnecessary error message.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id:
1366184940-13516-1-git-send-email-aik@ozlabs.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Lei Li [Wed, 17 Apr 2013 08:46:54 +0000 (16:46 +0800)]
chardev: remove the headers of Memory chardev driver
Memory chardev driver is no longer used, and Commit:
4bf0bb8014ac2ac61b1004f5d92b2a4594d48017 has droped
it but the headers, so clean it up.
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Message-id:
1366188414-24214-1-git-send-email-lilei@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 17 Apr 2013 15:14:07 +0000 (10:14 -0500)]
Merge remote-tracking branch 'bonzini/migration-writev' into staging
# By Paolo Bonzini
# Via Paolo Bonzini
* bonzini/migration-writev:
qemu-file: do not use stdio for qemu_fdopen
iov: handle partial writes from sendmsg and recvmsg
iov: reorganize iov_send_recv, part 3
iov: reorganize iov_send_recv, part 2
iov: reorganize iov_send_recv, part 1
qemu-file: drop socket_put_buffer
Message-id:
1366192012-14872-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Wed, 27 Mar 2013 16:36:32 +0000 (17:36 +0100)]
qemu-file: do not use stdio for qemu_fdopen
This uses system calls directly for Unix file descriptors, so that the
efficient writev_buffer can be used. Pay attention to the possibility
of partial writes in writev.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 27 Mar 2013 16:36:31 +0000 (17:36 +0100)]
iov: handle partial writes from sendmsg and recvmsg
Partial writes can still happen in sendmsg and recvmsg, if a
signal is received in the middle of a write. To handle this,
retry the operation with a new offset/bytes pair.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 27 Mar 2013 16:36:30 +0000 (17:36 +0100)]
iov: reorganize iov_send_recv, part 3
"si" and "ei" are merged in a single variable.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 27 Mar 2013 16:36:29 +0000 (17:36 +0100)]
iov: reorganize iov_send_recv, part 2
Do not touch the "bytes" argument anymore. Instead, remember the
original length of the last iovec if we touch it, and restore it
afterwards.
This requires undoing the changes in opposite order. The previous
algorithm didn't care.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 27 Mar 2013 16:36:28 +0000 (17:36 +0100)]
iov: reorganize iov_send_recv, part 1
Once the initial part of the iov is dropped, it is not used anymore.
Modify iov/iovcnt directly instead of adjusting them with the "si"
variable.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 27 Mar 2013 16:36:27 +0000 (17:36 +0100)]
qemu-file: drop socket_put_buffer
It is enough to implement one of socket_writev_buffer and
socket_put_buffer.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Tue, 2 Apr 2013 13:50:00 +0000 (15:50 +0200)]
qom: do nothing on unparent of object without parent
Otherwise, device_unparent will fail to get a canonical path of
the object.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
1364910600-3418-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Andreas Färber [Tue, 16 Apr 2013 01:50:21 +0000 (03:50 +0200)]
qdev: Fix device_add bus assumptions
Drop an unreachable fallback bus assignment to SysBus.
If no ,bus= is specified, only search busses recursively for bus type if
the DeviceClass has a bus_type specified. Handle resulting NULL cases.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id:
1366077021-28882-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Tue, 16 Apr 2013 10:28:16 +0000 (15:58 +0530)]
rng random backend: check for -EAGAIN errors on read
Not handling EAGAIN triggers the assert
qemu/backends/rng-random.c:44:entropy_available: assertion failed: (len != -1)
Aborted (core dumped)
This happens when starting a guest with '-device virtio-rng-pci',
issuing a 'cat /dev/hwrng' in the guest, while also doing 'cat
/dev/random' on the host.
Reported-by: yunpingzheng <yunzheng@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Message-id:
eacda84dfaf2d99cf6d250b678be4e4d6c2088fb.
1366108096.git.amit.shah@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paolo Bonzini [Tue, 9 Apr 2013 15:43:43 +0000 (17:43 +0200)]
migration: initialize RAM to zero
Using qemu_memalign only leaves the RAM zero by chance, because libc
will usually use mmap to satisfy our huge requests. But memory will
not be zero when using MALLOC_PERTURB_ with a nonzero value. In the
case of incoming migration, this breaks a recently-introduced
invariant (commit f1c7279, migration: do not sent zero pages in
bulk stage, 2013-03-26).
To fix this, use mmap ourselves to get a well-aligned, always zero
block for the RAM. Mmap-ed memory is easy to "trim" at the sides.
This also removes the need to do something special on valgrind
(see commit
c2a8238a, Support running QEMU on Valgrind, 2011-10-31),
thus effectively reverts that patch.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
1365522223-20153-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Tue, 16 Apr 2013 15:28:58 +0000 (10:28 -0500)]
Merge remote-tracking branch 'kraxel/usb.80' into staging
# By Gerd Hoffmann (6) and Hans de Goede (1)
# Via Gerd Hoffmann
* kraxel/usb.80:
use libusb for usb-host
xhci: fix address device
xhci: use slotid as device address
xhci: fix portsc writes
xhci: add xhci_cap_write
xhci: remove leftover debug printf
usb-serial: Remove double call to qemu_chr_add_handlers( NULL )
Message-id:
1366107190-30853-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>