Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1801320

Summary: aarch64: backport query-cpu-model-expansion and adjvtime document fixes
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Andrew Jones <drjones>
Component: qemu-kvmAssignee: Andrew Jones <drjones>
qemu-kvm sub component: CPU Models QA Contact: Qunfang Zhang <qzhang>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: jinzhao, juzhang, qzhang, virt-maint
Version: 8.2Keywords: OtherQA
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-4.2.0-10.module+el8.2.0+5740+c3dff59e Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 09:57:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1647366    
Bug Blocks: 1677408    

Description Andrew Jones 2020-02-10 16:16:38 UTC
The SVE support added the cpu-model-expansion QMP command to AArch64. It's possible to crash QEMU with that query when KVM is enabled, 'none' is used for the machine type, and a cpu type that is not supported by KVM is queried.

Backport 0999a4ba8718 ("target/arm/monitor: query-cpu-model-expansion crashed qemu when using machine type none") to fix it.

We also backport a kvm-no-adjvtime document fix.

Comment 2 Andrew Jones 2020-02-11 12:46:14 UTC
Here are the testing details


Before patch
------------

  <TERM_1>$ /usr/libexec/qemu-kvm -machine none,accel=kvm -qmp unix:./qmp-sock,server
  <TERM_2>$ /path/to/qemu/src/scripts/qmp/qmp-shell ./qmp-sock
  Welcome to the QMP low-level shell!
  Connected to QEMU 4.2.0

  (QEMU) query-cpu-model-expansion type=full model={"name":"cortex-a15"}
  Disconnected

  (And /usr/libexec/qemu-kvm in TERM_1 reports a segfault)

After patch
-----------

  <TERM_1>$ /usr/libexec/qemu-kvm -machine none,accel=kvm -qmp unix:./qmp-sock,server
  <TERM_2>$ /path/to/qemu/src/scripts/qmp/qmp-shell ./qmp-sock
  Welcome to the QMP low-level shell!
  Connected to QEMU 4.2.0

  (QEMU) query-cpu-model-expansion type=full model={"name":"cortex-a15"}
  {"error": {"class": "GenericError", "desc": "We cannot guarantee the CPU type 'cortex-a15' works with KVM on this host"}}
  (QEMU)

  (No segfault)

Comment 6 Andrew Jones 2020-02-27 12:32:43 UTC
I've tested this as OtherQA and request that QE move the BZ to VERIFIED. See comment 2 for testing details.

Comment 7 Qunfang Zhang 2020-02-28 02:12:28 UTC
Thank you Andrew! As I updated in other BZs, it would be appreciated that a tested version could be mentioned for reference. :)

Comment 8 Andrew Jones 2020-02-28 07:26:55 UTC
(In reply to Qunfang Zhang from comment #7)
> Thank you Andrew! As I updated in other BZs, it would be appreciated that a
> tested version could be mentioned for reference. :)

I tested qemu-kvm-4.2.0-12.module+el8.2.0+5858+afd073bc.aarch64

Comment 10 errata-xmlrpc 2020-05-05 09:57:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017