[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] hw/pt-graphics.c: Gave guest iomem permission for host opregion in qemu-xen-traditional
Actually, qemu-xen has done this in igd_write_opregion() of hw/xen/xen_pt_graphics.c, while qemu-xen-traditional lack of this, so I send this patch to fix it. thanks > -----Original Message----- > From: Pasi Kärkkäinen [mailto:pasik@xxxxxx] > Sent: Monday, July 10, 2017 11:00 PM > To: Anthony PERARD <anthony.perard@xxxxxxxxxx> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; ian.jackson@xxxxxxxxxxxxx; Zhang, Xiong Y > <xiong.y.zhang@xxxxxxxxx> > Subject: Re: [Xen-devel] [PATCH] hw/pt-graphics.c: Gave guest iomem > permission for host opregion in qemu-xen-traditional > > Hi, > > Perhaps Anthony can review this patch (noticing you reviewed other igd > related patches recently..) ? > > > Thanks, > > -- Pasi > > On Tue, Jun 27, 2017 at 12:12:50PM +0800, Xiong Zhang wrote: > > Currently guest couldn't access host opregion when igd is passed through > > to guest with qemu-xen-traditional. Because guest lack of > > iomem permission to map guest allocated opregion pages to host opregion > > pages. > > > > So guest should get iomem permission for host opregion before mapping. > > > > Signed-off-by: Xiong Zhang <xiong.y.zhang@xxxxxxxxx> > > --- > > hw/pt-graphics.c | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/hw/pt-graphics.c b/hw/pt-graphics.c > > index 7302b25..893bf12 100644 > > --- a/hw/pt-graphics.c > > +++ b/hw/pt-graphics.c > > @@ -78,10 +78,20 @@ void igd_write_opregion(struct pt_dev *real_dev, > uint32_t val) > > igd_guest_opregion = (val & ~0xfff) | (host_opregion & 0xfff); > > PT_LOG("Map OpRegion: %x -> %x\n", host_opregion, > igd_guest_opregion); > > > > + ret = xc_domain_iomem_permission(xc_handle, domid, > > + host_opregion >> XC_PAGE_SHIFT, 3, 1); > > + if (ret) > > + { > > + PT_LOG("Error[%d]: Can't enable to access IGD host opregion: > 0x%x\n", > > + ret, host_opregion >> XC_PAGE_SHIFT); > > + igd_guest_opregion = 0; > > + return; > > + } > > + > > ret = xc_domain_memory_mapping(xc_handle, domid, > > igd_guest_opregion >> XC_PAGE_SHIFT, > > host_opregion >> XC_PAGE_SHIFT, > > - 2, > > + 3, > > DPCI_ADD_MAPPING); > > > > if ( ret != 0 ) > > -- > > 2.7.4 > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@xxxxxxxxxxxxx > > https://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |