Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-18 Thread Oliver Upton
On Fri, Nov 18, 2022 at 02:56:38PM +, Will Deacon wrote: > On Thu, Nov 10, 2022 at 01:53:26AM +, Oliver Upton wrote: > > As the SMCCC (and related specifications) march towards an > > 'everything and the kitchen sink' interface for interacting with a > > system, it is less likely that KVM w

Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-18 Thread Will Deacon
Hey Oliver, On Thu, Nov 10, 2022 at 01:53:26AM +, Oliver Upton wrote: > As the SMCCC (and related specifications) march towards an > 'everything and the kitchen sink' interface for interacting with a > system, it is less likely that KVM will implement every supported > feature. > > Add a capa

Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-14 Thread Marc Zyngier
On Fri, 11 Nov 2022 23:39:09 +, Oliver Upton wrote: > > On Fri, Nov 11, 2022 at 08:26:02AM +, Marc Zyngier wrote: > > On Thu, 10 Nov 2022 21:13:54 +, Oliver Upton > > wrote: > > > The goal of what I was trying to get at is that either the kernel or > > > userspace takes ownership of

Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-11 Thread Oliver Upton
On Fri, Nov 11, 2022 at 08:26:02AM +, Marc Zyngier wrote: > On Thu, 10 Nov 2022 21:13:54 +, Oliver Upton > wrote: > > The goal of what I was trying to get at is that either the kernel or > > userspace takes ownership of a range that has an ABI, but not both. i.e. > > you really wouldn't w

Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-11 Thread Marc Zyngier
On Thu, 10 Nov 2022 21:13:54 +, Oliver Upton wrote: > > On Thu, Nov 10, 2022 at 12:22:12PM +, Marc Zyngier wrote: > > > +static bool kvm_hvc_call_user_trapped(struct kvm_vcpu *vcpu, u32 func_id) > > > +{ > > > + struct kvm *kvm = vcpu->kvm; > > > + unsigned long *bmap = &kvm->arch.smccc_f

Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-10 Thread Oliver Upton
On Thu, Nov 10, 2022 at 12:22:12PM +, Marc Zyngier wrote: > > diff --git a/arch/arm64/include/asm/kvm_host.h > > b/arch/arm64/include/asm/kvm_host.h > > index e33ed7c09a28..cc3872f1900c 100644 > > --- a/arch/arm64/include/asm/kvm_host.h > > +++ b/arch/arm64/include/asm/kvm_host.h > > @@ -52,6

Re: [RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-10 Thread Marc Zyngier
On Thu, 10 Nov 2022 01:53:26 +, Oliver Upton wrote: > > As the SMCCC (and related specifications) march towards an > 'everything and the kitchen sink' interface for interacting with a > system, it is less likely that KVM will implement every supported > feature. > > Add a capability that all

[RFC PATCH 2/3] KVM: arm64: Allow userspace to trap SMCCC sub-ranges

2022-11-09 Thread Oliver Upton
As the SMCCC (and related specifications) march towards an 'everything and the kitchen sink' interface for interacting with a system, it is less likely that KVM will implement every supported feature. Add a capability that allows userspace to trap hypercall ranges, allowing the VMM to mix-and-matc