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

Re: [PATCH] swiotlb-xen: override common mmap and get_sgtable dma ops


  • To: Roman Skakun <rm.skakun@xxxxxxxxx>
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Mon, 14 Jun 2021 11:45:46 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=t1qtCFv42Ehv8s+NNj+MyFNBqYrN7lrL8g47Ata/JRM=; b=jkv1zkU2bTisN/HS2HSgti5Ueu/houq800F2ZV8u2efs3r+Z/yHDYu10O7jH/9Gp2ToHuc1mLF176RFBNa0LZb1wjKUgi0XfXwpA599AUzzIy0ZGNLtHtYgDKWR9zumgWKYXKJBUdKQ4LoeLEMpCRPfDxKmeFX7EhXXuqB2aGlGPc52fzDjp6cIgIR8arGEWrpoQSDwz9wR4W1L5D4e8oDXh/NvnBd6gsetxLaVRXgHZQzqaLqx4R6fMp5ojNA+wOCKViAIeT3V04r7nh8eIzDCN1FT/DvqylIYpXXghBkdH9RtITmyBPPPfduTpVyLV5cUqeqbyP19rRlu4EaQQyw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hjP2co2IpBTx8GIrp208SOnXKoembSdA20V3JR6K8E0ZOhbBEs4hXxV9eqFUmUhg7yNFIEFMN4B9kmXg5oN+BeG+JDExm8ShJ6cWvfVpQSV+NrKOdYwD9X+fdj3bid2I8Lidq/0vdTZaNERREHmPZWZPWB9c73mehEb2gZachhX+dfuzDz73rmWPFzuNT+tSF0baV1IiC1EP5F+AXulL+iM95KKDhQ1A9yCfgP1+DbTJjey0cqqSU9bttoNWWOfj19rgDFgB+3mrV5vCR5OcdLJIygAU+OUSI5m01bRoydokcC19HLD4YSgoS45BH6hEwt3pvtpMVOTPAn05oe96+Q==
  • Authentication-results: epam.com; dkim=none (message not signed) header.d=none;epam.com; dmarc=none action=none header.from=oracle.com;
  • Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Roman Skakun <roman_skakun@xxxxxxxx>, Andrii Anisov <andrii_anisov@xxxxxxxx>
  • Delivery-date: Mon, 14 Jun 2021 15:46:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 6/14/21 8:47 AM, Roman Skakun wrote:
> Hey, Boris!
> Thanks for the review.
>
> I have an additional question about current implementation that disturbed me.
> I think, that we can have cases when mapped memory can not be
> physically contiguous.
> In order to proceed this correctly need to apply some additional steps
> to current implementation as well.
>
> In mmap() :
> 1. Is the memory region physically contiguous?
> 2. Remap multiple ranges if it is not.
>
> In get_sgtable() :
> 1. Is the memory region physically contiguous?
> 2. Create sgt that will be included multiple contiguous ranges if it is not.
>
> What do you think about it?


We make sure that we allocate contiguous memory in xen_swiotlb_alloc_coherent().


-boris





 


Rackspace

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