qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] pci: add dev_reserved_mask property to PCIB


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH 2/3] pci: add dev_reserved_mask property to PCIBus
Date: Mon, 10 Jul 2017 10:27:01 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 07/07/2017 10:44, Mark Cave-Ayland wrote:
This is just a simple bitmask indicating whether or not each PCI slot on the
bus is reserved. Ensure that it is initialised to zero so that all bus slots
are available by default.


Hi Mark,

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
  hw/pci/pci.c             |    1 +
  include/hw/pci/pci_bus.h |    1 +
  2 files changed, 2 insertions(+)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 04e6edb..239161e 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -371,6 +371,7 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent,
  {
      assert(PCI_FUNC(devfn_min) == 0);
      bus->devfn_min = devfn_min;
+    bus->dev_reserved_mask = 0x0;

Not really necessary, the object are zeroed when created
(as far as I remember).

      bus->address_space_mem = address_space_mem;
      bus->address_space_io = address_space_io;
diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h
index 5484a9b..a0cf655 100644
--- a/include/hw/pci/pci_bus.h
+++ b/include/hw/pci/pci_bus.h
@@ -23,6 +23,7 @@ struct PCIBus {
      PCIIOMMUFunc iommu_fn;
      void *iommu_opaque;
      uint8_t devfn_min;
+    uint32_t dev_reserved_mask;

I would merge this patch with the next one to
see the new field "in action".

Thanks,
Marcel

      pci_set_irq_fn set_irq;
      pci_map_irq_fn map_irq;
      pci_route_irq_fn route_intx_to_irq;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]