qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 3a7a27: target/i386: Remove LBREn bit check w


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 3a7a27: target/i386: Remove LBREn bit check when access Ar...
Date: Wed, 25 May 2022 15:18:40 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3a7a27cffb5ed50840e26a2567e187b17958cc64
      
https://github.com/qemu/qemu/commit/3a7a27cffb5ed50840e26a2567e187b17958cc64
  Author: Yang Weijiang <weijiang.yang@intel.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M target/i386/kvm/kvm.c

  Log Message:
  -----------
  target/i386: Remove LBREn bit check when access Arch LBR MSRs

Live migration can happen when Arch LBR LBREn bit is cleared,
e.g., when migration happens after guest entered SMM mode.
In this case, we still need to migrate Arch LBR MSRs.

Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
Message-Id: <20220517155024.33270-1-weijiang.yang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f8d426a6852c560fdd8648ae961c8189909a4b82
      
https://github.com/qemu/qemu/commit/f8d426a6852c560fdd8648ae961c8189909a4b82
  Author: Jaroslav Jindrak <dzejrou@gmail.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M backends/hostmem.c

  Log Message:
  -----------
  hostmem: default the amount of prealloc-threads to smp-cpus

Prior to the introduction of the prealloc-threads property, the amount
of threads used to preallocate memory was derived from the value of
smp-cpus passed to qemu, the amount of physical cpus of the host
and a hardcoded maximum value. When the prealloc-threads property
was introduced, it included a default of 1 in backends/hostmem.c and
a default of smp-cpus using the sugar API for the property itself. The
latter default is not used when the property is not specified on qemu's
command line, so guests that were not adjusted for this change suddenly
started to use the default of 1 thread to preallocate memory, which
resulted in observable slowdowns in guest boots for guests with large
memory (e.g. when using libvirt <8.2.0 or managing guests manually).

This commit restores the original behavior for these cases while not
impacting guests started with the prealloc-threads property in any way.

Fixes: 220c1fd864e9d ("hostmem: introduce "prealloc-threads" property")
Signed-off-by: Jaroslav Jindrak <dzejrou@gmail.com>
Message-Id: <20220517123858.7933-1-dzejrou@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3c7b72ddca9ce85a9d1e8a98fd0996b74597b5ae
      
https://github.com/qemu/qemu/commit/3c7b72ddca9ce85a9d1e8a98fd0996b74597b5ae
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M util/thread-pool.c

  Log Message:
  -----------
  thread-pool: optimize scheduling of completion bottom half

The completion bottom half was scheduled within the pool->lock
critical section.  That actually results in worse performance,
because the worker thread can run its own small critical section
and go to sleep before the bottom half starts running.

Note that this simple change does not produce an improvement without
changing the thread pool QemuSemaphore to a condition variable.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Message-Id: <20220514065012.1149539-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 900fa208f50623672a6f879374222a7fd4717791
      
https://github.com/qemu/qemu/commit/900fa208f50623672a6f879374222a7fd4717791
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M util/thread-pool.c

  Log Message:
  -----------
  thread-pool: replace semaphore with condition variable

Since commit f9fc8932b1 ("thread-posix: remove the posix semaphore
support", 2022-04-06) QemuSemaphore has its own mutex and condition
variable; this adds unnecessary overhead on I/O with small block sizes.

Check the QTAILQ directly instead of adding the indirection of a
semaphore's count.  Using a semaphore has not been necessary since
qemu_cond_timedwait was introduced; the new code has to be careful about
spurious wakeups but it is simpler, for example thread_pool_cancel does
not have to worry about synchronizing the semaphore count with the number
of elements of pool->request_list.

Note that the return value of qemu_cond_timedwait (0 for timeout, 1 for
signal or spurious wakeup) is different from that of qemu_sem_timedwait
(-1 for timeout, 0 for success).

Reported-by: Lukáš Doktor <ldoktor@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Message-Id: <20220514065012.1149539-3-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 232e9255478f3849957d2f4b083d6e5d4736ab04
      
https://github.com/qemu/qemu/commit/232e9255478f3849957d2f4b083d6e5d4736ab04
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M util/thread-pool.c

  Log Message:
  -----------
  thread-pool: remove stopping variable

Just setting the max threads to 0 is enough to stop all workers.

Message-Id: <20220514065012.1149539-4-pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c06ebc0f1b13b9b3802b35969c00e19a31cde484
      
https://github.com/qemu/qemu/commit/c06ebc0f1b13b9b3802b35969c00e19a31cde484
  Author: Viktor Prutyanov <viktor.prutyanov@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M contrib/elf2dmp/qemu_elf.c

  Log Message:
  -----------
  contrib/elf2dmp: add ELF dump header checking

Add ELF header checking to prevent processing input file which is not
QEMU x86_64 guest memory dump or even not ELF.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1013

Signed-off-by: Viktor Prutyanov <viktor.prutyanov@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220520084339.171684-1-viktor.prutyanov@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ab9f0f7d44d6795050187b3bb0fc28fe804a062b
      
https://github.com/qemu/qemu/commit/ab9f0f7d44d6795050187b3bb0fc28fe804a062b
  Author: BALATON Zoltan <balaton@eik.bme.hu>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M hw/audio/ac97.c

  Log Message:
  -----------
  hw/audio/ac97: Coding style fixes to avoid checkpatch errors

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Message-Id: 
<62862a057e9c9ec0bb45248b2b9a3a1babb346a6.1650706617.git.balaton@eik.bme.hu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: dafea9e2868a5349bb0f1650dd18fa1aac806ee4
      
https://github.com/qemu/qemu/commit/dafea9e2868a5349bb0f1650dd18fa1aac806ee4
  Author: BALATON Zoltan <balaton@eik.bme.hu>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M hw/audio/ac97.c

  Log Message:
  -----------
  hw/audio/ac97: Remove unimplemented reset functions

The warm_reset() and cold_reset() functions are not implemented and do
nothing so no point in calling them or keep around as dead code.
Therefore remove them for now.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Message-Id: 
<cc6e99fd498a9ae358ebce787fc04ab6e8201879.1650706617.git.balaton@eik.bme.hu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: dba2b2941ca2ebd5275b3b2c6e72678f98f83a8a
      
https://github.com/qemu/qemu/commit/dba2b2941ca2ebd5275b3b2c6e72678f98f83a8a
  Author: BALATON Zoltan <balaton@eik.bme.hu>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M hw/audio/ac97.c

  Log Message:
  -----------
  hw/audio/ac97: Remove unneeded local variables

Several functions have a local variable that is just a copy of one of
the function parameters. This is unneeded complication so just get rid
of these.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: 
<d959aa0b267eb139a994e41ca0b7ba87d9cef7a9.1650706617.git.balaton@eik.bme.hu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 267b5e7e378afd260004cb37a66a6fcd641e3b53
      
https://github.com/qemu/qemu/commit/267b5e7e378afd260004cb37a66a6fcd641e3b53
  Author: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386/kvm: Fix disabling MPX on "-cpu host" with MPX-capable host

Since KVM commit 5f76f6f5ff96 ("KVM: nVMX: Do not expose MPX VMX controls when 
guest MPX disabled")
it is not possible to disable MPX on a "-cpu host" just by adding "-mpx"
there if the host CPU does indeed support MPX.
QEMU will fail to set MSR_IA32_VMX_TRUE_{EXIT,ENTRY}_CTLS MSRs in this case
and so trigger an assertion failure.

Instead, besides "-mpx" one has to explicitly add also
"-vmx-exit-clear-bndcfgs" and "-vmx-entry-load-bndcfgs" to QEMU command
line to make it work, which is a bit convoluted.

Make the MPX-related bits in FEAT_VMX_{EXIT,ENTRY}_CTLS dependent on MPX
being actually enabled so such workarounds are no longer necessary.

Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: 
<51aa2125c76363204cc23c27165e778097c33f0b.1653323077.git.maciej.szmigiero@oracle.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 758c925ee04ecd9d2d543a60f3c389e4e814c6aa
      
https://github.com/qemu/qemu/commit/758c925ee04ecd9d2d543a60f3c389e4e814c6aa
  Author: Lev Kujawski <lkujaw@member.fsf.org>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M hw/ide/core.c
    M hw/ide/macio.c

  Log Message:
  -----------
  ide_ioport_read: Return lower octet of data register instead of 0xFF

Prior to this patch, the pre-GRUB Solaris x86 bootloader would fail to
load on QEMU with the following screen output:

SunOS Secondary Boot version 3.00

prom_panic: Could not mount filesystem.
Entering boot debugger:
[136419]: _

This occurs because the bootloader issues an ATA IDENTIFY DEVICE
command, and then reads the resulting 256 words of parameter
information using inb rather than the correct inw. As the previous
behavior of QEMU was to return 0xFF and not advance the drive's sector
buffer, DRQ would never be cleared and the bootloader would be blocked
from selecting a secondary ATA device, such as an optical drive.

Resolves:
* [Bug 1639394] Unable to boot Solaris 8/9 x86 under Fedora 24

Signed-off-by: Lev Kujawski <lkujaw@member.fsf.org>
Message-Id: <20220520235200.1138450-1-lkujaw@member.fsf.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7110fe56c1f69b9e1bdf838558fdcb75d1568964
      
https://github.com/qemu/qemu/commit/7110fe56c1f69b9e1bdf838558fdcb75d1568964
  Author: Vitaly Kuznetsov <vkuznets@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M target/i386/cpu.h
    M target/i386/kvm/kvm.c

  Log Message:
  -----------
  i386: Use hv_build_cpuid_leaf() for HV_CPUID_NESTED_FEATURES

Previously, HV_CPUID_NESTED_FEATURES.EAX CPUID leaf was handled differently
as it was only used to encode the supported eVMCS version range. In fact,
there are also feature (e.g. Enlightened MSR-Bitmap) bits there. In
preparation to adding these features, move HV_CPUID_NESTED_FEATURES leaf
handling to hv_build_cpuid_leaf() and drop now-unneeded 'hyperv_nested'.

No functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220525115949.1294004-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 869840d26c929b99694e31b1a18e83bdea6e97ca
      
https://github.com/qemu/qemu/commit/869840d26c929b99694e31b1a18e83bdea6e97ca
  Author: Vitaly Kuznetsov <vkuznets@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M docs/hyperv.txt
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm/hyperv-proto.h
    M target/i386/kvm/kvm.c

  Log Message:
  -----------
  i386: Hyper-V Enlightened MSR bitmap feature

The newly introduced enlightenment allow L0 (KVM) and L1 (Hyper-V)
hypervisors to collaborate to avoid unnecessary updates to L2
MSR-Bitmap upon vmexits.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220525115949.1294004-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9411e8b6faeb1d88d4441c63c5ec072a01b2914e
      
https://github.com/qemu/qemu/commit/9411e8b6faeb1d88d4441c63c5ec072a01b2914e
  Author: Vitaly Kuznetsov <vkuznets@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M docs/hyperv.txt
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm/hyperv-proto.h
    M target/i386/kvm/kvm.c

  Log Message:
  -----------
  i386: Hyper-V XMM fast hypercall input feature

Hyper-V specification allows to pass parameters for certain hypercalls
using XMM registers ("XMM Fast Hypercall Input"). When the feature is
in use, it allows for faster hypercalls processing as KVM can avoid
reading guest's memory.

KVM supports the feature since v5.14.

Rename HV_HYPERCALL_{PARAMS_XMM_AVAILABLE -> XMM_INPUT_AVAILABLE} to
comply with KVM.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220525115949.1294004-4-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: aa6bb5fad58d049c6ea97448d4caba4499d60634
      
https://github.com/qemu/qemu/commit/aa6bb5fad58d049c6ea97448d4caba4499d60634
  Author: Vitaly Kuznetsov <vkuznets@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M docs/hyperv.txt
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm/hyperv-proto.h
    M target/i386/kvm/kvm.c

  Log Message:
  -----------
  i386: Hyper-V Support extended GVA ranges for TLB flush hypercalls

KVM kind of supported "extended GVA ranges" (up to 4095 additional GFNs
per hypercall) since the implementation of Hyper-V PV TLB flush feature
(Linux-4.18) as regardless of the request, full TLB flush was always
performed. "Extended GVA ranges for TLB flush hypercalls" feature bit
wasn't exposed then. Now, as KVM gains support for fine-grained TLB
flush handling, exposing this feature starts making sense.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220525115949.1294004-5-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3aae0854b26aff303202c6f9542445f58b2539fe
      
https://github.com/qemu/qemu/commit/3aae0854b26aff303202c6f9542445f58b2539fe
  Author: Vitaly Kuznetsov <vkuznets@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M docs/hyperv.txt
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm/hyperv-proto.h
    M target/i386/kvm/kvm.c

  Log Message:
  -----------
  i386: Hyper-V Direct TLB flush hypercall

Hyper-V TLFS allows for L0 and L1 hypervisors to collaborate on L2's
TLB flush hypercalls handling. With the correct setup, L2's TLB flush
hypercalls can be handled by L0 directly, without the need to exit to
L1.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220525115949.1294004-6-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9ad6634ec956bcf3558059aae8c6b2b5ee985307
      
https://github.com/qemu/qemu/commit/9ad6634ec956bcf3558059aae8c6b2b5ee985307
  Author: Vitaly Kuznetsov <vkuznets@redhat.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    R docs/hyperv.txt
    A docs/system/i386/hyperv.rst
    M docs/system/target-i386.rst

  Log Message:
  -----------
  i386: docs: Convert hyperv.txt to rST

rSTify docs/hyperv.txt and link it from docs/system/target-i386.rst.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220525115949.1294004-7-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 58b53669e87fed0d70903e05cd42079fbbdbc195
      
https://github.com/qemu/qemu/commit/58b53669e87fed0d70903e05cd42079fbbdbc195
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M backends/hostmem.c
    M contrib/elf2dmp/qemu_elf.c
    R docs/hyperv.txt
    A docs/system/i386/hyperv.rst
    M docs/system/target-i386.rst
    M hw/audio/ac97.c
    M hw/ide/core.c
    M hw/ide/macio.c
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/kvm/hyperv-proto.h
    M target/i386/kvm/kvm.c
    M util/thread-pool.c

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* ac97 cleanups (Zoltan)
* default the amount of prealloc-threads to smp-cpus (Jaroslav)
* fix disabling MPX on "-cpu host" with MPX-capable host (Maciej)
* thread-pool performance optimizations (myself)
* Hyper-V enlightenment enabling and docs (Vitaly)
* check ELF header in elf2dmp (Viktor)
* tweak LBREn migration (Weijiang)

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmKOgwgUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOO3Qf7Btcvr2ex9qZ1yThlmZ6hl20WvQZe
# GlKBq5xJnx2FUpvrH/AiNl2qfiBN5emhzJp1oBieQusDDsWVblmRpWgzUkUZvh0H
# s5rKsNuOPdhqaxLH4sRCXS2FCVOy81d+lc9yYe5bzy3EHDO/qzMjye+JoBhXtQve
# 3gOcOb1srIB/xSGNur2iCJkcauhBOipOo77kryfWekfReA3glHGnwhuEO+F+gXT3
# hiEO6TuRHjVrVCExbsDJb2pV2sSH6FxOP09BZ84IT0puv/FfgnUGCiNVfVNmMgNq
# KYysG7vPlRSaDX17bt3UlS4Y6yKb1vZpnvymRRkWxWLIfuAVVNm0vgHBpg==
# =gX2j
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 25 May 2022 12:27:04 PM PDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# 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

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  i386: docs: Convert hyperv.txt to rST
  i386: Hyper-V Direct TLB flush hypercall
  i386: Hyper-V Support extended GVA ranges for TLB flush hypercalls
  i386: Hyper-V XMM fast hypercall input feature
  i386: Hyper-V Enlightened MSR bitmap feature
  i386: Use hv_build_cpuid_leaf() for HV_CPUID_NESTED_FEATURES
  ide_ioport_read: Return lower octet of data register instead of 0xFF
  target/i386/kvm: Fix disabling MPX on "-cpu host" with MPX-capable host
  hw/audio/ac97: Remove unneeded local variables
  hw/audio/ac97: Remove unimplemented reset functions
  hw/audio/ac97: Coding style fixes to avoid checkpatch errors
  contrib/elf2dmp: add ELF dump header checking
  thread-pool: remove stopping variable
  thread-pool: replace semaphore with condition variable
  thread-pool: optimize scheduling of completion bottom half
  hostmem: default the amount of prealloc-threads to smp-cpus
  target/i386: Remove LBREn bit check when access Arch LBR MSRs

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/6291d2588fff...58b53669e87f



reply via email to

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