[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/7] x86/pv: Rewrite %dr6 handling
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 18 Sep 2023 13:46:19 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=16/HsGxMSMAYDRdz+AA4pmHjS8iA/+e6BbAGyjHtETU=; b=LDGDhFaJe/2sugzj/m7M/vn1PRouVJPJDerntqGunMsZG1y7BaEFJUUVhd1MFeQJ5aHWYF6MoSTKEVVKgoquksitaYUHja6JnoHa2NxMmKN9P8olfOzoqtT1Sa/gNVmbh3NZUnoY0R9hqGgYo0mnijEcWj824exmrAAzdjb4W+PVYFkSMwwFFEY3pWRuvLMkQ4f5vsGBs+SLvaOwEC5Oroz79FYaFm5y12uMEMNAJN5c6s94n/LlOKYYZuj1nc1TOvIkRKje/SENQzOENuhBI3iHLtVbL/dk4tM/11SzNQ4ixGkt7U90t02r+bjJ5XfFjgZtFBYUkQp9vN1q9TiV7w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hDnyX0PGgg1yTK5pUlTiX/+lyUl4TVyiCJfN9bxZOPefepITL/7bcEZfcg+pvQFx+BZmx+StsLIpVsAB4Eo8ngmWn9MVqVokvuXSEzErcTGdi979i7mRwld48W/8STe75R0sG9+VrMxlhrbYWStvkwQhK4Z0sRoLfH9RLv94o3Qd/e2JNLjWqkxGv9lgbEDloRKLhJN8ryJ1UJ8Im7/K5qQarffbiQJ7TDcP72roXE04J9LGGQ0dBPFtoEBehPYWsJIOk4H0mhy/PPJ+1q9jizqlFrHdCMG/seRSYUQWbi6da6XH9DsbUhyZ0EMxlt72ZqPC7DtwPmGKYcPza0hePA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jinoh Kang <jinoh.kang.kr@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 18 Sep 2023 11:46:30 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 15.09.2023 22:36, Andrew Cooper wrote:
> All #DB exceptions result in an update of %dr6, but this isn't handled
> properly by Xen for any guest type.
>
> Remove all ad-hoc dr6 handling, leaving it to pv_inject_event() in most cases
> and using the new x86_merge_dr6() helper.
>
> In do_debug(), swap the dr6 to pending_dbg in order to operate entirely with
> positive polarity. Among other things, this helps spot RTM/BLD in the
> diagnostic message.
>
> Drop the unconditional v->arch.dr6 adjustment. pv_inject_event() performs the
> adjustment in the common case, but retain the prior behaviour if a debugger is
> attached.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
One minor aspect to consider:
> @@ -1990,24 +1990,23 @@ void do_debug(struct cpu_user_regs *regs)
> * so ensure the message is ratelimited.
> */
> gprintk(XENLOG_WARNING,
> - "Hit #DB in Xen context: %04x:%p [%ps], stk %04x:%p, dr6
> %lx\n",
> + "Hit #DB in Xen context: %04x:%p [%ps], stk %04x:%p,
> pending_dbg %lx\n",
Would you mind shorting to just "pending"?
Jan
|