mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-24 02:21:52 -06:00
qapi/common: Drop temporary 'prefix'
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves OffAutoPCIBAR's generated enumeration constant prefix from OFF_AUTOPCIBAR to OFF_AUTO_PCIBAR. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Message-ID: <20240904111836.3273842-5-armbru@redhat.com>
This commit is contained in:
parent
bcd63b55b0
commit
55872c7061
2 changed files with 5 additions and 6 deletions
|
@ -1452,7 +1452,7 @@ static bool vfio_pci_relocate_msix(VFIOPCIDevice *vdev, Error **errp)
|
||||||
int target_bar = -1;
|
int target_bar = -1;
|
||||||
size_t msix_sz;
|
size_t msix_sz;
|
||||||
|
|
||||||
if (!vdev->msix || vdev->msix_relo == OFF_AUTOPCIBAR_OFF) {
|
if (!vdev->msix || vdev->msix_relo == OFF_AUTO_PCIBAR_OFF) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1464,7 +1464,7 @@ static bool vfio_pci_relocate_msix(VFIOPCIDevice *vdev, Error **errp)
|
||||||
/* PCI BARs must be a power of 2 */
|
/* PCI BARs must be a power of 2 */
|
||||||
msix_sz = pow2ceil(msix_sz);
|
msix_sz = pow2ceil(msix_sz);
|
||||||
|
|
||||||
if (vdev->msix_relo == OFF_AUTOPCIBAR_AUTO) {
|
if (vdev->msix_relo == OFF_AUTO_PCIBAR_AUTO) {
|
||||||
/*
|
/*
|
||||||
* TODO: Lookup table for known devices.
|
* TODO: Lookup table for known devices.
|
||||||
*
|
*
|
||||||
|
@ -1479,7 +1479,7 @@ static bool vfio_pci_relocate_msix(VFIOPCIDevice *vdev, Error **errp)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
target_bar = (int)(vdev->msix_relo - OFF_AUTOPCIBAR_BAR0);
|
target_bar = (int)(vdev->msix_relo - OFF_AUTO_PCIBAR_BAR0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* I/O port BARs cannot host MSI-X structures */
|
/* I/O port BARs cannot host MSI-X structures */
|
||||||
|
@ -1624,7 +1624,7 @@ static bool vfio_msix_early_setup(VFIOPCIDevice *vdev, Error **errp)
|
||||||
} else if (vfio_pci_is(vdev, PCI_VENDOR_ID_BAIDU,
|
} else if (vfio_pci_is(vdev, PCI_VENDOR_ID_BAIDU,
|
||||||
PCI_DEVICE_ID_KUNLUN_VF)) {
|
PCI_DEVICE_ID_KUNLUN_VF)) {
|
||||||
msix->pba_offset = 0xb400;
|
msix->pba_offset = 0xb400;
|
||||||
} else if (vdev->msix_relo == OFF_AUTOPCIBAR_OFF) {
|
} else if (vdev->msix_relo == OFF_AUTO_PCIBAR_OFF) {
|
||||||
error_setg(errp, "hardware reports invalid configuration, "
|
error_setg(errp, "hardware reports invalid configuration, "
|
||||||
"MSIX PBA outside of specified BAR");
|
"MSIX PBA outside of specified BAR");
|
||||||
g_free(msix);
|
g_free(msix);
|
||||||
|
@ -3403,7 +3403,7 @@ static Property vfio_pci_dev_properties[] = {
|
||||||
nv_gpudirect_clique,
|
nv_gpudirect_clique,
|
||||||
qdev_prop_nv_gpudirect_clique, uint8_t),
|
qdev_prop_nv_gpudirect_clique, uint8_t),
|
||||||
DEFINE_PROP_OFF_AUTO_PCIBAR("x-msix-relocation", VFIOPCIDevice, msix_relo,
|
DEFINE_PROP_OFF_AUTO_PCIBAR("x-msix-relocation", VFIOPCIDevice, msix_relo,
|
||||||
OFF_AUTOPCIBAR_OFF),
|
OFF_AUTO_PCIBAR_OFF),
|
||||||
#ifdef CONFIG_IOMMUFD
|
#ifdef CONFIG_IOMMUFD
|
||||||
DEFINE_PROP_LINK("iommufd", VFIOPCIDevice, vbasedev.iommufd,
|
DEFINE_PROP_LINK("iommufd", VFIOPCIDevice, vbasedev.iommufd,
|
||||||
TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *),
|
TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *),
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
# Since: 2.12
|
# Since: 2.12
|
||||||
##
|
##
|
||||||
{ 'enum': 'OffAutoPCIBAR',
|
{ 'enum': 'OffAutoPCIBAR',
|
||||||
'prefix': 'OFF_AUTOPCIBAR', # TODO drop
|
|
||||||
'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
|
'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue