mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/vfio: Use the IEC binary prefix definitions
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180625124238.25339-38-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
4c8f9735da
commit
e0255bb1ac
2 changed files with 7 additions and 5 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "qemu/error-report.h"
|
||||
#include "qemu/option.h"
|
||||
#include "qemu/range.h"
|
||||
#include "qemu/units.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "pci.h"
|
||||
|
@ -1417,7 +1418,7 @@ static void vfio_pci_relocate_msix(VFIOPCIDevice *vdev, Error **errp)
|
|||
}
|
||||
|
||||
/* 2GB max size for 32-bit BARs, cannot double if already > 1G */
|
||||
if (vdev->bars[target_bar].size > (1 * 1024 * 1024 * 1024) &&
|
||||
if (vdev->bars[target_bar].size > 1 * GiB &&
|
||||
!vdev->bars[target_bar].mem64) {
|
||||
error_setg(errp, "Invalid MSI-X relocation BAR %d, "
|
||||
"no space to extend 32-bit BAR", target_bar);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue