mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
s390x/pci: optimize calling s390_get_phb()
A function may recursively call device search functions or may call serveral different device search function. Passing the S390pciState to search functions as an argument instead of looking up it inside the search functions lowers the number of calling s390_get_phb(). Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
e70377dfa4
commit
a975a24aed
4 changed files with 52 additions and 50 deletions
|
@ -2301,7 +2301,7 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
|
|||
uint32_t idx = data >> ZPCI_MSI_VEC_BITS;
|
||||
uint32_t vec = data & ZPCI_MSI_VEC_MASK;
|
||||
|
||||
pbdev = s390_pci_find_dev_by_idx(idx);
|
||||
pbdev = s390_pci_find_dev_by_idx(s390_get_phb(), idx);
|
||||
if (!pbdev) {
|
||||
DPRINTF("add_msi_route no dev\n");
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue