@@ -284,7 +284,6 @@ struct MachineClass {
no_floppy:1,
no_cdrom:1,
no_sdcard:1,
- pci_allow_0_address:1,
legacy_fw_cfg_order:1;
bool is_default;
const char *default_machine_opts;
@@ -45,7 +45,6 @@
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "hw/hotplug.h"
-#include "hw/boards.h"
#include "qapi/error.h"
#include "qemu/cutils.h"
#include "pci-internal.h"
@@ -1472,10 +1471,8 @@ pcibus_t pci_bar_address(PCIDevice *d,
{
pcibus_t new_addr, last_addr;
uint16_t cmd = pci_get_word(d->config + PCI_COMMAND);
- MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
- bool allow_0_address = mc->pci_allow_0_address;
+ bool allow_0_address = pci_bus_allows_io_addr0_access(pci_get_bus(d));
- allow_0_address |= pci_bus_allows_io_addr0_access(pci_get_bus(d));
if (type & PCI_BASE_ADDRESS_SPACE_IO) {
if (!(cmd & PCI_COMMAND_IO)) {
return PCI_BAR_UNMAPPED;
All users of this flag now set the PCI_BUS_IO_ADDR0_ALLOWED PCIBusFlags. Since there are no more users, remove the field in MachineClass. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/boards.h | 1 - hw/pci/pci.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-)