* [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t [not found] <20250610053128.4118784-1-anshuman.khandual@arm.com> @ 2025-06-10 5:31 ` Anshuman Khandual 2025-06-10 17:01 ` Marc Zyngier 0 siblings, 1 reply; 5+ messages in thread From: Anshuman Khandual @ 2025-06-10 5:31 UTC (permalink / raw) To: linux-arm-kernel Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Mark Rutland, Ada Couprie Diaz, linux-kernel, Marc Zyngier, Oliver Upton, Joey Gouly, kvm, kvmarm, linux-kselftest Change MDSCR_EL1 register holding local variables as uint64_t that reflects its true register width as well. Cc: Marc Zyngier <maz@kernel.org> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Joey Gouly <joey.gouly@arm.com> Cc: kvm@vger.kernel.org Cc: kvmarm@lists.linux.dev Cc: linux-kernel@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@arm.com> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> --- tools/testing/selftests/kvm/arm64/debug-exceptions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/arm64/debug-exceptions.c b/tools/testing/selftests/kvm/arm64/debug-exceptions.c index c7fb55c9135b..e34963956fbc 100644 --- a/tools/testing/selftests/kvm/arm64/debug-exceptions.c +++ b/tools/testing/selftests/kvm/arm64/debug-exceptions.c @@ -140,7 +140,7 @@ static void enable_os_lock(void) static void enable_monitor_debug_exceptions(void) { - uint32_t mdscr; + uint64_t mdscr; asm volatile("msr daifclr, #8"); @@ -223,7 +223,7 @@ void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, static void install_ss(void) { - uint32_t mdscr; + uint64_t mdscr; asm volatile("msr daifclr, #8"); -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t 2025-06-10 5:31 ` [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t Anshuman Khandual @ 2025-06-10 17:01 ` Marc Zyngier 2025-06-11 3:45 ` Anshuman Khandual 0 siblings, 1 reply; 5+ messages in thread From: Marc Zyngier @ 2025-06-10 17:01 UTC (permalink / raw) To: Anshuman Khandual Cc: linux-arm-kernel, Catalin Marinas, Will Deacon, Mark Rutland, Ada Couprie Diaz, linux-kernel, Oliver Upton, Joey Gouly, kvm, kvmarm, linux-kselftest On Tue, 10 Jun 2025 06:31:28 +0100, Anshuman Khandual <anshuman.khandual@arm.com> wrote: > > Change MDSCR_EL1 register holding local variables as uint64_t that reflects > its true register width as well. > > Cc: Marc Zyngier <maz@kernel.org> > Cc: Oliver Upton <oliver.upton@linux.dev> > Cc: Joey Gouly <joey.gouly@arm.com> > Cc: kvm@vger.kernel.org > Cc: kvmarm@lists.linux.dev > Cc: linux-kernel@vger.kernel.org > Cc: linux-kselftest@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@arm.com> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> > --- > tools/testing/selftests/kvm/arm64/debug-exceptions.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/kvm/arm64/debug-exceptions.c b/tools/testing/selftests/kvm/arm64/debug-exceptions.c > index c7fb55c9135b..e34963956fbc 100644 > --- a/tools/testing/selftests/kvm/arm64/debug-exceptions.c > +++ b/tools/testing/selftests/kvm/arm64/debug-exceptions.c > @@ -140,7 +140,7 @@ static void enable_os_lock(void) > > static void enable_monitor_debug_exceptions(void) > { > - uint32_t mdscr; > + uint64_t mdscr; > > asm volatile("msr daifclr, #8"); > > @@ -223,7 +223,7 @@ void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, > > static void install_ss(void) > { > - uint32_t mdscr; > + uint64_t mdscr; > > asm volatile("msr daifclr, #8"); > Why change this in the place that matters *the least*? arch/arm64/kernel/debug-monitors.c is full of 32bit manipulation of this register, and that's only one example of it. So if you are going to change this, please do it fully, not as a random change in a random file. Thanks, M. -- Without deviation from the norm, progress is not possible. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t 2025-06-10 17:01 ` Marc Zyngier @ 2025-06-11 3:45 ` Anshuman Khandual 2025-06-11 9:59 ` Mark Rutland 2025-06-11 12:52 ` Marc Zyngier 0 siblings, 2 replies; 5+ messages in thread From: Anshuman Khandual @ 2025-06-11 3:45 UTC (permalink / raw) To: Marc Zyngier Cc: linux-arm-kernel, Catalin Marinas, Will Deacon, Mark Rutland, Ada Couprie Diaz, linux-kernel, Oliver Upton, Joey Gouly, kvm, kvmarm, linux-kselftest On 10/06/25 10:31 PM, Marc Zyngier wrote: > On Tue, 10 Jun 2025 06:31:28 +0100, > Anshuman Khandual <anshuman.khandual@arm.com> wrote: >> >> Change MDSCR_EL1 register holding local variables as uint64_t that reflects >> its true register width as well. >> >> Cc: Marc Zyngier <maz@kernel.org> >> Cc: Oliver Upton <oliver.upton@linux.dev> >> Cc: Joey Gouly <joey.gouly@arm.com> >> Cc: kvm@vger.kernel.org >> Cc: kvmarm@lists.linux.dev >> Cc: linux-kernel@vger.kernel.org >> Cc: linux-kselftest@vger.kernel.org >> Cc: linux-arm-kernel@lists.infradead.org >> Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@arm.com> >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> >> --- >> tools/testing/selftests/kvm/arm64/debug-exceptions.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/tools/testing/selftests/kvm/arm64/debug-exceptions.c b/tools/testing/selftests/kvm/arm64/debug-exceptions.c >> index c7fb55c9135b..e34963956fbc 100644 >> --- a/tools/testing/selftests/kvm/arm64/debug-exceptions.c >> +++ b/tools/testing/selftests/kvm/arm64/debug-exceptions.c >> @@ -140,7 +140,7 @@ static void enable_os_lock(void) >> >> static void enable_monitor_debug_exceptions(void) >> { >> - uint32_t mdscr; >> + uint64_t mdscr; >> >> asm volatile("msr daifclr, #8"); >> >> @@ -223,7 +223,7 @@ void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, >> >> static void install_ss(void) >> { >> - uint32_t mdscr; >> + uint64_t mdscr; >> >> asm volatile("msr daifclr, #8"); >> > > Why change this in the place that matters *the least*? > > arch/arm64/kernel/debug-monitors.c is full of 32bit manipulation of > this register, and that's only one example of it. So if you are going > to change this, please do it fully, not as a random change in a random > file. The first patch in this series changes mdscr system register to 64 bit in the mentioned file (i.e arch/arm64/kernel/debug-monitors.c). > > Thanks, > > M. > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t 2025-06-11 3:45 ` Anshuman Khandual @ 2025-06-11 9:59 ` Mark Rutland 2025-06-11 12:52 ` Marc Zyngier 1 sibling, 0 replies; 5+ messages in thread From: Mark Rutland @ 2025-06-11 9:59 UTC (permalink / raw) To: Anshuman Khandual Cc: Marc Zyngier, linux-arm-kernel, Catalin Marinas, Will Deacon, Ada Couprie Diaz, linux-kernel, Oliver Upton, Joey Gouly, kvm, kvmarm, linux-kselftest On Wed, Jun 11, 2025 at 09:15:10AM +0530, Anshuman Khandual wrote: > > > On 10/06/25 10:31 PM, Marc Zyngier wrote: > > On Tue, 10 Jun 2025 06:31:28 +0100, > > Anshuman Khandual <anshuman.khandual@arm.com> wrote: > >> > >> Change MDSCR_EL1 register holding local variables as uint64_t that reflects > >> its true register width as well. > >> > >> Cc: Marc Zyngier <maz@kernel.org> > >> Cc: Oliver Upton <oliver.upton@linux.dev> > >> Cc: Joey Gouly <joey.gouly@arm.com> > >> Cc: kvm@vger.kernel.org > >> Cc: kvmarm@lists.linux.dev > >> Cc: linux-kernel@vger.kernel.org > >> Cc: linux-kselftest@vger.kernel.org > >> Cc: linux-arm-kernel@lists.infradead.org > >> Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@arm.com> > >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> > >> --- > >> tools/testing/selftests/kvm/arm64/debug-exceptions.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/tools/testing/selftests/kvm/arm64/debug-exceptions.c b/tools/testing/selftests/kvm/arm64/debug-exceptions.c > >> index c7fb55c9135b..e34963956fbc 100644 > >> --- a/tools/testing/selftests/kvm/arm64/debug-exceptions.c > >> +++ b/tools/testing/selftests/kvm/arm64/debug-exceptions.c > >> @@ -140,7 +140,7 @@ static void enable_os_lock(void) > >> > >> static void enable_monitor_debug_exceptions(void) > >> { > >> - uint32_t mdscr; > >> + uint64_t mdscr; > >> > >> asm volatile("msr daifclr, #8"); > >> > >> @@ -223,7 +223,7 @@ void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, > >> > >> static void install_ss(void) > >> { > >> - uint32_t mdscr; > >> + uint64_t mdscr; > >> > >> asm volatile("msr daifclr, #8"); > >> > > > > Why change this in the place that matters *the least*? > > > > arch/arm64/kernel/debug-monitors.c is full of 32bit manipulation of > > this register, and that's only one example of it. So if you are going > > to change this, please do it fully, not as a random change in a random > > file. > > The first patch in this series changes mdscr system register to 64 bit > in the mentioned file (i.e arch/arm64/kernel/debug-monitors.c). You did not Cc Marc on oatch 1 or the cover letter. KVM folk are only Cc'd on patch 2. Marc, for context the series is: https://lore.kernel.org/linux-arm-kernel/20250610053128.4118784-1-anshuman.khandual@arm.com/ ... and I've asked Anshuman to better describe the rationale. Mark. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t 2025-06-11 3:45 ` Anshuman Khandual 2025-06-11 9:59 ` Mark Rutland @ 2025-06-11 12:52 ` Marc Zyngier 1 sibling, 0 replies; 5+ messages in thread From: Marc Zyngier @ 2025-06-11 12:52 UTC (permalink / raw) To: Anshuman Khandual Cc: linux-arm-kernel, Catalin Marinas, Will Deacon, Mark Rutland, Ada Couprie Diaz, linux-kernel, Oliver Upton, Joey Gouly, kvm, kvmarm, linux-kselftest On Wed, 11 Jun 2025 04:45:10 +0100, Anshuman Khandual <anshuman.khandual@arm.com> wrote: > > > > On 10/06/25 10:31 PM, Marc Zyngier wrote: > > On Tue, 10 Jun 2025 06:31:28 +0100, > > Anshuman Khandual <anshuman.khandual@arm.com> wrote: > >> > >> Change MDSCR_EL1 register holding local variables as uint64_t that reflects > >> its true register width as well. > >> > >> Cc: Marc Zyngier <maz@kernel.org> > >> Cc: Oliver Upton <oliver.upton@linux.dev> > >> Cc: Joey Gouly <joey.gouly@arm.com> > >> Cc: kvm@vger.kernel.org > >> Cc: kvmarm@lists.linux.dev > >> Cc: linux-kernel@vger.kernel.org > >> Cc: linux-kselftest@vger.kernel.org > >> Cc: linux-arm-kernel@lists.infradead.org > >> Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@arm.com> > >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> > >> --- > >> tools/testing/selftests/kvm/arm64/debug-exceptions.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/tools/testing/selftests/kvm/arm64/debug-exceptions.c b/tools/testing/selftests/kvm/arm64/debug-exceptions.c > >> index c7fb55c9135b..e34963956fbc 100644 > >> --- a/tools/testing/selftests/kvm/arm64/debug-exceptions.c > >> +++ b/tools/testing/selftests/kvm/arm64/debug-exceptions.c > >> @@ -140,7 +140,7 @@ static void enable_os_lock(void) > >> > >> static void enable_monitor_debug_exceptions(void) > >> { > >> - uint32_t mdscr; > >> + uint64_t mdscr; > >> > >> asm volatile("msr daifclr, #8"); > >> > >> @@ -223,7 +223,7 @@ void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr, > >> > >> static void install_ss(void) > >> { > >> - uint32_t mdscr; > >> + uint64_t mdscr; > >> > >> asm volatile("msr daifclr, #8"); > >> > > > > Why change this in the place that matters *the least*? > > > > arch/arm64/kernel/debug-monitors.c is full of 32bit manipulation of > > this register, and that's only one example of it. So if you are going > > to change this, please do it fully, not as a random change in a random > > file. > > The first patch in this series changes mdscr system register to 64 bit > in the mentioned file (i.e arch/arm64/kernel/debug-monitors.c). Then please Cc me on the series, and not patches at random. Context matters. M. -- Without deviation from the norm, progress is not possible. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-11 12:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250610053128.4118784-1-anshuman.khandual@arm.com>
2025-06-10 5:31 ` [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t Anshuman Khandual
2025-06-10 17:01 ` Marc Zyngier
2025-06-11 3:45 ` Anshuman Khandual
2025-06-11 9:59 ` Mark Rutland
2025-06-11 12:52 ` Marc Zyngier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox