qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] b4510b: tests: add qtest_qmp_device_add_qdict


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] b4510b: tests: add qtest_qmp_device_add_qdict() helper
Date: Fri, 18 Oct 2019 02:56:13 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b4510bb4109f5fad478fb238b0ab11be7d2bc2fd
      
https://github.com/qemu/qemu/commit/b4510bb4109f5fad478fb238b0ab11be7d2bc2fd
  Author: Igor Mammedov <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

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

  Log Message:
  -----------
  tests: add qtest_qmp_device_add_qdict() helper

Add an API that takes QDict directly, so users could skip steps
of first building json dictionary and converting it back to
QDict in existing qtest_qmp_device_add() and instead use QDict
directly without intermediate conversion.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 021a007efc31d99416335f73a3c8f1b9183e0047
      
https://github.com/qemu/qemu/commit/021a007efc31d99416335f73a3c8f1b9183e0047
  Author: Igor Mammedov <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M tests/cpu-plug-test.c

  Log Message:
  -----------
  tests: cpu-plug-test: fix device_add for pc/q35 machines

Commit bc1fb850a3 silently broke device_add test for CPU hotplug which
resulted in test successfully passing though it wasn't actually run.
Fix it by making sure that all non present CPUs reported
by "query-hotpluggable-cpus" are hotplugged instead of making up
and hardcoding values.

Use of query-hotpluggable-cpus also allows consolidatiate device_add
cpu testcases and reuse the same test function for all targets.

While at it also add a check that at least one CPU was hotplugged,
to avoid silent breakage in the future.

Fixes: bc1fb850a3 (vl.c deprecate incorrect CPUs topology)
Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 0533ef5f2089f4f12a0ec5c8035e5e15ba0b5556
      
https://github.com/qemu/qemu/commit/0533ef5f2089f4f12a0ec5c8035e5e15ba0b5556
  Author: Tao Xu <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/core/numa.c
    M hw/ppc/spapr.c
    M include/hw/boards.h

  Log Message:
  -----------
  numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node

Add MachineClass::auto_enable_numa field. When it is true, a NUMA node
is expected to be created implicitly.

Acked-by: David Gibson <address@hidden>
Suggested-by: Igor Mammedov <address@hidden>
Suggested-by: Eduardo Habkost <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Tao Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 217e8ef9c975fee3aa823391cd1d2fd24d6a546e
      
https://github.com/qemu/qemu/commit/217e8ef9c975fee3aa823391cd1d2fd24d6a546e
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/acpi/piix4.c

  Log Message:
  -----------
  hw/acpi/piix4: Convert reset handler to DeviceReset

The PIIX4/PM is a PCI device within the PIIX4 chipset, it will be reset
when the PCI bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Li Qiang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: fd52c20f2c58152f6f23bed658474ae1d1a2fe52
      
https://github.com/qemu/qemu/commit/fd52c20f2c58152f6f23bed658474ae1d1a2fe52
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/isa/piix4.c

  Log Message:
  -----------
  hw/isa/piix4: Convert reset handler to DeviceReset

The PIIX4/ISA is a PCI device within the PIIX4 chipset, it will be reset
when the PCI bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: ee358e919e385fdc79d59d0d47b4a81e349cd5c9
      
https://github.com/qemu/qemu/commit/ee358e919e385fdc79d59d0d47b4a81e349cd5c9
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/ide/piix.c

  Log Message:
  -----------
  hw/ide/piix: Convert reset handler to DeviceReset

The PIIX/IDE is a PCI device within a PIIX chipset, it will be reset
when the PCI bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d96c81f9b8bdeb19417a54178759ac170f080cb2
      
https://github.com/qemu/qemu/commit/d96c81f9b8bdeb19417a54178759ac170f080cb2
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/ide/sii3112.c

  Log Message:
  -----------
  hw/ide/sii3112: Convert reset handler to DeviceReset

The SiI3112A SATA controller is a PCI device, it will be reset
when the PCI bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 71d3bacd7f77d06673041be3c50578807cd2555c
      
https://github.com/qemu/qemu/commit/71d3bacd7f77d06673041be3c50578807cd2555c
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/ide/via.c

  Log Message:
  -----------
  hw/ide/via82c: Convert reset handler to DeviceReset

The VIA82C686B IDE controller is a PCI device, it will be reset
when the PCI bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 9dc1a7699d52c9086950e7a64f0cbc657b70b645
      
https://github.com/qemu/qemu/commit/9dc1a7699d52c9086950e7a64f0cbc657b70b645
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/isa/vt82c686.c

  Log Message:
  -----------
  hw/isa/vt82c686: Convert reset handler to DeviceReset

The VIA VT82C686 Southbridge is a PCI device, it will be reset
when the PCI bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: f7030d0031d6a350d191178605b9c218457acbcd
      
https://github.com/qemu/qemu/commit/f7030d0031d6a350d191178605b9c218457acbcd
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/input/lm832x.c

  Log Message:
  -----------
  hw/input/lm832x: Convert reset handler to DeviceReset

The LM8323 key-scan controller is a I2C device, it will be reset
when the I2C bus it stands on is reset.

Convert its reset handler into a proper Device reset method.

Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 88552b16f2a11a51323b8a4d643e73332d89d7ef
      
https://github.com/qemu/qemu/commit/88552b16f2a11a51323b8a4d643e73332d89d7ef
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/misc/vmcoreinfo.c

  Log Message:
  -----------
  hw/misc/vmcoreinfo: Add comment about reset handler

The VM coreinfo device does not sit on a bus, so it won't be
reset automatically. This is why it calls qemu_register_reset().

Add a comment about it, so we don't convert its reset handler
to a DeviceReset method.

Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Li Qiang <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: fc2db8501f3bfa57000c625c1f8b304e4a15976e
      
https://github.com/qemu/qemu/commit/fc2db8501f3bfa57000c625c1f8b304e4a15976e
  Author: Wei Yang <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/mem/memory-device.c

  Log Message:
  -----------
  memory-device: not necessary to use goto for the last check

We are already at the last condition check.

Signed-off-by: Wei Yang <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 64afc7c32bf1634df9d9ff77efbc39225400744a
      
https://github.com/qemu/qemu/commit/64afc7c32bf1634df9d9ff77efbc39225400744a
  Author: Wei Yang <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M hw/mem/memory-device.c

  Log Message:
  -----------
  memory-device: break the loop if tmp exceed the hinted range

The memory-device list built by memory_device_build_list is ordered by
its address, this means if the tmp range exceed the hinted range, all
the following range will not overlap with it.

And this won't change default pc-dimm mapping and address assignment stay
the same as before this change.

Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: f2be0bebb6f5d5436079d8c28f07da891082d753
      
https://github.com/qemu/qemu/commit/f2be0bebb6f5d5436079d8c28f07da891082d753
  Author: Tao Xu <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M target/i386/cpu.h

  Log Message:
  -----------
  target/i386: clean up comments over 80 chars per line

Add some comments, clean up comments over 80 chars per line. And there
is an extra line in comment of CPUID_8000_0008_EBX_WBNOINVD, remove
the extra enter and spaces.

Acked-by: Stefano Garzarella <address@hidden>
Signed-off-by: Tao Xu <address@hidden>
Message-Id: <address@hidden>
[ehabkost: rebase to latest git master]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: e7694a5eae34a31a5b240467b5201a7f31b7f96a
      
https://github.com/qemu/qemu/commit/e7694a5eae34a31a5b240467b5201a7f31b7f96a
  Author: Tao Xu <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/hvf/x86_cpuid.c

  Log Message:
  -----------
  target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro

Drop the duplicated definition of cpuid AVX512_VBMI macro and rename
it as CPUID_7_0_ECX_AVX512_VBMI. Rename CPUID_7_0_ECX_VBMI2 as
CPUID_7_0_ECX_AVX512_VBMI2.

Acked-by: Stefano Garzarella <address@hidden>
Signed-off-by: Tao Xu <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 76ecd7a514aa74b92dca807c60ca1e427e178fda
      
https://github.com/qemu/qemu/commit/76ecd7a514aa74b92dca807c60ca1e427e178fda
  Author: Bingsong Si <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  i386: Fix legacy guest with xsave panic on host kvm without update cpuid.

without kvm commit 412a3c41, CPUID(EAX=0xd,ECX=0).EBX always equal to 0 even
through guest update xcr0, this will crash legacy guest(e.g., CentOS 6).
Below is the call trace on the guest.

[    0.000000] kernel BUG at mm/bootmem.c:469!
[    0.000000] invalid opcode: 0000 [#1] SMP
[    0.000000] last sysfs file:
[    0.000000] CPU 0
[    0.000000] Modules linked in:
[    0.000000]
[    0.000000] Pid: 0, comm: swapper Tainted: G           --------------- H  
2.6.32-279#2 Red Hat KVM
[    0.000000] RIP: 0010:[<ffffffff81c4edc4>]  [<ffffffff81c4edc4>] 
alloc_bootmem_core+0x7b/0x29e
[    0.000000] RSP: 0018:ffffffff81a01cd8  EFLAGS: 00010046
[    0.000000] RAX: ffffffff81cb1748 RBX: ffffffff81cb1720 RCX: 0000000001000000
[    0.000000] RDX: 0000000000000040 RSI: 0000000000000000 RDI: ffffffff81cb1720
[    0.000000] RBP: ffffffff81a01d38 R08: 0000000000000000 R09: 0000000000001000
[    0.000000] R10: 02008921da802087 R11: 00000000ffff8800 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000001000000
[    0.000000] FS:  0000000000000000(0000) GS:ffff880002200000(0000) 
knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0018 ES: 0018 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 0000000001a85000 CR4: 00000000001406b0
[    0.000000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    0.000000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    0.000000] Process swapper (pid: 0, threadinfo ffffffff81a00000, task 
ffffffff81a8d020)
[    0.000000] Stack:
[    0.000000]  0000000000000002 81a01dd881eaf060 000000007e5fe227 
0000000000001001
[    0.000000] <d> 0000000000000040 0000000000000001 0000006cffffffff 
0000000001000000
[    0.000000] <d> ffffffff81cb1720 0000000000000000 0000000000000000 
0000000000000000
[    0.000000] Call Trace:
[    0.000000]  [<ffffffff81c4f074>] ___alloc_bootmem_nopanic+0x8d/0xca
[    0.000000]  [<ffffffff81c4f0cf>] ___alloc_bootmem+0x11/0x39
[    0.000000]  [<ffffffff81c4f172>] __alloc_bootmem+0xb/0xd
[    0.000000]  [<ffffffff814d42d9>] xsave_cntxt_init+0x249/0x2c0
[    0.000000]  [<ffffffff814e0689>] init_thread_xstate+0x17/0x25
[    0.000000]  [<ffffffff814e0710>] fpu_init+0x79/0xaa
[    0.000000]  [<ffffffff814e27e3>] cpu_init+0x301/0x344
[    0.000000]  [<ffffffff81276395>] ? sort+0x155/0x230
[    0.000000]  [<ffffffff81c30cf2>] trap_init+0x24e/0x25f
[    0.000000]  [<ffffffff81c2bd73>] start_kernel+0x21c/0x430
[    0.000000]  [<ffffffff81c2b33a>] x86_64_start_reservations+0x125/0x129
[    0.000000]  [<ffffffff81c2b438>] x86_64_start_kernel+0xfa/0x109
[    0.000000] Code: 03 48 89 f1 49 c1 e8 0c 48 0f af d0 48 c7 c6 00 a6 61 81 
48 c7 c7 00 e5 79 81 31 c0 4c 89 74 24 08 e8 f2 d7 89 ff 4d 85 e4 75 04 <0f> 0b 
eb fe 48 8b 45 c0 48 83 e8 01 48 85 45
c0 74 04 0f 0b eb

Signed-off-by: Bingsong Si <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: af95cafb877f563ed39ce8a5b2abe227dd5312fa
      
https://github.com/qemu/qemu/commit/af95cafb877f563ed39ce8a5b2abe227dd5312fa
  Author: Eduardo Habkost <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M target/i386/kvm.c

  Log Message:
  -----------
  i386: Omit all-zeroes entries from KVM CPUID table

KVM has a 80-entry limit at KVM_SET_CPUID2.  With the
introduction of CPUID[0x1F], it is now possible to hit this limit
with unusual CPU configurations, e.g.:

  $ ./x86_64-softmmu/qemu-system-x86_64 \
    -smp 1,dies=2,maxcpus=2 \
    -cpu EPYC,check=off,enforce=off \
    -machine accel=kvm
  qemu-system-x86_64: kvm_init_vcpu failed: Argument list too long

This happens because QEMU adds a lot of all-zeroes CPUID entries
for unused CPUID leaves.  In the example above, we end up
creating 48 all-zeroes CPUID entries.

KVM already returns all-zeroes when emulating the CPUID
instruction if an entry is missing, so the all-zeroes entries are
redundant.  Skip those entries.  This reduces the CPUID table
size by half while keeping CPUID output unchanged.

Reported-by: Yumei Huang <address@hidden>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1741508
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 69edb0f37a52053978de65a81241ef171a6f2396
      
https://github.com/qemu/qemu/commit/69edb0f37a52053978de65a81241ef171a6f2396
  Author: Xiaoyao Li <address@hidden>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386: Add Snowridge-v2 (no MPX) CPU model

Add new version of Snowridge CPU model that removes MPX feature.

MPX support is being phased out by Intel. GCC has dropped it, Linux kernel
and KVM are also going to do that in the future.

Signed-off-by: Xiaoyao Li <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


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

  Changed paths:
    M hw/acpi/piix4.c
    M hw/core/numa.c
    M hw/ide/piix.c
    M hw/ide/sii3112.c
    M hw/ide/via.c
    M hw/input/lm832x.c
    M hw/isa/piix4.c
    M hw/isa/vt82c686.c
    M hw/mem/memory-device.c
    M hw/misc/vmcoreinfo.c
    M hw/ppc/spapr.c
    M include/hw/boards.h
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/hvf/x86_cpuid.c
    M target/i386/kvm.c
    M tests/cpu-plug-test.c
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/ehabkost/tags/machine-next-pull-request' into staging

x86 and machine queue, 2019-10-15

Features:
* Snowridge-v2 (no MPX) CPU model (Xiaoyao Li)

Bug fixes:
* cpu-plug-test: fix device_add for pc/q35 machines (Igor Mammedov)
* Fix legacy guest with xsave panic on older Linux kernel (Bingsong Si)
* Omit all-zeroes entries from KVM CPUID table (Eduardo Habkost)

Cleanups:
* Convert reset handlers to DeviceReset (Philippe Mathieu-Daudé)
* MachineClass::auto_enable_numa field (Tao Xu)
* target/i386/cpu.h cleanups (Tao Xu)
* memory_device_get_free_addr() cleanups (Wei Yang)

# gpg: Signature made Tue 15 Oct 2019 22:35:43 BST
# gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Eduardo Habkost <address@hidden>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/machine-next-pull-request:
  target/i386: Add Snowridge-v2 (no MPX) CPU model
  i386: Omit all-zeroes entries from KVM CPUID table
  i386: Fix legacy guest with xsave panic on host kvm without update cpuid.
  target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro
  target/i386: clean up comments over 80 chars per line
  memory-device: break the loop if tmp exceed the hinted range
  memory-device: not necessary to use goto for the last check
  hw/misc/vmcoreinfo: Add comment about reset handler
  hw/input/lm832x: Convert reset handler to DeviceReset
  hw/isa/vt82c686: Convert reset handler to DeviceReset
  hw/ide/via82c: Convert reset handler to DeviceReset
  hw/ide/sii3112: Convert reset handler to DeviceReset
  hw/ide/piix: Convert reset handler to DeviceReset
  hw/isa/piix4: Convert reset handler to DeviceReset
  hw/acpi/piix4: Convert reset handler to DeviceReset
  numa: Introduce MachineClass::auto_enable_numa for implicit NUMA node
  tests: cpu-plug-test: fix device_add for pc/q35 machines
  tests: add qtest_qmp_device_add_qdict() helper

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


Compare: https://github.com/qemu/qemu/compare/f22f553efffd...d52932ed34e6



reply via email to

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