[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Xen-devel] [v2][PATCH 2/8] pci: provide a way to reser
From: |
Chen, Tiejun |
Subject: |
Re: [Qemu-devel] [Xen-devel] [v2][PATCH 2/8] pci: provide a way to reserve some specific devfn |
Date: |
Mon, 19 May 2014 09:43:43 +0000 |
> -----Original Message-----
> From: Konrad Rzeszutek Wilk [mailto:address@hidden
> Sent: Friday, May 16, 2014 10:07 PM
> To: Chen, Tiejun
> Cc: address@hidden; address@hidden;
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden; Kay, Allen M;
> address@hidden; address@hidden;
> address@hidden; Zhang, Yang Z
> Subject: Re: [Xen-devel] [v2][PATCH 2/8] pci: provide a way to reserve some
> specific devfn
>
> On Fri, May 16, 2014 at 06:53:38PM +0800, Tiejun Chen wrote:
> > Sometime we may need to reserve some specific devfn since some vgabios
> > or drivers have to work well with a fixed bdf.
> >
> > Signed-off-by: Tiejun Chen <address@hidden>
> > ---
> > v2:
> >
> > * New patch
> >
> > hw/pci/pci.c | 11 +++++++++++
> > include/hw/pci/pci.h | 1 +
> > 2 files changed, 12 insertions(+)
> >
> > diff --git a/hw/pci/pci.c b/hw/pci/pci.c index ef944cf..06b0c92 100644
> > --- a/hw/pci/pci.c
> > +++ b/hw/pci/pci.c
> > @@ -813,6 +813,17 @@ static void do_pci_unregister_device(PCIDevice
> *pci_dev)
> > memory_region_destroy(&pci_dev->bus_master_enable_region);
> > }
> >
> > +
> > +void pci_reserve_pci_devfn(PCIBus *bus, uint8_t devfn) {
> > + int ret = test_and_set_bit(devfn, bus->pci_bdf_bitmap);
>
> unsigned int please.
Fixed.
> > + if (ret) {
> > + error_report("PCI: %02x:%02x:%02x is not available to reserve.",
> > + pci_bus_num(bus), PCI_SLOT(devfn),
> PCI_FUNC(devfn));
> > + return;
> > + }
> > +}
>
> Don't we want to return whether we are failed or not?
Its my typo so I will remove that "return" simply.
Thanks
Tiejun
- [Qemu-devel] [v2][PATCH 0/8] xen: add Intel IGD passthrough support, Tiejun Chen, 2014/05/16
- [Qemu-devel] [v2][PATCH 1/8] pci: use bitmap to manage registe/runregister pci device, Tiejun Chen, 2014/05/16
- [Qemu-devel] [v2][PATCH 2/8] pci: provide a way to reserve some specific devfn, Tiejun Chen, 2014/05/16
- [Qemu-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Tiejun Chen, 2014/05/16
- Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Konrad Rzeszutek Wilk, 2014/05/16
- Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Chen, Tiejun, 2014/05/19
- Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Konrad Rzeszutek Wilk, 2014/05/19
- Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Chen, Tiejun, 2014/05/20
- Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Stefano Stabellini, 2014/05/19
- Re: [Qemu-devel] [Xen-devel] [v2][PATCH 3/8] xen, gfx passthrough: basic graphics passthrough support, Chen, Tiejun, 2014/05/20
[Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD, Tiejun Chen, 2014/05/16