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

RE: [PATCH 3/3] VT-d: conditionalize IOTLB register offset check


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Wed, 24 Nov 2021 01:25:48 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=yTA9SFOXWewWt75ThHnKxE0AefTksWmZKDLROtq//R4=; b=ElH9EG+Wg5DALwtHhf/QIv5QDKBauqbGQuBnROWG6SNKpEB++2j9Fa69eljo45eRJ559UJFfV1CB500Bins2QKy11ywOeyQRtOdcVBgZIM10U7uXIFkn/5oUXhhiKwqoSF1YsxOguhJo8IqGXQ8FQO1t1oHnUyJN1Ojd5Pdm9B3tyo6orb28R5giU6rHGJvHQI4rTSrYLbTXJJqpVCcfE/sB+8t3gLRFrcFQazgHCwYR9jYWsWXSqVfju/253EJ49qjsxlOjiPiXiY2qh8fXMI5o7dwti0kA3QMGiDoVHjXbWc6nfQICBcqZOCJdEi87vJAYRAm4a19nfcqthahFfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V24IkZn+bR7FjFGfHfxqjTbB6F2zoj99qyAKQYRYPcIyJCPv8Tqo4Ts42CHudrkEraL5mxTmf66GhWnsPkksNrOxhSbIKNU15kbWeNp2+2YdUazqNSp3sdcC9w367nPvxUBZ9205/eCKfChTTfsbb91oK/O9rn7CToJbi3Ni5DtVa+wObQ/RYVbGZjquQGUgQT94DFYoIpPrCNAAm7tms4fX05B2UNhb23j0tTypXauVK1tIe+Oy9f0TNQAJjTqLXdzGDAwMdPWnVsXoQEUnxuyjmCmcTV/oJqJooTDU0GiVxzq3ei+LoRTq5sA3cf4Ri/pBSaQQVBsz6RIfYT+kTA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
  • Delivery-date: Wed, 24 Nov 2021 01:25:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHX4G+5FQV+mmRGK0Oi07D8aTZRP6wR4u0Q
  • Thread-topic: [PATCH 3/3] VT-d: conditionalize IOTLB register offset check

> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Tuesday, November 23, 2021 9:40 PM
> 
> As of commit 6773b1a7584a ("VT-d: Don't assume register-based
> invalidation is always supported") we don't (try to) use register based
> invalidation anymore when that's not supported by hardware. Hence
> there's also no point in the respective check, avoiding pointless IOMMU
> initialization failure. After all the spec (version 3.3 at the time of
> writing) doesn't say what the respective Extended Capability Register
> field would contain in such a case.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> 
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1228,7 +1228,8 @@ int __init iommu_alloc(struct acpi_drhd_
> 
>      if ( cap_fault_reg_offset(iommu->cap) +
>           cap_num_fault_regs(iommu->cap) * PRIMARY_FAULT_REG_LEN >
> PAGE_SIZE ||
> -         ecap_iotlb_offset(iommu->ecap) >= PAGE_SIZE )
> +         (has_register_based_invalidation(iommu) &&
> +          ecap_iotlb_offset(iommu->ecap) >= PAGE_SIZE) )
>      {
>          printk(XENLOG_ERR VTDPREFIX "IOMMU: unsupported\n");
>          print_iommu_regs(drhd);


 


Rackspace

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