lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877ehveq9j.fsf@concordia.ellerman.id.au>
Date:   Fri, 02 Nov 2018 21:18:48 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Alexey Kardashevskiy <aik@...abs.ru>,
        Christoph Hellwig <hch@....de>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>
Cc:     James Bottomley <jejb@...ux.vnet.ibm.com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/powernv: remove dead npu-dma code

Alexey Kardashevskiy <aik@...abs.ru> writes:
> On 31/10/2018 00:31, Christoph Hellwig wrote:
>> This code has never been unused in the kernel since it was merged, and
>> there has been no attempt that I could find to even submit users for
>> it.  Besides the general policy of not keep 1000+ lines of dead
>> code, it helps cleaning up the DMA code and making powerpc user common
>> infrastructure.
>> 
>> This effectively reverts commit 5d2aa710 ("powerpc/powernv: Add support
>> for Nvlink NPUs").
>> 
>> Signed-off-by: Christoph Hellwig <hch@....de>
>> ---
...
>> diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c
>> deleted file mode 100644
>> index 6f60e0931922..000000000000
>> --- a/arch/powerpc/platforms/powernv/npu-dma.c
>> +++ /dev/null
>> @@ -1,989 +0,0 @@
...
>> -int pnv_npu2_init(struct pnv_phb *phb)
>> -{
>> -	unsigned int i;
>> -	u64 mmio_atsd;
>> -	struct device_node *dn;
>> -	struct pci_dev *gpdev;
>> -	static int npu_index;
>> -	uint64_t rc = 0;
>> -
>> -	phb->npu.nmmu_flush =
>> -		of_property_read_bool(phb->hose->dn, "ibm,nmmu-flush");
>> -	for_each_child_of_node(phb->hose->dn, dn) {
>> -		gpdev = pnv_pci_get_gpu_dev(get_pci_dev(dn));
>> -		if (gpdev) {
>> -			rc = opal_npu_map_lpar(phb->opal_id,
>> -				PCI_DEVID(gpdev->bus->number, gpdev->devfn),
>> -				0, 0);
>
> I heavily hacked on these (draft):
> https://patchwork.ozlabs.org/project/kvm-ppc/list/?series=70791
>
> and the result is going to be used for VFIO purposes (draft too):
> https://patchwork.ozlabs.org/project/kvm-ppc/list/?series=70793
>
> Other bits can go away from npu-dma but I still need some to make
> KVM+VFIO work for GPUs, this is without any vendor driver on the host
> side whatsoever.

OK, so to be clear we will need at least some of this code so that a KVM
host can pass through a GPU to a guest, and that requires no binary
driver on the host.

I don't think anyone's arguing that we should prevent passing through
devices that might need a binary driver in a guest?

Christoph I think that establishes that this is not all dead code, and
so I'm nacking this patch in its current form. If you have other
objections to this code please raise them specifically.

I'll merge Alistair's patch to remove the NPU dma_ops, because they're
not really necessary and might legitimately be getting in the way of
dma_ops cleanups.

  https://patchwork.ozlabs.org/patch/990721/


cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ