qemu-s390x
[Top][All Lists]
Advanced

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

Re: [qemu-s390x] [PATCH 1/1] s390x/pci: let pci devices start in configu


From: Pierre Morel
Subject: Re: [qemu-s390x] [PATCH 1/1] s390x/pci: let pci devices start in configured mode
Date: Wed, 8 Nov 2017 10:19:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 08/11/2017 09:53, Cornelia Huck wrote:
On Tue,  7 Nov 2017 18:54:55 +0100
Christian Borntraeger <address@hidden> wrote:

Currently, to enable a pci device in the guest, the user has to issue
echo 1 > /sys/bus/pci/slots/00000000/power. This is not what people
expect. On an LPAR, the user can put a PCI device in configured or
deconfigured state via IOCDS. The "start in deconfigured state" can be
used for "sharing" a pci function across LPARs. This is not what we are
going to use in KVM, so always start configured.

Signed-off-by: Christian Borntraeger <address@hidden>
Acked-by: Yi Min Zhao <address@hidden>
Reviewed-by: Pierre Morel <address@hidden>
---
  hw/s390x/s390-pci-bus.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index e7a58e8..2b1e140 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -715,7 +715,7 @@ static void s390_pcihost_hot_plug(HotplugHandler 
*hotplug_dev,
          pbdev->pdev = pdev;
          pbdev->iommu = s390_pci_get_iommu(s, pdev->bus, pdev->devfn);
          pbdev->iommu->pbdev = pbdev;
-        pbdev->state = ZPCI_FS_STANDBY;
+        pbdev->state = ZPCI_FS_DISABLED;
if (s390_pci_msix_init(pbdev)) {
              error_setg(errp, "MSI-X support is mandatory "

A pci function already has to be configured before we can assign it via
vfio, right?

Yes it is right, otherwise we do not see the PCI device in the sysfs and we can not provide it to QEMU.

Regards

Pierre


I think I'll queue this for 2.11.



--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany




reply via email to

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