Anthony Liguori [Mon, 23 Sep 2013 16:53:11 +0000 (11:53 -0500)]
Merge remote-tracking branch 'stefanha/net' into staging
# By Aurelien Jarno (1) and Vincenzo Maffione (1)
# Via Stefan Hajnoczi
* stefanha/net:
e1000: NetClientInfo.receive_iov implemented
pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN
Anthony Liguori [Mon, 23 Sep 2013 16:53:05 +0000 (11:53 -0500)]
Merge remote-tracking branch 'stefanha/block' into staging
# By Stefan Hajnoczi (4) and others
# Via Stefan Hajnoczi
* stefanha/block:
virtio-blk: do not relay a previous driver's WCE configuration to the current
blockdev: do not default cache.no-flush to true
block: don't lose data from last incomplete sector
qcow2: Correct snapshots size for overlap check
coroutine: fix /perf/nesting coroutine benchmark
coroutine: add qemu_coroutine_yield benchmark
qemu-timer: do not take the lock in timer_pending
qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe
qemu-timer: drop outdated signal safety comments
osdep: warn if open(O_DIRECT) on fails with EINVAL
libcacard: link against qemu-error.o for error_report()
Anthony Liguori [Mon, 23 Sep 2013 16:52:55 +0000 (11:52 -0500)]
Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Stefan Weil (8) and others
# Via Michael Tokarev
* mjt/trivial-patches:
tests/.gitignore: ignore test-throttle
exec: Fix broken build for MinGW (regression)
kvm: Fix compiler warning (clang)
tcg-sparc: Fix parenthesis warning
Makefile: Remove some more files when cleaning
target-i386: Fix segment cache dump
iov: avoid "orig_len may be used unitialized" warning
vscclient: remove unnecessary use of uninitialized variable
trace-events: Clean up with scripts/cleanup-trace-events.pl again
tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)
*-user: Improve documentation for lock_user function
MAINTAINERS: Add missing entry to filelist for TCI target
translate-all: Fix formatting of dump output
*-user: Fix typo in comment (ulocking -> unlocking)
docs: Fix IO port number for CPU present bitmap.
q35: Fix typo in constant DEFUALT -> DEFAULT.
configure: Undefine _FORTIFY_SOURCE prior using it
Anthony Liguori [Mon, 23 Sep 2013 16:52:49 +0000 (11:52 -0500)]
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
# By Alexey Kardashevskiy (3) and others
# Via Paolo Bonzini
* qemu-kvm/uq/master:
target-i386: add feature kvm_pv_unhalt
linux-headers: update to 3.12-rc1
target-i386: forward CPUID cache leaves when -cpu host is used
linux-headers: update to 3.11
kvm: fix traces to use %x instead of %d
kvmvapic: Clear also physical ROM address when entering INACTIVE state
kvmvapic: Enter inactive state on hardware reset
kvmvapic: Catch invalid ROM size
kvm irqfd: support direct msimessage to irq translation
fix steal time MSR vmsd callback to proper opaque type
kvm: warn if num cpus is greater than num recommended
cpu: Move cpu state syncs up into cpu_dump_state()
exec: always use MADV_DONTFORK
Anthony Liguori [Mon, 23 Sep 2013 16:52:32 +0000 (11:52 -0500)]
Merge remote-tracking branch 'bonzini/scsi-next' into staging
# By Hervé Poussineau (5) and Stefan Weil (1)
# Via Paolo Bonzini
* bonzini/scsi-next:
block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi
lsi: add 53C810 variant
lsi: remove todo
lsi: ignore write accesses to CTEST0 registers
lsi: check ssid versus sdid only if ssid is valid
lsi: use constant name instead of its value
This patch implements the NetClientInfo.receive_iov method for the
e1000 device emulation. In this way a network backend that uses
qemu_sendv_packet() can deliver the fragmented packet without
requiring an additional copy in the frontend/backend network code
(nc_sendv_compat() function).
The existing method NetClientInfo.receive has been reimplemented
using the new method.
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Aurelien Jarno [Wed, 28 Aug 2013 12:17:39 +0000 (14:17 +0200)]
pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN
Now that the memory subsystem is propagating the endianness correctly,
the pcnet-pci device should have its I/O ports and MMIO memory marked
as LITTLE_ENDIAN, as PCI devices are little endian.
This makes the pcnet-pci NIC to work again on big endian MIPS Malta
(default NIC).
Cc: qemu-stable@nongnu.org Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Paolo Bonzini [Fri, 20 Sep 2013 15:31:55 +0000 (17:31 +0200)]
virtio-blk: do not relay a previous driver's WCE configuration to the current
The following sequence happens:
- the SeaBIOS virtio-blk driver does not support the WCE feature, which
causes QEMU to disable writeback caching
- the Linux virtio-blk driver resets the device, finds WCE is available
but writeback caching is disabled; tells block layer to not send cache
flush commands
- the Linux virtio-blk driver sets the DRIVER_OK bit, which causes
writeback caching to be re-enabled, but the Linux virtio-blk driver does
not know of this side effect and cache flushes remain disabled
The bug is at the third step. If the guest does know about CONFIG_WCE,
QEMU should ignore the WCE feature's state. The guest will control the
cache mode solely using configuration space. This change makes Linux
do flushes correctly, but Linux will keep SeaBIOS's writethrough mode.
Hence, whenever the guest is reset, the cache mode of the disk should
be reset to whatever was specified in the "-drive" option. With this
change, the Linux virtio-blk driver finds that writeback caching is
enabled, and tells the block layer to send cache flush commands
appropriately.
Reported-by: Rusty Russell <rusty@au1.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: don't lose data from last incomplete sector
To read the last sector that is not aligned to sector boundary, current
code for growable backends, since commit 893a8f6 "block: Produce zeros
when protocols reading beyond end of file", drops the data and directly
returns zeroes. That is incorrect.
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
exec.c: In function ‘qemu_ram_free’:
exec.c:1239:17: warning:
implicit declaration of function ‘munmap’ [-Wimplicit-function-declaration]
exec.c:1239:17: warning:
nested extern declaration of ‘munmap’ [-Wnested-externs]
exec.c:1239: undefined reference to `munmap'
Add some ifdeffery again to fix this.
Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Tobias Markus [Sun, 25 Aug 2013 10:20:06 +0000 (12:20 +0200)]
target-i386: Fix segment cache dump
When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default
operation size bit (D/B bit) is not set for Long Mode Data Segments since
there are only Data Segments in Long Mode and no explicit 16/32/64-bit
Descriptors.
This patch fixes this by checking the Long Mode Active bit of the hidden
flags variable and logging "DS" if it is set. (I.e. in Long Mode all Data
Segments are logged as "DS")
Signed-off-by: Tobias Markus <tobias@markus-regensburg.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Thu, 12 Sep 2013 18:17:50 +0000 (20:17 +0200)]
tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)
Debian busybox-static for alpha has a load address of 0x0000000120000000
which is mapped to 0x0000000020000000 for 32 bit hosts.
qemu-alpha uses the TCG opcodes qemu_ld32, qemu_ld64, qemu_st32 and
qemu_st64 which all raise the assertion (taddr == host_addr).
Remove all assertions of this type because they are either wrong or
unnecessary (when sizeof(tcg_target_ulong) >= sizeof(target_ulong)).
Cc: qemu-stable <qemu-stable@nongnu.org> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Anthony PERARD [Tue, 10 Sep 2013 16:36:18 +0000 (17:36 +0100)]
docs: Fix IO port number for CPU present bitmap.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewd-By: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
configure: Undefine _FORTIFY_SOURCE prior using it
Currently, we are enforcing the _FORTIFY_SOURCE=2 without any
previous detection if the macro has been already defined, e.g.
by environment, or is just enabled by compiler by default.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Anthony Liguori [Fri, 20 Sep 2013 13:08:08 +0000 (08:08 -0500)]
Merge remote-tracking branch 'kraxel/usb.90' into staging
# By Hans de Goede (6) and Gerd Hoffmann (1)
# Via Gerd Hoffmann
* kraxel/usb.90:
usb: Fix iovec memleak on combined-packet free
usb: Also reset max_packet_size on ep_reset
xhci: Fix memory leak on xhci_disable_ep
xhci: Add xhci_epid_to_usbep helper function
xhci: Init a transfers xhci, slotid and epid member on epctx alloc
xhci: Fix number of streams allocated when using streams
usb: remove old usb-host code
Max Reitz [Thu, 19 Sep 2013 10:29:15 +0000 (12:29 +0200)]
qcow2: Correct snapshots size for overlap check
Using s->snapshots_size instead of snapshots_size for the metadata
overlap check in qcow2_write_snapshots leads to the detection of an
overlap with the main qcow2 image header when deleting the last
snapshot, since s->snapshots_size has not yet been updated and is
therefore non-zero. However, the offset returned by qcow2_alloc_clusters
will be zero since snapshots_size is zero. Therefore, an overlap is
detected albeit no such will occur.
This patch fixes this by replacing s->snapshots_size by snapshots_size
when calling qcow2_pre_write_overlap_check.
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Andrew Jones [Wed, 18 Sep 2013 14:41:45 +0000 (16:41 +0200)]
target-i386: add feature kvm_pv_unhalt
I don't know yet if want this feature on by default, so for now I'm
just adding support for "-cpu ...,+kvm_pv_unhalt".
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386: forward CPUID cache leaves when -cpu host is used
Some users running cpu intensive tasks checking the cache CPUID leaves at
startup and making decisions based on the result reported that the guest was
not reflecting the host CPUID leaves when -cpu host is used.
This patch fix this.
Signed-off-by: Benoît Canet <benoit@irqsave.net>
[Rename new field to cache_info_passthrough - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Jan Kiszka [Tue, 3 Sep 2013 16:08:51 +0000 (18:08 +0200)]
kvmvapic: Enter inactive state on hardware reset
ROM layout may change after reset of devices are hotplugged, so we have
to pick up the physical address again when the ROM is initialized. This
is best achieved by resetting the state to INACTIVE.
CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Jan Kiszka [Tue, 3 Sep 2013 16:08:50 +0000 (18:08 +0200)]
kvmvapic: Catch invalid ROM size
If not caught early, a zero-length ROM will cause a NULL-pointer access
later on in patch_hypercalls when allocating a zero-length ROM copy and
trying to read from it.
CC: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
kvm irqfd: support direct msimessage to irq translation
On PPC64 systems MSI Messages are translated to system IRQ in a PCI
host bridge. This is already supported for emulated MSI/MSIX but
not for irqfd where the current QEMU allocates IRQ numbers from
irqchip and maps MSIMessages to IRQ in the host kernel.
This adds a new direct mapping flag which tells
the kvm_irqchip_add_msi_route() function that a new VIRQ
should not be allocated, instead the value from MSIMessage::data
should be used. It is up to the platform code to make sure that
this contains a valid IRQ number as sPAPR does in spapr_pci.c.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Andrew Jones [Fri, 23 Aug 2013 13:24:37 +0000 (15:24 +0200)]
kvm: warn if num cpus is greater than num recommended
The comment in kvm_max_vcpus() states that it's using the recommended
procedure from the kernel API documentation to get the max number
of vcpus that kvm supports. It is, but by always returning the
maximum number supported. The maximum number should only be used
for development purposes. qemu should check KVM_CAP_NR_VCPUS for
the recommended number of vcpus. This patch adds a warning if a user
specifies a number of cpus between the recommended and max.
Signed-off-by: Andrew Jones <drjones@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
James Hogan [Tue, 27 Aug 2013 11:19:10 +0000 (12:19 +0100)]
cpu: Move cpu state syncs up into cpu_dump_state()
The x86 and ppc targets call cpu_synchronize_state() from their
*_cpu_dump_state() callbacks to ensure that up to date state is dumped
when KVM is enabled (for example when a KVM internal error occurs).
Move this call up into the generic cpu_dump_state() function so that
other KVM targets (namely MIPS) can take advantage of it.
This requires kvm_cpu_synchronize_state() and cpu_synchronize_state() to
be moved out of the #ifdef NEED_CPU_H in <sysemu/kvm.h> so that they're
accessible to qom/cpu.c.
Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: Gleb Natapov <gleb@redhat.com> Cc: qemu-ppc@nongnu.org Cc: kvm@vger.kernel.org Signed-off-by: Gleb Natapov <gleb@redhat.com>
Andrea Arcangeli [Thu, 25 Jul 2013 10:11:15 +0000 (12:11 +0200)]
exec: always use MADV_DONTFORK
MADV_DONTFORK prevents fork to fail with -ENOMEM if the default
overcommit heuristics decides there's too much anonymous virtual
memory allocated. If the KVM secondary MMU is synchronized with MMU
notifiers or not, doesn't make a difference in that regard.
Secondly it's always more efficient to avoid copying the guest
physical address space in the fork child (so we avoid to mark all the
guest memory readonly in the parent and so we skip the establishment
and teardown of lots of pagetables in the child).
In the common case we can ignore the error if MADV_DONTFORK is not
available. Leave a second invocation that errors out in the KVM path
if MMU notifiers are missing and KVM is enabled, to abort in such
case.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Tested-By: Benoit Canet <benoit@irqsave.net> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Gabriel Kerneis [Tue, 17 Sep 2013 16:26:48 +0000 (18:26 +0200)]
coroutine: fix /perf/nesting coroutine benchmark
The /perf/nesting benchmark is broken because the counters are
not reset after each iteration. Therefore, nesting is done only
on the first iteration, and skipped on every other.
This patch fixes the issue, and reduces the number of iterations
to make it possible to run the benchmark in a reasonable amount of
time.
Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Gabriel Kerneis [Tue, 17 Sep 2013 15:09:39 +0000 (17:09 +0200)]
coroutine: add qemu_coroutine_yield benchmark
Current coroutine performance benchmarks test only coroutine creation,
either directly or in a nested way. This patch adds a benchmark to
evaluate the performance of qemu_coroutine_yield.
Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Hans de Goede [Tue, 17 Sep 2013 19:44:49 +0000 (21:44 +0200)]
xhci: Init a transfers xhci, slotid and epid member on epctx alloc
Transfers are part of an epctx, which is part of a slot, which is part of
a xhci. Transfers cannot dynamically be moved from one epctx to another,
so once created their xhci, slotid and epid are constant, so lets set these
up at creation time, rather then re-initializing them with the same
value each time a transfer gets submitted.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
The usb-host code has been rewritten for qemu 1.5 to use libusb,
the old code has been left in as temporary fallback. Now we are
two releases further out, targeting the 1.7 release. No major
issues with the new code poped up until now. Time to remove it
from tre tree. Should we ever need it again for some reason --
git has a copy for us in the history.
Paolo Bonzini [Thu, 12 Sep 2013 09:02:20 +0000 (11:02 +0200)]
qemu-timer: do not take the lock in timer_pending
We can deduce the result from expire_time, by making it always -1 if
the timer is not in the active_timers list. We need to check against
negative times passed to timer_mod_ns; clamping them to zero is not
a problem because the only clock that has a zero value at VM startup
is QEMU_CLOCK_VIRTUAL, and it is monotonic so it cannot be non-zero.
QEMU_CLOCK_HOST, instead, is not monotonic but it cannot go to negative
values unless the host time is seriously screwed up and points to
the 1960s.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Thu, 12 Sep 2013 09:02:18 +0000 (11:02 +0200)]
qemu-timer: drop outdated signal safety comments
host_alarm_handler() is invoked from the signal processing thread
(currently the iothread). Previously we did processing in a real signal
handler with signalfd and therefore needed signal-safe timer code.
Today host_alarm_handler() just marks the alarm timer as expired/pending
and notifies the main loop using qemu_notify_event().
Therefore these outdated comments about signal safety can be dropped.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Thu, 22 Aug 2013 09:29:03 +0000 (11:29 +0200)]
osdep: warn if open(O_DIRECT) on fails with EINVAL
Print a warning when opening a file O_DIRECT fails with EINVAL. This
saves users a lot of time trying to figure out the EINVAL error, which
is typical when attempting to open a file O_DIRECT on Linux tmpfs.
Reported-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Nowdays rom size is fixed at 8192 for live migration compat reasons.
So we can ditch the pointless math trying to calculate the size needed.
Also make the size sanity check fail at compile time not runtime.
Stefan Weil [Tue, 17 Sep 2013 17:33:49 +0000 (19:33 +0200)]
block/iscsi: Drop iscsi_co_get_block_status for older versions of libiscsi
Debian wheezy includes libiscsi-dev 1.4.0 which does not provide
SCSI_PROVISIONING_TYPE_DEALLOCATED. Drop iscsi_co_get_block_status
in this case to allow compilation without errors.
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Add myself to the MAINTAINERS file. I'll be looking at qemu-seccomp.c
and include/sysemu/seccomp.h.
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Acked-by: Paul Moore <pmoore@redhat.com>
Message-id: 1378746255-2089-1-git-send-email-otubo@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Anthony Liguori [Tue, 17 Sep 2013 15:01:24 +0000 (10:01 -0500)]
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
# By Liu Ping Fan (3) and Jan Kiszka (1)
# Via Jan Kiszka
* kiszka/queues/slirp:
slirp: clean up slirp_update_timeout
slirp: set mainloop timeout with more precise value
slirp: define timeout as macro
slirp: make timeout local
Anthony Liguori [Tue, 17 Sep 2013 14:51:40 +0000 (09:51 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging
# By Max Reitz (16) and others
# Via Kevin Wolf
* kwolf/for-anthony: (33 commits)
qemu-iotests: Fix test 038
block: Assert validity of BdrvActionOps
qemu-iotests: Cleanup test image in test number 007
qemu-img: fix invalid JSON
coroutine: add ./configure --disable-coroutine-pool
qemu-iotests: Adjustments due to error propagation
qcow2: Use Error parameter
qemu-img create: Emit filename on error
block: Error parameter for create functions
block: Error parameter for open functions
bdrv: Use "Error" for creating images
bdrv: Use "Error" for opening images
qemu-iotests: add 057 internal snapshot for block device test case
hmp: add interface hmp_snapshot_delete_blkdev_internal
hmp: add interface hmp_snapshot_blkdev_internal
qmp: add interface blockdev-snapshot-delete-internal-sync
qmp: add interface blockdev-snapshot-internal-sync
qmp: add internal snapshot support in qmp_transaction
snapshot: distinguish id and name in snapshot delete
snapshot: new function bdrv_snapshot_find_by_id_and_name()
...
Anthony Liguori [Tue, 17 Sep 2013 14:51:23 +0000 (09:51 -0500)]
Merge remote-tracking branch 'rth/tgt-i386' into staging
# By Paolo Bonzini (1) and Peter Maydell (1)
# Via Richard Henderson
* rth/tgt-i386:
target-i386: Only provide CMOV and friends if feature bit set
target-i386: fix disassembly with PAE=1, PG=0
Anthony Liguori [Tue, 17 Sep 2013 14:50:23 +0000 (09:50 -0500)]
Merge remote-tracking branch 'bonzini/scsi-next' into staging
# By Peter Lieven (3) and others
# Via Paolo Bonzini
* bonzini/scsi-next:
spapr-vscsi: Report error on unsupported MAD requests
spapr-vscsi: Adding VSCSI capabilities
iscsi: split discard requests in multiple parts
iscsi: add .bdrv_get_block_status
iscsi: add logical block provisioning information to iscsilun
hw/scsi/lsi53c895a: Use deposit32 rather than handcoded shift/mask
hw/scsi/lsi53c895a: Use sextract32 for sign-extension
scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial
virtio-scsi: Make type virtio-scsi-common abstract
spapr-vscsi: add task management
scsi: prefer UUID to VM name for the initiator name
Liu Ping Fan [Sun, 25 Aug 2013 02:01:21 +0000 (10:01 +0800)]
slirp: set mainloop timeout with more precise value
If slirp needs to emulate tcp timeout, then the timeout value
for mainloop should be more precise, which is determined by
slirp's fasttimo or slowtimo. Achieve this by swap the logic
sequence of slirp_pollfds_fill and slirp_update_timeout.
Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Currently, treat it exactly as a 53C895A. 53C895A is a 53C810 with more capabilities, so this should work.
However, this lets us test different code paths on Linux, which
don't use lastest features if it detect a 810, or on some OSes
which only support 810 and not 895A (like very old Windows NT
versions).
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
53C895A datasheet says that this register is read/write, and that the value
returned on read access is dependant of DMA FIFO state. However, nothing is
said for written value.
53C810A datasheet gives more insight about this register:
"This was a general purpose read/write register in previous SYM53C8XX
family chips. Although it is still a read/write register, Symbios reserves
the right to use these bits for future 53C8XX family enhancements."
This prevents going to the default case, which prints an error message.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Max Reitz [Fri, 13 Sep 2013 08:37:12 +0000 (10:37 +0200)]
qemu-iotests: Fix test 038
Test 038 uses asynchronous I/O, resulting (potentially) in a different
output for every run (regarding the order of the I/O accesses). This can
be fixed by simply sorting the I/O access messages, since their order is
irrelevant anyway (for this asynchonous I/O).
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Peter Maydell [Mon, 15 Jul 2013 17:21:40 +0000 (18:21 +0100)]
target-i386: Only provide CMOV and friends if feature bit set
The instructions CMOVcc, FCMOVcc and F[U]COMI[P] should only be
present if the CMOV feature bit is set. Add missing feature bit
checks so we correctly fault if emulating a 486 or 586.
This fixes bug LP:1201446.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
exec: Don't abort when we can't allocate guest memory
We abort() on memory allocation failure. abort() is appropriate for
programming errors. Maybe most memory allocation failures are
programming errors, maybe not. But guest memory allocation failure
isn't, and aborting when the user asks for more memory than we can
provide is not nice. exit(1) instead, and do it in just one place, so
the error message is consistent.
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-id: 1375276272-15988-8-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Another issue missed in commit fdec991 is -mem-path: it needs to be
rejected only for old S390 KVM, not for any S390. Not that I
personally care, but the ifdeffery in qemu_ram_alloc_from_ptr() annoys
me.
Note that this doesn't actually make -mem-path work, as the kernel
doesn't (yet?) support large pages in the host for KVM guests. Clean
it up anyway.
Thanks to Christian Borntraeger for pointing out the S390 kernel
limitations.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-id: 1375276272-15988-7-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
exec: Drop incorrect & dead S390 code in qemu_ram_remap()
Old S390 KVM wants guest RAM mapped in a peculiar way. Commit 6b02494
implemented that.
When qemu_ram_remap() got added in commit cd19cfa, its code carefully
mimicked the allocation code: peculiar way if defined(TARGET_S390X) &&
defined(CONFIG_KVM), else normal way.
For new S390 KVM, we actually want the normal way. Commit fdec991
changed qemu_ram_alloc_from_ptr() accordingly, but forgot to update
qemu_ram_remap(). If qemu_ram_alloc_from_ptr() maps RAM the normal
way, but qemu_ram_remap() remaps it the peculiar way, remapping
changes protection and flags, which it shouldn't.
Fortunately, this can't happen, as we never remap on S390.
Replace the incorrect code with an assertion.
Thanks to Christian Borntraeger for help with assessing the bug's
(non-)impact.
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Message-id: 1375276272-15988-6-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Instead of spreading its ifdeffery everywhere, confine it to
qemu_ram_alloc_from_ptr(). Everywhere else, simply test block->fd,
which is non-negative exactly when block uses -mem-path.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Message-id: 1375276272-15988-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
exec: Clean up fall back when -mem-path allocation fails
With -mem-path, qemu_ram_alloc_from_ptr() first tries to allocate
accordingly, but when it fails, it falls back to normal allocation.
The fall back allocation code used to be effectively identical to the
"-mem-path not given" code, until it started to diverge in commit 432d268. I believe the code still works, but clean it up anyway: drop
the special fall back allocation code, and fall back to the ordinary
"-mem-path not given" code instead.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Message-id: 1375276272-15988-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Max Reitz [Thu, 12 Sep 2013 12:57:27 +0000 (14:57 +0200)]
block: Assert validity of BdrvActionOps
In qmp_transaction, assert that the BdrvActionOps to be used is actually
valid.
This assertion failing is very improbable, however, it might happen, if
a new TransactionActionKind is introduced "out of order" and the
actions[] array is not updated.
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: Cleanup test image in test number 007
qemu-iotests number 007 doesn't do test image cleanup. This will affect
those protocols that expect a clean state before every test. Hence
ensure that test image is cleaned up in this test.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>