qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 777d05: checkpatch: refine mode selection


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 777d05: checkpatch: refine mode selection
Date: Thu, 19 Oct 2017 08:45:57 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 777d05ba477dde63a097ad12f1bb286f6ab7c4cc
      
https://github.com/qemu/qemu/commit/777d05ba477dde63a097ad12f1bb286f6ab7c4cc
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M scripts/checkpatch.pl

  Log Message:
  -----------
  checkpatch: refine mode selection

stgit produces patch files that lack the ".patch" extensions.  Others
might be using ".diff" too.  But since we are already limiting source files
to only a handful of extensions, we can reuse that in the mode selection
code.

While at it, do not match "../foo" as a branch name.

Reviewed-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 070f80095ad5b1143b50d2faffd2b1a84292e00d
      
https://github.com/qemu/qemu/commit/070f80095ad5b1143b50d2faffd2b1a84292e00d
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: support reporting of rotation rate

The Linux kernel will query the SCSI "Block device characteristics"
VPD to determine the rotations per minute of the disk. If this has
the value 1, it is taken to be an SSD and so Linux sets the
'rotational' flag to 0 for the I/O queue and will stop using that
disk as a source of random entropy. Other operating systems may
also take into account rotation rate when setting up default
behaviour.

Mgmt apps should be able to set the rotation rate for virtualized
block devices, based on characteristics of the host storage in use,
so that the guest OS gets sensible behaviour out of the box. This
patch thus adds a 'rotation-rate' parameter for 'scsi-hd' and
'scsi-block' device types. For the latter, this parameter will be
ignored unless the host device has TYPE_DISK.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3b19f4506901ecce25ff36cf62353a2b4bfe4f2b
      
https://github.com/qemu/qemu/commit/3b19f4506901ecce25ff36cf62353a2b4bfe4f2b
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M hw/ide/core.c
    M hw/ide/qdev.c
    M include/hw/ide/internal.h

  Log Message:
  -----------
  ide: support reporting of rotation rate

The Linux kernel will query the ATA IDENTITY DEVICE data, word 217
to determine the rotations per minute of the disk. If this has
the value 1, it is taken to be an SSD and so Linux sets the
'rotational' flag to 0 for the I/O queue and will stop using that
disk as a source of random entropy. Other operating systems may
also take into account rotation rate when setting up default
behaviour.

Mgmt apps should be able to set the rotation rate for virtualized
block devices, based on characteristics of the host storage in use,
so that the guest OS gets sensible behaviour out of the box. This
patch thus adds a 'rotation-rate' parameter for 'ide-hd' device
types.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9cca7578b45ac5b10c4cdb3dd7e08bb28c766c6d
      
https://github.com/qemu/qemu/commit/9cca7578b45ac5b10c4cdb3dd7e08bb28c766c6d
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M chardev/char-socket.c

  Log Message:
  -----------
  char: don't skip client cleanup if 'connected' flag is unset

The tcp_chr_free_connection & tcp_chr_disconnect methods both
skip all of their cleanup work unless the 's->connected' flag
is set.  This flag is set when the incoming client connection
is ready to use. Crucially this is *after* the TLS handshake
has been completed. So if the TLS handshake fails and we try
to cleanup the failed client, all the cleanup is skipped as
's->connected' is still false.

The only important thing that should be skipped in this case
is sending of the CHR_EVENT_CLOSED, because we never got as
far as sending the corresponding CHR_EVENT_OPENED. Every other
bit of cleanup can be robust against being called even when
s->connected is false.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d5e5fafd11be4458443c43f19c1ebdd24d99a751
      
https://github.com/qemu/qemu/commit/d5e5fafd11be4458443c43f19c1ebdd24d99a751
  Author: Peter Xu <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: add page_mask for flatview_do_translate

The function is originally used for flatview_space_translate() and what
we care about most is (xlat, plen) range. However for iotlb requests, we
don't really care about "plen", but the size of the page that "xlat" is
located on. While, plen cannot really contain this information.

A simple example to show why "plen" is not good for IOTLB translations:

E.g., for huge pages, it is possible that guest mapped 1G huge page on
device side that used this GPA range:

  0x100000000 - 0x13fffffff

Then let's say we want to translate one IOVA that finally mapped to GPA
0x13ffffe00 (which is located on this 1G huge page). Then here we'll
get:

  (xlat, plen) = (0x13fffe00, 0x200)

So the IOTLB would be only covering a very small range since from
"plen" (which is 0x200 bytes) we cannot tell the size of the page.

Actually we can really know that this is a huge page - we just throw the
information away in flatview_do_translate().

This patch introduced "page_mask" optional parameter to capture that
page mask info. Also, I made "plen" an optional parameter as well, with
some comments for the whole function.

No functional change yet.

Signed-off-by: Peter Xu <address@hidden>
Signed-off-by: Maxime Coquelin <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 076a93d7972c9c1e3839d2f65edc32568a2cce93
      
https://github.com/qemu/qemu/commit/076a93d7972c9c1e3839d2f65edc32568a2cce93
  Author: Peter Xu <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: simplify address_space_get_iotlb_entry

This patch let address_space_get_iotlb_entry() to use the newly
introduced page_mask parameter in flatview_do_translate(). Then we
will be sure the IOTLB can be aligned to page mask, also we should
nicely support huge pages now when introducing a764040.

Fixes: a764040 ("exec: abstract address_space_do_translate()")
Signed-off-by: Peter Xu <address@hidden>
Signed-off-by: Maxime Coquelin <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b021d1c04452276f4926eed2d104ccbd1037a6e1
      
https://github.com/qemu/qemu/commit/b021d1c04452276f4926eed2d104ccbd1037a6e1
  Author: Maxime Coquelin <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: fix off-by-one error in memory_region_notify_one()

This patch fixes an off-by-one error that could lead to the
notifyee to receive notifications for ranges it is not
registered to.

The bug has been spotted by code review.

Fixes: bd2bfa4c52e5 ("memory: introduce memory_region_notify_one()")
Cc: address@hidden
Cc: Peter Xu <address@hidden>
Signed-off-by: Maxime Coquelin <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6970c5ff13a47df7ce41b901a4459c587a03d16b
      
https://github.com/qemu/qemu/commit/6970c5ff13a47df7ce41b901a4459c587a03d16b
  Author: Igor Mammedov <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: make sure that plugged CPUs are of the same type

heterogeneous cpus are not supported and hotplugging different
cpu model crashes QEMU:

  qemu-system-x86_64 -cpu qemu64 -smp 1,maxcpus=2
  (qemu) device_add host-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=foo
  (qemu) info cpus
  error: failed to get MSR 0x38d
  qemu-system-x86_64: target/i386/kvm.c:2121: kvm_get_msrs: Assertion `ret == 
cpu->kvm_msr_buf->nmsrs' failed.
  Aborted (core dumped)

Gracefully fail hotplug process in case of user mistake.

Reported-by: Greg Kurz <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: eb584b401fdc0866d2ff0c03ab8b09d2ba04a49b
      
https://github.com/qemu/qemu/commit/eb584b401fdc0866d2ff0c03ab8b09d2ba04a49b
  Author: Thomas Huth <address@hidden>
  Date:   2017-10-12 (Thu, 12 Oct 2017)

  Changed paths:
    M disas.c
    M include/disas/bfd.h

  Log Message:
  -----------
  disas: Always initialize read_memory_inner_func properly

I've recently seen this with valgrind while running the HMP tester:

==22373== Conditional jump or move depends on uninitialised value(s)
==22373==    at 0x4A41FD: arm_disas_set_info (cpu.c:504)
==22373==    by 0x3867A7: monitor_disas (disas.c:390)
==22373==    by 0x38E80E: memory_dump (monitor.c:1339)
==22373==    by 0x38FA43: handle_hmp_command (monitor.c:3123)
==22373==    by 0x38FB9E: qmp_human_monitor_command (monitor.c:613)
==22373==    by 0x4E3124: qmp_marshal_human_monitor_command (qmp-marshal.c:1736)
==22373==    by 0x769678: do_qmp_dispatch (qmp-dispatch.c:104)
==22373==    by 0x769678: qmp_dispatch (qmp-dispatch.c:131)
==22373==    by 0x38B734: handle_qmp_command (monitor.c:3853)
==22373==    by 0x76ED07: json_message_process_token (json-streamer.c:105)
==22373==    by 0x78D40A: json_lexer_feed_char (json-lexer.c:323)
==22373==    by 0x78D4CD: json_lexer_feed (json-lexer.c:373)
==22373==    by 0x38A08D: monitor_qmp_read (monitor.c:3895)

And indeed, in monitor_disas, the read_memory_inner_func variable was
not initialized, but arm_disas_set_info() expects this to be NULL
or a valid pointer. Let's properly set this to NULL in the
INIT_DISASSEMBLE_INFO to fix it in all functions that use the
disassemble_info struct.

Fixes: f7478a92dd9ee2276bfaa5b7317140d3f9d6a53b ("Fix Thumb-1 BE32 execution")
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>


  Commit: 7271a81949ee9806705d51618379246fb2b72209
      
https://github.com/qemu/qemu/commit/7271a81949ee9806705d51618379246fb2b72209
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-16 (Mon, 16 Oct 2017)

  Changed paths:
    M Makefile.target
    M default-configs/ppc-linux-user.mak
    M default-configs/ppc-softmmu.mak
    M default-configs/ppc64-linux-user.mak
    M default-configs/ppc64-softmmu.mak
    M default-configs/ppc64abi32-linux-user.mak
    M default-configs/ppc64le-linux-user.mak
    M default-configs/ppcemb-softmmu.mak
    A libdecnumber/Makefile.objs
    M target/ppc/Makefile.objs

  Log Message:
  -----------
  build: remove CONFIG_LIBDECNUMBER

It is used by all PPC targets; we can give the directory its own
Makefile.objs file, and include it directly from target/ppc.
target/s390 can do the same when it starts using it.

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


  Commit: 17bd9597be45b96ae00716b0ae01a4d11bbee1ab
      
https://github.com/qemu/qemu/commit/17bd9597be45b96ae00716b0ae01a4d11bbee1ab
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-16 (Mon, 16 Oct 2017)

  Changed paths:
    M target/nios2/translate.c

  Log Message:
  -----------
  nios2: define tcg_env

This should be done by all target and, since commit 53f6672bcf
("gen-icount: use tcg_ctx.tcg_env instead of cpu_env", 2017-06-30),
is causing the NIOS2 target to hang.

This is because the test for "should I exit to the main loop"
was being done with the correct offset to the icount decrementer,
but using TCG temporary 0 (the frame pointer) rather than the
env pointer.

Cc: address@hidden
Cc: Marek Vasut <address@hidden>
Reported-by: Thomas Huth <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b7ecba0f6f6427683b2dc609f4830535b9a271dd
      
https://github.com/qemu/qemu/commit/b7ecba0f6f6427683b2dc609f4830535b9a271dd
  Author: Peter Maydell <address@hidden>
  Date:   2017-10-16 (Mon, 16 Oct 2017)

  Changed paths:
    A docs/devel/loads-stores.rst

  Log Message:
  -----------
  docs/devel/loads-stores.rst: Document our various load and store APIs

QEMU has a wide selection of different functions for doing
loads and stores; provide some overview documentation of
what they do and how to pick which one to use.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6a24f34e5c0bf83c5a31015242c94185c95c2554
      
https://github.com/qemu/qemu/commit/6a24f34e5c0bf83c5a31015242c94185c95c2554
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-16 (Mon, 16 Oct 2017)

  Changed paths:
    M hw/acpi/tco.c
    M hw/acpi/trace-events

  Log Message:
  -----------
  tco: add trace events

Add trace events to the PCH watchdog timer, it can be useful to see how
the guest is using it.

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


  Commit: e3af7c788b73a6495eb9d94992ef11f6ad6f3c56
      
https://github.com/qemu/qemu/commit/e3af7c788b73a6495eb9d94992ef11f6ad6f3c56
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-16 (Mon, 16 Oct 2017)

  Changed paths:
    M target/i386/translate.c

  Log Message:
  -----------
  target/i386: introduce x86_ld*_code

These take care of advancing s->pc, and will provide a unified point
where to check for the 15-byte instruction length limit.

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


  Commit: b066c5375737ad0d630196dab2a2b329515a1d00
      
https://github.com/qemu/qemu/commit/b066c5375737ad0d630196dab2a2b329515a1d00
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-16 (Mon, 16 Oct 2017)

  Changed paths:
    M target/i386/translate.c

  Log Message:
  -----------
  target/i386: trap on instructions longer than >15 bytes

Besides being more correct, arbitrarily long instruction allow the
generation of a translation block that spans three pages.  This
confuses the generator and even allows ring 3 code to poison the
translation block cache and inject code into other processes that are
in guest ring 3.

This is an improved (and more invasive) fix for commit 30663fd ("tcg/i386:
Check the size of instruction being translated", 2017-03-24).  In addition
to being more precise (and generating the right exception, which is #GP
rather than #UD), it distinguishes better between page faults and too long
instructions, as shown by this test case:

    #include <sys/mman.h>
    #include <string.h>
    #include <stdio.h>

    int main()
    {
      char *x = mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC,
                     MAP_PRIVATE|MAP_ANON, -1, 0);
      memset(x, 0x66, 4096);
      x[4096] = 0x90;
      x[4097] = 0xc3;
      char *i = x + 4096 - 15;
      mprotect(x + 4096, 4096, PROT_READ|PROT_WRITE);
      ((void(*)(void)) i) ();
    }

... which produces a #GP without the mprotect, and a #PF with it.

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


  Commit: ae990e6cd77a4e6004b7abc6d293598910abca63
      
https://github.com/qemu/qemu/commit/ae990e6cd77a4e6004b7abc6d293598910abca63
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: call log_start after region_add

It might be confusing for some listener implementations that implement
both, region_add and log_start (e.g. KVM) if we call log_start before an
actual region was added using region_add.

This makes current KVM code trigger an assertion
("kvm_section_update_flags: error finding slot"). So let's just reverse
the order instead of tolerating log_start on yet unknown regions.

Reported-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Tested-by: Joe Clifford <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: bbfd3017eb0ae59fe799e67046914dd1f94a9767
      
https://github.com/qemu/qemu/commit/bbfd3017eb0ae59fe799e67046914dd1f94a9767
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

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

  Log Message:
  -----------
  kvm: fix alignment of ram address

Fix the wrong calculation of the delta, used to align the ram address.

This only strikes if alignment has to be done.

Reported-by: Joe Clifford <address@hidden>
Fixes: 5ea69c2e3614 ("kvm: factor out alignment of memory section")
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Tested-by: Joe Clifford <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e377e87ca6a3d3d4f79bc2fdf2ad3283d39d4104
      
https://github.com/qemu/qemu/commit/e377e87ca6a3d3d4f79bc2fdf2ad3283d39d4104
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

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

  Log Message:
  -----------
  kvm: tolerate non-existing slot for log_start/log_stop/log_sync

If we want to trap every access to a section, we might not have a
slot. So let's just tolerate if we don't have one.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Tested-by: Joe Clifford <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1c4fdabaf734f6519fdef670df14285e491ef52c
      
https://github.com/qemu/qemu/commit/1c4fdabaf734f6519fdef670df14285e491ef52c
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

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

  Log Message:
  -----------
  kvm: fix error message when failing to unregister slot

"overlapping" is a leftover, let's drop it.

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


  Commit: 90ed4bcc3a15749c3c341e2a684f8f84e2251b67
      
https://github.com/qemu/qemu/commit/90ed4bcc3a15749c3c341e2a684f8f84e2251b67
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

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

  Log Message:
  -----------
  kvm: region_add and region_del is not called on updates

Attributes are not updated via region_add()/region_del(). Attribute changes
lead to a delete first, followed by a new add.

If this would ever not be the case, we would get an error when trying to
register the new slot.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Tested-by: Joe Clifford <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a6ffc4232ab649ea91bd951f8c4f9cc598a66fd6
      
https://github.com/qemu/qemu/commit/a6ffc4232ab649ea91bd951f8c4f9cc598a66fd6
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

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

  Log Message:
  -----------
  kvm: simplify kvm_align_section()

Use ROUND_UP and simplify the code a bit.

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


  Commit: 279836f8190fd9d6428324414ee802c38c09fbc5
      
https://github.com/qemu/qemu/commit/279836f8190fd9d6428324414ee802c38c09fbc5
  Author: David Hildenbrand <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: reuse section_from_flat_range()

We can use section_from_flat_range() instead of manually initializing.

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


  Commit: ad52878f97610757390148fe5d5b4cc5ad15c585
      
https://github.com/qemu/qemu/commit/ad52878f97610757390148fe5d5b4cc5ad15c585
  Author: Andrew Baumann <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  notdirty_mem_write: implement 8-byte accesses

Aligned 8-byte memory writes by a 64-bit target on a 64-bit host should
always turn into atomic 8-byte writes on the host, however if we missed
in the softmmu, and the TLB line was marked as not dirty, then we
would end up tearing the 8-byte write into two 4-byte writes in
access_with_adjusted_size().

Signed-off-by: Andrew Baumann <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 306526b5de6984a164548572fd04d898dd6adbaa
      
https://github.com/qemu/qemu/commit/306526b5de6984a164548572fd04d898dd6adbaa
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  watch_mem_write: implement 8-byte accesses

Aligned 8-byte memory writes by a 64-bit target on a 64-bit host should
always turn into atomic 8-byte writes on the host, however a write
write watchpoint would end up tearing the 8-byte write into two 4-byte
writes in access_with_adjusted_size().

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


  Commit: b3f1c8c413bc83e4a2cc7a63e4eddf9fe6449052
      
https://github.com/qemu/qemu/commit/b3f1c8c413bc83e4a2cc7a63e4eddf9fe6449052
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M configure
    M scsi/qemu-pr-helper.c

  Log Message:
  -----------
  qemu-pr-helper: use new libmultipath API

libmultipath has recently changed its API.  The new API supports multi-threaded
clients better.  Unfortunately there is no backwards-compatibility, so we just
switch to the new one.  Running QEMU compiled with the new library on the old
library will likely crash, while doing the opposite will cause QEMU not to
start at all (because udev, get_multipath_config and put_multipath_config
are undefined).

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


  Commit: 04162f8f4bcf8c9ae2422def4357289b44208c8c
      
https://github.com/qemu/qemu/commit/04162f8f4bcf8c9ae2422def4357289b44208c8c
  Author: Michael Roth <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M hw/core/qdev.c
    M include/hw/qdev-core.h

  Log Message:
  -----------
  qdev: store DeviceState's canonical path to use when unparenting

device_unparent(dev, ...) is called when a device is unparented,
either directly, or as a result of a parent device being
finalized, and handles some final cleanup for the device. Part
of this includes emiting a DEVICE_DELETED QMP event to notify
management, which includes the device's path in the composition
tree as provided by object_get_canonical_path().

object_get_canonical_path() assumes the device is still connected
to the machine/root container, and will assert otherwise, but
in some situations this isn't the case:

If the parent is finalized as a result of object_unparent(), it
will still be attached to the composition tree at the time any
children are unparented as a result of that same call to
object_unparent(). However, in some cases, object_unparent()
will complete without finalizing the parent device, due to
lingering references that won't be released till some time later.
One such example is if the parent has MemoryRegion children (which
take a ref on their parent), who in turn have AddressSpace's (which
take a ref on their regions), since those AddressSpaces get cleaned
up asynchronously by the RCU thread.

In this case qdev:device_unparent() may be called for a child Device
that no longer has a path to the root/machine container, causing
object_get_canonical_path() to assert.

Fix this by storing the canonical path during realize() so the
information will still be available for device_unparent() in such
cases.

Cc: Michael S. Tsirkin <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
Tested-by: Eric Auger <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
[Clear dev->canonical_path at the post_realize_fail label, which is
 cleaner.  Suggested by David Gibson. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2fc06c4ac65594ad248e9a9150ebdde9ff5a1253
      
https://github.com/qemu/qemu/commit/2fc06c4ac65594ad248e9a9150ebdde9ff5a1253
  Author: Michael Roth <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M hw/core/qdev.c

  Log Message:
  -----------
  Revert "qdev: Free QemuOpts when the QOM path goes away"

This reverts commit abed886ec60cf239a03515cf0b30fb11fa964c44.

This patch originally addressed an issue where a DEVICE_DELETED
event could be emitted (in device_unparent()) before a Device's
QemuOpts were cleaned up (in device_finalize()), leading to a
"duplicate ID" error if management attempted to immediately add
a device with the same ID in response to the DEVICE_DELETED event.

An alternative will be implemented in a subsequent patch where we
defer the DEVICE_DELETED event until device_finalize(), which would
also prevent the race, so we revert the original fix in preparation.

Signed-off-by: Michael Roth <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Tested-by: Eric Auger <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f7b879e072ae6839b1b1d1312f48fa7f256397e2
      
https://github.com/qemu/qemu/commit/f7b879e072ae6839b1b1d1312f48fa7f256397e2
  Author: Michael Roth <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M hw/core/qdev.c

  Log Message:
  -----------
  qdev: defer DEVICE_DEL event until instance_finalize()

DEVICE_DEL is currently emitted when a Device is unparented, as
opposed to when it is finalized. The main design motivation for this
seems to be that after unparent()/unrealize(), the Device is no
longer visible to the guest, and thus the operation is complete
from the perspective of management.

However, there are cases where remaining host-side cleanup is also
pertinent to management. The is generally handled by treating these
resources as aspects of the "backend", which can be managed via
separate interfaces/events, such as blockdev_add/del, netdev_add/del,
object_add/del, etc, but some devices do not have this level of
compartmentalization, namely vfio-pci, and possibly to lend themselves
well to it.

In the case of vfio-pci, the "backend" cleanup happens as part of
the finalization of the vfio-pci device itself, in particular the
cleanup of the VFIO group FD. Failing to wait for this cleanup can
result in tools like libvirt attempting to rebind the device to
the host while it's still being used by VFIO, which can result in
host crashes or other misbehavior depending on the host driver.

Deferring DEVICE_DEL still affords us the ability to manage backends
explicitly, while also addressing cases like vfio-pci's, so we
implement that approach here.

An alternative proposal involving having VFIO emit a separate event
to denote completion of host-side cleanup was discussed, but the
prevailing opinion seems to be that it is not worth the added
complexity, and leaves the issue open for other Device implementations
to solve in the future.

Signed-off-by: Michael Roth <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Tested-by: Eric Auger <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3da023b5827543ee4c022986ea2ad9d1274410b2
      
https://github.com/qemu/qemu/commit/3da023b5827543ee4c022986ea2ad9d1274410b2
  Author: Mark Kanda <address@hidden>
  Date:   2017-10-18 (Wed, 18 Oct 2017)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi: reject configurations with logical block size > physical block size

Logical block size of a SCSI disk should never be larger than
physical block size. From an ATA/SCSI perspective, it makes no sense
to have the logical block size greater than the physical block size,
and it cannot even be effectively expressed in the command set. The
whole point of adding the physical block size to the ATA/SCSI command
set was to communicate a desire for a larger block size (than logical),
while maintaining backwards compatibility with legacy 512 byte block
size.

When setting logical_block_size > physical_block_size, QEMU cannot express
it in READ CAPACITY(16) output, and all it can do is set the physical
block exponent to 0 (i.e. logical_block_size == physical_block_size).
Reporting the error properly, however, is better.

Signed-off-by: Mark Kanda <address@hidden>
Reviewed-by: Konrad Rzeszutek Wilk <address@hidden>
Reviewed-by: Martin K. Petersen <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a8b392ac9a158ff26cbbc2c2d205c370c35f64a2
      
https://github.com/qemu/qemu/commit/a8b392ac9a158ff26cbbc2c2d205c370c35f64a2
  Author: Peter Maydell <address@hidden>
  Date:   2017-10-19 (Thu, 19 Oct 2017)

  Changed paths:
    M Makefile.target
    M accel/kvm/kvm-all.c
    M chardev/char-socket.c
    M configure
    M default-configs/ppc-linux-user.mak
    M default-configs/ppc-softmmu.mak
    M default-configs/ppc64-linux-user.mak
    M default-configs/ppc64-softmmu.mak
    M default-configs/ppc64abi32-linux-user.mak
    M default-configs/ppc64le-linux-user.mak
    M default-configs/ppcemb-softmmu.mak
    M disas.c
    A docs/devel/loads-stores.rst
    M exec.c
    M hw/acpi/tco.c
    M hw/acpi/trace-events
    M hw/core/qdev.c
    M hw/i386/pc.c
    M hw/ide/core.c
    M hw/ide/qdev.c
    M hw/scsi/scsi-disk.c
    M include/disas/bfd.h
    M include/hw/ide/internal.h
    M include/hw/qdev-core.h
    A libdecnumber/Makefile.objs
    M memory.c
    M scripts/checkpatch.pl
    M scsi/qemu-pr-helper.c
    M target/i386/translate.c
    M target/nios2/translate.c
    M target/ppc/Makefile.objs

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

* TCG 8-byte atomic accesses bugfix (Andrew)
* Report disk rotation rate (Daniel)
* Report invalid scsi-disk block size configuration (Mark)
* KVM and memory API MemoryListener fixes (David, Maxime, Peter Xu)
* x86 CPU hotplug crash fix (Igor)
* Load/store API documentation (Peter Maydell)
* Small fixes by myself and Thomas
* qdev DEVICE_DELETED deferral (Michael)

# gpg: Signature made Wed 18 Oct 2017 10:56:24 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: (29 commits)
  scsi: reject configurations with logical block size > physical block size
  qdev: defer DEVICE_DEL event until instance_finalize()
  Revert "qdev: Free QemuOpts when the QOM path goes away"
  qdev: store DeviceState's canonical path to use when unparenting
  qemu-pr-helper: use new libmultipath API
  watch_mem_write: implement 8-byte accesses
  notdirty_mem_write: implement 8-byte accesses
  memory: reuse section_from_flat_range()
  kvm: simplify kvm_align_section()
  kvm: region_add and region_del is not called on updates
  kvm: fix error message when failing to unregister slot
  kvm: tolerate non-existing slot for log_start/log_stop/log_sync
  kvm: fix alignment of ram address
  memory: call log_start after region_add
  target/i386: trap on instructions longer than >15 bytes
  target/i386: introduce x86_ld*_code
  tco: add trace events
  docs/devel/loads-stores.rst: Document our various load and store APIs
  nios2: define tcg_env
  build: remove CONFIG_LIBDECNUMBER
  ...

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


Compare: https://github.com/qemu/qemu/compare/f2a48d696c12...a8b392ac9a15

reply via email to

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