Re: [PATCH v3 24/28] arm64/sve: KVM: Hide SVE from CPU features exposed to guests

Dave Martin
2017-10-18T15:01:50Z

On Wed, Oct 18, 2017 at 03:21:45PM +0200, Christoffer Dall wrote:
> On Tue, Oct 17, 2017 at 04:47:08PM +0100, Dave Martin wrote:
> > On Tue, Oct 17, 2017 at 03:29:36PM +0100, Marc Zyngier wrote:
> > > On 17/10/17 15:07, Dave Martin wrote:
> > > > On Tue, Oct 17, 2017 at 06:58:16AM -0700, Christoffer Dall wrote:
> > > >> On Tue, Oct 10, 2017 at 07:38:41PM +0100, Dave Martin wrote:

[...]

> > > >>> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c

[...]

> > > >>> @@ -897,8 +898,17 @@ static u64 read_id_reg(struct sys_reg_desc const *r, bool raz)
> > > >>> {
> > > >>> u32 id = sys_reg((u32)r->Op0, (u32)r->Op1,
> > > >>> (u32)r->CRn, (u32)r->CRm, (u32)r->Op2);
> > > >>> + u64 val = raz ? 0 : read_sanitised_ftr_reg(id);
> > > >>>
> > > >>> - return raz ? 0 : read_sanitised_ftr_reg(id);
> > > >>> + if (id == SYS_ID_AA64PFR0_EL1) {
> > > >>> + if (val & (0xfUL << ID_AA64PFR0_SVE_SHIFT))
> > > >>> + pr_err_once("kvm [%i]: SVE unsupported for guests, suppressing\n",
> > > >>> + task_pid_nr(current));
> > > >>
> > > >> nit: does this really qualify as an error print?
> > > >
> > > > I have no strong opinion on this: maz suggested I should add this --
> > > > his concern was to make it difficult to ignore.
> > > >
> > > > This is transitional: the main purpose is to circumvent bug reports from
> > > > people who find that SVE doesn't work in their guests, in the interim
> > > > before proper KVM support lands upstream.
> > > >
> > > > Marc, do you still agree with this position?
> > >
> > > As long as this is transitional, I'm OK with this.
> >
> > No argument from me, since it was your request in the first place ;)
> >
> > Christoffer?
> >
> No (further) argument from me.

OK, thanks. Can I take that as an Ack?

Cheers
---Dave