KVM enable SnowRidge Accelerator Interfacing Architecture (AIA)

Bug #1782206 reported by Paul Lai
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Wishlist
Unassigned
qemu (Ubuntu)
Fix Released
Wishlist
Unassigned
xen (Ubuntu)
Incomplete
Wishlist
Unassigned

Bug Description

CPU core (Tremont) includes Accelerator Interfacing Architecture (AIA) features including:
- UMONITOR/UMWAIT: Ring-3 MONITOR/MWAIT with timeout. For memory-based synch with accelerators
- TPAUSE: Monitor-less wait (with timeout). For wait-on-multiple or wait-for-interrupt usages
- MOVDIRI: 8B streaming doorbell write capability. For streaming accelerator usages.
- MOVDIR64B: Non-temporal write with 64B guaranteed write-atomicity. For latency critical accelerator usages

Upstream target linux 5.4/Qemu-3.10

Target Release: 20.04

quanxian (quanxian-wang)
description: updated
tags: added: intel-virt-19.04
removed: intel
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
title says KVM, but the bug is only against xen so far.

Will this need an "qemu (ubuntu)" and/or "linux (ubuntu)" task as well?

- kernel 4.20 is listed so I assume the latter.
- Comments do not mention Qemu yet

Revision history for this message
quanxian (quanxian-wang) wrote :

post qemu 3.1.0 (currently untagged)

  24261de4 x86/cpu: Enable MOVDIRI cpu feature
  1c65775f x86/cpu: Enable MOVDIR64B cpu feature

description: updated
Revision history for this message
quanxian (quanxian-wang) wrote :

Others information:
The series for kernel patches:
https://lkml.org/lkml/2018/11/6/379
https://lkml.org/lkml/2018/11/6/377

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ok, now we finally know it is about qemu&kernel patches - I'll add tasks for that.
Still haven't seen any xen references, setting that to incomplete.

But given how new it is I'd punt this from 19.04 to 19.10 where things in kernel&qemu will have matured and be safer to use.

If you are not ok with this please outline important use cases that will be inhibited.
All changes are "just" adding definitions, no actual code added - but I'm somewhat afraid of hidden dependencies - especially since we have no associated testcase and it would need special (very new) hardware t be tested.

Changed in qemu (Ubuntu):
status: New → Triaged
tags: added: qemu-19.10
Changed in qemu (Ubuntu):
importance: Undecided → Medium
Changed in xen (Ubuntu):
status: New → Incomplete
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1782206

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: disco
Revision history for this message
quanxian (quanxian-wang) wrote :

The detail git commits of Qemu are as below:

1c65775ffc2dbd276a8bffe592feba0e186a151c

==> x86/cpu: Enable MOVDIR64B cpu feature

24261de4916596d8ab5f5fee67e9e7a19e8325a5

==> x86/cpu: Enable MOVDIRI cpu feature

Revision history for this message
quanxian (quanxian-wang) wrote :

KVM patches are queuing.

description: updated
Revision history for this message
Paul Lai (pclai) wrote :

33823f4d6 x86/cpufeatures: Enumerate MOVDIRI instruction
ace6485a0 x86/cpufeatures: Enumerate MOVDIR64B instruction
65e259d5c tools arch x86: Update tools's copy of cpufeatures.h

(linux 5.1-rc1)
74f2370bb KVM: x86: expose MOVDIRI CPU feature into VM.
c029b5deb KVM: x86: expose MOVDIR64B CPU feature into VM.

quanxian (quanxian-wang)
description: updated
tags: added: intel-virt-19.10
removed: intel-virt-19.04
description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The qemu commits have landed in 4.0 - so that part should work in Ubuntu 19.10

The kernel commits are in 5.1 as outlined by Paul above already (thanks).
@Paul - since the initial upstream target was "linux 5.3" are there things missing or did this just work out faster than expected?

Revision history for this message
Paul Lai (pclai) wrote :

Chris: a little of both. The UMONITOR/UMWAIT/TPAUSE is delay, but the rest has been upstreamed (as you already noted.)

Revision history for this message
Robie Basak (racb) wrote :

Looks like this is a feature request rather than a bug?

Changed in linux (Ubuntu):
importance: Undecided → Wishlist
Changed in qemu (Ubuntu):
importance: Medium → Wishlist
Changed in xen (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.0 KiB)

This bug was fixed in the package qemu - 1:4.0+dfsg-0ubuntu1

---------------
qemu (1:4.0+dfsg-0ubuntu1) eoan; urgency=medium

  * Merge with Upstream release of qemu 4.0.
    Among many other things this fixes LP Bugs:
    LP: #1782206 - SnowRidge Accelerator Interfacing Architecture (AIA)
    LP: #1828038 - Update s390x CPU Model for more HW support
    LP: #1832622 - count cache flush Spectre v2 mitigation for ppc64el
    Remaining Changes:
    - qemu-kvm to systemd unit
      - d/qemu-kvm-init: script for QEMU KVM preparation modules, ksm,
        hugepages and architecture specifics
      - d/qemu-system-common.qemu-kvm.service: systemd unit to call
        qemu-kvm-init
      - d/qemu-system-common.install: install helper script
      - d/qemu-system-common.maintscript: clean old sysv and upstart scripts
      - d/qemu-system-common.qemu-kvm.default: defaults for
        /etc/default/qemu-kvm
      - d/rules: call dh_installinit and dh_installsystemd for qemu-kvm
    - Enable nesting by default
      - d/qemu-system-x86.modprobe: set nested=1 module option on intel.
        (is default on amd)
      - d/qemu-system-x86.postinst: re-load kvm_intel.ko if it was loaded
        without nested=1
      - d/p/ubuntu/expose-vmx_qemu64cpu.patch: expose nested kvm by default
        in qemu64 cpu type.
      - d/p/ubuntu/enable-svm-by-default.patch: Enable nested svm by default
        in qemu64 on amd
      - d/qemu-system-x86.README.Debian: document intention of nested being
        default is comfort, not full support
    - Distribution specific machine type (LP: 1304107 1621042)
      - d/p/ubuntu/define-ubuntu-machine-types.patch: define distro machine
        types
      - d/qemu-system-x86.NEWS Info on fixed machine type defintions
        for host-phys-bits=true (LP: 1776189)
      - add an info about -hpb machine type in debian/qemu-system-x86.NEWS
      - provide pseries-bionic-2.11-sxxm type as convenience with all
        meltdown/spectre workarounds enabled by default. (LP: 1761372).
    - improved dependencies
      - Make qemu-system-common depend on qemu-block-extra
      - Make qemu-utils depend on qemu-block-extra
      - let qemu-utils recommend sharutils
    - s390x support
      - Create qemu-system-s390x package
      - Enable numa support for s390x
    - arch aware kvm wrappers
    - d/control: update VCS links
    - qemu-guest-agent: freeze-hook fixes (LP: 1484990)
      - d/qemu-guest-agent.install: provide /etc/qemu/fsfreeze-hook
      - d/qemu-guest-agent.dirs: provide /etc/qemu/fsfreeze-hook.d
    - d/control-in: enable RDMA support in qemu (LP: 1692476)
        - enable RDMA config option
        - add libibumad-dev build-dep
    - tolerate ipxe size change on migrations to >=18.04 (LP: 1713490)
      - d/p/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch: old machine types
        reference 256k path
      - d/control-in: depend on ipxe-qemu-256k-compat-efi-roms to be able to
        handle incoming migrations from former releases.
    - d/control-in: Disable capstone disassembler library support (universe)
    - Move s390x roms to a new qemu-system-data-s390x
      - d/qemu-system-data.install: install s390x roms as archi...

Read more...

Changed in qemu (Ubuntu):
status: Triaged → Fix Released
quanxian (quanxian-wang)
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Setting linux task to triaged, as there are commits to pick up. Xen I'm still unsure.

Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Paul Lai (pclai) wrote :

Additional KVM patches has been merged (post 5.3-rc8):

e69e72faa3a KVM: x86: Add support for user wait instructions
6e3ba4abcea KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL
bf653b78f96 KVM: vmx: Introduce handle_unexpected_vmexit and handle WAITPKG vmexit

[There's no Xen AIA work (yet)]

quanxian (quanxian-wang)
description: updated
tags: added: intel-virt-20.04
removed: intel-virt-19.10
Revision history for this message
Paul Lai (pclai) wrote :

qemu post 4.1.0 (yet untagged)
67192a298f5 x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE
6508799707b target/i386: Add support for save/load IA32_UMWAIT_CONTROL MSR

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Most likely we will have qemu 4.2 in Ubuntu 20.04.
But we already closed this bug for qemu with the patches you identified in the past.
If you need - for tracking purposes - a bug that closes once these further changes are in I'd ask you to open a new one.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.