Alex Williamson [Tue, 5 Jun 2018 14:23:18 +0000 (08:23 -0600)]
vfio/pci: Default display option to "off"
Commit
a9994687cb9b ("vfio/display: core & wireup") added display
support to vfio-pci with the default being "auto", which breaks
existing VMs when the vGPU requires GL support but had no previous
requirement for a GL compatible configuration. "Off" is the safer
default as we impose no new requirements to VM configurations.
Fixes: a9994687cb9b ("vfio/display: core & wireup")
Cc: qemu-stable@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Alex Williamson [Tue, 5 Jun 2018 14:23:17 +0000 (08:23 -0600)]
vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly
With vfio ioeventfd support, we can program vfio-pci to perform a
specified BAR write when an eventfd is triggered. This allows the
KVM ioeventfd to be wired directly to vfio-pci, entirely avoiding
userspace handling for these events. On the same micro-benchmark
where the ioeventfd got us to almost 90% of performance versus
disabling the GeForce quirks, this gets us to within 95%.
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Alex Williamson [Tue, 5 Jun 2018 14:23:17 +0000 (08:23 -0600)]
vfio/quirks: ioeventfd quirk acceleration
The NVIDIA BAR0 quirks virtualize the PCI config space mirrors found
in device MMIO space. Normally PCI config space is considered a slow
path and further optimization is unnecessary, however NVIDIA uses a
register here to enable the MSI interrupt to re-trigger. Exiting to
QEMU for this MSI-ACK handling can therefore rate limit our interrupt
handling. Fortunately the MSI-ACK write is easily detected since the
quirk MemoryRegion otherwise has very few accesses, so simply looking
for consecutive writes with the same data is sufficient, in this case
10 consecutive writes with the same data and size is arbitrarily
chosen. We configure the KVM ioeventfd with data match, so there's
no risk of triggering for the wrong data or size, but we do risk that
pathological driver behavior might consume all of QEMU's file
descriptors, so we cap ourselves to 10 ioeventfds for this purpose.
In support of the above, generic ioeventfd infrastructure is added
for vfio quirks. This automatically initializes an ioeventfd list
per quirk, disables and frees ioeventfds on exit, and allows
ioeventfds marked as dynamic to be dropped on device reset. The
rationale for this latter feature is that useful ioeventfds may
depend on specific driver behavior and since we necessarily place a
cap on our use of ioeventfds, a machine reset is a reasonable point
at which to assume a new driver and re-profile.
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Alex Williamson [Tue, 5 Jun 2018 14:23:17 +0000 (08:23 -0600)]
vfio/quirks: Add quirk reset callback
Quirks can be self modifying, provide a hook to allow them to cleanup
on device reset if desired.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Alex Williamson [Tue, 5 Jun 2018 14:23:16 +0000 (08:23 -0600)]
vfio/quirks: Add common quirk alloc helper
This will later be used to include list initialization.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Tiwei Bie [Tue, 5 Jun 2018 14:23:16 +0000 (08:23 -0600)]
vfio: remove DPRINTF() definition from vfio-common.h
This macro isn't used by any VFIO code. And its name is
too generic. The vfio-common.h (in include/hw/vfio) can
be included by other modules in QEMU. It can introduce
conflicts.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Peter Maydell [Tue, 5 Jun 2018 09:38:33 +0000 (10:38 +0100)]
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging
move more data to arch specific files
fix SPARC %tick
replace strcpy() by g_strlcpy() in syscall.c
# gpg: Signature made Mon 04 Jun 2018 16:19:44 BST
# gpg: using RSA key
F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg: aka "Laurent Vivier <laurent@vivier.eu>"
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/linux-user-for-3.0-pull-request:
linux-user: remove useless #if
linux-user: move hppa signal definitions to hppa/target_signal.h
linux-user: move alpha signal definitions to alpha/target_signal.h
linux-user: move openrisc signal definitions to openrisc/target_signal.h
linux-user: move mips signal definitions to mips/target_signal.h
linux-user: move sparc signal definitions to sparc/target_signal.h
linux-user: move generic signal definitions to generic/signal.h
linux-user: move get_sp_from_cpustate() to target_cpu.h
linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h
linux-user: move ppc fcntl definitions to ppc/target_fcntl.h
linux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.h
linux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.h
linux-user: move hppa fcntl definitions to hppa/target_fcntl.h
linux-user: move alpha fcntl definitions to alpha/target_fcntl.h
linux-user: move generic fcntl definitions to generic/fcntl.h
linux-user: SPARC "rd %tick" can be used by user application
syscall: replace strcpy() by g_strlcpy()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 4 Jun 2018 17:34:04 +0000 (18:34 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
* Copy offloading for qemu-img convert (iSCSI, raw, and qcow2)
If the underlying storage supports copy offloading, qemu-img convert will
use it instead of performing reads and writes. This avoids data transfers
and thus frees up storage bandwidth for other purposes. SCSI EXTENDED COPY
and Linux copy_file_range(2) are used to implement this optimization.
* Drop spurious "WARNING: I\/O thread spun for 1000 iterations" warning
# gpg: Signature made Mon 04 Jun 2018 12:20:08 BST
# gpg: using RSA key
9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
main-loop: drop spin_counter
qemu-img: Convert with copy offloading
block-backend: Add blk_co_copy_range
iscsi: Implement copy offloading
iscsi: Create and use iscsi_co_wait_for_task
iscsi: Query and save device designator when opening
file-posix: Implement bdrv_co_copy_range
qcow2: Implement copy offloading
raw: Implement copy offloading
raw: Check byte range uniformly
block: Introduce API for copy offloading
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 4 Jun 2018 14:46:15 +0000 (15:46 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/vga-
20180604-pull-request' into staging
Two little vga fixes.
# gpg: Signature made Mon 04 Jun 2018 09:48:53 BST
# gpg: using RSA key
4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/vga-
20180604-pull-request:
vga: cleanup surface handling
bochs-display: add missing break
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 4 Jun 2018 13:24:16 +0000 (14:24 +0100)]
Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging
# gpg: Signature made Mon 04 Jun 2018 08:09:27 BST
# gpg: using RSA key
CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6
* remotes/famz/tags/docker-pull-request:
docker: Update fedora image to 28
tests/docker/Makefile.include: handle empty TARGET_LIST
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 4 Jun 2018 11:54:00 +0000 (12:54 +0100)]
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/
20180604' into staging
migration/next for
20180604
# gpg: Signature made Mon 04 Jun 2018 05:14:24 BST
# gpg: using RSA key
F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg: aka "Juan Quintela <quintela@trasno.org>"
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723
* remotes/juanquintela/tags/migration/
20180604:
migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
migration: remove unnecessary variables len in QIOChannelRDMA
migration: Don't activate block devices if using -S
migration: discard non-migratable RAMBlocks
migration: introduce decompress-error-check
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 4 Jun 2018 10:28:31 +0000 (11:28 +0100)]
Merge remote-tracking branch 'remotes/rth/tags/tcg-next-pull-request' into staging
tcg-next queue
# gpg: Signature made Sat 02 Jun 2018 00:12:42 BST
# gpg: using RSA key
64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth/tags/tcg-next-pull-request:
tcg: Pass tb and index to tcg_gen_exit_tb separately
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Mon, 4 Jun 2018 09:15:16 +0000 (10:15 +0100)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi, vhost, misc: fixes, features
vDPA support, fix to vhost blk RO bit handling, some include path
cleanups, NFIT ACPI table.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 01 Jun 2018 17:25:19 BST
# gpg: using RSA key
281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream: (31 commits)
vhost-blk: turn on pre-defined RO feature bit
ACPI testing: test NFIT platform capabilities
nvdimm, acpi: support NFIT platform capabilities
tests/.gitignore: add entry for generated file
arch_init: sort architectures
ui: use local path for local headers
qga: use local path for local headers
colo: use local path for local headers
migration: use local path for local headers
usb: use local path for local headers
sd: fix up include
vhost-scsi: drop an unused include
ppc: use local path for local headers
rocker: drop an unused include
e1000e: use local path for local headers
ioapic: fix up includes
ide: use local path for local headers
display: use local path for local headers
trace: use local path for local headers
migration: drop an unused include
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Gerd Hoffmann [Fri, 25 May 2018 13:13:18 +0000 (15:13 +0200)]
vga: cleanup surface handling
Just set the full_update flag if we need a new DisplaySurface. Create
a new surface when the flag is set instead of having two places where
qemu_create_displaysurface_from() is called.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id:
20180525131318.28437-1-kraxel@redhat.com
Gerd Hoffmann [Fri, 25 May 2018 04:53:44 +0000 (06:53 +0200)]
bochs-display: add missing break
Fixes: CID 1391291
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id:
20180525045344.28347-1-kraxel@redhat.com
Fam Zheng [Fri, 1 Jun 2018 02:35:57 +0000 (10:35 +0800)]
docker: Update fedora image to 28
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <
20180601023557.9770-1-famz@redhat.com>
Alex Bennée [Mon, 21 May 2018 10:35:04 +0000 (11:35 +0100)]
tests/docker/Makefile.include: handle empty TARGET_LIST
If the user doesn't specify a TARGET_LIST they get the current
configuration but with spaces and hilarity ensues. This adds some make
magic to turn the TARGET_LIST back into a comma separated list.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <
20180521103504.26432-1-alex.bennee@linaro.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
Lidong Chen [Wed, 30 May 2018 09:43:31 +0000 (17:43 +0800)]
migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
When cancel migration during RDMA precopy, the source qemu main thread hangs sometime.
The backtrace is:
(gdb) bt
#0 0x00007f249eabd43d in write () from /lib64/libpthread.so.0
#1 0x00007f24a1ce98e4 in rdma_get_cm_event (channel=0x4675d10, event=0x7ffe2f643dd0) at src/cma.c:2189
#2 0x00000000007b6166 in qemu_rdma_cleanup (rdma=0x6784000) at migration/rdma.c:2296
#3 0x00000000007b7cae in qio_channel_rdma_close (ioc=0x3bfcc30, errp=0x0) at migration/rdma.c:2999
#4 0x00000000008db60e in qio_channel_close (ioc=0x3bfcc30, errp=0x0) at io/channel.c:273
#5 0x00000000007a8765 in channel_close (opaque=0x3bfcc30) at migration/qemu-file-channel.c:98
#6 0x00000000007a71f9 in qemu_fclose (f=0x527c000) at migration/qemu-file.c:334
#7 0x0000000000795b96 in migrate_fd_cleanup (opaque=0x3b46280) at migration/migration.c:1162
#8 0x000000000093a71b in aio_bh_call (bh=0x3db7a20) at util/async.c:90
#9 0x000000000093a7b2 in aio_bh_poll (ctx=0x3b121c0) at util/async.c:118
#10 0x000000000093f2ad in aio_dispatch (ctx=0x3b121c0) at util/aio-posix.c:436
#11 0x000000000093ab41 in aio_ctx_dispatch (source=0x3b121c0, callback=0x0, user_data=0x0)
at util/async.c:261
#12 0x00007f249f73c7aa in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#13 0x000000000093dc5e in glib_pollfds_poll () at util/main-loop.c:215
#14 0x000000000093dd4e in os_host_main_loop_wait (timeout=
28000000) at util/main-loop.c:263
#15 0x000000000093de05 in main_loop_wait (nonblocking=0) at util/main-loop.c:522
#16 0x00000000005bc6a5 in main_loop () at vl.c:1944
#17 0x00000000005c39b5 in main (argc=56, argv=0x7ffe2f6443f8, envp=0x3ad0030) at vl.c:4752
It does not get the RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect sometime.
According to IB Spec once active side send DREQ message, it should wait for DREP message
and only once it arrived it should trigger a DISCONNECT event. DREP message can be dropped
due to network issues.
For that case the spec defines a DREP_timeout state in the CM state machine, if the DREP is
dropped we should get a timeout and a TIMEWAIT_EXIT event will be trigger.
Unfortunately the current kernel CM implementation doesn't include the DREP_timeout state
and in above scenario we will not get DISCONNECT or TIMEWAIT_EXIT events.
So it should not invoke rdma_get_cm_event which may hang forever, and the event channel
is also destroyed in qemu_rdma_cleanup.
Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Lidong Chen [Wed, 30 May 2018 09:43:27 +0000 (17:43 +0800)]
migration: remove unnecessary variables len in QIOChannelRDMA
Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked
by different threads concurrently, this patch removes unnecessary variables
len in QIOChannelRDMA and use local variable instead.
Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Lidong Chen <jemmy858585@gmail.com>
Dr. David Alan Gilbert [Mon, 16 Apr 2018 17:09:30 +0000 (18:09 +0100)]
migration: Don't activate block devices if using -S
Activating the block devices causes the locks to be taken on
the backing file. If we're running with -S and the destination libvirt
hasn't started the destination with 'cont', it's expecting the locks are
still untaken.
Don't activate the block devices if we're not going to autostart the VM;
'cont' already will do that anyway. This change is tied to the new
migration capability 'late-block-activate' that defaults to off, keeping
the old behaviour by default.
bz: https://bugzilla.redhat.com/show_bug.cgi?id=
1560854
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Cédric Le Goater [Mon, 14 May 2018 06:57:00 +0000 (08:57 +0200)]
migration: discard non-migratable RAMBlocks
On the POWER9 processor, the XIVE interrupt controller can control
interrupt sources using MMIO to trigger events, to EOI or to turn off
the sources. Priority management and interrupt acknowledgment is also
controlled by MMIO in the presenter sub-engine.
These MMIO regions are exposed to guests in QEMU with a set of 'ram
device' memory mappings, similarly to VFIO, and the VMAs are populated
dynamically with the appropriate pages using a fault handler.
But, these regions are an issue for migration. We need to discard the
associated RAMBlocks from the RAM state on the source VM and let the
destination VM rebuild the memory mappings on the new host in the
post_load() operation just before resuming the system.
To achieve this goal, the following introduces a new RAMBlock flag
RAM_MIGRATABLE which is updated in the vmstate_register_ram() and
vmstate_unregister_ram() routines. This flag is then used by the
migration to identify RAMBlocks to discard on the source. Some checks
are also performed on the destination to make sure nothing invalid was
sent.
This change impacts the boston, malta and jazz mips boards for which
migration compatibility is broken.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Xiao Guangrong [Thu, 3 May 2018 08:06:11 +0000 (16:06 +0800)]
migration: introduce decompress-error-check
QEMU 3.0 enables strict check for compression & decompression to
make the migration more robust, that depends on the source to fix
the internal design which triggers the unexpected error conditions
To make it work for migrating old version QEMU to 2.13 QEMU, we
introduce this parameter to disable the error check on the
destination which is the default behavior of the machine type
which is older than 2.13, alternately, the strict check can be
enabled explicitly as followings:
-M pc-q35-2.11 -global migration.decompress-error-check=true
Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Laurent Vivier [Tue, 29 May 2018 19:42:07 +0000 (21:42 +0200)]
linux-user: remove useless #if
Remove a "#if defined(XX) || defined(YY) || ..." with all available
targets
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-16-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:06 +0000 (21:42 +0200)]
linux-user: move hppa signal definitions to hppa/target_signal.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-15-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:05 +0000 (21:42 +0200)]
linux-user: move alpha signal definitions to alpha/target_signal.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-14-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:04 +0000 (21:42 +0200)]
linux-user: move openrisc signal definitions to openrisc/target_signal.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-13-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:03 +0000 (21:42 +0200)]
linux-user: move mips signal definitions to mips/target_signal.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-12-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:02 +0000 (21:42 +0200)]
linux-user: move sparc signal definitions to sparc/target_signal.h
Remove sparc64/target_signal.h, use sparc/target_signal.h instead.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-11-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:01 +0000 (21:42 +0200)]
linux-user: move generic signal definitions to generic/signal.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-10-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:42:00 +0000 (21:42 +0200)]
linux-user: move get_sp_from_cpustate() to target_cpu.h
Remove useless includes
Fix HPPA include guard.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20180529194207.31503-9-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:59 +0000 (21:41 +0200)]
linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-8-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:58 +0000 (21:41 +0200)]
linux-user: move ppc fcntl definitions to ppc/target_fcntl.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-7-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:57 +0000 (21:41 +0200)]
linux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-6-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:56 +0000 (21:41 +0200)]
linux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20180529194207.31503-5-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:55 +0000 (21:41 +0200)]
linux-user: move hppa fcntl definitions to hppa/target_fcntl.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20180529194207.31503-4-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:54 +0000 (21:41 +0200)]
linux-user: move alpha fcntl definitions to alpha/target_fcntl.h
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20180529194207.31503-3-laurent@vivier.eu>
Laurent Vivier [Tue, 29 May 2018 19:41:53 +0000 (21:41 +0200)]
linux-user: move generic fcntl definitions to generic/fcntl.h
add a per target target_fcntl.h and include the generic one from them
No code change.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20180529194207.31503-2-laurent@vivier.eu>
Laurent Vivier [Mon, 28 May 2018 19:48:12 +0000 (21:48 +0200)]
linux-user: SPARC "rd %tick" can be used by user application
we have the same problem decribed in
7d6b1daedd
("linux-user, ppc: mftbl can be used by user application")
for ppc in the case of sparc.
When we use an application trying to resolve a name, it hangs in
0x00000000ff5dd40c: rd %tick, %o5
0x00000000ff5dd410: srlx %o5, 0x20, %o4
0x00000000ff5dd414: btst %o5, %g4
0x00000000ff5dd418: be %icc, 0xff5dd40c
because %tick is staying at 0.
As QEMU_CLOCK_VIRTUAL is not available in linux-user mode,
simply use cpu_get_host_ticks() instead.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20180528194812.31216-1-laurent@vivier.eu>
Philippe Mathieu-Daudé [Mon, 24 Jul 2017 18:27:47 +0000 (15:27 -0300)]
syscall: replace strcpy() by g_strlcpy()
linux-user/syscall.c:9860:17: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119
strcpy (buf->machine, cpu_to_uname_machine(cpu_env));
^~~~~~
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <
20170724182751.18261-32-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Richard Henderson [Thu, 31 May 2018 01:06:23 +0000 (18:06 -0700)]
tcg: Pass tb and index to tcg_gen_exit_tb separately
Do the cast to uintptr_t within the helper, so that the compiler
can type check the pointer argument. We can also do some more
sanity checking of the index argument.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 1 Jun 2018 17:24:16 +0000 (18:24 +0100)]
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Linux header upgrade (Peter)
* firmware.json definition (Laszlo)
* IPMI migration fix (Corey)
* QOM improvements (Alexey, Philippe, me)
* Memory API cleanups (Jay, me, Tristan, Peter)
* WHPX fixes and improvements (Lucian)
* Chardev fixes (Marc-André)
* IOMMU documentation improvements (Peter)
* Coverity fixes (Peter, Philippe)
* Include cleanup (Philippe)
* -clock deprecation (Thomas)
* Disable -sandbox unless CONFIG_SECCOMP (Yi Min Zhao)
* Configurability improvements (me)
# gpg: Signature made Fri 01 Jun 2018 17:42:13 BST
# gpg: using RSA key
BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream: (56 commits)
hw: make virtio devices configurable via default-configs/
hw: allow compiling out SCSI
memory: Make operations using MemoryRegionIoeventfd struct pass by pointer.
char: Remove unwanted crlf conversion
qdev: Remove DeviceClass::init() and ::exit()
qdev: Simplify the SysBusDeviceClass::init path
hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init
hw/i2c/smbus: Use DeviceClass::realize instead of SMBusDeviceClass::init
target/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME
Update Linux headers to 4.17-rc6
target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED
scripts/update-linux-headers: Handle kernel license no longer being one file
scripts/update-linux-headers: Handle __aligned_u64
virtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere
gdbstub: Prevent fd leakage
docs/interop: add "firmware.json"
ipmi: Use proper struct reference for KCS vmstate
vmstate: Add a VSTRUCT type
tcg: remove softfloat from --disable-tcg builds
qemu-options: Mark the non-functional -clock option as deprecated
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Fri, 1 Jun 2018 16:32:30 +0000 (17:32 +0100)]
Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging
Some Travis & Docker updates
- simplification of the build matrix
- usability tweaks for docker
- update Travis docker image
# gpg: Signature made Fri 01 Jun 2018 15:05:03 BST
# gpg: using RSA key
FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44
* remotes/stsquad/tags/pull-travis-updates-010618-1:
.travis.yml: update GCC sanitizer build to GCC 7
.travis.yml: make current setup explicit
.travis.yml: rationalise clang testing
docker: update Travis docker image
docker: do not display deprecated images in 'make docker' help
docker: sort images list displayed by 'make docker'
.travis.yml: disable linux-user build for gcov
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Changpeng Liu [Tue, 29 May 2018 01:24:35 +0000 (09:24 +0800)]
vhost-blk: turn on pre-defined RO feature bit
Read only feature shouldn't be negotiable, because if the
backend device reported Read only feature supported, QEMU
host driver shouldn't change backend's RO attribute. While
here, also enable the vhost-user-blk test utility to test
RO feature.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Ross Zwisler [Mon, 21 May 2018 16:32:03 +0000 (10:32 -0600)]
ACPI testing: test NFIT platform capabilities
Add testing for the newly added NFIT Platform Capabilities Structure.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Ross Zwisler [Mon, 21 May 2018 16:32:02 +0000 (10:32 -0600)]
nvdimm, acpi: support NFIT platform capabilities
Add a machine command line option to allow the user to control the Platform
Capabilities Structure in the virtualized NFIT. This Platform Capabilities
Structure was added in ACPI 6.2 Errata A.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Ross Zwisler [Mon, 21 May 2018 16:32:01 +0000 (10:32 -0600)]
tests/.gitignore: add entry for generated file
After a "make check" we end up with the following:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
tests/test-block-backend
nothing added to commit but untracked files present (use "git add" to track)
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Fixes: commit ad0df3e0fdac ("block: test blk_aio_flush() with blk->root == NULL")
Cc: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Michael S. Tsirkin [Thu, 3 May 2018 19:51:03 +0000 (22:51 +0300)]
arch_init: sort architectures
Sort alphabetically. Will help us see if anything is missing (e.g. tile
is not there now).
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Michael S. Tsirkin [Thu, 3 May 2018 19:51:00 +0000 (22:51 +0300)]
ui: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:57 +0000 (22:50 +0300)]
qga: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:56 +0000 (22:50 +0300)]
colo: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Reviewed-by: Zhang Chen <zhangckid@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:51 +0000 (22:50 +0300)]
migration: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:48 +0000 (22:50 +0300)]
usb: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:46 +0000 (22:50 +0300)]
sd: fix up include
include files shouldn't have the "include/" part, that is implied.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:37 +0000 (22:50 +0300)]
vhost-scsi: drop an unused include
No reason for vhost-scsi to pull in migration headers directly.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:35 +0000 (22:50 +0300)]
ppc: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:34 +0000 (22:50 +0300)]
rocker: drop an unused include
We don't use net/clients.h, drop that include.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:33 +0000 (22:50 +0300)]
e1000e: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:32 +0000 (22:50 +0300)]
ioapic: fix up includes
include files shouldn't have the "include/" part, that is implied.
Also, drop an unused include.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:31 +0000 (22:50 +0300)]
ide: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:31 +0000 (22:50 +0300)]
display: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:28 +0000 (22:50 +0300)]
trace: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:27 +0000 (22:50 +0300)]
migration: drop an unused include
In the vmstate.h file, we just need a struct name. Use a forward
declaration instead of an include, then adjust the one affected .c file
to include the file that is no longer implicit from the header.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:25 +0000 (22:50 +0300)]
hppa: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Michael S. Tsirkin [Thu, 3 May 2018 19:50:23 +0000 (22:50 +0300)]
crypto: use local path for local headers
When pulling in headers that are in the same directory as the C file (as
opposed to one in include/), we should use its relative path, without a
directory.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
Peter Maydell [Fri, 1 Jun 2018 15:07:11 +0000 (16:07 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Pull request
# gpg: Signature made Fri 01 Jun 2018 16:03:58 BST
# gpg: using RSA key
9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/tracing-pull-request:
trace: Sort trace-events-subdirs
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Stefan Hajnoczi [Wed, 30 May 2018 19:42:38 +0000 (20:42 +0100)]
main-loop: drop spin_counter
Commit
d759c951f3287fad04210a52f2dc93f94cf58c7f ("replay: push
replay_mutex_lock up the call tree") removed the !timeout lock
optimization in the main loop.
The idea of the optimization was to avoid ping-pongs between threads by
keeping the Big QEMU Lock held across non-blocking (!timeout) main loop
iterations.
A warning is printed when the main loop spins without releasing BQL for
long periods of time. These warnings were supposed to aid debugging but
in practice they just alarm users. They are considered noise because
the cause of spinning is not shown and is hard to find.
Now that the lock optimization has been removed, there is no danger of
hogging the BQL. Drop the spin counter and the infamous warning.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Alex Bennée [Wed, 30 May 2018 08:09:31 +0000 (09:09 +0100)]
.travis.yml: update GCC sanitizer build to GCC 7
GCC has moved on and so should we. We also enable apt update to ensure
we get the latest build from the toolchain PPA.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Alex Bennée [Wed, 30 May 2018 08:04:04 +0000 (09:04 +0100)]
.travis.yml: make current setup explicit
Add some commentary and make the selection of Container based Trusty
build explicit. We will need to add VM builds later when using docker.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Alex Bennée [Tue, 29 May 2018 17:14:04 +0000 (18:14 +0100)]
.travis.yml: rationalise clang testing
As Travis includes Clang 5.0 in its own build environment there is no
point manually building with older Clangs. We still need to test with
the two pythons though so we leave them as minimal system only builds.
We also split the clang build into two as it often exceeds the 40
minute build time limit.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Alex Bennée [Tue, 29 May 2018 14:25:27 +0000 (15:25 +0100)]
docker: update Travis docker image
This is still poorly documented by Travis but according to:
https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-Based-Docker-Image-Locally
their reference images are now hosted on Docker Hub. So we update the
FROM line to refer to the new default image. We also need a few
additional tweaks:
- re-enable deb-src lines for our build-dep install
- add explicit PATH definition for tools
- force the build USER to be Travis
- add clang to FEATURES for our test-clang machinery
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Peter Maydell [Fri, 1 Jun 2018 13:58:53 +0000 (14:58 +0100)]
Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging
slirp updates
Alexey Kardashevskiy
slirp: Improve debugging messages
Andreas Gustafsson, Samuel Thibault, James Clarke
slirp: Improve bandwidth in GDB remote debugging and FreeBSD guests
Benjamin Drung:
slirp/dhcp: Add domainname option
Cédric Le Goater (3):
slirp/ncsi: fix "Get Version ID" payload length
slirp/ncsi: add a "Get Parameters" response
slirp/ncsi: add checksum support
Nia Alarie:
net/slirp: Convert atoi to qemu_strtoi to allow error checking
# gpg: Signature made Fri 01 Jun 2018 14:54:45 BST
# gpg: using RSA key
996849C1CF560478
# gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>"
# gpg: aka "Samuel Thibault <sthibault@debian.org>"
# gpg: aka "Samuel Thibault <samuel.thibault@gnu.org>"
# gpg: aka "Samuel Thibault <samuel.thibault@inria.fr>"
# gpg: aka "Samuel Thibault <samuel.thibault@labri.fr>"
# gpg: aka "Samuel Thibault <samuel.thibault@ens-lyon.org>"
# gpg: aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82 304B D017 8C76 7D06 9EE6
# Subkey fingerprint: 3A3A 5D46 4660 E867 610C A427 9968 49C1 CF56 0478
* remotes/thibault/tags/samuel-thibault:
slirp/ncsi: add checksum support
slirp/ncsi: add a "Get Parameters" response
slirp/ncsi: fix "Get Version ID" payload length
slirp: Send window updates to guest after window was closed
net/slirp: Convert atoi to qemu_strtoi to allow error checking
slirp/debug: Print IP addresses in human readable form
slirp: disable Nagle in ingoing connections
slirp: disable Nagle in outgoing connections
slirp: Add domainname option to slirp's DHCP server
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé [Mon, 15 Jan 2018 14:34:53 +0000 (11:34 -0300)]
docker: do not display deprecated images in 'make docker' help
the 'debian' base image is deprecated since
3e11974988d8
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Philippe Mathieu-Daudé [Mon, 15 Jan 2018 14:34:52 +0000 (11:34 -0300)]
docker: sort images list displayed by 'make docker'
we can now directly see different version sort consecutively.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Alex Bennée [Wed, 9 May 2018 09:28:34 +0000 (10:28 +0100)]
.travis.yml: disable linux-user build for gcov
Currently the default testing doesn't exercise the linux-user builds
so there is no point spending time building them. We may want to
enable a separate gcov build once linux-user testing is re-enabled
although it's likely to report very low coverage.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Fam Zheng [Fri, 1 Jun 2018 09:26:48 +0000 (17:26 +0800)]
qemu-img: Convert with copy offloading
The new blk_co_copy_range interface offers a more efficient way in the
case of network based storage. Make use of it to allow faster convert
operation.
Since copy offloading cannot do zero detection ('-S') and compression
(-c), only try it when these options are not used.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20180601092648.24614-11-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:47 +0000 (17:26 +0800)]
block-backend: Add blk_co_copy_range
It's a BlockBackend wrapper of the BDS interface.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20180601092648.24614-10-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:46 +0000 (17:26 +0800)]
iscsi: Implement copy offloading
Issue EXTENDED COPY (LID1) command to implement the copy_range API.
The parameter data construction code is modified from libiscsi's
iscsi-dd.c.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20180601092648.24614-9-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:45 +0000 (17:26 +0800)]
iscsi: Create and use iscsi_co_wait_for_task
This loop is repeated a growing number times. Make a helper.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
20180601092648.24614-8-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:44 +0000 (17:26 +0800)]
iscsi: Query and save device designator when opening
The device designator data returned in INQUIRY command will be useful to
fill in source/target fields during copy offloading. Do this when
connecting to the target and save the data for later use.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20180601092648.24614-7-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:43 +0000 (17:26 +0800)]
file-posix: Implement bdrv_co_copy_range
With copy_file_range(2), we can implement the bdrv_co_copy_range
semantics.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
20180601092648.24614-6-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:42 +0000 (17:26 +0800)]
qcow2: Implement copy offloading
The two callbacks are implemented quite similarly to the read/write
functions: bdrv_co_copy_range_from maps for read and calls into bs->file
or bs->backing depending on the allocation status; bdrv_co_copy_range_to
maps for write and calls into bs->file.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
20180601092648.24614-5-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:41 +0000 (17:26 +0800)]
raw: Implement copy offloading
Just pass down to ->file.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20180601092648.24614-4-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:40 +0000 (17:26 +0800)]
raw: Check byte range uniformly
We don't verify the request range against s->size in the I/O callbacks
except for raw_co_pwritev. This is inconsistent (especially for
raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them, in the meanwhile
make the helper reusable by the coming new callbacks.
Note that in most cases the block layer already verifies the request
byte range against our reported image length, before invoking the driver
callbacks. The exception is during image creating, after
blk_set_allow_write_beyond_eof(blk, true) is called. But in that case,
the requests are not directly from the user or guest. So there is no
visible behavior change in adding the check code.
The int64_t -> uint64_t inconsistency, as shown by the type casting, is
pre-existing due to the interface.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id:
20180601092648.24614-3-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Fri, 1 Jun 2018 09:26:39 +0000 (17:26 +0800)]
block: Introduce API for copy offloading
Introduce the bdrv_co_copy_range() API for copy offloading. Block
drivers implementing this API support efficient copy operations that
avoid reading each block from the source device and writing it to the
destination devices. Examples of copy offload primitives are SCSI
EXTENDED COPY and Linux copy_file_range(2).
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20180601092648.24614-2-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Paolo Bonzini [Tue, 22 May 2018 19:48:22 +0000 (21:48 +0200)]
hw: make virtio devices configurable via default-configs/
This is only half of the work, because the proxy devices (virtio-*-pci,
virtio-*-ccw, etc.) are still included unconditionally. It is still a
move in the right direction.
Based-on: <
20180522194943.24871-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Tue, 22 May 2018 19:44:55 +0000 (21:44 +0200)]
hw: allow compiling out SCSI
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tristan Burgess [Tue, 29 May 2018 03:04:45 +0000 (23:04 -0400)]
memory: Make operations using MemoryRegionIoeventfd struct pass by pointer.
This changes the functions memory_region_ioeventfd_equal, memory_region_ioeventfd_before, and their callers,
to pass the MemoryRegionIoeventfd struct via pointer, instead of directly passing the struct. This saves on stack space
and is considered safe practice.
Signed-off-by: Tristan Burgess <tburgessdev@gmail.com>
Message-Id: <
20180529030445.177867-1-tburgessdev@gmail.com>
Fixes: Launchpad bug 1720969
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Patryk Olszewski [Wed, 23 May 2018 19:50:41 +0000 (21:50 +0200)]
char: Remove unwanted crlf conversion
This patch fixes a bug in serial that made it almost impossible for guest
to communicate with devices through host's serial.
OPOST flag in c_oflag enables output processing letting other flags in
c_oflag take effect. Usually in c_oflag ONLCR flag is also set, which
causes crlf to be sent in place of lf. This breaks binary transmissions.
Unsetting OPOST flag turns off any output processing which fixes the bug.
Bug reports related:
https://bugs.launchpad.net/qemu/+bug/
1772086
https://bugs.launchpad.net/qemu/+bug/
1407813
https://bugs.launchpad.net/qemu/+bug/
1715296
also
https://lists.nongnu.org/archive/html/qemu-devel/2006-06/msg00196.html
Signed-off-by: Patryk Olszewski <patryk@fala.ehost.pl>
Message-Id: <
1527105041-21013-1-git-send-email-patryk@fala.ehost.pl>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Philippe Mathieu-Daudé [Mon, 28 May 2018 14:45:09 +0000 (16:45 +0200)]
qdev: Remove DeviceClass::init() and ::exit()
Since no devices use it, we can safely remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20180419212727.26095-5-f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Removal of DeviceClass::init() moved from previous patch, missing
documentation updates supplied]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20180528144509.15812-5-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Philippe Mathieu-Daudé [Mon, 28 May 2018 14:45:08 +0000 (16:45 +0200)]
qdev: Simplify the SysBusDeviceClass::init path
Instead of using
SysBusDeviceClass::realize
-> DeviceClass::realize
-> DeviceClass::init
-> sysbus_device_init
-> SysBusDeviceClass::init
Simplify the path by directly calling SysBusDeviceClass::init
in SysBusDeviceClass::realize:
SysBusDeviceClass::realize
-> SysBusDeviceClass::init
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20180419212727.26095-4-f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Removal of DeviceClass::init() moved into next patch,
sysbus_realize() tweaked for clarity]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20180528144509.15812-4-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Philippe Mathieu-Daudé [Mon, 28 May 2018 14:45:07 +0000 (16:45 +0200)]
hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init
I2CSlaveClass::init is no more used, remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20180419212727.26095-3-f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20180528144509.15812-3-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Philippe Mathieu-Daudé [Mon, 28 May 2018 14:45:06 +0000 (16:45 +0200)]
hw/i2c/smbus: Use DeviceClass::realize instead of SMBusDeviceClass::init
SMBusDeviceClass::init is no more used, remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20180419212727.26095-2-f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20180528144509.15812-2-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Peter Maydell [Fri, 25 May 2018 13:27:55 +0000 (14:27 +0100)]
target/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME
Now we've updated our copy of the kernel headers we can remove the
compatibility shim that handled KVM_HINTS_REALTIME not being defined.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <
20180525132755.21839-7-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Peter Maydell [Fri, 25 May 2018 13:27:54 +0000 (14:27 +0100)]
Update Linux headers to 4.17-rc6
Update our copy of the Linux headers to upstream 4.17-rc6
(kernel commit
771c577c23bac90597c68).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <
20180525132755.21839-6-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Peter Maydell [Fri, 25 May 2018 13:27:53 +0000 (14:27 +0100)]
target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED
In kernel header commit
633711e8287, the define KVM_HINTS_DEDICATED
was renamed to KVM_HINTS_REALTIME. Work around this compatibility
break by (a) using the new constant name, and (b) defining it
if the headers don't.
Part (b) can be removed once we've updated our copy of the kernel
headers to a version that defines KVM_HINTS_REALTIME.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <
20180525132755.21839-5-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Peter Maydell [Fri, 25 May 2018 13:27:52 +0000 (14:27 +0100)]
scripts/update-linux-headers: Handle kernel license no longer being one file
The kernel has changed its license documentation, so instead of COPYING
being a stand-alone file that defines the license, it refers to various
other files under LICENSES/. This means we need to copy not just COPYING
but also these other files to our copy of the kernel headers.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <
20180525132755.21839-4-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Peter Maydell [Fri, 25 May 2018 13:27:51 +0000 (14:27 +0100)]
scripts/update-linux-headers: Handle __aligned_u64
We'll currently replace any 'u64' with a 'uint64_t' including when
it's embedded in an '__aligned_u64', creating a '__aligned_uint64_t'
which doesn't exist. We need to instead expand out the kernel's
definition of __aligned_u64:
#define __aligned_u64 __u64 __attribute__((aligned(8)))
before we convert the __u64 to uint64_t.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <
20180525132755.21839-3-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Alex Williamson [Fri, 25 May 2018 13:27:50 +0000 (14:27 +0100)]
virtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere
Commit
5643cc94ac1c ("virtio-gpu-3d: add support for second capability
set (v4)") updated virtio_gpu.h with a define that does not yet(?)
exist upstream resulting in build breakage every time Linux headers
are updated via the standard update script. Conditionally define this
within QEMU code instead to avoid future breakage.
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Fixes: 5643cc94ac1c ("virtio-gpu-3d: add support for second capability set (v4)")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <
20180525132755.21839-2-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Philippe Mathieu-Daudé [Thu, 24 May 2018 22:34:58 +0000 (19:34 -0300)]
gdbstub: Prevent fd leakage
Since
2f652224f7, we now check if socket_set_nodelay() errored,
but forgot to close the socket before reporting an error.
Fixes: Coverity CID 1391290 (RESOURCE_LEAK)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20180524223458.5651-1-f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Laszlo Ersek [Wed, 9 May 2018 15:26:08 +0000 (17:26 +0200)]
docs/interop: add "firmware.json"
Add a schema that describes the different uses and properties of virtual
machine firmware.
Each firmware executable installed on a host system should come with at
least one JSON file that conforms to this schema. Each file informs the
management applications about
- the firmware's properties and one possible use case / feature set,
- configuration bits that are required to run the firmware binary.
In addition, define rules for management apps for picking the highest
priority firmware JSON file when multiple such files match the search
criteria.
Cc: "Daniel P. Berrange" <berrange@redhat.com>
Cc: David Gibson <dgibson@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Kashyap Chamarthy <kchamart@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <
20180509152608.9343-1-lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>