All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>, Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, kernel-team@android.com,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/6] KVM: selftests: arm64: Initialise default guest mode at test startup time
Date: Mon, 27 Dec 2021 12:48:04 +0000	[thread overview]
Message-ID: <20211227124809.1335409-2-maz@kernel.org> (raw)
In-Reply-To: <20211227124809.1335409-1-maz@kernel.org>

As we are going to add support for a variable default mode on arm64,
let's make sure it is setup first by using a constructor that gets
called before the actual test runs.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 tools/testing/selftests/kvm/lib/aarch64/processor.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/testing/selftests/kvm/lib/aarch64/processor.c
index b4eeeafd2a70..b509341b8411 100644
--- a/tools/testing/selftests/kvm/lib/aarch64/processor.c
+++ b/tools/testing/selftests/kvm/lib/aarch64/processor.c
@@ -432,3 +432,12 @@ uint32_t guest_get_vcpuid(void)
 {
 	return read_sysreg(tpidr_el1);
 }
+
+/*
+ * arm64 doesn't have a true default mode, so start by computing the
+ * available IPA space and page sizes early.
+ */
+void __attribute__((constructor)) init_guest_modes(void)
+{
+       guest_modes_append_default();
+}
-- 
2.30.2

_______________________________________________
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: Paolo Bonzini <pbonzini@redhat.com>, Andrew Jones <drjones@redhat.com>
Cc: James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel-team@android.com
Subject: [PATCH v2 1/6] KVM: selftests: arm64: Initialise default guest mode at test startup time
Date: Mon, 27 Dec 2021 12:48:04 +0000	[thread overview]
Message-ID: <20211227124809.1335409-2-maz@kernel.org> (raw)
In-Reply-To: <20211227124809.1335409-1-maz@kernel.org>

As we are going to add support for a variable default mode on arm64,
let's make sure it is setup first by using a constructor that gets
called before the actual test runs.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 tools/testing/selftests/kvm/lib/aarch64/processor.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/testing/selftests/kvm/lib/aarch64/processor.c
index b4eeeafd2a70..b509341b8411 100644
--- a/tools/testing/selftests/kvm/lib/aarch64/processor.c
+++ b/tools/testing/selftests/kvm/lib/aarch64/processor.c
@@ -432,3 +432,12 @@ uint32_t guest_get_vcpuid(void)
 {
 	return read_sysreg(tpidr_el1);
 }
+
+/*
+ * arm64 doesn't have a true default mode, so start by computing the
+ * available IPA space and page sizes early.
+ */
+void __attribute__((constructor)) init_guest_modes(void)
+{
+       guest_modes_append_default();
+}
-- 
2.30.2


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

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>, Andrew Jones <drjones@redhat.com>
Cc: James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel-team@android.com
Subject: [PATCH v2 1/6] KVM: selftests: arm64: Initialise default guest mode at test startup time
Date: Mon, 27 Dec 2021 12:48:04 +0000	[thread overview]
Message-ID: <20211227124809.1335409-2-maz@kernel.org> (raw)
In-Reply-To: <20211227124809.1335409-1-maz@kernel.org>

As we are going to add support for a variable default mode on arm64,
let's make sure it is setup first by using a constructor that gets
called before the actual test runs.

Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 tools/testing/selftests/kvm/lib/aarch64/processor.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/testing/selftests/kvm/lib/aarch64/processor.c
index b4eeeafd2a70..b509341b8411 100644
--- a/tools/testing/selftests/kvm/lib/aarch64/processor.c
+++ b/tools/testing/selftests/kvm/lib/aarch64/processor.c
@@ -432,3 +432,12 @@ uint32_t guest_get_vcpuid(void)
 {
 	return read_sysreg(tpidr_el1);
 }
+
+/*
+ * arm64 doesn't have a true default mode, so start by computing the
+ * available IPA space and page sizes early.
+ */
+void __attribute__((constructor)) init_guest_modes(void)
+{
+       guest_modes_append_default();
+}
-- 
2.30.2


  reply	other threads:[~2021-12-27 12:49 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 12:48 [PATCH v2 0/6] KVM: arm64: Selftest IPA fixes and 16kB support Marc Zyngier
2021-12-27 12:48 ` Marc Zyngier
2021-12-27 12:48 ` Marc Zyngier
2021-12-27 12:48 ` Marc Zyngier [this message]
2021-12-27 12:48   ` [PATCH v2 1/6] KVM: selftests: arm64: Initialise default guest mode at test startup time Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:37   ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 2/6] KVM: selftests: arm64: Introduce a variable default IPA size Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:26   ` Andrew Jones
2021-12-28  9:26     ` Andrew Jones
2021-12-28  9:26     ` Andrew Jones
2021-12-28 10:29     ` Marc Zyngier
2021-12-28 10:29       ` Marc Zyngier
2021-12-28 10:29       ` Marc Zyngier
2021-12-28 10:33       ` Andrew Jones
2021-12-28 10:33         ` Andrew Jones
2021-12-28 10:33         ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 3/6] KVM: selftests: arm64: Check for supported page sizes Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:37   ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 4/6] KVM: selftests: arm64: Rework TCR_EL1 configuration Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:37   ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 5/6] KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K, 64K} Marc Zyngier
2021-12-27 12:48   ` [PATCH v2 5/6] KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K} Marc Zyngier
2021-12-27 12:48   ` [PATCH v2 5/6] KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K, 64K} Marc Zyngier
2021-12-27 12:48 ` [PATCH v2 6/6] KVM: selftests: arm64: Add support for various modes with 16kB page size Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:38   ` Andrew Jones
2021-12-28  9:38     ` Andrew Jones
2021-12-28  9:38     ` Andrew Jones
2021-12-28 11:09 ` [PATCH v2 0/6] KVM: arm64: Selftest IPA fixes and 16kB support Marc Zyngier
2021-12-28 11:09   ` Marc Zyngier
2021-12-28 11:09   ` Marc Zyngier

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=20211227124809.1335409-2-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=drjones@redhat.com \
    --cc=kernel-team@android.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=pbonzini@redhat.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.