lkml.org 
[lkml]   [2023]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] arm64/kvm: Introduce feature extension for SMCCC filter
Date


> -----Original Message-----
> From: Salil Mehta <salil.mehta@huawei.com>
> Sent: 2023年11月16日 22:06
> To: Cornelia Huck <cohuck@redhat.com>; Jianyong Wu
> <Jianyong.Wu@arm.com>; maz@kernel.org; James Morse
> <James.Morse@arm.com>; will@kernel.org
> Cc: rmk@armlinux.org.uk; Suzuki Poulose <Suzuki.Poulose@arm.com>;
> oliver.upton@linux.dev; linux-arm-kernel@lists.infradead.org;
> kvmarm@lists.linux.dev; linux-kernel@vger.kernel.org; Justin He
> <Justin.He@arm.com>; Jianyong Wu <Jianyong.Wu@arm.com>
> Subject: RE: [PATCH] arm64/kvm: Introduce feature extension for SMCCC filter
>
> > From: Cornelia Huck <cohuck@redhat.com>
> > Sent: Thursday, November 16, 2023 1:09 PM
> > To: Jianyong Wu <jianyong.wu@arm.com>; maz@kernel.org;
> > james.morse@arm.com; will@kernel.org
> >
> > On Thu, Nov 16 2023, Jianyong Wu <jianyong.wu@arm.com> wrote:
> >
> > > 821d935c87b introduces support for userspace SMCCC filtering, but
> > > lack of a way to tell userspace if we have this feature. Add a
> > > corresponding feature extension can resolve this issue.
> > >
> > > For example, the incoming feature Vcpu Hotplug needs the SMCCC filter.
> > > As there is no way to check this feature, VMM will run into error
> > > when it calls this feature on an old kernel. It's bad for backward compatible.
> >
> > Can't you simply query via KVM_HAS_DEVICE_ATTR whether the SMCCC
> > filtering controls exist?
>
>
> Agreed. In fact, this is what I had earlier intended to do but deferred this change.
> As of now, RFC V2 of vCPU Hotplug series does not have this check yet while
> installing the SMCCC filters in KVM Host.
>

Yes, we can use KVM_HAS_DEVICE_ATTR to do the check in userspace. Thanks Cornelia.

Thanks
Jianyong

> Thanks
>
> > > Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
> > > ---
> > > Documentation/virt/kvm/api.rst | 3 ++-
> > > arch/arm64/kvm/arm.c | 1 +
> > > include/uapi/linux/kvm.h | 1 +
> > > 3 files changed, 4 insertions(+), 1 deletion(-)
> > >

\
 
 \ /
  Last update: 2023-11-21 02:59    [W:0.097 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site