diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-03 11:46:52 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-03 11:46:52 +0000 |
commit | 43246f5e26fa0bd81576032314ed840d0a4c9d41 (patch) | |
tree | 3378d57486b9170e597e4d204990d4d6d95bda95 /xen/arch/x86/hvm/vmsi.c | |
parent | 9b82af4b039d3b0c411e14daad17e561c11ecfda (diff) | |
download | xen-43246f5e26fa0bd81576032314ed840d0a4c9d41.tar.gz xen-43246f5e26fa0bd81576032314ed840d0a4c9d41.tar.bz2 xen-43246f5e26fa0bd81576032314ed840d0a4c9d41.zip |
hvm: passthrough MSI-X: fix ia64 link and MSI-X clean up
This patch fixes the ia64 link error and some clean up of MSI-X code.
- add ia64 dummy function to link
- fix unmatched prototype
- add error check
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Diffstat (limited to 'xen/arch/x86/hvm/vmsi.c')
-rw-r--r-- | xen/arch/x86/hvm/vmsi.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c index 2d10be9345..1a0a45a6c9 100644 --- a/xen/arch/x86/hvm/vmsi.c +++ b/xen/arch/x86/hvm/vmsi.c @@ -378,14 +378,16 @@ static void del_msixtbl_entry(struct msixtbl_entry *entry) call_rcu(&entry->rcu, free_msixtbl_entry); } -void msixtbl_pt_register(struct domain *d, int pirq, uint64_t gtable) +int msixtbl_pt_register(struct domain *d, int pirq, uint64_t gtable) { irq_desc_t *irq_desc; struct msi_desc *msi_desc; struct pci_dev *pdev; struct msixtbl_entry *entry; + int r = -EINVAL; + + ASSERT(spin_is_locked(&pcidevs_lock)); - /* pcidevs_lock already held */ irq_desc = domain_spin_lock_irq_desc(d, pirq, NULL); if ( irq_desc->handler != &pci_msi_type ) @@ -412,11 +414,13 @@ void msixtbl_pt_register(struct domain *d, int pirq, uint64_t gtable) found: atomic_inc(&entry->refcnt); - spin_unlock(&d->arch.hvm_domain.msixtbl_list_lock); + r = 0; out: spin_unlock_irq(&irq_desc->lock); + return r; + } void msixtbl_pt_unregister(struct domain *d, int pirq) @@ -426,7 +430,8 @@ void msixtbl_pt_unregister(struct domain *d, int pirq) struct pci_dev *pdev; struct msixtbl_entry *entry; - /* pcidevs_lock already held */ + ASSERT(spin_is_locked(&pcidevs_lock)); + irq_desc = domain_spin_lock_irq_desc(d, pirq, NULL); if ( irq_desc->handler != &pci_msi_type ) |