qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] dd054b: config: enable ivshmem on POSIX


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] dd054b: config: enable ivshmem on POSIX
Date: Mon, 26 Oct 2015 06:30:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: dd054be35fa355a6ebeab58618d7ff662247a9f6
      
https://github.com/qemu/qemu/commit/dd054be35fa355a6ebeab58618d7ff662247a9f6
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M default-configs/pci.mak

  Log Message:
  -----------
  config: enable ivshmem on POSIX

ivshmem doesn't actually require kvm, so enable it when POSIX is
enabled. (it is required however when ioeventfd is enabled)

Signed-off-by: Marc-André Lureau <address@hidden>


  Commit: bbfc2efefe9779f85dfe2713aec1568b1ba871ad
      
https://github.com/qemu/qemu/commit/bbfc2efefe9779f85dfe2713aec1568b1ba871ad
  Author: Andreas Färber <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M tests/Makefile
    A tests/ivshmem-test.c

  Log Message:
  -----------
  tests: Add ivshmem qtest

Note that it launches two instances, as sharing memory is the purpose of
ivshmem.

Cc: Cam Macdonell <address@hidden>
Cc: Marc-André Lureau <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
[ Remove Nahanni codename, add test to pci set - Marc-André ]
Signed-off-by: Marc-André Lureau <address@hidden>


  Commit: 1ad78ea51aad7978638299a27004049935c2d913
      
https://github.com/qemu/qemu/commit/1ad78ea51aad7978638299a27004049935c2d913
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: add qemu_chr_free()

If a chardev is allowed to be created outside of QMP, then it must be
also possible to free it. This is useful for ivshmem that creates
chardev anonymously and must be able to free them.

Signed-off-by: Marc-André Lureau <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: c246a62f26e5afa8285b21e641b33456f1e69c99
      
https://github.com/qemu/qemu/commit/c246a62f26e5afa8285b21e641b33456f1e69c99
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M include/hw/pci/msix.h

  Log Message:
  -----------
  msix: add VMSTATE_MSIX_TEST

ivshmem is going to use MSIX state conditionally.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: b8ab854b27e9b88d9b85b4c572049b29cb96de43
      
https://github.com/qemu/qemu/commit/b8ab854b27e9b88d9b85b4c572049b29cb96de43
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivhsmem: read do not accept more than sizeof(long)

ivshmem_read() only reads sizeof(long) from the input buffer.  Accepting
more could lead to fifo8 abort() on 32bit systems if fifo is not empty.

A following patch will change the protocol to 64-bit little-endian
instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 951dada665041e8199e8c572d2981773fa2f0d8c
      
https://github.com/qemu/qemu/commit/951dada665041e8199e8c572d2981773fa2f0d8c
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: fix number of bytes to push to fifo

If the fifo has 0 bytes, and the read is of size 1, the call to
fifo8_push_all() will copy off boundary data.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 0f14fd71c170278b35b46d8ae214473680905606
      
https://github.com/qemu/qemu/commit/0f14fd71c170278b35b46d8ae214473680905606
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: factor out the incoming fifo handling

Make a new function fifo_update_and_get() that can be reused by other
functions (in next commits).

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: dee2151e7260a65c27495e9cbfc1931d9c9083d9
      
https://github.com/qemu/qemu/commit/dee2151e7260a65c27495e9cbfc1931d9c9083d9
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove unnecessary dup()

qemu_chr_fe_get_msgfd() transfers ownership, there is no need to dup the
fd.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 9113e3f394e0a8569713b7aa9ece3e37cb9b61e8
      
https://github.com/qemu/qemu/commit/9113e3f394e0a8569713b7aa9ece3e37cb9b61e8
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove superflous ivshmem_attr field

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 49b2951f8416b356001d7b32625da0c555f0d1ce
      
https://github.com/qemu/qemu/commit/49b2951f8416b356001d7b32625da0c555f0d1ce
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove useless doorbell field

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: d58d7e848ec6d5bcd19634212d58dec5f1efbdb8
      
https://github.com/qemu/qemu/commit/d58d7e848ec6d5bcd19634212d58dec5f1efbdb8
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: more qdev conversion

Use the latest qemu device modeling API, in particular, convert to
realize to fix the error handling; right now a botched device_add
ivhsmem command kills the VM.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 03977ad552874f6598a8f0ef3089e6846ba01a2b
      
https://github.com/qemu/qemu/commit/03977ad552874f6598a8f0ef3089e6846ba01a2b
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove last exit(1)

Failing to create a chardev shouldn't be fatal.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 61ea2d8648d32b8e84da62f142dc08fa9ee5b7b9
      
https://github.com/qemu/qemu/commit/61ea2d8648d32b8e84da62f142dc08fa9ee5b7b9
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: limit maximum number of peers to G_MAXUINT16

Limit the maximum number of peers to MAXUINT16. This is more realistic
and better matches the limit of the doorbell register.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 1300b2733a297f9a59deb4eebbd437a5833f3f41
      
https://github.com/qemu/qemu/commit/1300b2733a297f9a59deb4eebbd437a5833f3f41
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: simplify around increase_dynamic_storage()

Set the number of peers and array allocation in a single place. Rename
to better reflect the function content.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 81e507f0bc584f417cb671e88da3f049cb4defb1
      
https://github.com/qemu/qemu/commit/81e507f0bc584f417cb671e88da3f049cb4defb1
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: allocate eventfds in resize_peers()

It simplifies a bit the code to allocate the array when setting the
number of peers instead of lazily when receiving the first vector.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: d8a5da075a919f7b42f2182cc55f5d3e7e60b264
      
https://github.com/qemu/qemu/commit/d8a5da075a919f7b42f2182cc55f5d3e7e60b264
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove useless ivshmem_update_irq() val argument

val isn't used in ivshmem_update_irq() function.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 95e7c8a0f690f9a0c8b70fd1a4de60bd944371b8
      
https://github.com/qemu/qemu/commit/95e7c8a0f690f9a0c8b70fd1a4de60bd944371b8
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: initialize max_peer to -1

There is no peer when device is initialized, do not let doorbell for
inexisting peer 0.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 95c8425cc3a316c998a7e306799ec6d29811bc32
      
https://github.com/qemu/qemu/commit/95c8425cc3a316c998a7e306799ec6d29811bc32
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove max_peer field

max_peer isn't really useful, it tracks the maximum received VM id, but
that quickly matches nb_peers, the size of the peers array. Since VM
come and go, there might be sparse peers so it doesn't help much in
general to have this value around.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: f59bb37898d6ff44cdf68bfbadaf3bd260ae465e
      
https://github.com/qemu/qemu/commit/f59bb37898d6ff44cdf68bfbadaf3bd260ae465e
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: improve debug messages

Some misc improvements to ivshmem debug.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 36617792b45b5d46d574af4f6ebb3f35c77d1e69
      
https://github.com/qemu/qemu/commit/36617792b45b5d46d574af4f6ebb3f35c77d1e69
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: improve error handling

The test whether the chardev is an AF_UNIX socket rejects
"-chardev socket,id=chr0,path=/tmp/foo,server,nowait -device
ivshmem,chardev=chr0", but fails to explain why.

Use an explicit error on why a chardev may be rejected.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: ffa99afd6e4d354cdfae44cc43a2ca7ef056eb35
      
https://github.com/qemu/qemu/commit/ffa99afd6e4d354cdfae44cc43a2ca7ef056eb35
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: print error on invalid peer id

The server shouldn't send invalid peer id, so print an error if it's the
case.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 9a2f0e64aeb4c7891244785e88b2b0cfa1d61742
      
https://github.com/qemu/qemu/commit/9a2f0e64aeb4c7891244785e88b2b0cfa1d61742
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: simplify a bit the code

Use some more explicit variables to simplify the code.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 6f8a16d55daac5657ccbcf953140685048e15ace
      
https://github.com/qemu/qemu/commit/6f8a16d55daac5657ccbcf953140685048e15ace
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: use common return

Both if branches return, move this out to common end.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: e309366337d636689730f6484e388e46db7b5654
      
https://github.com/qemu/qemu/commit/e309366337d636689730f6484e388e46db7b5654
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: use common is_power_of_2()

The common version correctly checks for 0 value case.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 1f8552df2c7935a4cf883bda22acbe2adbf7d579
      
https://github.com/qemu/qemu/commit/1f8552df2c7935a4cf883bda22acbe2adbf7d579
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: migrate with VMStateDescription

load_state_old() is used to keep compatibility with version 0.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 86d471bfa4262fa983c0214ace7336843e2181a2
      
https://github.com/qemu/qemu/commit/86d471bfa4262fa983c0214ace7336843e2181a2
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: shmfd can be 0

0 is a valid fd value, so change conditions and set -1 value early

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 945001a1af36eafd093b6b1582f5282932cd3d87
      
https://github.com/qemu/qemu/commit/945001a1af36eafd093b6b1582f5282932cd3d87
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: check shm isn't already initialized

The server should not change the shm, and this isn't handled by qemu and
we should should verify this in qemu.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: d383537d01c1f23d783955963e234d11fce8ec02
      
https://github.com/qemu/qemu/commit/d383537d01c1f23d783955963e234d11fce8ec02
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: add device description

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: f64a078d45a4c1d1da074d1c306a5a4994dcda89
      
https://github.com/qemu/qemu/commit/f64a078d45a4c1d1da074d1c306a5a4994dcda89
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: fix pci_ivshmem_exit()

Free all objects owned by the device, making sure the device is free,
fixing hot-unplug.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: f456179fae249a420dce38a02ad7e2efc6be37cf
      
https://github.com/qemu/qemu/commit/f456179fae249a420dce38a02ad7e2efc6be37cf
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: replace 'guest' for 'peer' appropriately

The terms 'guest' and 'peer' are used sometime interchangeably which may
be confusing. Instead, use 'peer' for the remote instances of ivshmem
clients, and 'guest' for the local VM.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 1ee57de444ac7dd0cdb091fec318ba056ed173fd
      
https://github.com/qemu/qemu/commit/1ee57de444ac7dd0cdb091fec318ba056ed173fd
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: error on too many eventfd received

The number of eventfd that can be handled per peer is limited by the
number of vectors. Return an error when receiving too many of them.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 972ad21553fd46738eea91f0085c7bc32cf68d86
      
https://github.com/qemu/qemu/commit/972ad21553fd46738eea91f0085c7bc32cf68d86
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: reset mask on device reset

The interrupt mask is a state value, it should be reset, like the
interrupt status.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 12f0b68c82356e4dd24f2f0d370b21eb17f1f42e
      
https://github.com/qemu/qemu/commit/12f0b68c82356e4dd24f2f0d370b21eb17f1f42e
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M include/qemu/event_notifier.h
    M util/event_notifier-posix.c

  Log Message:
  -----------
  util: const event_notifier_get_fd() argument

Signed-off-by: Marc-André Lureau <address@hidden>


  Commit: a75eb03b9fca3af291ec2c433ddda06121ae927d
      
https://github.com/qemu/qemu/commit/a75eb03b9fca3af291ec2c433ddda06121ae927d
  Author: David Marchand <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M Makefile
    M Makefile.objs
    M configure
    A contrib/ivshmem-client/Makefile.objs
    A contrib/ivshmem-client/ivshmem-client.c
    A contrib/ivshmem-client/ivshmem-client.h
    A contrib/ivshmem-client/main.c
    A contrib/ivshmem-server/Makefile.objs
    A contrib/ivshmem-server/ivshmem-server.c
    A contrib/ivshmem-server/ivshmem-server.h
    A contrib/ivshmem-server/main.c
    M qemu-doc.texi

  Log Message:
  -----------
  contrib: add ivshmem client and server

When using ivshmem devices, notifications between guests can be sent as
interrupts using a ivshmem-server (typical use described in documentation).
The client is provided as a debug tool.

Signed-off-by: Olivier Matz <address@hidden>
Signed-off-by: David Marchand <address@hidden>
[fix a valgrind warning, option and server_close() segvs, extra server
headers includes, getopt() return type, out-of-tree build, use qemu
event_notifier instead of eventfd, fix x86/osx warnings - Marc-André]
Signed-off-by: Marc-André Lureau <address@hidden>


  Commit: 95204aa951ceb28eb6d4ce43bce09a58cbad83d8
      
https://github.com/qemu/qemu/commit/95204aa951ceb28eb6d4ce43bce09a58cbad83d8
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M contrib/ivshmem-client/ivshmem-client.c

  Log Message:
  -----------
  ivshmem-client: check the number of vectors

Check the number of vectors received from the server, to avoid
out of bound array access.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 022cffe31360750b405d368e343f3ca5febc0d0a
      
https://github.com/qemu/qemu/commit/022cffe31360750b405d368e343f3ca5febc0d0a
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M contrib/ivshmem-server/ivshmem-server.c
    M contrib/ivshmem-server/ivshmem-server.h

  Log Message:
  -----------
  ivshmem-server: use a uint16 for client ID

In practice, the number of VM is limited to MAXUINT16 in ivshmem, so use
the same limit on the server (removes a theorical infinite loop)

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 1e21feb6280222a230fda1d87318ab58adde188f
      
https://github.com/qemu/qemu/commit/1e21feb6280222a230fda1d87318ab58adde188f
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M contrib/ivshmem-server/ivshmem-server.c
    M contrib/ivshmem-server/ivshmem-server.h
    M contrib/ivshmem-server/main.c

  Log Message:
  -----------
  ivshmem-server: fix hugetlbfs support

As pointed out on the ML by Andrew Jones, glibc no longer permits
creating POSIX shm on hugetlbfs directly. When given a hugetlbfs path,
create a shareable file there.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>


  Commit: 8c4ef202b901d25b88efc55398d4a76dfb2594de
      
https://github.com/qemu/qemu/commit/8c4ef202b901d25b88efc55398d4a76dfb2594de
  Author: David Marchand <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M docs/specs/ivshmem_device_spec.txt

  Log Message:
  -----------
  docs: update ivshmem device spec

Add some notes on the parts needed to use ivshmem devices: more specifically,
explain the purpose of an ivshmem server and the basic concept to use the
ivshmem devices in guests.
Move some parts of the documentation and re-organise it.

Signed-off-by: David Marchand <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>


  Commit: 5105b1d8c2d1ad4a25b8806e86c0f012936b2eed
      
https://github.com/qemu/qemu/commit/5105b1d8c2d1ad4a25b8806e86c0f012936b2eed
  Author: David Marchand <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M contrib/ivshmem-client/ivshmem-client.c
    M contrib/ivshmem-client/ivshmem-client.h
    M contrib/ivshmem-server/ivshmem-server.c
    M contrib/ivshmem-server/ivshmem-server.h
    M docs/specs/ivshmem_device_spec.txt
    M hw/misc/ivshmem.c
    A include/hw/misc/ivshmem.h

  Log Message:
  -----------
  ivshmem: add check on protocol version in QEMU

Send a protocol version as the first message from server, clients must
close communication if they don't support this protocol version.  Older
QEMUs should be fine with this change in the protocol since they
overrides their own vm_id on reception of an id associated to no
eventfd.

Signed-off-by: David Marchand <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
[use fifo_update_and_get()]
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 45b00c44ceffeac8143fb8857a12677234114f2b
      
https://github.com/qemu/qemu/commit/45b00c44ceffeac8143fb8857a12677234114f2b
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M contrib/ivshmem-client/main.c
    M contrib/ivshmem-server/main.c

  Log Message:
  -----------
  contrib: remove unnecessary strdup()

getopt() optarg points to argv memory, no need to dup those values,
fixes small leaks detected by clang-analyzer.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>


  Commit: 43b11a91dd861a946b231b89b7542856ade23d1b
      
https://github.com/qemu/qemu/commit/43b11a91dd861a946b231b89b7542856ade23d1b
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M hw/pci/msix.c

  Log Message:
  -----------
  msix: implement pba write (but read-only)

qpci_msix_pending() writes on pba region, causing qemu to SEGV:

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7ffff7fba8c0 (LWP 25882)]
  0x0000000000000000 in ?? ()
  (gdb) bt
  #0  0x0000000000000000 in  ()
  #1  0x00005555556556c5 in memory_region_oldmmio_write_accessor 
(mr=0x5555579f3f80, addr=0, value=0x7fffffffbf68, size=4, shift=0, 
mask=4294967295, attrs=...) at /home/elmarco/src/qemu/memory.c:434
  #2  0x00005555556558e1 in access_with_adjusted_size (addr=0, 
value=0x7fffffffbf68, size=4, access_size_min=1, access_size_max=4, 
access=0x55555565563e <memory_region_oldmmio_write_accessor>, 
mr=0x5555579f3f80, attrs=...) at /home/elmarco/src/qemu/memory.c:506
  #3  0x00005555556581eb in memory_region_dispatch_write (mr=0x5555579f3f80, 
addr=0, data=0, size=4, attrs=...) at /home/elmarco/src/qemu/memory.c:1176
  #4  0x000055555560b6f9 in address_space_rw (as=0x555555eff4e0 
<address_space_memory>, addr=3759147008, attrs=..., buf=0x7fffffffc1b0 "", 
len=4, is_write=true) at /home/elmarco/src/qemu/exec.c:2439
  #5  0x000055555560baa2 in cpu_physical_memory_rw (addr=3759147008, 
buf=0x7fffffffc1b0 "", len=4, is_write=1) at /home/elmarco/src/qemu/exec.c:2534
  #6  0x000055555564c005 in cpu_physical_memory_write (addr=3759147008, 
buf=0x7fffffffc1b0, len=4) at 
/home/elmarco/src/qemu/include/exec/cpu-common.h:80
  #7  0x000055555564cd9c in qtest_process_command (chr=0x55555642b890, 
words=0x5555578de4b0) at /home/elmarco/src/qemu/qtest.c:378
  #8  0x000055555564db77 in qtest_process_inbuf (chr=0x55555642b890, 
inbuf=0x55555641b340) at /home/elmarco/src/qemu/qtest.c:569
  #9  0x000055555564dc07 in qtest_read (opaque=0x55555642b890, 
buf=0x7fffffffc2e0 "writel 0xe0100800 0x0\n", size=22) at 
/home/elmarco/src/qemu/qtest.c:581
  #10 0x000055555574ce3e in qemu_chr_be_write (s=0x55555642b890, 
buf=0x7fffffffc2e0 "writel 0xe0100800 0x0\n", len=22) at qemu-char.c:306
  #11 0x0000555555751263 in tcp_chr_read (chan=0x55555642bcf0, cond=G_IO_IN, 
opaque=0x55555642b890) at qemu-char.c:2876
  #12 0x00007ffff64c9a8a in g_main_context_dispatch (context=0x55555641c400) at 
gmain.c:3122

(without this patch, this can be reproduced with the ivshmem qtest)

Implement an empty mmio write to avoid the crash.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>


  Commit: 063c23d909a8d6c9f251347514e34835e0510294
      
https://github.com/qemu/qemu/commit/063c23d909a8d6c9f251347514e34835e0510294
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-24 (Sat, 24 Oct 2015)

  Changed paths:
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  qtest: add qtest_add_abrt_handler()

Allow a test to add abort handlers, use GHook for all handlers.

There is currently no way to remove a handler, but it could be
later added if needed.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: ddef6a0d68f641ca89466c697d191d07b7e6718c
      
https://github.com/qemu/qemu/commit/ddef6a0d68f641ca89466c697d191d07b7e6718c
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M tests/Makefile
    M tests/ivshmem-test.c

  Log Message:
  -----------
  tests: add ivshmem qtest

Adds 4 ivshmemtests:
- single qemu instance and basic IO
- pair of instances, check memory sharing
- pair of instances with server, and MSIX
- hot plug/unplug

A temporary shm is created as well as a directory to place server
socket, both should be clear on exit and abort.

Cc: Cam Macdonell <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>


  Commit: f689d2811a36894618087e1e2cc3ade78e758e94
      
https://github.com/qemu/qemu/commit/f689d2811a36894618087e1e2cc3ade78e758e94
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: do not keep shm_fd open

Remove shm_fd from device state, closing it as early as possible to avoid leaks.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 2c04752cc8e37b15be4643570b49abb3128a8a46
      
https://github.com/qemu/qemu/commit/2c04752cc8e37b15be4643570b49abb3128a8a46
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: use qemu_strtosz()

Use the common qemu utility function to parse the memory size.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: d9453c93fea0c9c67f9c63bfa79a87631317d746
      
https://github.com/qemu/qemu/commit/d9453c93fea0c9c67f9c63bfa79a87631317d746
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c
    M tests/ivshmem-test.c

  Log Message:
  -----------
  ivshmem: add hostmem backend

Instead of handling allocation, teach ivshmem to use a memory backend.
This allows to use hugetlbfs backed memory now.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: d160f3f7911bb1f99235ae211269c8f4422f2079
      
https://github.com/qemu/qemu/commit/d160f3f7911bb1f99235ae211269c8f4422f2079
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: remove EventfdEntry.vector

No need to store an extra int for the vector number when it can be
computed easily by looking at the position in the array.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 0f57350e5c2ee0c6fe979f4d4b6d4e1de0c26e46
      
https://github.com/qemu/qemu/commit/0f57350e5c2ee0c6fe979f4d4b6d4e1de0c26e46
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: rename MSI eventfd_table

The array is used to have vector specific data, so use a more
descriptive name.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 660c97eef6f8f416c5dc24d3798e29f9f9f698fb
      
https://github.com/qemu/qemu/commit/660c97eef6f8f416c5dc24d3798e29f9f9f698fb
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: use kvm irqfd for msi notifications

Use irqfd for improving context switch when notifying the guest.
If the host doesn't support kvm irqfd, regular msi notifications are
still supported.

Note: the ivshmem implementation doesn't allow switching between MSI and
IO interrupts, this patch doesn't either.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>


  Commit: f7a199b2b4486242271f769bb4bc2638c0413274
      
https://github.com/qemu/qemu/commit/f7a199b2b4486242271f769bb4bc2638c0413274
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M contrib/ivshmem-client/ivshmem-client.c
    M contrib/ivshmem-client/ivshmem-client.h
    M contrib/ivshmem-client/main.c
    M contrib/ivshmem-server/ivshmem-server.c
    M contrib/ivshmem-server/ivshmem-server.h
    M docs/specs/ivshmem_device_spec.txt
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: use little-endian int64_t for the protocol

The current ivshmem protocol uses 'long' for integers. But the
sizeof(long) depends on the host and the endianess is not defined, which
may cause portability troubles.

Instead, switch to using little-endian int64_t. This breaks the
protocol, except on x64 little-endian host where this change
should be compatible.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>


  Commit: 7d4f4bdaf785dfe9fc41b06f85cc9aaf1b1474ee
      
https://github.com/qemu/qemu/commit/7d4f4bdaf785dfe9fc41b06f85cc9aaf1b1474ee
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M qemu-doc.texi

  Log Message:
  -----------
  doc: document ivshmem & hugepages

Document and give some examples of hugepages support with ivshmem device
and server.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 251d7e60148599be685c6f9f3921aee38dccef5c
      
https://github.com/qemu/qemu/commit/251d7e60148599be685c6f9f3921aee38dccef5c
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-26 (Mon, 26 Oct 2015)

  Changed paths:
    M Makefile
    M Makefile.objs
    M configure
    A contrib/ivshmem-client/Makefile.objs
    A contrib/ivshmem-client/ivshmem-client.c
    A contrib/ivshmem-client/ivshmem-client.h
    A contrib/ivshmem-client/main.c
    A contrib/ivshmem-server/Makefile.objs
    A contrib/ivshmem-server/ivshmem-server.c
    A contrib/ivshmem-server/ivshmem-server.h
    A contrib/ivshmem-server/main.c
    M default-configs/pci.mak
    M docs/specs/ivshmem_device_spec.txt
    M hw/misc/ivshmem.c
    M hw/pci/msix.c
    A include/hw/misc/ivshmem.h
    M include/hw/pci/msix.h
    M include/qemu/event_notifier.h
    M include/sysemu/char.h
    M qemu-char.c
    M qemu-doc.texi
    M tests/Makefile
    A tests/ivshmem-test.c
    M tests/libqtest.c
    M tests/libqtest.h
    M util/event_notifier-posix.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/elmarco/tags/ivshmem-pull-request' into 
staging

ivshmem series

# gpg: Signature made Mon 26 Oct 2015 09:27:46 GMT using RSA key ID 75969CE5
# gpg: Good signature from "Marc-André Lureau <address@hidden>"
# gpg:                 aka "Marc-André Lureau <address@hidden>"
# 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: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/elmarco/tags/ivshmem-pull-request: (51 commits)
  doc: document ivshmem & hugepages
  ivshmem: use little-endian int64_t for the protocol
  ivshmem: use kvm irqfd for msi notifications
  ivshmem: rename MSI eventfd_table
  ivshmem: remove EventfdEntry.vector
  ivshmem: add hostmem backend
  ivshmem: use qemu_strtosz()
  ivshmem: do not keep shm_fd open
  tests: add ivshmem qtest
  qtest: add qtest_add_abrt_handler()
  msix: implement pba write (but read-only)
  contrib: remove unnecessary strdup()
  ivshmem: add check on protocol version in QEMU
  docs: update ivshmem device spec
  ivshmem-server: fix hugetlbfs support
  ivshmem-server: use a uint16 for client ID
  ivshmem-client: check the number of vectors
  contrib: add ivshmem client and server
  util: const event_notifier_get_fd() argument
  ivshmem: reset mask on device reset
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/af25e7277d3e...251d7e601485

reply via email to

[Prev in Thread] Current Thread [Next in Thread]