summary refs log tree commit diff stats
path: root/hw/pci/pci_host.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-06-27 15:07:50 +0900
committerMichael S. Tsirkin <mst@redhat.com>2024-07-03 18:14:07 -0400
commit6a31b219a5338564f3978251c79f96f689e037da (patch)
tree2f3d1e5b5d6354b6353704d16f42f3388fb4f194 /hw/pci/pci_host.c
parent1b889d6e39c32d709f1114699a014b381bcf1cb1 (diff)
downloadfocaccia-qemu-6a31b219a5338564f3978251c79f96f689e037da.tar.gz
focaccia-qemu-6a31b219a5338564f3978251c79f96f689e037da.zip
hw/pci: Rename has_power to enabled
The renamed state will not only represent powering state of PFs, but
also represent SR-IOV VF enablement in the future.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240627-reuse-v10-1-7ca0b8ed3d9f@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci/pci_host.c')
-rw-r--r--hw/pci/pci_host.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c
index dfe6fe6184..0d82727cc9 100644
--- a/hw/pci/pci_host.c
+++ b/hw/pci/pci_host.c
@@ -86,7 +86,7 @@ void pci_host_config_write_common(PCIDevice *pci_dev, uint32_t addr,
      * allowing direct removal of unexposed functions.
      */
     if ((pci_dev->qdev.hotplugged && !pci_get_function_0(pci_dev)) ||
-        !pci_dev->has_power || is_pci_dev_ejected(pci_dev)) {
+        !pci_dev->enabled || is_pci_dev_ejected(pci_dev)) {
         return;
     }
 
@@ -111,7 +111,7 @@ uint32_t pci_host_config_read_common(PCIDevice *pci_dev, uint32_t addr,
      * allowing direct removal of unexposed functions.
      */
     if ((pci_dev->qdev.hotplugged && !pci_get_function_0(pci_dev)) ||
-        !pci_dev->has_power || is_pci_dev_ejected(pci_dev)) {
+        !pci_dev->enabled || is_pci_dev_ejected(pci_dev)) {
         return ~0x0;
     }