kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Karim Manaouil <karim.manaouil@linaro.org>,
	linux-kernel@vger.kernel.org,  kvm@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	Steven Price <steven.price@arm.com>,
	Gavin Shan <gshan@redhat.com>,
	Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>,
	"Usug, Ugur" <ugurus@amazon.co.uk>
Cc: Alexander Graf <graf@amazon.com>, Alex Elder <elder@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Fuad Tabba <tabba@google.com>, Joey Gouly <joey.gouly@arm.com>,
	 Jonathan Corbet <corbet@lwn.net>, Marc Zyngier <maz@kernel.org>,
	Mark Brown <broonie@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>,
	 Quentin Perret <qperret@google.com>,
	Rob Herring <robh@kernel.org>,
	Srinivas Kandagatla <srini@kernel.org>,
	 Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>,
	Will Deacon <will@kernel.org>,
	Haripranesh S <haripran@qti.qualcomm.com>,
	 Carl van Schaik <cvanscha@qti.qualcomm.com>,
	Murali Nalajala <mnalajal@quicinc.com>,
	Sreenivasulu Chalamcharla <sreeniva@qti.qualcomm.com>,
	Trilok Soni <tsoni@quicinc.com>,
	Stefan Schmidt <stefan.schmidt@linaro.org>
Subject: Re: [RFC PATCH 06/34] KVM: gunyah: Add initial Gunyah backend support
Date: Fri, 01 Aug 2025 13:25:43 +0100	[thread overview]
Message-ID: <2700e50c6ca07b58c4a4a0c219815cf3e1319f35.camel@infradead.org> (raw)
In-Reply-To: <20250424141341.841734-7-karim.manaouil@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

On Thu, 2025-04-24 at 15:13 +0100, Karim Manaouil wrote:
> 
> - Introduces a new Kconfig split: `CONFIG_KVM_ARM` for native support,
>   and a variant for Gunyah-backed virtualization.
> - Adds `gunyah.c`, a new arch backend file that implements the minimal
>   KVM architecture callbacks and stub interfaces required by the KVM
>   core to build and boot.
> - Refactors Makefile and build rules to support mutually exclusive
>   builds of `CONFIG_KVM_ARM` and `CONFIG_GUNYAH`.
> - Introduces a dummy implementation of required KVM stubs such as:
>   `kvm_arch_init_vm()`, `kvm_arch_vcpu_create()`, `kvm_age_gfn()`, etc.

I quite like this, conceptually. I do think it's important for the
kernel to provide a generic virtualization API regardless of the
underlying hardware/firmware — that is, after all, what an OS kernel is
*for*. So the answer "not in KVM" is just fundamentally not realistic.

I'd like to see fewer #ifdefs though. The model we have on x86 with
static_calls for the AMD vs. Intel back ends seems to work out OK.

We ought to be able to come up with a model inspired by x86 where we
allow certain methods to be provided by one of many sets of 'lowvisor'
ops or whatever we want to call them:

 • Native KVM (at EL2)
 • pKVM
 • Gunyah
 • CCA
 • ... and potentially one or two others.

Currently we have completely separate work on some of those; can we
combine at least the basic hooks/operations and come up with something
which is minimally intrusive where each one just plugs in its own
implementation but the KVM userspace API is as unified as possible?

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]

  reply	other threads:[~2025-08-01 12:25 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 14:13 [RFC PATCH 00/34] Running Qualcomm's Gunyah Guests via KVM in EL1 Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 01/34] KVM: Allow arch-specific vCPU allocation and freeing Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 02/34] KVM: irqfd: Add architecture hooks for irqfd allocation and initialization Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 03/34] KVM: irqfd: Allow KVM backends to override IRQ injection via set_irq callback Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 04/34] KVM: Add weak stubs for irqchip-related functions for Gunyah builds Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 05/34] KVM: Add KVM_SET_DTB_ADDRESS ioctl to pass guest DTB address from userspace Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 06/34] KVM: gunyah: Add initial Gunyah backend support Karim Manaouil
2025-08-01 12:25   ` David Woodhouse [this message]
2025-04-24 14:13 ` [RFC PATCH 07/34] KVM: gunyah: Pin guest memory Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 08/34] docs: gunyah: Introduce Gunyah Hypervisor Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 09/34] dt-bindings: Add binding for gunyah hypervisor Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 10/34] gunyah: Common types and error codes for Gunyah hypercalls Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 11/34] gunyah: Add hypercalls to identify Gunyah Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 12/34] gunyah: Add hypervisor driver Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 13/34] gunyah: Add hypercalls to send and receive messages Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 14/34] gunyah: Add resource manager RPC core Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 15/34] gunyah: Add VM lifecycle RPC Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 16/34] gunyah: Add basic VM lifecycle management Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 17/34] gunyah: Translate gh_rm_hyp_resource into gunyah_resource Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 18/34] gunyah: Add resource tickets Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 19/34] gunyah: Add hypercalls for running a vCPU Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 20/34] gunyah: add proxy-scheduled vCPUs Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 21/34] gunyah: Add hypercalls for demand paging Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 22/34] gunyah: Add memory parcel RPC Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 23/34] gunyah: Add interfaces to map memory into guest address space Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 24/34] gunyah: Add platform ops on mem_lend/mem_reclaim Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 25/34] gunyah: Add Qualcomm Gunyah platform ops Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 26/34] gunyah: Share memory parcels Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 27/34] gunyah: Share guest VM dtb configuration to Gunyah Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 28/34] gunyah: Add RPC to enable demand paging Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 29/34] gunyah: Enable " Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 30/34] gunyah: Add RPC to set VM boot context Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 31/34] gunyah: allow userspace to set boot cpu context Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 32/34] gunyah: Add hypercalls for sending doorbell Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 33/34] KVM: gunyah: Implement irqfd interface Karim Manaouil
2025-04-24 14:13 ` [RFC PATCH 34/34] KVM: gunyah: enable KVM for Gunyah Karim Manaouil
2025-04-24 15:34 ` [RFC PATCH 00/34] Running Qualcomm's Gunyah Guests via KVM in EL1 Oliver Upton
2025-04-24 16:12   ` Trilok Soni
2025-04-24 16:43   ` Karim Manaouil
2025-04-24 16:57   ` Marc Zyngier
2025-06-19 15:50     ` David Woodhouse

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=2700e50c6ca07b58c4a4a0c219815cf3e1319f35.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=cvanscha@qti.qualcomm.com \
    --cc=elder@kernel.org \
    --cc=graf@amazon.com \
    --cc=gshan@redhat.com \
    --cc=haripran@qti.qualcomm.com \
    --cc=joey.gouly@arm.com \
    --cc=karim.manaouil@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mnalajal@quicinc.com \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=qperret@google.com \
    --cc=quic_pheragu@quicinc.com \
    --cc=quic_svaddagi@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sreeniva@qti.qualcomm.com \
    --cc=srini@kernel.org \
    --cc=stefan.schmidt@linaro.org \
    --cc=steven.price@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=tsoni@quicinc.com \
    --cc=ugurus@amazon.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).