Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1266262

Re: [PATCH v4 0/6] virtio core DMA API conversion

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH v4 0/6] virtio core DMA API conversion
Date 2015-11-10 06:40 +0100
Message-ID <qt9OW-TO-13@gated-at.bofh.it> (permalink)
References (2 earlier) <qt42S-5vi-23@gated-at.bofh.it> <qt5ii-6fS-3@gated-at.bofh.it> <qt6Ho-7hQ-19@gated-at.bofh.it> <qt6Ho-7hQ-17@gated-at.bofh.it> <qt9Fg-QD-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 9, 2015 at 9:28 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Mon, 2015-11-09 at 18:18 -0800, Andy Lutomirski wrote:
>>
>> /* Qumranet donated their vendor ID for devices 0x1000 thru 0x10FF.
>> */
>> static const struct pci_device_id virtio_pci_id_table[] = {
>>         { PCI_DEVICE(0x1af4, PCI_ANY_ID) },
>>         { 0 }
>> };
>>
>> Can we match on that range?
>
> We can, but the problem remains, how do we differenciate an existing
> device that does bypass vs. a newer one that needs the IOMMU and thus
> doesn't have the new "bypass" property in the device-tree.
>

We could do it the other way around: on powerpc, if a PCI device is in
that range and doesn't have the "bypass" property at all, then it's
assumed to bypass the IOMMU.  This means that everything that
currently works continues working.  If someone builds a physical
virtio device or uses another system in PCIe target mode speaking
virtio, then it won't work until they upgrade their firmware to set
bypass=0.  Meanwhile everyone using hypothetical new QEMU also gets
bypass=0 and no ambiguity.

vfio will presumably notice the bypass and correctly refuse to map any
current virtio devices.

Would that work?

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 0/6] virtio core DMA API conversion "Michael S. Tsirkin" <mst@redhat.com> - 2015-11-09 13:20 +0100
  Re: [PATCH v4 0/6] virtio core DMA API conversion Paolo Bonzini <pbonzini@redhat.com> - 2015-11-09 13:30 +0100
  Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 00:30 +0100
    Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-10 01:50 +0100
      Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-10 03:20 +0100
        Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 06:30 +0100
          Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-10 06:40 +0100
            Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 11:40 +0100
              Re: [PATCH v4 0/6] virtio core DMA API conversion "Michael S. Tsirkin" <mst@redhat.com> - 2015-11-10 13:50 +0100
                Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 21:40 +0100
              Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-10 20:00 +0100
                Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 23:30 +0100
                Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-11 00:50 +0100
                Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-11 01:50 +0100
                Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-11 05:50 +0100
                Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-11 06:10 +0100
        Re: [PATCH v4 0/6] virtio core DMA API conversion Andy Lutomirski <luto@amacapital.net> - 2015-11-10 06:40 +0100
        Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 07:30 +0100
        Re: [PATCH v4 0/6] virtio core DMA API conversion Jan Kiszka <jan.kiszka@siemens.com> - 2015-11-10 09:20 +0100
      Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 04:10 +0100
        Re: [PATCH v4 0/6] virtio core DMA API conversion Knut Omang <knut.omang@oracle.com> - 2015-11-10 10:50 +0100
          Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 11:50 +0100
        Re: [PATCH v4 0/6] virtio core DMA API conversion Joerg Roedel <jroedel@suse.de> - 2015-11-10 11:30 +0100
          Re: [PATCH v4 0/6] virtio core DMA API conversion Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2015-11-10 20:40 +0100

csiph-web