[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] x86: Introduce x86_merge_dr6()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 15 Sep 2023 09:42: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=Z/bMK71pu+dY+ne+U+NXHCh+5iCIo7BU/oosu7XSHww=; b=iK3MNFZaxRc43IebsM+GsO5jW5rN3VGe8gtEIOCIcHLL9xwIZOPmsM+Bznb2WWxvrh97xqpotqT0vKEFm6i1FRYE7R3F94urlrrMdrW70WLtl4WPbiDXk/y+9nLwQv4XmSALC53tvoW7H7YyOt7f60U5ll6sYqhggka2N01N6gERUDN2EAzErryiX8leaCQ4k0bKhhH3leUopZpoHIEq96DBDf7iroq79VkO/zc9QAqwunoKqu5/ni2FGnCWmxAptp8d0i3EmnrDMd8BoL+mcmcff758TLzlKFdRe9dShvbld9Dr6yKrjCYUJQWXBIBZUGhvrw7Jw11tnwwuaw3aHg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QNv9GtX8GP2+jP816xLUXwBlXEe+uo9oKtR8G6zMmQI2GQn9I7CrfzsYDGeWqpi+b3//AEF4RdK5P2LUL8CxduD70qXKsYGADGWmVZeBdwiUvaHjyd66L03lRv7j1U3i+lq9HDVwToWbaWfQAT+xC7Ai/u3fjWlLnMZP9OBGCzXoQ1CFMpO2yjdLKK6YcXljiAYpmp9768Bq4buIojNtLpgM+r8BDJpKY1Ub4dvXpgMamP2fAzRpbiWyPIsy05IZ78sPONu1XlpqJMTa0sqolsna/Oco7xFmCC+wC0RBsPhmJ6yodOu6ZBovuOtWFacIbB5cTajNWmf33NQtCd8qMA==
  • 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: Fri, 15 Sep 2023 07:42:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.09.2023 20:03, Andrew Cooper wrote:
> On 14/09/2023 3:53 pm, Jan Beulich wrote:
>> On 13.09.2023 01:21, Andrew Cooper wrote:
>>> The current logic used to update %dr6 when injecting #DB is buggy.  The
>>> architectural behaviour is to overwrite B{0..3} and accumulate all other 
>>> bits.
>> While I consider this behavior plausible, forever since the introduction of
>> debug registers in i386 I have been missing a description in the manuals of
>> how %dr6 updating works. Can you point me at where the above is actually
>> spelled out?
> 
> The documentation is very poor.  The comment in the code is based on my
> conversations with architects.

Especially in such a case, can you please make very explicit in the
description what the origin of the information is? That way it's
simply impossible for anyone to review properly without having had
the same conversations.

Jan

> APM Vol2 13.1.1.3 Debug-Status Register (DR6) says
> 
> "Bits 15:13 of the DR6 register are not cleared by the processor and
> must be cleared by software after the contents have been read."
> 
> although this is buggy given the addition of BLD in the latest
> revision.  I've asked AMD to correct it.
> 
> 
> SDM Vol3 18.2.3 Debug Status Register (DR6) says
> 
> "Certain debug exceptions may clear bits 0-3. The remaining contents of
> the DR6 register are never cleared by the processor."
> 
> ~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.