From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH 1/6] VT-d: properly reserve DID 0 for caching mode IOMMUs
Date: Fri, 12 Nov 2021 13:07:33 +0100 [thread overview]
Message-ID: <6c142f50-84f2-b499-d486-61690cdc2629@suse.com> (raw)
In-Reply-To: <YY5OztQdQMXJSG+u@Air-de-Roger>
On 12.11.2021 12:23, Roger Pau Monné wrote:
> On Fri, Nov 12, 2021 at 10:47:59AM +0100, Jan Beulich wrote:
>> Merely setting bit 0 in the bitmap is insufficient, as then Dom0 will
>> still have DID 0 allocated to it, because of the zero-filling of
>> domid_map[]. Set slot 0 to DOMID_INVALID to keep DID 0 from getting
>> used.
>
> Shouldn't the whole domid_map be initialized to DOMID_INVALID to
> prevent dom0 matching against any unused slot?
>
> Similarly cleanup_domid_map should set the slot to DOMID_INVALID.
I don't think so, that's the purpose of setting the bit in domid_bitmap.
The problem really was only with setting a bit in that bitmap without
invalidating the corresponding slot.
This said, I can still see value in doing as you suggest, but as a
separate change with a different justification. In fact domid_bitmap is
kind of redundant now anyway; aiui it was the thing that existed first.
Then domid_map[] was simply added, rather than fully replacing the
original bitmap.
Jan
next prev parent reply other threads:[~2021-11-12 12:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 9:46 [PATCH 0/6] VT-d: domain ID mapping improvements Jan Beulich
2021-11-12 9:47 ` [PATCH 1/6] VT-d: properly reserve DID 0 for caching mode IOMMUs Jan Beulich
2021-11-12 11:23 ` Roger Pau Monné
2021-11-12 12:07 ` Jan Beulich [this message]
2021-11-12 12:19 ` Roger Pau Monné
2021-11-15 5:13 ` Tian, Kevin
2021-11-12 12:21 ` Roger Pau Monné
2021-11-15 5:13 ` Tian, Kevin
2021-11-12 9:48 ` [PATCH 2/6] VT-d: split domid map cleanup check into a function Jan Beulich
2021-11-12 12:31 ` Roger Pau Monné
2021-11-15 5:16 ` Tian, Kevin
2021-11-12 9:48 ` [PATCH 3/6] VT-d: don't leak domid mapping on error path Jan Beulich
2021-11-12 13:42 ` Roger Pau Monné
2021-11-12 13:45 ` Jan Beulich
2021-11-12 14:35 ` Roger Pau Monné
2021-11-15 9:32 ` Jan Beulich
2021-11-15 5:21 ` Tian, Kevin
2021-11-12 9:49 ` [PATCH 4/6] VT-d: tidy domid map handling Jan Beulich
2021-11-15 5:51 ` Tian, Kevin
2021-11-12 9:49 ` [PATCH 5/6] VT-d: introduce helper to convert DID to domid_t Jan Beulich
2021-11-15 5:54 ` Tian, Kevin
2021-11-12 9:50 ` [PATCH 6/6] VT-d: avoid allocating domid_{bit,}map[] when possible Jan Beulich
2021-11-15 6:18 ` Tian, Kevin
2021-11-15 9:37 ` 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=6c142f50-84f2-b499-d486-61690cdc2629@suse.com \
--to=jbeulich@suse.com \
--cc=kevin.tian@intel.com \
--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.