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

Re: [PATCH v7 7/8] AMD/IOMMU: add "ivmd=" command line option


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 26 Aug 2021 16:30:27 +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-SenderADCheck; bh=rWfwH9kc6fHt9MLyds0xb2MgFZKMGJezK5n3rnbweMQ=; b=JPf1VoEWRDBzQaKTtdkRL5Txk21JgZMUxxLKOYW+YwMRubMeNaHckOrQR9g4DKsXxkfJBoreCE5vlHIAzqfbaNZu77/tjVUkts9WnO0tDgLGgIv9QV+acvm0MqTolkrsqrkfFB+1EHJzkZJKI4gPDzrzhz8yvF85dka7+ZvbNQTBaX9nR7dkT5z4YMjrRUVi3eF8r5EeozmT8ZsRblRU46q9pdTWHY81SIsmk0Eex/qVBi0FSs7VttV3++eZdLoQdXYpTvzhQ96+nWKMxx87vU7lOiAcBWH/dyH/tIj437X4+MzBpJr8WGTuUUOJIry7bsq+MXtHY3pYrB0nKGXdPQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gR7BKSCEaWlUP13r51EhAYEoP/paXBFgGq+ra5LVYaClL26hl7SdZ3JRcSX+L2Y4C/ohjxm2shuEUGAUQMFkYVCaeNygMXFwMiZWn3XExPJNJLYfHOhuphIDiO962l3EFKqQd8zlLbxSQq6amBGcedunJI51T2m+/BvJVqSjJobqgaNuApVwpwI1dMwtxE94OrS3Nn8LgcBndjZqniC7++IcQM5cHoFT92QSKrD0IN+GXquqkLZ7xkdJw1mwj/cUmkV1Pvo6p1oWzLd9SY9QDc3KjTt/InERV8eHCuj65QRlmMx/yJf+BS4FN9bqn9nTFm5BqWtsS6GjQXiPAD6nbg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 26 Aug 2021 14:30:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.08.2021 16:08, Andrew Cooper wrote:
> On 26/08/2021 08:25, Jan Beulich wrote:
>> @@ -1523,6 +1523,31 @@ _dom0-iommu=map-inclusive_ - using both
>>  > `= <integer>`
>>  
>>  ### irq_vector_map (x86)
>> +
>> +### ivmd (x86)
>> +> `= 
>> <start>[-<end>][=<bdf1>[-<bdf1'>][,<bdf2>[-<bdf2'>][,...]]][;<start>...]`
>> +
>> +Define IVMD-like ranges that are missing from ACPI tables along with the
>> +device(s) they belong to, and use them for 1:1 mapping.  End addresses can 
>> be
>> +omitted when exactly one page is meant.  The ranges are inclusive when start
>> +and end are specified.  Note that only PCI segment 0 is supported at this 
>> time,
>> +but it is fine to specify it explicitly.
>> +
>> +'start' and 'end' values are page numbers (not full physical addresses),
>> +in hexadecimal format (can optionally be preceded by "0x").
>> +
>> +Omitting the optional (range of) BDF spcifiers signals that the range is to
>> +be applied to all devices.
>> +
>> +Usage example: If device 0:0:1d.0 requires one page (0xd5d45) to be
>> +reserved, and devices 0:0:1a.0...0:0:1a.3 collectively require three pages
>> +(0xd5d46 thru 0xd5d48) to be reserved, one usage would be:
>> +
>> +ivmd=d5d45=0:1d.0;0xd5d46-0xd5d48=0:1a.0-0:1a.3
>> +
>> +Note: grub2 requires to escape or quote special characters, like ';' when
>> +multiple ranges are specified - refer to the grub2 documentation.
> 
> I'm slightly concerned that we're putting in syntax which the majority
> bootloader in use can't handle.

This matches RMRR handling, and I'd really like to keep the two as
similar as possible. Plus you can avoid the use of ; also by having
more than one "ivmd=" on the command line.

> A real IVMD entry in hardware doesn't have the concept of multiple
> device ranges, so I think comma ought to be the main list separator, and
> I don't think we need ; at all.

Firmware would need to present two IVMD entries in such a case. On
the command line I think we should allow more compact representation.
Plus again - this is similar to "rmrr=".

Jan




 


Rackspace

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