diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2015-09-08 16:21:29 -0400 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2015-09-10 16:47:20 +0000 |
commit | bce33948178e338eac2629284b199c0c1f05f8a3 (patch) | |
tree | 4252ac368e2768965b07a26a834ec227aa51e04a /hw/xen/xen_pt.h | |
parent | fe2da64c5ab882124aaf14c27d62409d02ff1786 (diff) | |
download | qemu-bce33948178e338eac2629284b199c0c1f05f8a3.tar.gz |
xen/pt: Make xen_pt_unregister_device idempotent
To deal with xen_host_pci_[set|get]_ functions returning error values
and clearing ourselves in the init function we should make the
.exit (xen_pt_unregister_device) function be idempotent in case
the generic code starts calling .exit (or for fun does it before
calling .init!).
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen/xen_pt.h')
-rw-r--r-- | hw/xen/xen_pt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index 76551efb26..3bc22eb1d1 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -225,6 +225,7 @@ struct XenPCIPassthroughState { MemoryListener memory_listener; MemoryListener io_listener; + bool listener_set; }; int xen_pt_config_init(XenPCIPassthroughState *s); @@ -290,6 +291,7 @@ static inline uint8_t xen_pt_pci_intx(XenPCIPassthroughState *s) " value=%i, acceptable range is 1 - 4\n", r_val); r_val = 0; } else { + /* Note that if s.real_device.config_fd is closed we make 0xff. */ r_val -= 1; } |