|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] qemu-xen: Pass through, utility functions
On 01/02 02:47, Stefano Stabellini wrote:
> On Tue, 31 Jan 2012, Jean Guyader wrote:
> > Add a function to map a specific bar into a pt_dev.
> >
> > Add a function that gets called everytime the bar of a pass
> > through device gets remap.
> >
> > Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
> > ---
> > hw/pass-through.c | 34 ++++++++++++++++++++++++++++++++++
> > hw/pass-through.h | 3 +++
> > hw/pt-graphics.c | 7 +++++++
> > 3 files changed, 44 insertions(+), 0 deletions(-)
>
> Could you please send inline patches in the future?
>
>
> > diff --git a/hw/pass-through.c b/hw/pass-through.c
> > index dbe8804..1bdb223 100644
> > --- a/hw/pass-through.c
> > +++ b/hw/pass-through.c
> > @@ -93,6 +93,7 @@
> > #include <unistd.h>
> > #include <sys/ioctl.h>
> > #include <assert.h>
> > +#include <sys/mman.h>
> >
> > extern int gfx_passthru;
> > int igd_passthru = 0;
> > @@ -1155,6 +1156,9 @@ static void pt_iomem_map(PCIDevice *d, int i,
> > uint32_t e_phys, uint32_t e_size,
> > if ( e_size == 0 )
> > return;
> >
> > + if (assigned_device->pci_dev->device_class == 0x0300)
> > + pt_graphic_bar_remap(assigned_device, i, first_map,
> > DPCI_ADD_MAPPING);
> > +
> > if ( !first_map && old_ebase != -1 )
> > {
> > if ( has_msix_mapping(assigned_device, i) )
>
> Wouldn't it be better if we move this into _pt_iomem_helper?
>
>
It will be equivalent, but at least it will make the current pt_ioemu_map
function
smaller which isn't a bad thing.
Jean
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |