[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capabilit
From: |
Alexander Bezzubikov |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capability structure |
Date: |
Sun, 23 Jul 2017 19:12:00 +0300 |
2017-07-23 5:44 GMT+03:00 Michael S. Tsirkin <address@hidden>:
> On Sun, Jul 23, 2017 at 01:11:49AM +0300, Aleksandr Bezzubikov wrote:
> > On PCI init PCI bridge devices may need some
> > extra info about bus number to reserve, IO, memory and
> > prefetchable memory limits. QEMU can provide this
> > with special vendor-specific PCI capability.
> >
> > This capability is intended to be used only
> > for Red Hat PCI bridges, i.e. QEMU cooperation.
> >
> > Sizes of limits match ones from
> > PCI Type 1 Configuration Space Header,
> > number of buses to reserve occupies only 1 byte
> > since it is the size of Subordinate Bus Number register.
> >
> > Signed-off-by: Aleksandr Bezzubikov <address@hidden>
> > ---
> > src/hw/pci_cap.h | 23 +++++++++++++++++++++++
> > 1 file changed, 23 insertions(+)
> > create mode 100644 src/hw/pci_cap.h
> >
> > diff --git a/src/hw/pci_cap.h b/src/hw/pci_cap.h
> > new file mode 100644
> > index 0000000..1382b0b
> > --- /dev/null
> > +++ b/src/hw/pci_cap.h
> > @@ -0,0 +1,23 @@
> > +#ifndef _PCI_CAP_H
> > +#define _PCI_CAP_H
> > +
> > +#include "types.h"
> > +
> > +struct vendor_pci_cap {
> > + u8 id;
> > + u8 next;
> > + u8 len;
> > +};
> > +
> > +struct redhat_pci_bridge_cap {
> > + struct vendor_pci_cap hdr;
>
> Hi Michael,
Thanks for the quick reply.
> You want to add some kind of identifier here after
> the header, such that more capabilities can be added
> in future without breaking this one.
>
You mean to distinguish different vendor-specific capabilities?
Agreed if so, will add it in the next version.
>
> > + u8 bus_res;
> > + u32 pref_lim_upper;
> > + u16 pref_lim;
> > + u16 mem_lim;
> > + u16 io_lim_upper;
> > + u8 io_lim;
> > + u8 padd;
>
> Please add documentation.
>
>
> > +};
> > +
> > +#endif /* _PCI_CAP_H */
> > --
> > 2.7.4
>
--
Alexander Bezzubikov
- [Qemu-devel] [RFC PATCH v2 0/4] Allow RedHat PCI bridges reserve more buses than necessary during init, Aleksandr Bezzubikov, 2017/07/22
- [Qemu-devel] [RFC PATCH v2 1/4] pci: refactor pci_find_capapibilty to get bdf as the first argument instead of the whole pci_device, Aleksandr Bezzubikov, 2017/07/22
- [Qemu-devel] [RFC PATCH v2 2/4] pci: add RedHat vendor ID, Aleksandr Bezzubikov, 2017/07/22
- [Qemu-devel] [RFC PATCH v2 3/4] pci: add QEMU-specific PCI capability structure, Aleksandr Bezzubikov, 2017/07/22
- [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Aleksandr Bezzubikov, 2017/07/22
- Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Michael S. Tsirkin, 2017/07/22
- Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Alexander Bezzubikov, 2017/07/23
- Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Alexander Bezzubikov, 2017/07/23
- Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Gerd Hoffmann, 2017/07/24
- Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Alexander Bezzubikov, 2017/07/24
- Re: [Qemu-devel] [RFC PATCH v2 4/4] pci: enable RedHat PCI bridges to reserve additional buses on PCI init, Marcel Apfelbaum, 2017/07/24
Re: [Qemu-devel] [RFC PATCH v2 0/4] Allow RedHat PCI bridges reserve more buses than necessary during init, Laszlo Ersek, 2017/07/25