lkml.org 
[lkml]   [2007]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [kvm-devel] [PATCH 3/3] virtio PCI device
    Date
    On Tuesday 27 November 2007, Avi Kivity wrote:
    > > :-)  Do you know if there is a hard limit on the number of devices on
    > > a PCI bus?  My concern was that it was limited by something stupid
    > > like an 8-bit identifier.
    >
    > IIRC pci slots are 8-bit, but you can have multiple buses, so
    > effectively 16 bits of device address space (discounting functions which
    > are likely not hot-pluggable).

    You have an 8 bit bus number and an 8 bit device/function number.
    The function number is 3 bits, so if you want to use only function 0
    for everything, you are limited to a little under 8192 (2^(8+5)) devices
    per PCI domain. PC style hardware cannot easily address multiple PCI
    domains, but I think you can have them if you assume that the guest is
    using mmconfig.

    For using multiple buses, the easiest way could be to have every
    device/function on bus 0 be a bridge by itself, so you end up with a
    flat number space for the actual devices,

    $ lspci -t
    [0000:00]-+-00.0-[0000:01]--+-00.0
    | +-01.0
    | +-02.0
    | + ...
    | \-3f.0
    +-00.1-[0000:02]--+-00.0
    | +-01.0
    | +-02.0
    | + ...
    | \-3f.0
    + ...
    |
    +-3f.6-[0000:ff]--+-00.0
    +-01.0
    +-02.0
    + ...
    \-3f.0

    Arnd <><
    -
    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/

    \
     
     \ /
      Last update: 2007-11-27 10:31    [W:0.025 / U:150.112 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site