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

Re: [PATCH 1/6] VT-d: properly reserve DID 0 for caching mode IOMMUs


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 12 Nov 2021 13:07:33 +0100
  • 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=fhETlBSLyVyFNaIXyy2Nb08GiUL5eHqgjOwrWDhmVxw=; b=BVtdhX7bIcwvtR2Cl4Ua1VbFdBCcr11VbG60t6sY4cp73cFh7jzEN14vVZcke6DreWmDf3y6ZFoULIVuDkD+8DPKgzXx1G62ZUppJs77HCU8GRPvxfuiU+exkyYfl8+dwd1ZuL5xgQWt+4aHMJWuE5Lb1iPecpIHPp0KOYnJJJdjp/jC8s5AmOkZth3pvPz+rTHrF14WtHA1SgKV79g7KF15UfIrIrrU2O51LtS4WMFqmyQxBiMiCmJqahiLZ8IlSavlJPNNMJ+Cj75svFTKuOJniONkOPtvSVd8DTXoEFi55+iq7kziH+aVC2oqleybZrSm22dUkv0fF1Z4IHn+xA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DeJKP9gdqUYbmMCxSLSPJxec1XQRz3AxiM3r9eG8Zx8YFuselYKoqZ6aqwGfwOiUGVXH9CJ3lbWByfYUZvgkvZMjkL1lkoe+3IW2jv7KLukVZCehLXgO4LmV1wo1VBt6YJRjd1xIEyvkGDGsDw3PDu+eZQGm3DO4GXs9/BZLz9g6MDVrDUF92ZHMjlditJa0S4intzUnLo+XJk8XVuYKAuqK4GBPIX96Mkkyk3eRK8mLOJXeRKn37OcoFCAAJE67tNL0kVQT1FOLKoPub/j8sfPQFgOa9M7pSA/TDsc7QEcYdgZGh90mYzVDvgvCaIqmUuXOwcNckn8Q4x3+RjrRIw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Fri, 12 Nov 2021 12:07:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

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