[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: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 26 Aug 2021 15:08:02 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=wjzs+GwUD53JRNY2tPdQdcyk0bYkWizcvjHcWek0v60=; b=NVpa44/ManPiyo0mUWEhwDRNJw+vm3IShbpBat36h4WaHDlaoxCvZiHIu4ruUcCq1pc+L4MhelTVAdWB3s+enpIOmwQogwkdssDfCSeSXxfd/DC25JjEpuK8qYencocmp0hgamp6fC3p81TB5iyddMixGqXalHmj9MzwtdLqQUBQGSRiGq/DeHS4qnas72QOYf7nFIUFX2Waw4p0ciUqRZs8mzHUSF7s7Jtgk4UbK3uLznm8QlcKIrHkSt/0rZUkodVUAgjqYh5Z94ZbKLrgPbyfiCMQkwvKdS4f4jbkPSbupAyln9LjFKZRY7u6PaBw0iiZcznqkQQ6yzQYBpCitw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ber0+jJxE1avoK4Cw0PAeSCKXtkncB2eE5SEjNeZ3EHo0ltL4oqUcSSLz9NlJKCuQzBP7XXyBAxouqwokYjrXKgJ2LogqN+5fv0oSquFuPM6YDY+TgNgM+uXZ0IDD2vsxT5MoMEeJsOdyjD3kVeYaVRtdjlC5BV3bB2dBXnF0znhOX44pakKiQsshl05+JFb2/HeGLOKq3uP6SwdfPdZYBInCaqTUif3wLGW1xOqdMIKthl6xQ8cX4TzdsXUXayIja4FHDOdxjVhJnjayQ76AbwDkrvo9yR7OVDjMSkp8S2QOQOsdDvyLGrYFS6QNN7e5VOEwYb7iX3KrNwd8bmTOQ==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Thu, 26 Aug 2021 14:11:57 +0000
  • Ironport-hdrordr: A9a23:d1lyzals6VxY98RTrV3HMAXQvFHpDfLW3DAbv31ZSRFFG/Fw9/ rCoB3U73/JYVcqKRUdcLW7UpVoLkmyyXcY2+cs1NSZLWzbUQmTXeJfBOLZqlWNJ8SXzIVgPM xbAspD4bPLbGSTjazBkXSF+9RL+qj6zEh/792usEuETmtRGt9dBx8SMHf9LqXvLjM2fqbQEv Cnl6x6jgvlQ1s7ROKhCEIIWuDSzue77q4PMXY9dmcaABDlt0LR1ILH
  • Ironport-sdr: ANAqpPyLpM0FoiF5F3YOFw8U+FjATMV2E/+VQGBlY1cBLJEA2Ggxy2GS2m7B/KRvGmGxgHBU2f 0V1gRd6SMHwC9R6CnW1om2h0hYQpRcahn9C/tQAM8U7fNo5dGNCm8NnYPh3QKfEjVvbbvMBtzb WWK9aDLCA0cLsS/E2iflWPwnh/KIeQfwSQFXupT/HQtDvr2Zz6bvJYq6O4BERhrHtp1JOniSVI uzHeJk1ZunR06BO4m0WcFk9AHcOPGOqZ7Vy6HA1eSqfKY3EKb8CLVKY73giaKzc2Fm0ArRTkrJ CHHTftY0aiGE7BnGFas53PS+
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/08/2021 08:25, Jan Beulich wrote:
> Just like VT-d's "rmrr=" it can be used to cover for firmware omissions.
> Since systems surfacing IVMDs seem to be rare, it is also meant to allow
> testing of the involved code.
>
> Only the IVMD flavors actually understood by the IVMD parsing logic can
> be generated, and for this initial implementation there's also no way to
> control the flags field - unity r/w mappings are assumed.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Reviewed-by: Paul Durrant <paul@xxxxxxx>
> ---
> v5: New.
>
> --- a/docs/misc/xen-command-line.pandoc
> +++ b/docs/misc/xen-command-line.pandoc
> @@ -836,12 +836,12 @@ Controls for the dom0 IOMMU setup.
>  
>      Typically, some devices in a system use bits of RAM for communication, 
> and
>      these areas should be listed as reserved in the E820 table and identified
> -    via RMRR or IVMD entries in the APCI tables, so Xen can ensure that they
> +    via RMRR or IVMD entries in the ACPI tables, so Xen can ensure that they

Oops.

> @@ -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.

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.

~Andrew




 


Rackspace

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