[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Using PCI config space to indicate config location
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] Using PCI config space to indicate config location |
Date: |
Wed, 10 Oct 2012 08:36:12 -0500 |
User-agent: |
Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
Rusty Russell <address@hidden> writes:
> Gerd Hoffmann <address@hidden> writes:
>> So how about this:
>>
>> (1) Add a vendor specific pci capability for new-style virtio.
>> Specifies the pci bar used for new-style virtio registers.
>> Guests can use it to figure whenever new-style virtio is
>> supported and to map the correct bar (which will probably
>> be bar 1 in most cases).
>
> This was closer to the original proposal[1], which I really liked (you
> can layout bars however you want). Anthony thought that vendor
> capabilities were a PCI-e feature, but it seems they're blessed in PCI
> 2.3.
2.3 was standardized in 2002. Are we confident that vendor extensions
play nice with pre-2.3 OSes like Win2k, WinXP, etc?
I still think it's a bad idea to rely on something so "new" in something
as fundamental as virtio-pci unless we have to.
Regards,
Anthony Liguori
>
> So let's return to that proposal, giving something like this:
>
> /* IDs for different capabilities. Must all exist. */
> /* FIXME: Do we win from separating ISR, NOTIFY and COMMON? */
> /* Common configuration */
> #define VIRTIO_PCI_CAP_COMMON_CFG 1
> /* Notifications */
> #define VIRTIO_PCI_CAP_NOTIFY_CFG 2
> /* ISR access */
> #define VIRTIO_PCI_CAP_ISR_CFG 3
> /* Device specific confiuration */
> #define VIRTIO_PCI_CAP_DEVICE_CFG 4
>
> /* This is the PCI capability header: */
> struct virtio_pci_cap {
> u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */
> u8 cap_next; /* Generic PCI field: next ptr. */
> u8 cap_len; /* Generic PCI field: sizeof(struct virtio_pci_cap). */
> u8 cfg_type; /* One of the VIRTIO_PCI_CAP_*_CFG. */
> u8 bar; /* Where to find it. */
> u8 unused;
> __le16 offset; /* Offset within bar. */
> __le32 length; /* Length. */
> };
>
> This means qemu can point the isr_cfg into the legacy area if it wants.
> In fact, it can put everything in BAR0 if it wants.
>
> Thoughts?
> Rusty.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to address@hidden
> More majordomo info at http://vger.kernel.org/majordomo-info.html
- Re: [Qemu-devel] Using PCI config space to indicate config location, (continued)
- Re: [Qemu-devel] Using PCI config space to indicate config location, Jamie Lokier, 2012/10/09
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location, Gerd Hoffmann, 2012/10/09
- Re: [Qemu-devel] Using PCI config space to indicate config location, Anthony Liguori, 2012/10/09
- Re: [Qemu-devel] Using PCI config space to indicate config location, Gerd Hoffmann, 2012/10/09
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location,
Anthony Liguori <=
- Re: [Qemu-devel] Using PCI config space to indicate config location, Michael S. Tsirkin, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location, Michael S. Tsirkin, 2012/10/10
Re: [Qemu-devel] Using PCI config space to indicate config location, Michael S. Tsirkin, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/10
- Re: [Qemu-devel] Using PCI config space to indicate config location, Michael S. Tsirkin, 2012/10/11
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/11
- Re: [Qemu-devel] Using PCI config space to indicate config location, Michael S. Tsirkin, 2012/10/12
- Re: [Qemu-devel] Using PCI config space to indicate config location, Rusty Russell, 2012/10/12
- Re: [Qemu-devel] Using PCI config space to indicate config location, Michael S. Tsirkin, 2012/10/12