All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Paul Durrant <paul@xen.org>, xen-devel@lists.xenproject.org
Subject: Re: [PATCH 4/4] iommu/x86: make unity range checking more strict
Date: Tue, 6 Feb 2024 12:49:08 +0100	[thread overview]
Message-ID: <5db22ee1-40b3-4df8-88b8-446a2e224d22@suse.com> (raw)
In-Reply-To: <20240201170159.66330-5-roger.pau@citrix.com>

On 01.02.2024 18:01, Roger Pau Monne wrote:
> Currently when a unity range overlaps with memory being used as RAM by the
> hypervisor the result would be that the IOMMU gets disabled.  However that's
> not enough, as even with the IOMMU disabled the device will still access the
> affected RAM areas.

Hmm, no, I think this is going too far. Not the least because it is
s/will/may/. But also because if we really wanted such behavior, we
ought to also parse the respective ACPI tables when the "iommu=off".

> Note that IVMD or RMRR ranges being placed over RAM is a firmware bug.

As written this is wrong: They're typically in RAM, just that the E820
type for that range should not be RAM_TYPE_CONVENTIONAL.

> Doing so also allows to simplify the code and use a switch over the reported
> memory type(s).

I'm afraid this isn't right either: page_get_ram_type() can set
multiple bits in its output.

Jan


  reply	other threads:[~2024-02-06 11:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 17:01 [PATCH 0/4] iommu/x86: fixes/improvements for unity range checks Roger Pau Monne
2024-02-01 17:01 ` [PATCH 1/4] amd-vi: fix IVMD memory type checks Roger Pau Monne
2024-02-03  6:51   ` oxjo
2024-02-06 10:16   ` Jan Beulich
2024-03-11  2:18   ` Regression with xhci console (was: [PATCH 1/4] amd-vi: fix IVMD memory type checks) Marek Marczykowski-Górecki
2024-03-11  7:58     ` Regression with xhci console Jan Beulich
2024-02-01 17:01 ` [PATCH 2/4] iommu/x86: introduce a generic IVMD/RMRR range validity helper Roger Pau Monne
2024-02-06 11:17   ` Jan Beulich
2024-02-07  8:37     ` Roger Pau Monné
2024-02-01 17:01 ` [PATCH 3/4] iommu/vt-d: switch to common RMRR checker Roger Pau Monne
2024-02-06 11:28   ` Jan Beulich
2024-02-07  9:01     ` Roger Pau Monné
2024-02-07 10:33       ` Jan Beulich
2024-02-01 17:01 ` [PATCH 4/4] iommu/x86: make unity range checking more strict Roger Pau Monne
2024-02-06 11:49   ` Jan Beulich [this message]
2024-02-07  9:14     ` Roger Pau Monné
2024-02-07 10:42       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5db22ee1-40b3-4df8-88b8-446a2e224d22@suse.com \
    --to=jbeulich@suse.com \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.