[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ae5c378-a81a-469f-a7eb-ddd855590a3b@intel.com>
Date: Tue, 17 Jun 2025 16:10:19 -0700
From: Sohil Mehta <sohil.mehta@...el.com>
To: "Xin Li (Intel)" <xin@...or.com>, <linux-kernel@...r.kernel.org>,
<kvm@...r.kernel.org>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <x86@...nel.org>, <hpa@...or.com>,
<seanjc@...gle.com>, <pbonzini@...hat.com>, <peterz@...radead.org>,
<brgerst@...il.com>, <tony.luck@...el.com>, <fenghuay@...dia.com>
Subject: Re: [PATCH v2 2/2] x86/traps: Initialize DR7 by writing its
architectural reset value
On 6/17/2025 12:32 AM, Xin Li (Intel) wrote:
> Initialize DR7 by writing its architectural reset value to ensure
> compliance with the specification.
>
> Reviewed-by: H. Peter Anvin (Intel) <hpa@...or.com>
> Signed-off-by: Xin Li (Intel) <xin@...or.com>
> ---
>
> Changes in v2:
> *) Use debug register index 7 rather than DR_CONTROL (PeterZ and Sean).
> *) Use DR7_FIXED_1 as the architectural reset value of DR7 (Sean).
> ---
> arch/x86/include/asm/debugreg.h | 14 ++++++++++----
> arch/x86/include/asm/kvm_host.h | 2 +-
> arch/x86/kernel/cpu/common.c | 2 +-
> arch/x86/kernel/kgdb.c | 2 +-
> arch/x86/kernel/process_32.c | 2 +-
> arch/x86/kernel/process_64.c | 2 +-
> arch/x86/kvm/x86.c | 4 ++--
> 7 files changed, 17 insertions(+), 11 deletions(-)
>
With the updated commit message suggested by Sean,
Reviewed-by: Sohil Mehta <sohil.mehta@...el.com>
> diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h
> index 363110e6b2e3..3acb85850c19 100644
> --- a/arch/x86/include/asm/debugreg.h
> +++ b/arch/x86/include/asm/debugreg.h
> @@ -9,6 +9,9 @@
> #include <asm/cpufeature.h>
> #include <asm/msr.h>
>
> +/* DR7_FIXED_1 is also used as the init/reset value for DR7 */
> +#define DR7_FIXED_1 0x00000400
> +
Did you mean to describe what DR7_FIXED_1 is, and then say it is also
used as the init/reset value? Because the way the comment is framed
right now, it seems something is missing.
> DECLARE_PER_CPU(unsigned long, cpu_dr7);
>
Powered by blists - more mailing lists