lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1434035560.3907.74.camel@infradead.org>
Date:	Thu, 11 Jun 2015 16:12:40 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	Joerg Roedel <jroedel@...e.de>
Cc:	zhen-hual@...com, iommu@...ts.linux-foundation.org, bhe@...hat.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] iommu/vt-d: Don't consider copied context entries
 as present

On Thu, 2015-06-11 at 15:44 +0100, David Woodhouse wrote:
> It used to look like this
> ...
> Now it looks like this

That's not quite right; each root entry is for only *one* bus, and the
correct version looks more like this...

It used to look like this:

Root Table Address Register
       |
       V

Root Table (struct root_entry)     Context Table (struct context_entry)
------------------------------     ------------------------------------
0x00: CTX TBL for bus #0 --------->  CTX entry for 00:00.0 (bits 63-0)
0x08: unused                         CTX entry for 00:00.0 (bits 127-64)
0x10: CTX TBL for bus #1 ----.       CTX entry for 00:00.1 (bits 63-0)
...   ...                    |       ...
0xff8:unused                 |       CTX entry for 00:1f.7 (bits 127-64)
                             |
                             |
                             |     Context Table (struct context_entry)
                             |     ------------------------------------
0x00:                        ----->  CTX entry for 01:00.0 (bits 63-0)
0x00:                                CTX entry for 01:00.0 (bits 127-64)
0x08:                                CTX entry for 01:00.1 (bits 63-0)
...                                  ...
0xff8:                               CTX entry for 01:1f.7 (bits 127-64)


Now it looks like this, with each context entry taking twice the amount
of space:

Root Table Address Register
       |
       V

Root Table (struct root_entry)     Context Table (struct context_entry)
------------------------------     ------------------------------------
0x00: CTX TBL LO for bus #0 ------>  CTX entry for 00:00.0 (bits 63-0)
0x08: CTX TBL HI for bus #0 --.      CTX entry for 00:00.0 (bits 127-64)
0x10: CTX TBL LO for bus #1   |      CTX entry for 00:00.0 (bits 191-128)
...   ...                     |      ...
0xff8:CTX TBL HI for bus #FF  |      CTX entry for 00:0f.7 (bits 255-192)
                              |
                              |
                              |    Context Table (struct context_entry)
                              |    ------------------------------------
0x00:                         ---->  CTX entry for 00:10.0 (bits 63-0)
0x00:                                CTX entry for 00:10.0 (bits 127-64)
0x08:                                CTX entry for 00:10.0 (bits 191-128)
...                                  ...
0xff8:                               CTX entry for 00:1f.7 (bits 63-0)

-- 
dwmw2

Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5691 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ