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>,
	Will Deacon <will@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Fuad Tabba <tabba@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH 2/4] arm64/fpsimd: Discover maximum vector length implemented by any CPU
Date: Wed, 05 Jun 2024 13:13:20 +0100	[thread overview]
Message-ID: <86bk4flh9b.wl-maz@kernel.org> (raw)
In-Reply-To: <20240605-kvm-arm64-fix-pkvm-sve-vl-v1-2-680d6b43b4c1@kernel.org>

On Wed, 05 Jun 2024 12:41:28 +0100,
Mark Brown <broonie@kernel.org> wrote:
> 
> @@ -1083,6 +1095,18 @@ int vec_verify_vq_map(enum vec_type type)
>  	if (!IS_ENABLED(CONFIG_KVM) || !is_hyp_mode_available())
>  		return 0;
>  
> +	/*
> +	 * pKVM allocates and uses storage for host state based on the
> +	 * largest per-PE VL, reject new PEs with a larger maximum.
> +	 */
> +	if (is_protected_kvm_enabled()) {
> +		if (max_vl > info->max_cpu_vl) {
> +			pr_warn("%s: cpu%d: would increase maximum VL\n",
> +				info->name, smp_processor_id());
> +			return -EINVAL;
> +		}
> +	}
> +

Once protected mode is enabled, no new CPU can be booted (see
psci_relay.c::psci_cpu_on()).

	M.

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

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>,
	Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Fuad Tabba <tabba@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH 2/4] arm64/fpsimd: Discover maximum vector length implemented by any CPU
Date: Wed, 05 Jun 2024 13:13:20 +0100	[thread overview]
Message-ID: <86bk4flh9b.wl-maz@kernel.org> (raw)
In-Reply-To: <20240605-kvm-arm64-fix-pkvm-sve-vl-v1-2-680d6b43b4c1@kernel.org>

On Wed, 05 Jun 2024 12:41:28 +0100,
Mark Brown <broonie@kernel.org> wrote:
> 
> @@ -1083,6 +1095,18 @@ int vec_verify_vq_map(enum vec_type type)
>  	if (!IS_ENABLED(CONFIG_KVM) || !is_hyp_mode_available())
>  		return 0;
>  
> +	/*
> +	 * pKVM allocates and uses storage for host state based on the
> +	 * largest per-PE VL, reject new PEs with a larger maximum.
> +	 */
> +	if (is_protected_kvm_enabled()) {
> +		if (max_vl > info->max_cpu_vl) {
> +			pr_warn("%s: cpu%d: would increase maximum VL\n",
> +				info->name, smp_processor_id());
> +			return -EINVAL;
> +		}
> +	}
> +

Once protected mode is enabled, no new CPU can be booted (see
psci_relay.c::psci_cpu_on()).

	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

  parent reply	other threads:[~2024-06-05 12:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 11:41 [PATCH 0/4] KVM: arm64: Fix underallocation of storage for SVE state Mark Brown
2024-06-05 11:41 ` Mark Brown
2024-06-05 11:41 ` [PATCH 1/4] arm64/fpsimd: Introduce __bit_to_vl() helper Mark Brown
2024-06-05 11:41   ` Mark Brown
2024-06-05 11:41 ` [PATCH 2/4] arm64/fpsimd: Discover maximum vector length implemented by any CPU Mark Brown
2024-06-05 11:41   ` Mark Brown
2024-06-05 12:03   ` Fuad Tabba
2024-06-05 12:03     ` Fuad Tabba
2024-06-05 12:56     ` Mark Brown
2024-06-05 12:56       ` Mark Brown
2024-06-05 12:13   ` Marc Zyngier [this message]
2024-06-05 12:13     ` Marc Zyngier
2024-06-05 12:31     ` Mark Brown
2024-06-05 12:31       ` Mark Brown
2024-06-05 11:41 ` [PATCH 3/4] KVM: arm64: Fix FFR offset calculation for pKVM host state save and restore Mark Brown
2024-06-05 11:41   ` Mark Brown
2024-06-05 12:12   ` Fuad Tabba
2024-06-05 12:12     ` Fuad Tabba
2024-06-05 13:17     ` Mark Brown
2024-06-05 13:17       ` Mark Brown
2024-06-05 11:41 ` [PATCH 4/4] KVM: arm64: Avoid underallocating storage for host SVE state Mark Brown
2024-06-05 11:41   ` 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=86bk4flh9b.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=will@kernel.org \
    /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.