All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Zhang Lei <zhang.lei@jp.fujitsu.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Will Deacon <will@kernel.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/7] KVM: arm64: Discard any SVE state when entering KVM guests
Date: Wed, 21 Sep 2022 18:31:28 +0100	[thread overview]
Message-ID: <87mtask51r.wl-maz@kernel.org> (raw)
In-Reply-To: <YyogzYzVbb3mvZWM@sirena.org.uk>

On Tue, 20 Sep 2022 21:21:33 +0100,
Mark Brown <broonie@kernel.org> wrote:
> 
> [1  <text/plain; us-ascii (quoted-printable)>]
> On Tue, Sep 20, 2022 at 05:44:01PM +0100, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > >  void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu)
> > >  {
> > >  	BUG_ON(!current->mm);
> > > -	BUG_ON(test_thread_flag(TIF_SVE));
> > > +
> > > +	fpsimd_kvm_prepare();
> > 
> > Why is this *before* the check against system_supports_fpsimd()? I
> > don't think the architecture allows SVE without FP, for obvious
> > reasons...
> 
> Good point, though now that I think about it I can't think of a
> requirement for FP when implementing SME (there's certainly not
> one for SVE).

Even if the architecture was allowing this madness, KVM doesn't allow
SVE if FP is not available, just like the rest of the kernel.

> There's no use for that hook now though.

Care to clarify?

	M.

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Zhang Lei <zhang.lei@jp.fujitsu.com>,
	James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Andre Przywara <andre.przywara@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/7] KVM: arm64: Discard any SVE state when entering KVM guests
Date: Wed, 21 Sep 2022 18:31:28 +0100	[thread overview]
Message-ID: <87mtask51r.wl-maz@kernel.org> (raw)
In-Reply-To: <YyogzYzVbb3mvZWM@sirena.org.uk>

On Tue, 20 Sep 2022 21:21:33 +0100,
Mark Brown <broonie@kernel.org> wrote:
> 
> [1  <text/plain; us-ascii (quoted-printable)>]
> On Tue, Sep 20, 2022 at 05:44:01PM +0100, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > >  void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu)
> > >  {
> > >  	BUG_ON(!current->mm);
> > > -	BUG_ON(test_thread_flag(TIF_SVE));
> > > +
> > > +	fpsimd_kvm_prepare();
> > 
> > Why is this *before* the check against system_supports_fpsimd()? I
> > don't think the architecture allows SVE without FP, for obvious
> > reasons...
> 
> Good point, though now that I think about it I can't think of a
> requirement for FP when implementing SME (there's certainly not
> one for SVE).

Even if the architecture was allowing this madness, KVM doesn't allow
SVE if FP is not available, just like the rest of the kernel.

> There's no use for that hook now though.

Care to clarify?

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-21 17:31 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 22:55 [PATCH v3 0/7] arm64/sve: Clean up KVM integration and optimise syscalls Mark Brown
2022-08-15 22:55 ` Mark Brown
2022-08-15 22:55 ` [PATCH v3 1/7] KVM: arm64: Discard any SVE state when entering KVM guests Mark Brown
2022-08-15 22:55   ` Mark Brown
2022-09-20 16:44   ` Marc Zyngier
2022-09-20 16:44     ` Marc Zyngier
2022-09-20 20:21     ` Mark Brown
2022-09-20 20:21       ` Mark Brown
2022-09-21 17:31       ` Marc Zyngier [this message]
2022-09-21 17:31         ` Marc Zyngier
2022-09-22 11:44         ` Mark Brown
2022-09-22 11:44           ` Mark Brown
2022-08-15 22:55 ` [PATCH v3 2/7] arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE Mark Brown
2022-08-15 22:55   ` Mark Brown
2022-09-20 17:14   ` Marc Zyngier
2022-09-20 17:14     ` Marc Zyngier
2022-09-20 18:09     ` Mark Brown
2022-09-20 18:09       ` Mark Brown
2022-09-20 18:30       ` Marc Zyngier
2022-09-20 18:30         ` Marc Zyngier
2022-08-15 22:55 ` [PATCH v3 3/7] arm64/fpsimd: Have KVM explicitly say which FP registers to save Mark Brown
2022-08-15 22:55   ` Mark Brown
2022-09-20 17:52   ` Marc Zyngier
2022-09-20 17:52     ` Marc Zyngier
2022-09-20 18:32     ` Mark Brown
2022-09-20 18:32       ` Mark Brown
2022-09-21 17:47       ` Marc Zyngier
2022-09-21 17:47         ` Marc Zyngier
2022-09-22 12:18         ` Mark Brown
2022-09-22 12:18           ` Mark Brown
2022-08-15 22:55 ` [PATCH v3 4/7] arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM Mark Brown
2022-08-15 22:55   ` Mark Brown
2022-09-20 18:04   ` Marc Zyngier
2022-09-20 18:04     ` Marc Zyngier
2022-09-20 18:53     ` Mark Brown
2022-09-20 18:53       ` Mark Brown
2022-08-15 22:55 ` [PATCH v3 5/7] arm64/fpsimd: Load FP state based on recorded data type Mark Brown
2022-08-15 22:55   ` Mark Brown
2022-09-20 18:19   ` Marc Zyngier
2022-09-20 18:19     ` Marc Zyngier
2022-09-20 19:02     ` Mark Brown
2022-09-20 19:02       ` Mark Brown
2022-08-15 22:55 ` [PATCH v3 6/7] arm64/fpsimd: SME no longer requires SVE register state Mark Brown
2022-08-15 22:55   ` Mark Brown
2022-08-15 22:55 ` [PATCH v3 7/7] arm64/sve: Leave SVE enabled on syscall if we don't context switch Mark Brown
2022-08-15 22:55   ` Mark Brown

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=87mtask51r.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=will@kernel.org \
    --cc=zhang.lei@jp.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.