[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Xen-devel] [PATCH] xen-pt: Fix PCI devices re-attach f
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [Xen-devel] [PATCH] xen-pt: Fix PCI devices re-attach failed |
Date: |
Mon, 12 Jan 2015 15:49:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 12/01/2015 14:35, Li, Liang Z wrote:
>
> diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index c1bf357..f2893b2 100644
> --- a/hw/xen/xen_pt.c
> +++ b/hw/xen/xen_pt.c
> @@ -736,7 +736,7 @@ static int xen_pt_initfn(PCIDevice *d)
> }
>
> out:
> - memory_listener_register(&s->memory_listener, &address_space_memory);
> + memory_listener_register(&s->memory_listener,
> + &s->dev.bus_master_as);
> memory_listener_register(&s->io_listener, &address_space_io);
> XEN_PT_LOG(d,
> "Real physical device %02x:%02x.%d registered
> successfully!\n",
>
> By further debugging, I found when using 'address_space_memory',
> 'xen_pt_region_del'
> won't be called when the memory region's name is not ' xen-pci-pt-*', when
> using
> ' s->dev.bus_master_as ', there is no such issue.
>
> I think use the device related address space here is more reasonable, but I
> am not sure.
> Could you give some suggestion?
Yes, this patch makes sense. The listener will be called every time the
command register is written.
Paolo