From: Oliver Upton <oupton@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
James Morse <james.morse@arm.com>,
Alexandru Elisei <Alexandru.Elisei@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
Andrew Jones <drjones@redhat.com>,
Peter Shier <pshier@google.com>,
Ricardo Koller <ricarkol@google.com>,
Reiji Watanabe <reijiw@google.com>
Subject: Re: [PATCH v2 2/6] KVM: arm64: Stash OSLSR_EL1 in the cpu context
Date: Tue, 2 Nov 2021 02:51:21 -0700 [thread overview]
Message-ID: <CAOQ_QsgqLVVwzOhC5QeRm4qvWA-OXPB+bA=JJk4ffAavO5KMqQ@mail.gmail.com> (raw)
In-Reply-To: <20211102094651.2071532-3-oupton@google.com>
On Tue, Nov 2, 2021 at 2:47 AM Oliver Upton <oupton@google.com> wrote:
>
> An upcoming change to KVM will context switch the OS Lock status between
> guest/host. Add OSLSR_EL1 to the cpu context and handle guest reads
> using the stored value.
>
> Wire up a custom handler for writes from userspace and prevent any of
> the invariant bits from changing.
>
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---
> arch/arm64/include/asm/kvm_host.h | 1 +
> arch/arm64/kvm/sys_regs.c | 31 ++++++++++++++++++++++++-------
> 2 files changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index f8be56d5342b..c98f65c4a1f7 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -172,6 +172,7 @@ enum vcpu_sysreg {
> MDSCR_EL1, /* Monitor Debug System Control Register */
> MDCCINT_EL1, /* Monitor Debug Comms Channel Interrupt Enable Reg */
> DISR_EL1, /* Deferred Interrupt Status Register */
> + OSLSR_EL1, /* OS Lock Status Register */
Sorry Marc, forgot to move this up per your suggestion on the last
series. Only caught it once the patch went out the door.
--
Oliver
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oupton@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
Peter Shier <pshier@google.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/6] KVM: arm64: Stash OSLSR_EL1 in the cpu context
Date: Tue, 2 Nov 2021 02:51:21 -0700 [thread overview]
Message-ID: <CAOQ_QsgqLVVwzOhC5QeRm4qvWA-OXPB+bA=JJk4ffAavO5KMqQ@mail.gmail.com> (raw)
In-Reply-To: <20211102094651.2071532-3-oupton@google.com>
On Tue, Nov 2, 2021 at 2:47 AM Oliver Upton <oupton@google.com> wrote:
>
> An upcoming change to KVM will context switch the OS Lock status between
> guest/host. Add OSLSR_EL1 to the cpu context and handle guest reads
> using the stored value.
>
> Wire up a custom handler for writes from userspace and prevent any of
> the invariant bits from changing.
>
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---
> arch/arm64/include/asm/kvm_host.h | 1 +
> arch/arm64/kvm/sys_regs.c | 31 ++++++++++++++++++++++++-------
> 2 files changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index f8be56d5342b..c98f65c4a1f7 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -172,6 +172,7 @@ enum vcpu_sysreg {
> MDSCR_EL1, /* Monitor Debug System Control Register */
> MDCCINT_EL1, /* Monitor Debug Comms Channel Interrupt Enable Reg */
> DISR_EL1, /* Deferred Interrupt Status Register */
> + OSLSR_EL1, /* OS Lock Status Register */
Sorry Marc, forgot to move this up per your suggestion on the last
series. Only caught it once the patch went out the door.
--
Oliver
_______________________________________________
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: Oliver Upton <oupton@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
James Morse <james.morse@arm.com>,
Alexandru Elisei <Alexandru.Elisei@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
Andrew Jones <drjones@redhat.com>,
Peter Shier <pshier@google.com>,
Ricardo Koller <ricarkol@google.com>,
Reiji Watanabe <reijiw@google.com>
Subject: Re: [PATCH v2 2/6] KVM: arm64: Stash OSLSR_EL1 in the cpu context
Date: Tue, 2 Nov 2021 02:51:21 -0700 [thread overview]
Message-ID: <CAOQ_QsgqLVVwzOhC5QeRm4qvWA-OXPB+bA=JJk4ffAavO5KMqQ@mail.gmail.com> (raw)
In-Reply-To: <20211102094651.2071532-3-oupton@google.com>
On Tue, Nov 2, 2021 at 2:47 AM Oliver Upton <oupton@google.com> wrote:
>
> An upcoming change to KVM will context switch the OS Lock status between
> guest/host. Add OSLSR_EL1 to the cpu context and handle guest reads
> using the stored value.
>
> Wire up a custom handler for writes from userspace and prevent any of
> the invariant bits from changing.
>
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---
> arch/arm64/include/asm/kvm_host.h | 1 +
> arch/arm64/kvm/sys_regs.c | 31 ++++++++++++++++++++++++-------
> 2 files changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index f8be56d5342b..c98f65c4a1f7 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -172,6 +172,7 @@ enum vcpu_sysreg {
> MDSCR_EL1, /* Monitor Debug System Control Register */
> MDCCINT_EL1, /* Monitor Debug Comms Channel Interrupt Enable Reg */
> DISR_EL1, /* Deferred Interrupt Status Register */
> + OSLSR_EL1, /* OS Lock Status Register */
Sorry Marc, forgot to move this up per your suggestion on the last
series. Only caught it once the patch went out the door.
--
Oliver
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-11-02 9:52 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 9:46 [PATCH v2 0/6] KVM: arm64: Emulate the OS lock Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` [PATCH v2 1/6] KVM: arm64: Correctly treat writes to OSLSR_EL1 as undefined Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-04 2:40 ` Reiji Watanabe
2021-11-04 2:40 ` Reiji Watanabe
2021-11-04 2:40 ` Reiji Watanabe
2021-11-02 9:46 ` [PATCH v2 2/6] KVM: arm64: Stash OSLSR_EL1 in the cpu context Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:51 ` Oliver Upton [this message]
2021-11-02 9:51 ` Oliver Upton
2021-11-02 9:51 ` Oliver Upton
2021-11-04 3:37 ` Reiji Watanabe
2021-11-04 3:37 ` Reiji Watanabe
2021-11-04 3:37 ` Reiji Watanabe
2021-11-02 9:46 ` [PATCH v2 3/6] KVM: arm64: Allow guest to set the OSLK bit Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-04 3:31 ` Reiji Watanabe
2021-11-04 3:31 ` Reiji Watanabe
2021-11-04 3:31 ` Reiji Watanabe
2021-11-04 3:47 ` Ricardo Koller
2021-11-04 3:47 ` Ricardo Koller
2021-11-04 3:47 ` Ricardo Koller
2021-11-04 4:40 ` Oliver Upton
2021-11-04 4:40 ` Oliver Upton
2021-11-04 4:40 ` Oliver Upton
2021-11-02 9:46 ` [PATCH v2 4/6] KVM: arm64: Emulate the OS Lock Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 23:45 ` Ricardo Koller
2021-11-02 23:45 ` Ricardo Koller
2021-11-02 23:45 ` Ricardo Koller
2021-11-03 0:35 ` Oliver Upton
2021-11-03 0:35 ` Oliver Upton
2021-11-03 0:35 ` Oliver Upton
2021-11-05 3:56 ` Reiji Watanabe
2021-11-05 3:56 ` Reiji Watanabe
2021-11-05 3:56 ` Reiji Watanabe
2021-11-05 5:36 ` Oliver Upton
2021-11-05 5:36 ` Oliver Upton
2021-11-05 5:36 ` Oliver Upton
2021-11-02 9:46 ` [PATCH v2 5/6] selftests: KVM: Add OSLSR_EL1 to the list of blessed regs Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` [PATCH v2 6/6] selftests: KVM: Test OS lock behavior Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 9:46 ` Oliver Upton
2021-11-02 11:09 ` Marc Zyngier
2021-11-02 11:09 ` Marc Zyngier
2021-11-02 11:09 ` Marc Zyngier
2021-11-02 14:53 ` Oliver Upton
2021-11-02 14:53 ` Oliver Upton
2021-11-02 14:53 ` Oliver Upton
2021-11-02 20:01 ` Oliver Upton
2021-11-02 20:01 ` Oliver Upton
2021-11-02 20:01 ` Oliver Upton
2021-11-02 23:27 ` Ricardo Koller
2021-11-02 23:27 ` Ricardo Koller
2021-11-02 23:27 ` Ricardo Koller
2021-11-02 23:36 ` Oliver Upton
2021-11-02 23:36 ` Oliver Upton
2021-11-02 23:36 ` Oliver Upton
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='CAOQ_QsgqLVVwzOhC5QeRm4qvWA-OXPB+bA=JJk4ffAavO5KMqQ@mail.gmail.com' \
--to=oupton@google.com \
--cc=Alexandru.Elisei@arm.com \
--cc=drjones@redhat.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=pshier@google.com \
--cc=reijiw@google.com \
--cc=ricarkol@google.com \
--cc=suzuki.poulose@arm.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.