Re: [RFC PATCH 29/32] KVM: arm64: Pass hypercalls to userspace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: James Morse <james.morse@xxxxxxx>
- Subject: Re: [RFC PATCH 29/32] KVM: arm64: Pass hypercalls to userspace
- From: Marc Zyngier <maz@xxxxxxxxxx>
- Date: Wed, 08 Feb 2023 09:02:09 +0000
- Cc: Oliver Upton <oliver.upton@xxxxxxxxx>, linux-pm@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, kvmarm@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Sudeep Holla <sudeep.holla@xxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, H Peter Anvin <hpa@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Huacai Chen <chenhuacai@xxxxxxxxxx>, Suzuki K Poulose <suzuki.poulose@xxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, Rafael Wysocki <rafael@xxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>, Salil Mehta <salil.mehta@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
- In-reply-to: <0621bf8e-06f2-70f2-6d2b-f311c5a4ffce@arm.com>
- References: <20230203135043.409192-1-james.morse@arm.com> <20230203135043.409192-30-james.morse@arm.com> <Y913sIqWxmf4O5oG@google.com> <0621bf8e-06f2-70f2-6d2b-f311c5a4ffce@arm.com>
- User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
On Tue, 07 Feb 2023 17:50:59 +0000,
James Morse <james.morse@xxxxxxx> wrote:
>
> Hi Oliver,
>
> On 03/02/2023 21:08, Oliver Upton wrote:
> > On Fri, Feb 03, 2023 at 01:50:40PM +0000, James Morse wrote:
> >> From: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
> >>
> >> When capability KVM_CAP_ARM_HVC_TO_USER is available, userspace can
> >> request to handle all hypercalls that aren't handled by KVM.
>
> > I would very much prefer we not go down this route. This capability
> > effectively constructs an ABI out of what KVM presently does not
> > implement. What would happen if KVM decides to implement a new set
> > of hypercalls later down the road that were previously forwarded to
> > userspace?
>
> The user-space support would never get called. If we have a
> wild-west allocation of IDs in this area we have bigger
> problems. I'd hope in this example it would be a VMM or an in-kernel
> implementation of the same feature.
>
> When I floated something like this before for supporting SDEI in
> guests, Christoffer didn't like tie-ing KVM to SMC-CC - hence the
> all or nothing.
>
> Since then we've had things like Spectre, which I don't think the
> VMM should ever be allowed to handle, which makes the whole thing
> much murkier.
That ship has sailed a long time ago. We also have grown a bunch of
in-kernel SMCCC services that are KVM specific (the silly PTP stuff,
for example, not to mention all the pKVM hypercalls...).
It is also likely that these ranges will grow over time (it has been a
long time since the last drop of Spectre-like crap, and something must
be brewing somewhere), so a level of discrimination is important.
M.
--
Without deviation from the norm, progress is not possible.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]