[Qemu-devel] [PULL v2 00/34] Misc patches for 2016-06-01

Paolo Bonzini posted 34 patches 6 years, 10 months ago
Only 2 patches received!
.gitignore                                |   1 +
Makefile                                  |   3 +
Makefile.objs                             |   4 +
block/nbd-client.c                        |  41 +-
configure                                 |   4 +-
contrib/libvhost-user/libvhost-user.h     |  11 +-
contrib/vhost-user-scsi/Makefile.objs     |   1 +
contrib/vhost-user-scsi/vhost-user-scsi.c | 886 ++++++++++++++++++++++++++++++
cpus.c                                    |   2 +-
default-configs/pci.mak                   |   1 +
default-configs/s390x-softmmu.mak         |   1 +
exec.c                                    |  27 +-
gdb-xml/i386-32bit-sse.xml                |  52 ++
gdb-xml/i386-32bit.xml                    |  14 +
gdb-xml/i386-64bit-sse.xml                |  60 ++
gdb-xml/i386-64bit.xml                    |  14 +
hw/core/Makefile.objs                     |   2 +-
hw/i386/kvm/clock.c                       |   3 +
hw/misc/edu.c                             |  12 +-
hw/pci/msix.c                             |  11 +-
hw/pci/trace-events                       |   3 +
hw/scsi/Makefile.objs                     |   1 +
hw/scsi/vhost-scsi-common.c               |   1 -
hw/scsi/vhost-user-scsi.c                 | 211 +++++++
hw/scsi/virtio-scsi.c                     |   3 +
hw/timer/mc146818rtc.c                    | 203 ++++---
hw/virtio/virtio-pci.c                    |  54 ++
hw/virtio/virtio-pci.h                    |  11 +
include/block/nbd.h                       |   8 +-
include/hw/timer/mc146818rtc_regs.h       |  20 +
include/hw/virtio/vhost-user-scsi.h       |  35 ++
include/hw/virtio/virtio-scsi.h           |   2 +
kvm-all.c                                 |   8 +-
nbd/client.c                              | 125 ++---
nbd/common.c                              |  23 +-
nbd/nbd-internal.h                        |  40 +-
nbd/server.c                              | 100 ++--
pc-bios/linuxboot_dma.bin                 | Bin 1536 -> 1536 bytes
pc-bios/optionrom/Makefile                |   1 +
qemu-nbd.c                                |   5 +-
target/i386/arch_memory_mapping.c         |  18 +-
target/i386/cpu.c                         |  23 +-
target/i386/cpu.h                         |  20 +-
target/i386/helper.c                      |  96 ++--
target/i386/kvm.c                         |  36 +-
target/i386/machine.c                     |   4 -
target/i386/smm_helper.c                  |  18 -
target/i386/translate.c                   |  12 +
tests/qemu-iotests/083.out                |   2 +
tests/rtc-test.c                          |  49 ++
trace-events                              |   3 +-
util/oslib-posix.c                        |   4 +-
util/qemu-sockets.c                       |  68 ++-
53 files changed, 1956 insertions(+), 401 deletions(-)
create mode 100644 contrib/vhost-user-scsi/Makefile.objs
create mode 100644 contrib/vhost-user-scsi/vhost-user-scsi.c
create mode 100644 gdb-xml/i386-32bit-sse.xml
create mode 100644 gdb-xml/i386-32bit.xml
create mode 100644 gdb-xml/i386-64bit-sse.xml
create mode 100644 gdb-xml/i386-64bit.xml
create mode 100644 hw/scsi/vhost-user-scsi.c
create mode 100644 include/hw/virtio/vhost-user-scsi.h
[Qemu-devel] [PULL v2 00/34] Misc patches for 2016-06-01
Posted by Paolo Bonzini 6 years, 10 months ago
The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab:

  Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging (2017-05-18 13:36:15 +0100)

are available in the git repository at:

  git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to f3c3ad2dc98c6610152355f6a4de1445efc87421:

  cpus: reset throttle_thread_scheduled after sleep (2017-06-01 18:01:05 +0200)

----------------------------------------------------------------
* virtio-scsi use-after-free fix (Fam)
* vhost-user-scsi support (Felipe)
* SMM fixes and improvements for TCG (myself, Mihail)
* irqchip and AddressSpaceDispatch cleanups and fixes (Peter)
* Coverity fix (Stefano)
* NBD cleanups and fixes (Vladimir, Eric, myself)
* RTC accuracy improvements and code cleanups (Guangrong+Yunfang)
* socket error reporting improvement (Daniel)
* GDB XML description for SSE registers (Abdallah)
* kvmclock update fix (Denis)
* SMM memory savings (Gonglei)
* -cpu 486 fix (Paolo)
* various bugfixes (Roman, Peter, myself, Thomas)
* rtc-test improvement (Guangrong)
* migration throttling fix (Felipe)

----------------------------------------------------------------

Fixed patchew build failure, added another patch.

Abdallah Bouassida (1):
      target/i386: Add GDB XML description for SSE registers

Daniel P. Berrange (1):
      sockets: improve error reporting if UNIX socket path is too long

Denis Plotnikov (1):
      kvmclock: update system_time_msr address forcibly

Eric Blake (1):
      nbd: Fully initialize client in case of failed negotiation

Fam Zheng (1):
      virtio-scsi: Unset hotplug handler when unrealize

Felipe Franciosi (3):
      vhost-user-scsi: Introduce vhost-user-scsi host device
      vhost-user-scsi: Introduce a vhost-user-scsi sample application
      cpus: reset throttle_thread_scheduled after sleep

Gonglei (1):
      kvm: don't register smram_listener when smm is off

Mihail Abakumov (1):
      i386: fix read/write cr with icount option

Paolo Bonzini (5):
      target/i386: enable A20 automatically in system management mode
      target/i386: use multiple CPU AddressSpaces
      linuxboot_dma: compile for i486
      edu: fix memory leak on msi_broken platforms
      nbd: make it thread-safe, fix qcow2 over nbd

Peter Xu (5):
      kvm: irqchip: trace changes on msi add/remove
      msix: trace control bit write op
      kvm: irqchip: skip update msi when disabled
      exec: simplify phys_page_find() params
      exec: fix address_space_get_iotlb_entry page mask

Roman Pen (1):
      i386/kvm: do not zero out segment flags if segment is unusable or not present

Stefano Stabellini (1):
      Check the return value of fcntl in qemu_set_cloexec

Tai Yunfang (1):
      mc146818rtc: precisely count the clock for periodic timer

Thomas Huth (1):
      hw/core: nmi.c can be compiled as common-obj nowadays

Vladimir Sementsov-Ogievskiy (5):
      nbd: strict nbd_wr_syncv
      nbd: read_sync and friends: return 0 on success
      nbd: add errp parameter to nbd_wr_syncv()
      nbd: add errp to read_sync, write_sync and drop_sync
      nbd/client.c: use errp instead of LOG

Xiao Guangrong (5):
      mc146818rtc: update periodic timer only if it is needed
      mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386
      mc146818rtc: drop unnecessary '#ifdef TARGET_I386'
      mc146818rtc: embrace all x86 specific code
      qtest: add rtc periodic timer test

 .gitignore                                |   1 +
 Makefile                                  |   3 +
 Makefile.objs                             |   4 +
 block/nbd-client.c                        |  41 +-
 configure                                 |   4 +-
 contrib/libvhost-user/libvhost-user.h     |  11 +-
 contrib/vhost-user-scsi/Makefile.objs     |   1 +
 contrib/vhost-user-scsi/vhost-user-scsi.c | 886 ++++++++++++++++++++++++++++++
 cpus.c                                    |   2 +-
 default-configs/pci.mak                   |   1 +
 default-configs/s390x-softmmu.mak         |   1 +
 exec.c                                    |  27 +-
 gdb-xml/i386-32bit-sse.xml                |  52 ++
 gdb-xml/i386-32bit.xml                    |  14 +
 gdb-xml/i386-64bit-sse.xml                |  60 ++
 gdb-xml/i386-64bit.xml                    |  14 +
 hw/core/Makefile.objs                     |   2 +-
 hw/i386/kvm/clock.c                       |   3 +
 hw/misc/edu.c                             |  12 +-
 hw/pci/msix.c                             |  11 +-
 hw/pci/trace-events                       |   3 +
 hw/scsi/Makefile.objs                     |   1 +
 hw/scsi/vhost-scsi-common.c               |   1 -
 hw/scsi/vhost-user-scsi.c                 | 211 +++++++
 hw/scsi/virtio-scsi.c                     |   3 +
 hw/timer/mc146818rtc.c                    | 203 ++++---
 hw/virtio/virtio-pci.c                    |  54 ++
 hw/virtio/virtio-pci.h                    |  11 +
 include/block/nbd.h                       |   8 +-
 include/hw/timer/mc146818rtc_regs.h       |  20 +
 include/hw/virtio/vhost-user-scsi.h       |  35 ++
 include/hw/virtio/virtio-scsi.h           |   2 +
 kvm-all.c                                 |   8 +-
 nbd/client.c                              | 125 ++---
 nbd/common.c                              |  23 +-
 nbd/nbd-internal.h                        |  40 +-
 nbd/server.c                              | 100 ++--
 pc-bios/linuxboot_dma.bin                 | Bin 1536 -> 1536 bytes
 pc-bios/optionrom/Makefile                |   1 +
 qemu-nbd.c                                |   5 +-
 target/i386/arch_memory_mapping.c         |  18 +-
 target/i386/cpu.c                         |  23 +-
 target/i386/cpu.h                         |  20 +-
 target/i386/helper.c                      |  96 ++--
 target/i386/kvm.c                         |  36 +-
 target/i386/machine.c                     |   4 -
 target/i386/smm_helper.c                  |  18 -
 target/i386/translate.c                   |  12 +
 tests/qemu-iotests/083.out                |   2 +
 tests/rtc-test.c                          |  49 ++
 trace-events                              |   3 +-
 util/oslib-posix.c                        |   4 +-
 util/qemu-sockets.c                       |  68 ++-
 53 files changed, 1956 insertions(+), 401 deletions(-)
 create mode 100644 contrib/vhost-user-scsi/Makefile.objs
 create mode 100644 contrib/vhost-user-scsi/vhost-user-scsi.c
 create mode 100644 gdb-xml/i386-32bit-sse.xml
 create mode 100644 gdb-xml/i386-32bit.xml
 create mode 100644 gdb-xml/i386-64bit-sse.xml
 create mode 100644 gdb-xml/i386-64bit.xml
 create mode 100644 hw/scsi/vhost-user-scsi.c
 create mode 100644 include/hw/virtio/vhost-user-scsi.h
-- 
2.13.0


Re: [Qemu-devel] [PULL v2 00/34] Misc patches for 2016-06-01
Posted by Peter Maydell 6 years, 10 months ago
On 1 June 2017 at 18:07, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab:
>
>   Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging (2017-05-18 13:36:15 +0100)
>
> are available in the git repository at:
>
>   git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to f3c3ad2dc98c6610152355f6a4de1445efc87421:
>
>   cpus: reset throttle_thread_scheduled after sleep (2017-06-01 18:01:05 +0200)
>
> ----------------------------------------------------------------
> * virtio-scsi use-after-free fix (Fam)
> * vhost-user-scsi support (Felipe)
> * SMM fixes and improvements for TCG (myself, Mihail)
> * irqchip and AddressSpaceDispatch cleanups and fixes (Peter)
> * Coverity fix (Stefano)
> * NBD cleanups and fixes (Vladimir, Eric, myself)
> * RTC accuracy improvements and code cleanups (Guangrong+Yunfang)
> * socket error reporting improvement (Daniel)
> * GDB XML description for SSE registers (Abdallah)
> * kvmclock update fix (Denis)
> * SMM memory savings (Gonglei)
> * -cpu 486 fix (Paolo)
> * various bugfixes (Roman, Peter, myself, Thomas)
> * rtc-test improvement (Guangrong)
> * migration throttling fix (Felipe)

Test failure on OSX:

TEST: tests/device-introspect-test... (pid=66373)
  /aarch64/device/introspect/list:                                     OK
  /aarch64/device/introspect/none:                                     OK
  /aarch64/device/introspect/abstract:                                 OK
  /aarch64/device/introspect/concrete:                                 **
ERROR:/root/qemu/qom/object.c:364:object_initialize_with_type:
assertion failed: (type != NULL)
Broken pipe

Test failures on FreeBSD:
  GTESTER check-qtest-aarch64
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S8983f4bd019deabaf27dbf8281490ab9
  GTESTER check-qtest-alpha
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S5ba80c00f420a9cbe79b7926bc90901c
  GTESTER check-qtest-arm
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S9a3f10d16d54467f421a79a355a25714
  GTESTER check-qtest-cris
  GTESTER check-qtest-i386
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S29797c8935576bfd6237cce3e02075c9
  GTESTER check-qtest-lm32
  GTESTER check-qtest-m68k
  GTESTER check-qtest-microblaze
  GTESTER check-qtest-microblazeel
  GTESTER check-qtest-mips
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S1d5b7d14f648cc07be3bfc003b7c66a2
  GTESTER check-qtest-mips64
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S6c9d59bd8f80319effd07c498108c129
  GTESTER check-qtest-mips64el
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S530b42302d04c589e6a5f1fc49268dcb
  GTESTER check-qtest-mipsel
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S404f19f557f26102621573b7b8641871
  GTESTER check-qtest-moxie
  GTESTER check-qtest-nios2
  GTESTER check-qtest-or1k
  GTESTER check-qtest-ppc
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S8a9874d645fde55f36b7df0204c82959
  GTESTER check-qtest-ppc64
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S1bf51dd7caadd650ac3be82bd21cbae5
  GTESTER check-qtest-ppcemb
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02Sbb3adb4867092ddb73e7fc0ecfe68c96
  GTESTER check-qtest-s390x
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S2e85df237abb737f12c5aba4c0592c41
  GTESTER check-qtest-sh4
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S36667c3c9283bf56a54f105edfd951c4
  GTESTER check-qtest-sh4eb
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S7a8f453c29b24767afcbf5af6c890072
  GTESTER check-qtest-sparc
  GTESTER check-qtest-sparc64
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02Scf61ab29a9f9630cf0661370bca2f09d
  GTESTER check-qtest-tricore
  GTESTER check-qtest-unicore32
  GTESTER check-qtest-x86_64
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
"kvm" accelerator not found.
**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
GTester: last random seed: R02S1639c5bd5af52de8b1b097d44666b889
  GTESTER check-qtest-xtensa
  GTESTER check-qtest-xtensaeb

(Yes, the test's error messages are pretty useless.)

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/34] Misc patches for 2016-06-01
Posted by Peter Maydell 6 years, 10 months ago
On 1 June 2017 at 18:53, Peter Maydell <peter.maydell@linaro.org> wrote:
> Test failure on OSX:
>
> TEST: tests/device-introspect-test... (pid=66373)
>   /aarch64/device/introspect/list:                                     OK
>   /aarch64/device/introspect/none:                                     OK
>   /aarch64/device/introspect/abstract:                                 OK
>   /aarch64/device/introspect/concrete:                                 **
> ERROR:/root/qemu/qom/object.c:364:object_initialize_with_type:
> assertion failed: (type != NULL)
> Broken pipe

Got those the wrong way round -- this is the FreeBSD failure
and the other lot are OSX. Pretty sure it's the same error,
though -- it's just that for some reason my OSX setup doesn't
actually cause make to exit with an error when a test fails,
so it goes on to hit what's probably the same bug in all the
other check-qtest-$ARCH targets rather than bailing out.

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/34] Misc patches for 2016-06-01
Posted by Paolo Bonzini 6 years, 10 months ago
On 01/06/2017 19:56, Peter Maydell wrote:
> On 1 June 2017 at 18:53, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Test failure on OSX:
>>
>> TEST: tests/device-introspect-test... (pid=66373)
>>   /aarch64/device/introspect/list:                                     OK
>>   /aarch64/device/introspect/none:                                     OK
>>   /aarch64/device/introspect/abstract:                                 OK
>>   /aarch64/device/introspect/concrete:                                 **
>> ERROR:/root/qemu/qom/object.c:364:object_initialize_with_type:
>> assertion failed: (type != NULL)
>> Broken pipe
> 
> Got those the wrong way round -- this is the FreeBSD failure
> and the other lot are OSX. Pretty sure it's the same error,
> though -- it's just that for some reason my OSX setup doesn't
> actually cause make to exit with an error when a test fails,
> so it goes on to hit what's probably the same bug in all the
> other check-qtest-$ARCH targets rather than bailing out.

Thanks, any chance you can bisect these?  I'll install a FreeBSD VM next
week.

Paolo

Re: [Qemu-devel] [PULL v2 00/34] Misc patches for 2016-06-01
Posted by Peter Maydell 6 years, 10 months ago
On 2 June 2017 at 09:06, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 01/06/2017 19:56, Peter Maydell wrote:
>> On 1 June 2017 at 18:53, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> Test failure on OSX:
>>>
>>> TEST: tests/device-introspect-test... (pid=66373)
>>>   /aarch64/device/introspect/list:                                     OK
>>>   /aarch64/device/introspect/none:                                     OK
>>>   /aarch64/device/introspect/abstract:                                 OK
>>>   /aarch64/device/introspect/concrete:                                 **
>>> ERROR:/root/qemu/qom/object.c:364:object_initialize_with_type:
>>> assertion failed: (type != NULL)
>>> Broken pipe
>>
>> Got those the wrong way round -- this is the FreeBSD failure
>> and the other lot are OSX. Pretty sure it's the same error,
>> though -- it's just that for some reason my OSX setup doesn't
>> actually cause make to exit with an error when a test fails,
>> so it goes on to hit what's probably the same bug in all the
>> other check-qtest-$ARCH targets rather than bailing out.
>
> Thanks, any chance you can bisect these?  I'll install a FreeBSD VM next
> week.

No bisection, but using QTEST_LOG:

QTEST_LOG=1 QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64
QTEST_QEMU_IMG=qemu-img MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM %
255 + 1))} gtester -k --verbose -m=quick tests/device-introspect-test
-p=/aarch64/device/introspect/concrete
[...]
{"return": "/machine (none-machine)\r\n  /peripheral (container)\r\n
/peripheral-anon (container)\r\n  /unattached (container)\r\n
/io[0] (qemu:memory-region)\r\n    /sysbus (System)\r\n    /system[0]
(qemu:memory-region)\r\n"}{"execute": "device-list-properties",
"arguments": {"typename": "vhost-user-scsi-pci"}}

**
ERROR:/Users/pm215/src/qemu-for-merges/qom/object.c:364:void
object_initialize_with_type(void *, size_t, TypeImpl *): assertion
failed: (type != NULL)
Broken pipe
FAIL

suggests that there's a bug in the new vhost-user-scsi-pci
device. Specifically in commit 550811c37e0f2
("vhost-user-scsi: Introduce vhost-user-scsi host device")
hw/virtio/virtio-pci.c is changed to unconditionally call
type_register_static(&vhost_user_scsi_pci_info), whose
instance_init method tries to use TYPE_VHOST_USER_SCSI,
but hw/scsi/vhost-user-scsi.c (where that type is defined)
is only compiled if CONFIG_VHOST_USER_SCSI is set (which
only happens for Linux).

thanks
-- PMM