qemu-e2k/hw
Dongli Zhang 17323e8b68 msix: make pba size math more uniform
In msix_exclusive_bar the bar_pba_size is more than what the pba is
expected to have, although this never affects the bar size.

Specifically, the math in msix_init_exclusive_bar allocates too much
memory in some cases.

For example consider nentries = 8.  msix_exclusive_bar will give us
bar_pba_size = 16.  So 16 bytes.  However 8 bytes would be enough - this
is all that the spec requires.

So in practice bar_pba_size sometimes allocates an extra 8 bytes but
never more.

Since each MSIX entry size is 16 bytes, and since we make sure that
table+pba is a power of two, this always leaves a multiple of 16 bytes
for the PBA, so extra 8 bytes have no effect.

However, its ugly to have pba size temporary variable have an incorrect
value.  For consistency switch to the formula used in msix_init.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-01-14 19:31:04 -05:00
..
9pfs xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
acpi
adc
alpha avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
arm avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
audio hw/audio/marvell: Don't include unnecessary i2c.h header file 2019-01-10 09:51:42 +01:00
block xen-block: avoid repeated memory allocation 2019-01-14 13:45:40 +00:00
bt
char xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
core * HAX support for Linux hosts (Alejandro) 2019-01-11 15:46:09 +00:00
cpu hw/cpu: introduce CPU clusters 2019-01-07 15:23:45 +00:00
cris
display xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
dma avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
gpio avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
hppa
hyperv
i2c i2c-ddc: fix oob read 2019-01-11 11:45:00 +01:00
i386 x86 queue, 2019-01-14 2019-01-14 17:35:00 +00:00
ide avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
input avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
intc avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
ipack
ipmi
isa
lm32
m68k
mem memory-device: rewrite address assignment using ranges 2019-01-09 22:09:31 -02:00
microblaze Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
mips avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
misc avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
moxie trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
net xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
nios2 Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
nvram trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
openrisc
pci msix: make pba size math more uniform 2019-01-14 19:31:04 -05:00
pci-bridge
pci-host pam: wrap MemoryRegion initialization in a transaction 2019-01-11 13:57:23 +01:00
pcmcia
ppc * HAX support for Linux hosts (Alejandro) 2019-01-11 15:46:09 +00:00
rdma
riscv
s390x machine: Use shorter format for GlobalProperty arrays 2019-01-09 22:10:00 -02:00
scsi avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
sd
sh4 avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
smbios
sparc trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
sparc64
ssi
timer trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
tpm
tricore
unicore32
usb xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
vfio qemu/queue.h: typedef QTAILQ heads 2019-01-11 15:46:55 +01:00
virtio
watchdog hw/watchdog/wdt_i6300esb: remove a unnecessary comment 2019-01-11 15:46:55 +01:00
xen xen: automatically create XenBlockDevice-s 2019-01-14 13:45:40 +00:00
xenpv xen: Replace few mentions of xend by libxl 2019-01-14 13:45:40 +00:00
xtensa
Makefile.objs