All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fuad Tabba <tabba@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kernel-team@android.com, maz@kernel.org, catalin.marinas@arm.com,
	will@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 0/4] KVM: arm64: Do not communicate host pmu event changes by accessing hyp data
Date: Tue, 10 May 2022 09:57:06 +0000	[thread overview]
Message-ID: <20220510095710.148178-1-tabba@google.com> (raw)

Hi,

This series changes the way KVM communicates host pmu event changes to the
hypervisor in nvhe and protected mode. Instead of accessing hyp data directly
from the host, the data is passed to hyp via the loaded vcpu. This provides
more isolation between the host and the hypervisor, and allows us to use pmu in
protected mode.

This series is based on kvmarm/next (8c22fd2d4cfa).

Changes since V3 [1]:
- Fix/clarify commit messages (Oliver)
- Reduce scope of kvm_pmu_events (Oliver/Marc)

Changes since V2 [2]:
- Update the guest view of the pmu events after interrupts have been disabled
  (Marc)

Changes since V1 [3]:
- Repack struct kvm_pmu to remove all (two) holes (Marc)
- Updating the guest's view of the pmu events before every vcpu run rather than
  vcpu load to avoid missing updates (Marc)

Thanks,
/fuad

[1] https://lore.kernel.org/all/20220509120330.3043773-1-tabba@google.com/
[2] https://lore.kernel.org/all/20220509095500.2408785-1-tabba@google.com/
[3] https://lore.kernel.org/linux-arm-kernel/20220408084052.3310931-1-tabba@google.com/

Fuad Tabba (4):
  KVM: arm64: Wrapper for getting pmu_events
  KVM: arm64: Repack struct kvm_pmu to reduce size
  KVM: arm64: Pass pmu events to hyp via vcpu
  KVM: arm64: Reenable pmu in Protected Mode

 arch/arm64/include/asm/kvm_host.h |  7 +-----
 arch/arm64/kvm/arm.c              | 15 ++++++++++++
 arch/arm64/kvm/hyp/nvhe/switch.c  | 20 +++++-----------
 arch/arm64/kvm/pmu-emul.c         |  3 +--
 arch/arm64/kvm/pmu.c              | 40 ++++++++++++++++++-------------
 include/kvm/arm_pmu.h             | 10 ++++++--
 6 files changed, 54 insertions(+), 41 deletions(-)


base-commit: 8c22fd2d4cfaab2ae3c5859496c894df58ab014b
-- 
2.36.0.512.ge40c2bad7a-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Fuad Tabba <tabba@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: maz@kernel.org, will@kernel.org, qperret@google.com,
	james.morse@arm.com,  alexandru.elisei@arm.com,
	suzuki.poulose@arm.com, catalin.marinas@arm.com,
	 drjones@redhat.com, oupton@google.com,
	linux-arm-kernel@lists.infradead.org, tabba@google.com,
	kernel-team@android.com
Subject: [PATCH v4 0/4] KVM: arm64: Do not communicate host pmu event changes by accessing hyp data
Date: Tue, 10 May 2022 09:57:06 +0000	[thread overview]
Message-ID: <20220510095710.148178-1-tabba@google.com> (raw)

Hi,

This series changes the way KVM communicates host pmu event changes to the
hypervisor in nvhe and protected mode. Instead of accessing hyp data directly
from the host, the data is passed to hyp via the loaded vcpu. This provides
more isolation between the host and the hypervisor, and allows us to use pmu in
protected mode.

This series is based on kvmarm/next (8c22fd2d4cfa).

Changes since V3 [1]:
- Fix/clarify commit messages (Oliver)
- Reduce scope of kvm_pmu_events (Oliver/Marc)

Changes since V2 [2]:
- Update the guest view of the pmu events after interrupts have been disabled
  (Marc)

Changes since V1 [3]:
- Repack struct kvm_pmu to remove all (two) holes (Marc)
- Updating the guest's view of the pmu events before every vcpu run rather than
  vcpu load to avoid missing updates (Marc)

Thanks,
/fuad

[1] https://lore.kernel.org/all/20220509120330.3043773-1-tabba@google.com/
[2] https://lore.kernel.org/all/20220509095500.2408785-1-tabba@google.com/
[3] https://lore.kernel.org/linux-arm-kernel/20220408084052.3310931-1-tabba@google.com/

Fuad Tabba (4):
  KVM: arm64: Wrapper for getting pmu_events
  KVM: arm64: Repack struct kvm_pmu to reduce size
  KVM: arm64: Pass pmu events to hyp via vcpu
  KVM: arm64: Reenable pmu in Protected Mode

 arch/arm64/include/asm/kvm_host.h |  7 +-----
 arch/arm64/kvm/arm.c              | 15 ++++++++++++
 arch/arm64/kvm/hyp/nvhe/switch.c  | 20 +++++-----------
 arch/arm64/kvm/pmu-emul.c         |  3 +--
 arch/arm64/kvm/pmu.c              | 40 ++++++++++++++++++-------------
 include/kvm/arm_pmu.h             | 10 ++++++--
 6 files changed, 54 insertions(+), 41 deletions(-)


base-commit: 8c22fd2d4cfaab2ae3c5859496c894df58ab014b
-- 
2.36.0.512.ge40c2bad7a-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-05-10  9:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  9:57 Fuad Tabba [this message]
2022-05-10  9:57 ` [PATCH v4 0/4] KVM: arm64: Do not communicate host pmu event changes by accessing hyp data Fuad Tabba
2022-05-10  9:57 ` [PATCH v4 1/4] KVM: arm64: Wrapper for getting pmu_events Fuad Tabba
2022-05-10  9:57   ` Fuad Tabba
2022-05-10  9:57 ` [PATCH v4 2/4] KVM: arm64: Repack struct kvm_pmu to reduce size Fuad Tabba
2022-05-10  9:57   ` Fuad Tabba
2022-05-10  9:57 ` [PATCH v4 3/4] KVM: arm64: Pass pmu events to hyp via vcpu Fuad Tabba
2022-05-10  9:57   ` Fuad Tabba
2022-05-10 18:07   ` Oliver Upton
2022-05-10 18:07     ` Oliver Upton
2022-05-10  9:57 ` [PATCH v4 4/4] KVM: arm64: Reenable pmu in Protected Mode Fuad Tabba
2022-05-10  9:57   ` Fuad Tabba
2022-05-10 18:07   ` Oliver Upton
2022-05-10 18:07     ` Oliver Upton
2022-05-15 10:29 ` [PATCH v4 0/4] KVM: arm64: Do not communicate host pmu event changes by accessing hyp data Marc Zyngier
2022-05-15 10:29   ` Marc Zyngier
2022-05-15 10:57 ` Marc Zyngier
2022-05-15 10:57   ` Marc Zyngier

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=20220510095710.148178-1-tabba@google.com \
    --to=tabba@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=will@kernel.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.