Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
- Subject: Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Wed, 9 Mar 2022 07:18:40 +0100
- Cc: Christoph Hellwig <hch@xxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Stefano Stabellini <sstabellini@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, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, tboot-devel@xxxxxxxxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx
- In-reply-to: <6a22ea1e-4823-5c3b-97ee-a29155404a0d@oracle.com>
- References: <20220301105311.885699-1-hch@lst.de> <20220301105311.885699-12-hch@lst.de> <6a22ea1e-4823-5c3b-97ee-a29155404a0d@oracle.com>
- User-agent: Mutt/1.5.17 (2007-11-01)
On Tue, Mar 08, 2022 at 04:38:21PM -0500, Boris Ostrovsky wrote:
>
> On 3/1/22 5:53 AM, Christoph Hellwig wrote:
>> Allow to pass a remap argument to the swiotlb initialization functions
>> to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping
>> from xen_swiotlb_fixup, so we don't even need that quirk.
>
>
> Any chance this patch could be split? Lots of things are happening here and it's somewhat hard to review. (Patch 7 too BTW but I think I managed to get through it)
What would be your preferred split?
>> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
>> index e0def4b1c3181..2f2c468acb955 100644
>> --- a/arch/x86/kernel/pci-dma.c
>> +++ b/arch/x86/kernel/pci-dma.c
>> @@ -71,15 +71,12 @@ static inline void __init pci_swiotlb_detect(void)
>> #endif /* CONFIG_SWIOTLB */
>> #ifdef CONFIG_SWIOTLB_XEN
>> -static bool xen_swiotlb;
>> -
>> static void __init pci_xen_swiotlb_init(void)
>> {
>> if (!xen_initial_domain() && !x86_swiotlb_enable)
>> return;
>
>
> Now that there is a single call site for this routine I think this check can be dropped. We are only called here for xen_initial_domain()==true.
The callsite just checks xen_pv_domain() and itself is called
unconditionally during initialization.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]