]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
6 years agoMerge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging
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>
6 years agoMerge remote-tracking branch 'remotes/juanquintela/tags/migration/20180604' into...
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>
6 years agoMerge remote-tracking branch 'remotes/rth/tags/tcg-next-pull-request' into staging
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>
6 years agoMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
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>
6 years agodocker: Update fedora image to 28
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>

6 years agotests/docker/Makefile.include: handle empty TARGET_LIST
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>
6 years agomigration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
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>
6 years agomigration: remove unnecessary variables len in QIOChannelRDMA
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>
6 years agomigration: Don't activate block devices if using -S
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>
6 years agomigration: discard non-migratable RAMBlocks
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>
6 years agomigration: introduce decompress-error-check
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>
6 years agotcg: Pass tb and index to tcg_gen_exit_tb separately
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>
6 years agoMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
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>
6 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1'...
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>
6 years agovhost-blk: turn on pre-defined RO feature bit
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>
6 years agoACPI testing: test NFIT platform capabilities
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>
6 years agonvdimm, acpi: support NFIT platform capabilities
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>
6 years agotests/.gitignore: add entry for generated file
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>
6 years agoarch_init: sort architectures
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>
6 years agoui: use local path for local headers
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>
6 years agoqga: use local path for local headers
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>
6 years agocolo: use local path for local headers
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>
6 years agomigration: use local path for local headers
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>
6 years agousb: use local path for local headers
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>
6 years agosd: fix up include
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>
6 years agovhost-scsi: drop an unused include
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>
6 years agoppc: use local path for local headers
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>
6 years agorocker: drop an unused include
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>
6 years agoe1000e: use local path for local headers
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>
6 years agoioapic: fix up includes
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>
6 years agoide: use local path for local headers
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>
6 years agodisplay: use local path for local headers
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>
6 years agotrace: use local path for local headers
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>
6 years agomigration: drop an unused include
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>
6 years agohppa: use local path for local headers
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>
6 years agocrypto: use local path for local headers
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>
6 years agoMerge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
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>
6 years ago.travis.yml: update GCC sanitizer build to GCC 7
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>
6 years ago.travis.yml: make current setup explicit
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>
6 years ago.travis.yml: rationalise clang testing
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>
6 years agodocker: update Travis docker image
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>
6 years agoMerge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging
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>
6 years agodocker: do not display deprecated images in 'make docker' help
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>
6 years agodocker: sort images list displayed by 'make docker'
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>
6 years ago.travis.yml: disable linux-user build for gcov
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>
6 years agohw: make virtio devices configurable via default-configs/
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>
6 years agohw: allow compiling out SCSI
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>
6 years agomemory: Make operations using MemoryRegionIoeventfd struct pass by pointer.
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>
6 years agochar: Remove unwanted crlf conversion
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>
6 years agoqdev: Remove DeviceClass::init() and ::exit()
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>
6 years agoqdev: Simplify the SysBusDeviceClass::init path
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>
6 years agohw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init
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>
6 years agohw/i2c/smbus: Use DeviceClass::realize instead of SMBusDeviceClass::init
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>
6 years agotarget/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME
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>
6 years agoUpdate Linux headers to 4.17-rc6
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>
6 years agotarget/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED
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>
6 years agoscripts/update-linux-headers: Handle kernel license no longer being one file
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>
6 years agoscripts/update-linux-headers: Handle __aligned_u64
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>
6 years agovirtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere
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>
6 years agogdbstub: Prevent fd leakage
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>
6 years agodocs/interop: add "firmware.json"
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>
6 years agoipmi: Use proper struct reference for KCS vmstate
Corey Minyard [Wed, 25 Apr 2018 15:27:31 +0000 (10:27 -0500)]
ipmi: Use proper struct reference for KCS vmstate

The vmstate for isa_ipmi_kcs was referencing into the kcs structure,
instead create a kcs structure separate and use that.

There were also some issues in the state transfer.  The inlen field
was not being transferred, so if a transaction was in process during
the transfer it would be messed up.  And the use_irq field was
transferred, but that should come from the configuration.

To fix this, the new VMS_VSTRUCT macros are used so the exact
version of the structure can be specified, depending on what
version was being received.  So an upgrade should work for KCS.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <1524670052-28373-3-git-send-email-minyard@acm.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agovmstate: Add a VSTRUCT type
Corey Minyard [Wed, 25 Apr 2018 15:27:30 +0000 (10:27 -0500)]
vmstate: Add a VSTRUCT type

The VMS_STRUCT has no way to specify which version of a structure
to use.  Add a type and a new field to allow the specific version
of a structure to be used.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Message-Id: <1524670052-28373-2-git-send-email-minyard@acm.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agotcg: remove softfloat from --disable-tcg builds
Paolo Bonzini [Tue, 22 May 2018 19:20:03 +0000 (21:20 +0200)]
tcg: remove softfloat from --disable-tcg builds

Even though the presence of softfloat does not cause --disable-tcg builds to fail,
it is the single largest .o file in them.  Remove it, since TCG is the only client.

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoqemu-options: Mark the non-functional -clock option as deprecated
Thomas Huth [Tue, 22 May 2018 11:58:18 +0000 (13:58 +0200)]
qemu-options: Mark the non-functional -clock option as deprecated

The function is only ignored since QEMU version 1.7.0. Let's mark
it as deprecated, so that we can finally completely remove it soon.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1526990298-17924-1-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoWHPX: fix some compiler warnings
Lucian Petrut [Tue, 15 May 2018 17:35:22 +0000 (20:35 +0300)]
WHPX: fix some compiler warnings

This patch fixes a few compiler warnings, especially in case of
x86 targets, where the number of registers was not properly handled
and could cause an overflow.

Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Message-Id: <1526405722-10887-3-git-send-email-lpetrut@cloudbasesolutions.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoWHPX: dynamically load WHP libraries
Lucian Petrut [Tue, 15 May 2018 17:35:21 +0000 (20:35 +0300)]
WHPX: dynamically load WHP libraries

We're currently linking against import libraries of the WHP DLLs.

By dynamically loading the libraries, we ensure that QEMU will work
on previous Windows versions, where the WHP DLLs will be missing
(assuming that WHP is not requested).

Also, we're simplifying the build process, as we no longer require
the import libraries.

Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Message-Id: <1526405722-10887-2-git-send-email-lpetrut@cloudbasesolutions.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoexec.c: Initialize sa_flags passed to sigaction()
Peter Maydell [Tue, 15 May 2018 18:27:00 +0000 (19:27 +0100)]
exec.c: Initialize sa_flags passed to sigaction()

Coverity points out that in the user-only version of cpu_abort() we
call sigaction() with a partially initialized struct sigaction
(CID 1005351). Correct the omission.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180515182700.31736-1-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agomemfd: Avoid Coverity warning about integer overflow
Peter Maydell [Tue, 15 May 2018 17:27:29 +0000 (18:27 +0100)]
memfd: Avoid Coverity warning about integer overflow

Coverity complains about qemu_memfd_create() (CID 1385858) because
we calculate a bit position htsize which could be up to 63, but
then use it in "1 << htsize" which is a 32-bit integer calculation
and could push the 1 off the top of the value.

Silence the complaint bu using "1ULL"; this isn't a bug in
practice since a hugetlbsize of 4GB is not very plausible.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180515172729.24564-1-peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agomux: fix ctrl-a b again
Marc-André Lureau [Tue, 15 May 2018 15:25:00 +0000 (12:25 -0300)]
mux: fix ctrl-a b again

Commit fb5e19d2e1472e96d72d5e4d89c20033f8ab345c originally fixed the
regression, but was inadvertently broken again in merge commit
2d6752d38d8acda.

Fixes:
https://bugs.launchpad.net/qemu/+bug/1654137

Cc: qemu-stable@nongnu.org
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180515152500.19460-3-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/isa/superio: Fix inconsistent use of Chardev->be
Philippe Mathieu-Daudé [Tue, 15 May 2018 15:24:59 +0000 (12:24 -0300)]
hw/isa/superio: Fix inconsistent use of Chardev->be

4c3119a6e3e and cd9526ab7c0 introduced an incorrect and inconsistent
use of Chardev->be. Also, this CharBackend member is private and is
not supposed to be accessible.

Fix it by removing the inconsistent check.

Cc: qemu-stable@nongnu.org
Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180515152500.19460-2-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
6 years agomemory: delete struct AddressSpaceOps
Jay Zhou [Tue, 15 May 2018 11:35:08 +0000 (19:35 +0800)]
memory: delete struct AddressSpaceOps

Since struct AddressSpaceOps isn't used anywhere else,
so just delete it.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Message-Id: <1526384108-49348-1-git-send-email-jianjay.zhou@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agomemory: get rid of memory_region_init_reservation
Paolo Bonzini [Tue, 15 May 2018 14:35:16 +0000 (16:35 +0200)]
memory: get rid of memory_region_init_reservation

The function has been deprecated for 2.5 years, and there are just a handful
of users.  Convert them to memory_region_init_io with NULL callbacks,
and while at it pass the right device as the owner.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agomemory.h: Fix typo in documentation comment
Peter Maydell [Tue, 15 May 2018 13:48:35 +0000 (14:48 +0100)]
memory.h: Fix typo in documentation comment

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180515134835.3409-1-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agovirtio: free MemoryRegionCache when initialization fails
Paolo Bonzini [Tue, 15 May 2018 13:25:31 +0000 (15:25 +0200)]
virtio: free MemoryRegionCache when initialization fails

6 years agoqom: support orphan objects in object_get_canonical_path
Paolo Bonzini [Wed, 30 May 2018 16:16:04 +0000 (18:16 +0200)]
qom: support orphan objects in object_get_canonical_path

Mostly a rewrite, in order to keep the loop simple.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoqom: Document qom/device-list-properties implementation specific
Alexey Kardashevskiy [Wed, 30 May 2018 07:11:29 +0000 (17:11 +1000)]
qom: Document qom/device-list-properties implementation specific

The recently introduced qom-list-properties QMP command raised
a question what properties it (and its cousin - device-list-properties)
can possibly print - only those defined by DeviceClass::props
or dynamically created in TypeInfo::instance_init() so properties created
elsewhere won't show up and this behaviour might confuse the user.

For example, PIIX4 does that from piix4_pm_realize() via
  piix4_pm_add_propeties():

object_property_add_uint8_ptr(OBJECT(s), ACPI_PM_PROP_ACPI_ENABLE_CMD,
                              &acpi_enable_cmd, NULL);

This adds a note to the command descriptions about the limitation.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20180530071129.9013-1-aik@ozlabs.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw: Clean "hw/devices.h" includes
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:19 +0000 (20:27 -0300)]
hw: Clean "hw/devices.h" includes

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-22-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/ide: Remove unused include
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:18 +0000 (20:27 -0300)]
hw/ide: Remove unused include

There is no need to include pci.h in this file.
(Continue f23c81073a cleanup).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-21-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/i386/pc: Remove unused include
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:17 +0000 (20:27 -0300)]
hw/i386/pc: Remove unused include

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-20-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/hppa: Remove unused include
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:16 +0000 (20:27 -0300)]
hw/hppa: Remove unused include

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-19-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/misc/sga: Use the correct ISA include
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:15 +0000 (20:27 -0300)]
hw/misc/sga: Use the correct ISA include

The SGA BIOS loader is an ISA device, it does not require the PCI header.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-18-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/misc/mips_itu: Cleanup includes
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:14 +0000 (20:27 -0300)]
hw/misc/mips_itu: Cleanup includes

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-17-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw/block/nvme: Include "qemu/cutils.h" directly in the source file
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:13 +0000 (20:27 -0300)]
hw/block/nvme: Include "qemu/cutils.h" directly in the source file

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20180528232719.4721-16-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw: Do not include "sysemu/blockdev.h" if it is not necessary
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:12 +0000 (20:27 -0300)]
hw: Do not include "sysemu/blockdev.h" if it is not necessary

Remove those unneeded includes to speed up the compilation
process a little bit.

Code change produced with:

    $ git grep '#include "sysemu/blockdev.h"' | \
      cut -d: -f-1 | \
      xargs egrep -L "(BlockInterfaceType|DriveInfo|drive_get|blk_legacy_dinfo|blockdev_mark_auto_del)" | \
      xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-15-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw: Do not include "sysemu/blockdev.h" if it is not necessary
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:11 +0000 (20:27 -0300)]
hw: Do not include "sysemu/blockdev.h" if it is not necessary

The header "hw/boards.h" already includes "sysemu/blockdev.h".

Code change produced with:

    $ git grep '#include "sysemu/blockdev.h"' hw | \
      cut -d: -f-1 | \
      xargs fgrep -l '#include "hw/boards.h"' | \
      xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-14-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw: Do not include "sysemu/block-backend.h" if it is not necessary
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:10 +0000 (20:27 -0300)]
hw: Do not include "sysemu/block-backend.h" if it is not necessary

Remove those unneeded includes to speed up the compilation
process a little bit. (Continue 7eceff5b5a1fa cleanup)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-13-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw: Do not include "exec/address-spaces.h" if it is not necessary
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:09 +0000 (20:27 -0300)]
hw: Do not include "exec/address-spaces.h" if it is not necessary

Code change produced with:
    $ git grep '#include "exec/address-spaces.h"' hw include/hw | \
      cut -d: -f-1 | \
      xargs egrep -L "(get_system_|address_space_)" | \
      xargs sed -i.bak '/#include "exec\/address-spaces.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-12-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agohw: Do not include "exec/ioport.h" if it is not necessary
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:08 +0000 (20:27 -0300)]
hw: Do not include "exec/ioport.h" if it is not necessary

Code change produced with:
    $ git grep '#include "exec/ioport.h"' hw | \
      cut -d: -f-1 | \
      xargs egrep -Li "(portio|cpu_(in|out).\()" | \
      xargs sed -i.bak '/#include "exec\/ioport.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-11-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agonios2: do not include exec-all.h from cpu.h
Paolo Bonzini [Wed, 30 May 2018 09:59:31 +0000 (11:59 +0200)]
nios2: do not include exec-all.h from cpu.h

exec-all.h contains TCG-specific declarations, it should only be
includer from helper C files.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agotarget: Do not include "exec/exec-all.h" if it is not necessary
Philippe Mathieu-Daudé [Mon, 28 May 2018 23:27:07 +0000 (20:27 -0300)]
target: Do not include "exec/exec-all.h" if it is not necessary

Code change produced with:
    $ git grep '#include "exec/exec-all.h"' | \
      cut -d: -f-1 | \
      xargs egrep -L "(cpu_address_space_init|cpu_loop_|tlb_|tb_|GETPC|singlestep|TranslationBlock)" | \
      xargs sed -i.bak '/#include "exec\/exec-all.h"/d'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180528232719.4721-10-f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agobsd-user: include "exec/exec-all.h" which provides mmap_lock/unlock"
Paolo Bonzini [Fri, 1 Jun 2018 12:15:01 +0000 (14:15 +0200)]
bsd-user: include "exec/exec-all.h" which provides mmap_lock/unlock"

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 years agoMerge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20180601' into staging
Peter Maydell [Fri, 1 Jun 2018 12:11:30 +0000 (13:11 +0100)]
Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20180601' into staging

pull-seccomp-20180601

# gpg: Signature made Fri 01 Jun 2018 13:01:18 BST
# gpg:                using RSA key DF32E7C0F0FFF9A2
# gpg: Good signature from "Eduardo Otubo (Senior Software Engineer) <otubo@redhat.com>"
# Primary key fingerprint: D67E 1B50 9374 86B4 0723  DBAB DF32 E7C0 F0FF F9A2

* remotes/otubo/tags/pull-seccomp-20180601:
  sandbox: disable -sandbox if CONFIG_SECCOMP undefined

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosandbox: disable -sandbox if CONFIG_SECCOMP undefined
Yi Min Zhao [Thu, 31 May 2018 03:29:37 +0000 (11:29 +0800)]
sandbox: disable -sandbox if CONFIG_SECCOMP undefined

If CONFIG_SECCOMP is undefined, the option 'elevatedprivileges' remains
compiled. This would make libvirt set the corresponding capability and
then trigger failure during guest startup. This patch moves the code
regarding seccomp command line options to qemu-seccomp.c file and
wraps qemu_opts_foreach finding sandbox option with CONFIG_SECCOMP.
Because parse_sandbox() is moved into qemu-seccomp.c file, change
seccomp_start() to static function.

Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>
Acked-by: Eduardo Otubo <otubo@redhat.com>
6 years agoMerge remote-tracking branch 'remotes/sstabellini-http/tags/xen-20180531-tag' into...
Peter Maydell [Fri, 1 Jun 2018 09:16:48 +0000 (10:16 +0100)]
Merge remote-tracking branch 'remotes/sstabellini-http/tags/xen-20180531-tag' into staging

Xen 2018/05/31

# gpg: Signature made Thu 31 May 2018 20:05:49 BST
# gpg:                using RSA key 894F8F4870E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
# gpg:                 aka "Stefano Stabellini <sstabellini@kernel.org>"
# Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90

* remotes/sstabellini-http/tags/xen-20180531-tag:
  xen-hvm: stop faking I/O to access PCI config space
  xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages
  xen/hvm: correct reporting of modified memory under physmap during migration

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoslirp/ncsi: add checksum support
Cédric Le Goater [Wed, 30 May 2018 06:10:35 +0000 (08:10 +0200)]
slirp/ncsi: add checksum support

The checksum field of a NC-SI packet contains a value that may be
included in each command and response. The verification is optional
but the Linux driver does so when a non-zero value is provided. Let's
extend the model to compute the checksum value and exercise a little
more the Linux driver.

See section "8.2.2.3 - 2's Complement Checksum Compensation" in the
Network Controller Sideband Interface (NC-SI) Specification for more
details.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
6 years agoslirp/ncsi: add a "Get Parameters" response
Cédric Le Goater [Wed, 30 May 2018 06:10:34 +0000 (08:10 +0200)]
slirp/ncsi: add a "Get Parameters" response

Command 0x17 'Get Parameters' is used to get configuration parameter
values currently in effect on the controller and it is mandatory in
the NS-CI specification.

Provide a minimum response to exercise the kernel.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
6 years agoslirp/ncsi: fix "Get Version ID" payload length
Cédric Le Goater [Wed, 30 May 2018 06:10:33 +0000 (08:10 +0200)]
slirp/ncsi: fix "Get Version ID" payload length

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
6 years agoslirp: Send window updates to guest after window was closed
James Clarke [Tue, 17 Apr 2018 14:10:58 +0000 (15:10 +0100)]
slirp: Send window updates to guest after window was closed

If the receive window presented to the guest closes, slirp should send a
window update once the window reopens sufficiently, rather than forcing
the guest to send a window probe, which can take several seconds.

Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
6 years agonet/slirp: Convert atoi to qemu_strtoi to allow error checking
Nia Alarie [Fri, 16 Mar 2018 14:39:21 +0000 (14:39 +0000)]
net/slirp: Convert atoi to qemu_strtoi to allow error checking

Signed-off-by: Nia Alarie <nia.alarie@gmail.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>