qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 55289f: virtio-serial: add enable_backend cal


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 55289f: virtio-serial: add enable_backend callback
Date: Sat, 23 Sep 2017 07:53:35 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 55289fb036481396466d7825fa01d829c891108c
      
https://github.com/qemu/qemu/commit/55289fb036481396466d7825fa01d829c891108c
  Author: Pavel Butsykin <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M hw/char/virtio-console.c
    M hw/char/virtio-serial-bus.c
    M include/hw/virtio/virtio-serial.h

  Log Message:
  -----------
  virtio-serial: add enable_backend callback

We should guarantee that RAM will not be modified while VM has a stopped
state, otherwise it can lead to negative consequences during post-copy
migration. In RUN_STATE_FINISH_MIGRATE step, it's expected that RAM on
source side will not be modified as this could lead to non-consistent vm state
on the destination side. Also RAM access during postcopy-ram migration with
enabled release-ram capability can lead to sad consequences.

Let's add enable_backend() callback to avoid undesirable virtioqueue changes
in the guest memory.

Signed-off-by: Pavel Butsykin <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3110cdbd8a4845c5b5fb861b0a664c56d993dd3c
      
https://github.com/qemu/qemu/commit/3110cdbd8a4845c5b5fb861b0a664c56d993dd3c
  Author: David Hildenbrand <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  kvm: drop wrong assertion creating problems with pflash

pflash toggles mr->romd_mode. So this assert does not always hold.

1) a device was added with !mr->romd_mode, therefore effectively not
   creating a kvm slot as we want to trap every access (add = false).
2) mr->romd_mode was toggled on before remove it. There is now
   actually no slot to remove and the assert is wrong.

So let's just drop the assert.

Reported-by: Gerd Hoffmann <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Tested-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 05e015f73c3b5c50c237d3d8e555e25cfa543a5c
      
https://github.com/qemu/qemu/commit/05e015f73c3b5c50c237d3d8e555e25cfa543a5c
  Author: KONRAD Frederic <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: avoid a name clash with access macro

This avoids a name clash with the access macro on windows 64:

make
        CHK version_gen.h
  CC      aarch64-softmmu/memory.o
/home/konrad/qemu/memory.c: In function 'access_with_adjusted_size':
/home/konrad/qemu/memory.c:591:73: error: macro "access" passed 7 arguments, \
                   but takes just 2
                   (size - access_size - i) * 8, access_mask, attrs);
                                                                   ^

Signed-off-by: KONRAD Frederic <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: db81b9953761cac71906728fb3dfefce661ab903
      
https://github.com/qemu/qemu/commit/db81b9953761cac71906728fb3dfefce661ab903
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M docs/devel/atomics.txt

  Log Message:
  -----------
  atomic: update documentation

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 447b0d0b9ee8a0ac216c3186e0f3c427a1001f0c
      
https://github.com/qemu/qemu/commit/447b0d0b9ee8a0ac216c3186e0f3c427a1001f0c
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M docs/devel/atomics.txt
    M include/qemu/atomic.h
    M memory.c

  Log Message:
  -----------
  memory: avoid "resurrection" of dead FlatViews

It's possible for address_space_get_flatview() as it currently stands
to cause a use-after-free for the returned FlatView, if the reference
count is incremented after the FlatView has been replaced by a writer:

   thread 1             thread 2             RCU thread
  -------------------------------------------------------------
   rcu_read_lock
   read as->current_map
                  set as->current_map
                  flatview_unref
                     '--> call_rcu
   flatview_ref
     [ref=1]
   rcu_read_unlock
                                       flatview_destroy
   <badness>

Since FlatViews are not updated very often, we can just detect the
situation using a new atomic op atomic_fetch_inc_nonzero, similar to
Linux's atomic_inc_not_zero, which performs the refcount increment only if
it hasn't already hit zero.  This is similar to Linux commit de09a9771a53
("CRED: Fix get_task_cred() and task_state() to not resurrect dead
credentials", 2010-07-29).

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e76bb18f7e430e0c50fb38d051feacf268bd78f4
      
https://github.com/qemu/qemu/commit/e76bb18f7e430e0c50fb38d051feacf268bd78f4
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Explicitly export target AS from address_space_translate_internal

This adds an AS** parameter to address_space_do_translate()
to make it easier for the next patch to share FlatViews.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9a62e24f45bc97f8eaf198caf58906b47c50a8d5
      
https://github.com/qemu/qemu/commit/9a62e24f45bc97f8eaf198caf58906b47c50a8d5
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c
    M include/exec/memory-internal.h
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: Open code FlatView rendering

We are going to share FlatView's between AddressSpace's and per-AS
memory listeners won't suit the purpose anymore so open code
the dispatch tree rendering.

Since there is a good chance that dispatch_listener was the only
listener, this avoids address_space_update_topology_pass() if there is
no registered listeners; this should improve starting time.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: cc94cd6d36602d976a5e7bc29134d1eaefb4102e
      
https://github.com/qemu/qemu/commit/cc94cd6d36602d976a5e7bc29134d1eaefb4102e
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Move FlatView allocation to a helper

This moves a FlatView allocation and initialization to a helper.
While we are nere, replace g_new with g_new0 to not to bother if we add
new fields in the future.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 66a6df1dc6d5b28cc3e65db0d71683fbdddc6b62
      
https://github.com/qemu/qemu/commit/66a6df1dc6d5b28cc3e65db0d71683fbdddc6b62
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c
    M include/exec/memory-internal.h
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: Move AddressSpaceDispatch from AddressSpace to FlatView

As we are going to share FlatView's between AddressSpace's,
and AddressSpaceDispatch is a structure to perform quick lookup
in FlatView, this moves ASD to FlatView.

After previosly open coded ASD rendering, we can also remove
as->next_dispatch as the new FlatView pointer is stored
on a stack and set to an AS atomically.

flatview_destroy() is executed under RCU instead of
address_space_dispatch_free() now.

This makes mem_begin/mem_commit to work with ASD and mem_add with FV
as later on mem_add will be taking FV as an argument anyway.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c7752523787dc148f5ee976162e80ab594c386a1
      
https://github.com/qemu/qemu/commit/c7752523787dc148f5ee976162e80ab594c386a1
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  memory: Remove AddressSpace pointer from AddressSpaceDispatch

AS in ASD is only used to pass AS from mem_begin() to register_subpage()
to store it in MemoryRegionSection, we can do this directly now.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 166206845f7fd75e720e6feea0bb01957c8da07f
      
https://github.com/qemu/qemu/commit/166206845f7fd75e720e6feea0bb01957c8da07f
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c
    M hw/intc/openpic_kvm.c
    M include/exec/memory-internal.h
    M include/exec/memory.h
    M memory.c

  Log Message:
  -----------
  memory: Switch memory from using AddressSpace to FlatView

FlatView's will be shared between AddressSpace's and subpage_t
and MemoryRegionSection cannot store AS anymore, hence this change.

In particular, for:

 typedef struct subpage_t {
     MemoryRegion iomem;
-    AddressSpace *as;
+    FlatView *fv;
     hwaddr base;
     uint16_t sub_section[];
 } subpage_t;

  struct MemoryRegionSection {
     MemoryRegion *mr;
-    AddressSpace *address_space;
+    FlatView *fv;
     hwaddr offset_within_region;
     Int128 size;
     hwaddr offset_within_address_space;
     bool readonly;
 };

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9950322a593ff900a860fb52938159461798a831
      
https://github.com/qemu/qemu/commit/9950322a593ff900a860fb52938159461798a831
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  memory: Cleanup after switching to FlatView

We store AddressSpaceDispatch* in FlatView anyway so there is no need
to carry it from mem_add() to register_subpage/register_multipage.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8629d3fcb77e9775e44d9051bad0fb5187925eae
      
https://github.com/qemu/qemu/commit/8629d3fcb77e9775e44d9051bad0fb5187925eae
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c
    M include/exec/memory-internal.h
    M memory.c

  Log Message:
  -----------
  memory: Rename mem_begin/mem_commit/mem_add helpers

This renames some helpers to reflect better what they do.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 89c177bbdd6cf8e50b3fd4831697d50e195d6432
      
https://github.com/qemu/qemu/commit/89c177bbdd6cf8e50b3fd4831697d50e195d6432
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Store physical root MR in FlatView

Address spaces get to keep a root MR (alias or not) but FlatView stores
the actual MR as this is going to be used later on to decide whether to
share a particular FlatView or not.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9bf561e36cf8fed9565011a19ba9ea0100e1811e
      
https://github.com/qemu/qemu/commit/9bf561e36cf8fed9565011a19ba9ea0100e1811e
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Alloc dispatch tree where topology is generared

This is to make next patches simpler.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02218487649558ed66c3689d4cc55250a42601d8
      
https://github.com/qemu/qemu/commit/02218487649558ed66c3689d4cc55250a42601d8
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Move address_space_update_ioeventfds

So it is called (twice) from the same function. This is to make the next
patches a bit simpler.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 967dc9b1194a9281124b2e1ce67b6c3359a2138f
      
https://github.com/qemu/qemu/commit/967dc9b1194a9281124b2e1ce67b6c3359a2138f
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Share FlatView's and dispatch trees between address spaces

This allows sharing flat views between address spaces (AS) when
the same root memory region is used when creating a new address space.
This is done by walking through all ASes and caching one FlatView per
a physical root MR (i.e. not aliased).

This removes search for duplicates from address_space_init_shareable() as
FlatViews are shared elsewhere and keeping as::ref_count correct seems
an unnecessary and useless complication.

This should cause no change and memory use or boot time yet.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 67ace39b253ed5ae465275bc870f7e495547658b
      
https://github.com/qemu/qemu/commit/67ace39b253ed5ae465275bc870f7e495547658b
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Do not allocate FlatView in address_space_init

This creates a new AS object without any FlatView as
memory_region_transaction_commit() may want to reuse the empty FV.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5e8fd947e2670c3c18f139de6a83fafcb56abbcc
      
https://github.com/qemu/qemu/commit/5e8fd947e2670c3c18f139de6a83fafcb56abbcc
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-21 (Thu, 21 Sep 2017)

  Changed paths:
    M exec.c
    M hmp-commands-info.hx
    M include/exec/memory-internal.h
    M include/exec/memory.h
    M memory.c
    M monitor.c

  Log Message:
  -----------
  memory: Rework "info mtree" to print flat views and dispatch trees

This adds a new "-d" switch to "info mtree" to print dispatch tree
internals.

This changes the way "-f" is handled - it prints now flat views and
associated address spaces.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b516572f31c0ea0937cd9d11d9bd72dd83809886
      
https://github.com/qemu/qemu/commit/b516572f31c0ea0937cd9d11d9bd72dd83809886
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M cpus.c
    M hw/arm/armv7m.c
    M include/exec/memory.h
    M include/hw/arm/armv7m.h
    M memory.c
    M target/arm/cpu.c
    M target/i386/cpu.c

  Log Message:
  -----------
  memory: Get rid of address_space_init_shareable

Since FlatViews are shared now and ASes not, this gets rid of
address_space_init_shareable().

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 202fc01b05572ecb258fdf4c5bd56cf6de8140c7
      
https://github.com/qemu/qemu/commit/202fc01b05572ecb258fdf4c5bd56cf6de8140c7
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Create FlatView directly

This avoids usual memory_region_transaction_commit() which rebuilds
all FVs.

On POWER8 with 255 CPUs, 255 virtio-net, 40 PCI bridges guest this brings
down the boot time from 25s to 20s and reduces the amount of temporary FVs
allocated during machine constructon (~800000 -> ~640000) and amount of
temporary dispatch trees (~370000 -> ~300000), the total memory footprint
goes down (18G -> 17G).

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02d9651d6a46479e9d70b72dca34e43605d06cda
      
https://github.com/qemu/qemu/commit/02d9651d6a46479e9d70b72dca34e43605d06cda
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M include/exec/memory.h
    M include/qemu/typedefs.h
    M memory.c
    M trace-events

  Log Message:
  -----------
  memory: trace FlatView creation and destruction

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e673ba9af9bf8fd8e0f44025ac738b8285b3ed27
      
https://github.com/qemu/qemu/commit/e673ba9af9bf8fd8e0f44025ac738b8285b3ed27
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: seek FlatView sharing candidates among children subregions

A container can be used instead of an alias to allow switching between
multiple subregions.  In this case we cannot directly share the
subregions (since they only belong to a single parent), but if the
subregions are aliases we can in turn walk those.

This is not enough to remove all source of quadratic FlatView creation,
but it enables sharing of the PCI bus master FlatViews (and their
AddressSpaceDispatch structures) across all PCI devices.  For 112
virtio-net-pci devices, boot time is reduced from 25 to 10 seconds and
memory consumption from 1.4 to 1 G.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 092aa2fc65b7a35121616aad8f39d47b8f921618
      
https://github.com/qemu/qemu/commit/092aa2fc65b7a35121616aad8f39d47b8f921618
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Share special empty FlatView

This shares an cached empty FlatView among address spaces. The empty
FV is used every time when a root MR renders into a FV without memory
sections which happens when MR or its children are not enabled or
zero-sized. The empty_view is not NULL to keep the rest of memory
API intact; it also has a dispatch tree for the same reason.

On POWER8 with 255 CPUs, 255 virtio-net, 40 PCI bridges guest this halves
the amount of FlatView's in use (557 -> 260) and dispatch tables
(~800000 -> ~370000).  In an unrelated experiment with 112 non-virtio
devices on x86 ("-M pc"), only 4 FlatViews are alive, and about ~2000
are created at startup.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7c9e527659c67d4d7b41d9504f93d2d7ee482488
      
https://github.com/qemu/qemu/commit/7c9e527659c67d4d7b41d9504f93d2d7ee482488
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M Makefile.objs
    M block/file-posix.c
    A docs/pr-manager.rst
    A include/scsi/pr-manager.h
    M qapi/block-core.json
    M scsi/Makefile.objs
    A scsi/pr-manager.c
    A scsi/trace-events
    M vl.c

  Log Message:
  -----------
  scsi, file-posix: add support for persistent reservation management

It is a common requirement for virtual machine to send persistent
reservations, but this currently requires either running QEMU with
CAP_SYS_RAWIO, or using out-of-tree patches that let an unprivileged
QEMU bypass Linux's filter on SG_IO commands.

As an alternative mechanism, the next patches will introduce a
privileged helper to run persistent reservation commands without
expanding QEMU's attack surface unnecessarily.

The helper is invoked through a "pr-manager" QOM object, to which
file-posix.c passes SG_IO requests for PERSISTENT RESERVE OUT and
PERSISTENT RESERVE IN commands.  For example:

  $ qemu-system-x86_64
      -device virtio-scsi \
      -object pr-manager-helper,id=helper0,path=/var/run/qemu-pr-helper.sock
      -drive 
if=none,id=hd,driver=raw,file.filename=/dev/sdb,file.pr-manager=helper0
      -device scsi-block,drive=hd

or:

  $ qemu-system-x86_64
      -device virtio-scsi \
      -object pr-manager-helper,id=helper0,path=/var/run/qemu-pr-helper.sock
      -blockdev 
node-name=hd,driver=raw,file.driver=host_device,file.filename=/dev/sdb,file.pr-manager=helper0
      -device scsi-block,drive=hd

Multiple pr-manager implementations are conceivable and possible, though
only one is implemented right now.  For example, a pr-manager could:

- talk directly to the multipath daemon from a privileged QEMU
  (i.e. QEMU links to libmpathpersist); this makes reservation work
  properly with multipath, but still requires CAP_SYS_RAWIO

- use the Linux IOC_PR_* ioctls (they require CAP_SYS_ADMIN though)

- more interestingly, implement reservations directly in QEMU
  through file system locks or a shared database (e.g. sqlite)

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b855f8d175a0a26c9798cbc5962bb8c0d9538231
      
https://github.com/qemu/qemu/commit/b855f8d175a0a26c9798cbc5962bb8c0d9538231
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M Makefile
    M configure
    A docs/interop/pr-helper.rst
    M docs/pr-manager.rst
    A scsi/pr-helper.h
    A scsi/qemu-pr-helper.c

  Log Message:
  -----------
  scsi: build qemu-pr-helper

Introduce a privileged helper to run persistent reservation commands.
This lets virtual machines send persistent reservations without using
CAP_SYS_RAWIO or out-of-tree patches.  The helper uses Unix permissions
and SCM_RIGHTS to restrict access to processes that can access its socket
and prove that they have an open file descriptor for a raw SCSI device.

The next patch will also correct the usage of persistent reservations
with multipath devices.

It would also be possible to support for Linux's IOC_PR_* ioctls in
the future, to support NVMe devices.  For now, however, only SCSI is
supported.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81
      
https://github.com/qemu/qemu/commit/fe8fc5ae5c808e037fa4746cbfeb3c07ffe0af81
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M Makefile
    M configure
    M docs/pr-manager.rst
    M include/scsi/utils.h
    M scsi/qemu-pr-helper.c
    M scsi/utils.c

  Log Message:
  -----------
  scsi: add multipath support to qemu-pr-helper

Proper support of persistent reservation for multipath devices requires
communication with the multipath daemon, so that the reservation is
registered and applied when a path comes up.  The device mapper
utilities provide a library to do so; this patch makes qemu-pr-helper.c
detect multipath devices and, when one is found, delegate the operation
to libmpathpersist.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9bad2a6b9d0aeb2dcf91a07652cc63bbb6e73141
      
https://github.com/qemu/qemu/commit/9bad2a6b9d0aeb2dcf91a07652cc63bbb6e73141
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M scsi/Makefile.objs
    A scsi/pr-manager-helper.c

  Log Message:
  -----------
  scsi: add persistent reservation manager using qemu-pr-helper

This adds a concrete subclass of pr-manager that talks to qemu-pr-helper.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 07241c205c2c0b3e5e17e883c8ae523e90d172c2
      
https://github.com/qemu/qemu/commit/07241c205c2c0b3e5e17e883c8ae523e90d172c2
  Author: Peter Xu <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M chardev/char-fe.c
    M chardev/char.c
    M include/chardev/char.h

  Log Message:
  -----------
  chardev: new qemu_chr_be_update_read_handlers()

Add a wrapper for the chr_update_read_handler().

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


  Commit: 95eeeba669dca94492d708b2893f296839652c84
      
https://github.com/qemu/qemu/commit/95eeeba669dca94492d708b2893f296839652c84
  Author: Peter Xu <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M chardev/char.c
    M include/chardev/char.h

  Log Message:
  -----------
  chardev: add Chardev.gcontext field

It caches the gcontext that is used to poll the chardev IO.  Before this
patch, we only passed it in via chr_update_read_handlers().  However
that may not be enough if the char backend is disconnected and
reconnected afterward.  There are chardev codes that still assumed the
context be NULL (which is the main context).  Will fix that up in
following up patches.

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


  Commit: 6bbb6c0644f76b58012bd7ed4279d44c59bb43ab
      
https://github.com/qemu/qemu/commit/6bbb6c0644f76b58012bd7ed4279d44c59bb43ab
  Author: Peter Xu <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M chardev/char-fd.c
    M chardev/char-pty.c
    M chardev/char-socket.c
    M chardev/char-udp.c

  Log Message:
  -----------
  chardev: use per-dev context for io_add_watch_poll

It was only passed in by chr_update_read_handlers().  However when
reconnect, we'll lose that context information.  So if a chardev was
running on another context (rather than the default context, the NULL
pointer), it'll switch back to the default context if reconnection
happens.  But, it should really stick to the old context.

Convert all the callers of io_add_watch_poll() to use the internally
cached gcontext.  Then the context should be able to survive even after
reconnections.

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


  Commit: bb86d05f4afab3ebfee2e897e295d61dbd8cc28e
      
https://github.com/qemu/qemu/commit/bb86d05f4afab3ebfee2e897e295d61dbd8cc28e
  Author: Peter Xu <address@hidden>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M chardev/char-fd.c
    M chardev/char-pty.c
    M chardev/char-socket.c
    M chardev/char-udp.c
    M chardev/char.c
    M include/chardev/char.h

  Log Message:
  -----------
  chardev: remove context in chr_update_read_handler

We had a per-chardev cache for context, then we don't need this
parameter to be passed in every time when chr_update_read_handler()
called.  As long as we are calling chr_update_read_handler() using
qemu_chr_be_update_read_handlers() we'll be fine.

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


  Commit: 460b6c8e581aa06b86f59eebd9e52edfe7adf417
      
https://github.com/qemu/qemu/commit/460b6c8e581aa06b86f59eebd9e52edfe7adf417
  Author: Peter Maydell <address@hidden>
  Date:   2017-09-23 (Sat, 23 Sep 2017)

  Changed paths:
    M Makefile
    M Makefile.objs
    M accel/kvm/kvm-all.c
    M block/file-posix.c
    M chardev/char-fd.c
    M chardev/char-fe.c
    M chardev/char-pty.c
    M chardev/char-socket.c
    M chardev/char-udp.c
    M chardev/char.c
    M configure
    M cpus.c
    M docs/devel/atomics.txt
    A docs/interop/pr-helper.rst
    A docs/pr-manager.rst
    M exec.c
    M hmp-commands-info.hx
    M hw/arm/armv7m.c
    M hw/char/virtio-console.c
    M hw/char/virtio-serial-bus.c
    M hw/intc/openpic_kvm.c
    M include/chardev/char.h
    M include/exec/memory-internal.h
    M include/exec/memory.h
    M include/hw/arm/armv7m.h
    M include/hw/virtio/virtio-serial.h
    M include/qemu/atomic.h
    M include/qemu/typedefs.h
    A include/scsi/pr-manager.h
    M include/scsi/utils.h
    M memory.c
    M monitor.c
    M qapi/block-core.json
    M scsi/Makefile.objs
    A scsi/pr-helper.h
    A scsi/pr-manager-helper.c
    A scsi/pr-manager.c
    A scsi/qemu-pr-helper.c
    A scsi/trace-events
    M scsi/utils.c
    M target/arm/cpu.c
    M target/i386/cpu.c
    M trace-events
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* Speed up AddressSpaceDispatch creation (Alexey)
* Fix kvm.c assert (David)
* Memory fixes and further speedup (me)
* Persistent reservation manager infrastructure (me)
* virtio-serial: add enable_backend callback (Pavel)
* chardev GMainContext fixes (Peter)

# gpg: Signature made Fri 22 Sep 2017 20:07:33 BST
# gpg:                using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# 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: (32 commits)
  chardev: remove context in chr_update_read_handler
  chardev: use per-dev context for io_add_watch_poll
  chardev: add Chardev.gcontext field
  chardev: new qemu_chr_be_update_read_handlers()
  scsi: add persistent reservation manager using qemu-pr-helper
  scsi: add multipath support to qemu-pr-helper
  scsi: build qemu-pr-helper
  scsi, file-posix: add support for persistent reservation management
  memory: Share special empty FlatView
  memory: seek FlatView sharing candidates among children subregions
  memory: trace FlatView creation and destruction
  memory: Create FlatView directly
  memory: Get rid of address_space_init_shareable
  memory: Rework "info mtree" to print flat views and dispatch trees
  memory: Do not allocate FlatView in address_space_init
  memory: Share FlatView's and dispatch trees between address spaces
  memory: Move address_space_update_ioeventfds
  memory: Alloc dispatch tree where topology is generared
  memory: Store physical root MR in FlatView
  memory: Rename mem_begin/mem_commit/mem_add helpers
  ...

# Conflicts:
#       configure


Compare: https://github.com/qemu/qemu/compare/c348b54ab5c3...460b6c8e581a

reply via email to

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