From: Marc Zyngier <maz@kernel.org>
To: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] KVM: arm64: Initialize VCPU mdcr_el2 before loading it
Date: Thu, 01 Apr 2021 16:22:40 +0100 [thread overview]
Message-ID: <87r1juowqn.wl-maz@kernel.org> (raw)
In-Reply-To: <d3f6cd69-42c8-0199-c7cd-56e1789ac141@arm.com>
On Thu, 01 Apr 2021 14:55:54 +0100,
Alexandru Elisei <alexandru.elisei@arm.com> wrote:
[...]
> Had another go at this, and as I was looking at the code, I realized that
> conceptually, trapping debug registers access (MDCR_EL2.TDA) is tied to:
>
> - KVM_ARM64_DEBUG_DIRTY *not* being set (guest is debugging itself and KVM will
> world-switch the debug registers).
>
> - KVM_GUESTDBG_USE_HW being set, which also *sets* KVM_ARM64_DEBUG_DIRTY (host is
> debugging the guest using hardware breakpoints).
>
> So I cannot set the MDCR_EL2.TDA bit based on KVM_ARM64_DEBUG_DIRTY,
> because I would lose one of the two cases. It looks to me that
> keeping kvm_arm_setup_mdcr_el2() unchanged and calling it at the
> start of kvm_arm_setup_debug() is the way to go here.
Just post the revised patch, and we'll take it from there.
Thanks,
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: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] KVM: arm64: Initialize VCPU mdcr_el2 before loading it
Date: Thu, 01 Apr 2021 16:22:40 +0100 [thread overview]
Message-ID: <87r1juowqn.wl-maz@kernel.org> (raw)
In-Reply-To: <d3f6cd69-42c8-0199-c7cd-56e1789ac141@arm.com>
On Thu, 01 Apr 2021 14:55:54 +0100,
Alexandru Elisei <alexandru.elisei@arm.com> wrote:
[...]
> Had another go at this, and as I was looking at the code, I realized that
> conceptually, trapping debug registers access (MDCR_EL2.TDA) is tied to:
>
> - KVM_ARM64_DEBUG_DIRTY *not* being set (guest is debugging itself and KVM will
> world-switch the debug registers).
>
> - KVM_GUESTDBG_USE_HW being set, which also *sets* KVM_ARM64_DEBUG_DIRTY (host is
> debugging the guest using hardware breakpoints).
>
> So I cannot set the MDCR_EL2.TDA bit based on KVM_ARM64_DEBUG_DIRTY,
> because I would lose one of the two cases. It looks to me that
> keeping kvm_arm_setup_mdcr_el2() unchanged and calling it at the
> start of kvm_arm_setup_debug() is the way to go here.
Just post the revised patch, and we'll take it from there.
Thanks,
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
next prev parent reply other threads:[~2021-04-01 15:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 18:00 [PATCH v2] KVM: arm64: Initialize VCPU mdcr_el2 before loading it Alexandru Elisei
2021-03-23 18:00 ` Alexandru Elisei
2021-03-30 9:55 ` Marc Zyngier
2021-03-30 9:55 ` Marc Zyngier
2021-03-30 17:13 ` Alexandru Elisei
2021-03-30 17:13 ` Alexandru Elisei
2021-03-30 17:49 ` Alexandru Elisei
2021-03-30 17:49 ` Alexandru Elisei
2021-03-30 19:57 ` Marc Zyngier
2021-03-30 19:57 ` Marc Zyngier
2021-03-31 10:48 ` Alexandru Elisei
2021-03-31 10:48 ` Alexandru Elisei
2021-04-01 13:55 ` Alexandru Elisei
2021-04-01 13:55 ` Alexandru Elisei
2021-04-01 15:22 ` Marc Zyngier [this message]
2021-04-01 15:22 ` Marc Zyngier
2021-03-30 20:07 ` Marc Zyngier
2021-03-30 20:07 ` Marc Zyngier
2021-03-31 15:25 ` Alexandru Elisei
2021-03-31 15:25 ` Alexandru Elisei
2021-03-31 15:35 ` Marc Zyngier
2021-03-31 15:35 ` 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=87r1juowqn.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.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.