All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, eric.auger@redhat.com
Subject: [PATCH v4 0/6] hw/arm/virt: Introduce kvm-steal-time
Date: Thu,  1 Oct 2020 08:17:12 +0200	[thread overview]
Message-ID: <20201001061718.101915-1-drjones@redhat.com> (raw)

v4:
  - Rebased to latest master
  - Added an official linux header synch patch, replacing the
    hack patch used in v3
  - Added a patch to restore the arm-cpu-features test for AArch64
    that got lost in the meson shuffle
  - Added Eric's R-b's

v3:
  - Rebased: 5.2 machine type and kvm32 drop now included
  - Switched to using new KVM cap that has been merged upstream
  - Picked up some r-b's and some of Eric's comments from v2

v2: https://www.mail-archive.com/qemu-devel@nongnu.org/msg727588.html

KVM supports the ability to publish the amount of time that VCPUs
were runnable, but not running due to other host threads running
instead, to the guest. The guest scheduler may use that information
when making decisions and the guest may expose it to its userspace
(Linux publishes this information in /proc/stat). This feature is
called "steal time" as it represents the amount of time stolen from
a guest by scheduling out its VCPUs. To enable this feature KVM
userspace must provide a memory region that will be used to publish
the information to the guest. The memory region is typical migratable
region. The GPA of the region is given to KVM through a VCPU device
ioctl interface. This feature is only available for 64-bit guests
per the Arm PVTIME specification (DEN0057A).

This series provides the QEMU support of this feature. It will
be enabled by default for 5.2 machine types and later, but may
be disabled with a new CPU property "kvm-steal-time".

Thanks,
drew


Andrew Jones (6):
  linux headers: sync to 5.9-rc7
  target/arm/kvm: Make uncalled stubs explicitly unreachable
  hw/arm/virt: Move post cpu realize check into its own function
  hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init
  tests/qtest: Restore aarch64 arm-cpu-features test
  hw/arm/virt: Implement kvm-steal-time

 docs/system/arm/cpu-features.rst |  11 ++++
 hw/arm/virt.c                    | 110 ++++++++++++++++++++++---------
 include/hw/arm/virt.h            |   5 ++
 linux-headers/linux/kvm.h        |   6 +-
 target/arm/cpu.c                 |   8 +++
 target/arm/cpu.h                 |   4 ++
 target/arm/kvm.c                 |  16 +++++
 target/arm/kvm64.c               |  64 ++++++++++++++++--
 target/arm/kvm_arm.h             |  94 ++++++++++++++++++++------
 target/arm/monitor.c             |   2 +-
 tests/qtest/arm-cpu-features.c   |  25 +++++--
 tests/qtest/meson.build          |   3 +-
 12 files changed, 286 insertions(+), 62 deletions(-)

-- 
2.26.2



             reply	other threads:[~2020-10-01  6:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  6:17 Andrew Jones [this message]
2020-10-01  6:17 ` [PATCH v4 1/6] linux headers: sync to 5.9-rc7 Andrew Jones
2020-10-01  6:17 ` [PATCH v4 2/6] target/arm/kvm: Make uncalled stubs explicitly unreachable Andrew Jones
2020-10-01  6:17 ` [PATCH v4 3/6] hw/arm/virt: Move post cpu realize check into its own function Andrew Jones
2020-10-01  6:17 ` [PATCH v4 4/6] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init Andrew Jones
2020-10-01  6:17 ` [PATCH v4 5/6] tests/qtest: Restore aarch64 arm-cpu-features test Andrew Jones
2020-10-01  6:17 ` [PATCH v4 6/6] hw/arm/virt: Implement kvm-steal-time Andrew Jones
2020-10-08 20:39   ` Peter Maydell
2020-10-08 21:12     ` Andrew Jones
2020-10-08 13:01 ` [PATCH v4 0/6] hw/arm/virt: Introduce kvm-steal-time Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201001061718.101915-1-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.