[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/12] x86: centralize setting SWIOTLB_FORCE when guest memory encryption is enabled
- To: Christoph Hellwig <hch@xxxxxx>, "iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Tue, 1 Mar 2022 11:39:29 +0000
- Accept-language: en-GB, en-US
- 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YkxE1f2Bzj1X7jPJQvSSRXnaMkgU9fY9NDuKWHA4v4Q=; b=PN0XQDeHFqDPlEUM2KLVxdx6hxfe3b+6KiTEz/XrFrtWo5e1HmsInVdXUDTpQWeZ1LvUDhc31E7xFn6p2JPpi7b92tjBHryXabyvcdNFgd95377zUjORYqJyvo7gQhvava5IhRpHwbK1Pv0NACUMTzzPSWQno0TVtgVEo9yKMLdZRV6an+mRTHDgpYBALTAqB02KUSm8q4lH6wZ6q7ud/VbW9DSrDPn/leVuRiBadGkfj6mZvv5qfCy64yoeqoNGDVpgvhMFOQo00bx3gMWl5j6f6btmZ4ackCPGwt00Ovs85azCoKc1xL69cvdkJyHkH2lmx0xhAE3HTSoQK/cNbQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rrjyn4HlQnEHcuIqGpcs28ooDKC34t9cILAgwXLCdmdfJpSTuFHzlcCkkfGGFyV1CTbcB3+bXYogyKiXIkXGT/peo5Ruqu2bXChvG29LUdpJose1gilGWZqS0ZLDxECaUWkQ8RaErEkbaMWdVpfVWAV+Tcx8zwnaDEE7kyCLGptCHg61BRltbpg2VRzpKeGtx5nhC3Vbpxb/s8OLOWYsJvUgOQcHBc5fvlYbtftx4AGmCZY+Ld21GnZNUwhoqVnsAPYDD7pjDeT7qpbZuW2z7V2dHhZeklYK9EtuDuu1CX/PXkl90i8Qyj8ANPIGT458qqfjgnlgA1iheabbBHy7qg==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, "David Woodhouse" <dwmw2@xxxxxxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, "Robin Murphy" <robin.murphy@xxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "tboot-devel@xxxxxxxxxxxxxxxxxxxxx" <tboot-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>
- Delivery-date: Tue, 01 Mar 2022 11:39:39 +0000
- Ironport-data: A9a23:bn3jqa3mM61RMjrMjvbD5eJ3kn2cJEfYwER7XKvMYLTBsI5bp2QCz TNMDWrVbPjZMGP3fN93Pd6yoU4Du5XRmINlSApvpC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EE/NtTo5w7Rj2tUw2IDga++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1kuayBRF4XD5bMnc0ZSjBpOB1gY/F/reqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHCOo8Ft24m5jbeFfs8GrjIQrnQ5M8e1zA17ixLNaiDP ZJJMWIzBPjGS00RHGYlFY0PoOmhhCfHcxhT9nykl4NitgA/yyQuieOwYbI5YOeiQcRTg1bdp 2uYo0znDRwAct+S0zyI9jSrnOCntSf6Xp8CUbi57uVCnlKe3CoQBQcQWF/9puO24mauVtQaJ 0EK9y4Gqakp6FftXtT7Rwe/onOPolgbQdU4O/c94gCLjK/J+R6ZF0ANVDsHY9sj3OcyRDo3x hqAhdasBjF1trCRYXac7auP6zK0NzIcIWILaWkDVwRty93ippwjlgrEC9puDoaxj8bpAnf30 TSDpjN4gK8c5eYX3aK84RXLjiyhorDNTxUp/UPMWX+/5Q53Y5Sqasqu5ESzxfJBKpuJC0GKv VAalMWEquMDF5eAkGqKWuplNLWo4euVdT3NmVN1AbE/+Dm3vX2uZ4Zd5Hd5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5o6H8BEGBKUmskKKceeEqTPiftXrdyReVxeZZnMXfKlzbamHDH4tmu5 uIHJIOceEYYWIK7voSpTPIaerIo+P3sZxA592ut0uFJDsCA8oLjmdE40SgYzZLrWF9dMEE/f Gnl656Tk+bCBIqh7OAdx44tob41r/2vaOjRSRDKw8s6QGIgz/twqX9CQKk0hAXVC4K6as+8E De+jaJppmLgrWe8FvxxmXT55NZlJ/K0d1YHvGBjcATN3HFlhuoXoJ8QLeP1QpF491HqWxa0u UkkS1Qe/ib2EmhOV1dZiGdnTUI5QxerkMKD2Xo2EcL7/aJHA7SQPAx+r6xOiGplXbI+usMip 6jlljpx6a+R3n77VXAzsmNWBdwmkWup30+1eYVknxESIMbLKRctIoF4SpuYdw99Q/Bmcka+d NVfYnhDTdtACenRmGcunMqzM2nX3w1EBvDSk8eutaN2zwTmHxi1UMXyMEWg39FrfsGOtR5zv WBNr4tmKBFT8cQY644DOAdQdGvAmiIRR7XKmqdLVnuCalCMXPQrJz85qkz+YiRCdY15Yp3nI 6EXEJTtGY0dU6rAcqS3IdT+hSIW2m5VSSF8LAp23G4gMyKeFPGC1zwdLl1qbrSnxw2OLyvZ8 qO
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYLVsO0esfCi4ktkCl+GWHal7mDKyqZ0+A
- Thread-topic: [PATCH 08/12] x86: centralize setting SWIOTLB_FORCE when guest memory encryption is enabled
On 01/03/2022 10:53, Christoph Hellwig wrote:
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index 2ac0ef9c2fb76..7ab7002758396 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -53,6 +53,13 @@ static void __init pci_swiotlb_detect(void)
> if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
> x86_swiotlb_enable = true;
>
> + /*
> + * Guest with guest memory encryption must always do I/O through a
> + * bounce buffer as the hypervisor can't access arbitrary VM memory.
This isn't really "must". The guest is perfectly capable of sharing
memory with the hypervisor.
It's just that for now, bounce buffering is allegedly faster, and the
simple way of getting it working.
~Andrew
|