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

Re: [PATCH 3/4] x86/DMI: fix table mapping when one lives above 1Mb


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 23 Nov 2020 16:41:25 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=g8m5e98SQ6tCHfxh9kP9bnoce95sGLFrftHvjBmBMuo=; b=Q9D6e0Knl5QC0URNBM+NiQJmJ7B1AM7PJ7gA1w3TW1nvhUw68LhOM6Xe1VkJATd7tYHEsc8KgOc6MAN+s3SF5MU1rxSl5JK6wY+XZ5Yb1gxBno5VF35peSID5O6YJDgTbM5bSubK0N3Md5STel52ZkSxbxjTAYJspBUyRZFmHwHPa41ZAyvxPsOyWVkJpL85NGjRDQpfG++Jwt3VQ9jPccnAqvrX6Kt0rp2bQjUboThe08GLhLY71H8V6rWJsCW58UJbKQWTfZkWFJbVTtVmOvDb8n8wvHBG0/NKzuT13fSKUthymnC13U7bMYA2k44dLufg6z1duIF63M7rGx/oKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mzfFyPon5P8vIQpmKuHkEzzBZYKEMcRbDw2go5fufI7X2BfgqD2Td8rZejWal3qDcmrUSHQY/llqEilo0wznP8ZscvzoR3hoydmJA3aK+//wguCwCAe+tpH6clK7eQrXS3eaHYDVec6JcjxtebrkutxUcz2ROiWa3LDhoEaGHNUUf3Jfs0iw+PBJHwWkq+/nUzdwUbr2n0tuahcHoPHcLp0QWATz1J4m2Og9lMO+S72zbiROYPZQ+KaI2QBsz7sUEdS81msI9mo6Z+ip84TUSu1/2aaq3t+Z0q4ucAK1Qi1cyLL7PKv6inv2gD0v4FVJHTO+MGlu47vkXcUWdVie8w==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Mon, 23 Nov 2020 15:41:43 +0000
  • Ironport-sdr: 7qCbsb1jt0B1kFWijrnms59X6SVbH6TOtGVWcWsubV9GWy7ll8BaGLp/wHxszReQIaNcvr7yRU jFegfXEFjNtRSqqOuIQ+t2ZlKhqfLnMcnbBTVAXnUwnWC55JXsBKusoJqCS8I3E8uK+ItwFPIU A3oVNbCkjs/jqWZIKZa2StbFmct6pDOqyWRpOWXzb8Y1KTPkFsX98TN3IdXJ0bHnhE1g9OpaAO f0CegCGILy6K02n3Nu42eMNZ8bdtRl6W2BBpvCTIH3bmvAvpFKdC2LQw6SELCcOdGO0ozTXlw0 xjE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Nov 23, 2020 at 01:40:30PM +0100, Jan Beulich wrote:
> Use of __acpi_map_table() is kind of an abuse here, and doesn't work
> anymore for the majority of cases if any of the tables lives outside the
> low first Mb. Keep this (ab)use only prior to reaching SYS_STATE_boot,
> primarily to avoid needing to audit whether any of the calls here can
> happen this early in the first place; quite likely this isn't necessary
> at all - at least dmi_scan_machine() gets called late enough.
> 
> For the "normal" case, call __vmap() directly, despite effectively
> duplicating acpi_os_map_memory(). There's one difference though: We
> shouldn't need to establish UC- mappings, WP or r/o WB mappings ought to
> be fine, as the tables are going to live in either RAM or ROM. Short of
> having PAGE_HYPERVISOR_WP and wanting to map the tables r/o anyway, use
> the latter of the two options. The r/o mapping implies some
> constification of code elsewhere in the file. For code touched anyway
> also switch to void (where possible) or uint8_t.
> 
> Fixes: 1c4aa69ca1e1 ("xen/acpi: Rework acpi_os_map_memory() and 
> acpi_os_unmap_memory()")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.



 


Rackspace

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