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

Re: [PATCH for-4.18] iommu/vt-d: use max supported AGAW


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 Oct 2023 11:14:49 +0200
  • 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=i/d9klQd5LsNya+up6vzr0ff+wdYeA6/XnAet6JRZuk=; b=dhxhS1p4MqzWAXWxh0I4pRkYl8qHxg7kc0MNXhSZP1oRAAVdbUJviL4xR+O2nXbWTTbvki++/hA2Z46vOsZcfihMs3rRo5cm6Pp2vPPFODTaTo/bVCEifPjjO2Qltu9HYCUDkXZN5x1HqPdu80REDw1h8qtTYIg2axM2JuEaQrsMAVX9fCYsjUp9EtD02G3PtIQ1O7y4J00B3XmzOQkOGtxtj59Z10LpsYP+E4627yvK6kj7WxwVwTLVQ3fJuaf51koVvlFYzizvh6bcRhvWc5NrtWcHqKEUIb0CDDDzRMeCiA7U0OP2Usf9djsEzVmhXl8XzbwFQeTE9gDp1ziyeQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lrqYr3QRDC+NqcKXfmmXX8QOjHfla2xfuZCj5yTjtwrIiswUp1C4Zb0ZRerNX1qtlWxL7TxPM+wvV1XcAfNOEgEPawNgC4b+NKl3taVq8LwhxrccTQPwhlHf+mVo2aewkmpCtF3eBe4l0yzXNRj8eI+Fc51yfEKIROATNZXqGJKI+xjAIH0qIfW3obJMCK16vIG5PXwOyUbVCjj9PkPiy6OjwORZHHBg8/oYOuEqhivVfTN1oxyHDJePArivrDwMC8RTzuMpW9NRj609BuJDqnHmAF58TFT3uEzz3OUA49DPyrFdFS9FWMMWo7yYZ7MDSnXc76my70IxUelvNNJIEQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 18 Oct 2023 09:15:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.10.2023 10:54, Roger Pau Monné wrote:
> On Wed, Oct 18, 2023 at 09:54:15AM +0200, Jan Beulich wrote:
>> Taking together perhaps:
>> - nr_pt_levels needs setting to the larger of 3 and 4, depending on what
>>   hardware supports, for use in non-pass-through entries,
>> - a new max_pt_levels field needs setting to what would result from your
>>   code change above, for use in pass-through entries,
> 
> It needs to be a per-IOMMU field, as I would assume IOMMUs can have
> different page table level support on the same system?

Right, hence why I also said "field".

>> - min_pt_levels could then remain as is,
>> - for the moment we ignore the forward-compatibility aspect, until the
>>   underlying principle has been clarified by Intel.
>>
>> A possible further complication then is that we will end up switching
>> context entries between different AW values. That's not an issue when
>> we use CMPXCHG16B or transiently clear the present bit, but our best
>> effort fallback would likely be of security concern then.
> 
> We would need to update the AW context entry field unconditionally in
> domain_context_mapping_one().

Plus (just so it's not missed) purge the corresponding assertion.

> Hm, it's likely more change than what I was expecting to perform at
> this point in the release, but I guess we cannot ignore the fact that
> SAGAW might now have bit 3 set and hence passthrough mode is broken on
> such systems.

Ideally yes. Of course for the immediate purpose we might go with the
smaller change, but then with the description mentioning (and
justifying) the omission. If there are 5-level IOMMUs in the wild, I'm
afraid that wouldn't be a (good) option though. Otoh people shouldn't
be using hwdom-pass-through mode in the first place ...

Jan



 


Rackspace

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