Juergen Gross
2023-Jun-09 15:38 UTC
[Nouveau] [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On 07.06.23 15:12, Christoph Hellwig wrote:> On Mon, May 22, 2023 at 10:37:09AM +0200, Juergen Gross wrote: >> In normal cases PCI passthrough in PV guests requires to start the guest >> with e820_host=1. So it should be rather easy to limit allocating the >> 64MB in PV guests to the cases where the memory map has non-RAM regions >> especially in the first 1MB of the memory. >> >> This will cover even hotplug cases. The only case not covered would be a >> guest started with e820_host=1 even if no PCI passthrough was planned. >> But this should be rather rare (at least I hope so). > > So is this an ACK for the patch and can we go ahead with it?As long as above mentioned check of the E820 map is done, yes. If you want I can send a diff to be folded into your patch on Monday.> > (I'd still like to merge swiotlb-xen into swiotlb eventually, but it's > probably not going to happen this merge window)Would be nice. Juergen -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_0xB0DE9DD628BF132F.asc Type: application/pgp-keys Size: 3098 bytes Desc: OpenPGP public key URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20230609/d63cb750/attachment.key> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20230609/d63cb750/attachment.sig>
Christoph Hellwig
2023-Jun-12 06:47 UTC
[Nouveau] [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On Fri, Jun 09, 2023 at 05:38:28PM +0200, Juergen Gross wrote:>>> guest started with e820_host=1 even if no PCI passthrough was planned. >>> But this should be rather rare (at least I hope so). >> >> So is this an ACK for the patch and can we go ahead with it? > > As long as above mentioned check of the E820 map is done, yes. > > If you want I can send a diff to be folded into your patch on Monday.Yes, that would be great!
Juergen Gross
2023-Jun-12 08:08 UTC
[Nouveau] [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On 09.06.23 17:38, Juergen Gross wrote:> On 07.06.23 15:12, Christoph Hellwig wrote: >> On Mon, May 22, 2023 at 10:37:09AM +0200, Juergen Gross wrote: >>> In normal cases PCI passthrough in PV guests requires to start the guest >>> with e820_host=1. So it should be rather easy to limit allocating the >>> 64MB in PV guests to the cases where the memory map has non-RAM regions >>> especially in the first 1MB of the memory. >>> >>> This will cover even hotplug cases. The only case not covered would be a >>> guest started with e820_host=1 even if no PCI passthrough was planned. >>> But this should be rather rare (at least I hope so). >> >> So is this an ACK for the patch and can we go ahead with it? > > As long as above mentioned check of the E820 map is done, yes. > > If you want I can send a diff to be folded into your patch on Monday.Attached is a patch for adding a new flag xen_pv_pci_possible. You can either add the patch to your series or merge it into your patch 2. You need to modify your patch like this: @@ -111,7 +90,10 @@ static inline void __init pci_xen_swiotlb_init(void) void __init pci_iommu_alloc(void) { if (xen_pv_domain()) { - if (xen_initial_domain() || x86_swiotlb_enable) + if (xen_initial_domain() || + (IS_ENABLED(CONFIG_XEN_PCIDEV_FRONTEND) && + xen_pv_pci_possible) || + x86_swiotlb_enable) pci_xen_swiotlb_init(); return; } Juergen -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-xen-pci-add-flag-for-PCI-passthrough-being-possible.patch Type: text/x-patch Size: 1903 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20230612/bba994cd/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_0xB0DE9DD628BF132F.asc Type: application/pgp-keys Size: 3098 bytes Desc: OpenPGP public key URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20230612/bba994cd/attachment.key> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20230612/bba994cd/attachment.sig>
Apparently Analagous Threads
- [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
- [PATCH 1/4] x86: move a check out of pci_xen_swiotlb_init
- [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
- [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
- unexport swiotlb_active