qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/1] s390/pci more enhancements
@ 2017-11-07 17:54 Christian Borntraeger
  2017-11-07 17:54 ` [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode Christian Borntraeger
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Borntraeger @ 2017-11-07 17:54 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: qemu-devel, qemu-s390x, Halil Pasic, Alexander Graf,
	Richard Henderson, Yi Min Zhao, Pierre Morel,
	Christian Borntraeger

This patch puts PCI device in the configured state by default, which is the
only sane default for KVM guests.

Christian Borntraeger (1):
  s390x/pci: let pci devices start in configured mode

 hw/s390x/s390-pci-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode
  2017-11-07 17:54 [Qemu-devel] [PATCH 0/1] s390/pci more enhancements Christian Borntraeger
@ 2017-11-07 17:54 ` Christian Borntraeger
  2017-11-08  8:53   ` Cornelia Huck
  2017-11-08 11:05   ` Cornelia Huck
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Borntraeger @ 2017-11-07 17:54 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: qemu-devel, qemu-s390x, Halil Pasic, Alexander Graf,
	Richard Henderson, Yi Min Zhao, Pierre Morel,
	Christian Borntraeger

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 <borntraeger@de.ibm.com>
Acked-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
---
 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 "
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode
  2017-11-07 17:54 ` [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode Christian Borntraeger
@ 2017-11-08  8:53   ` Cornelia Huck
  2017-11-08  9:19     ` Pierre Morel
  2017-11-08 11:05   ` Cornelia Huck
  1 sibling, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2017-11-08  8:53 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: qemu-devel, qemu-s390x, Halil Pasic, Alexander Graf,
	Richard Henderson, Yi Min Zhao, Pierre Morel

On Tue,  7 Nov 2017 18:54:55 +0100
Christian Borntraeger <borntraeger@de.ibm.com> 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 <borntraeger@de.ibm.com>
> Acked-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
> Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
> ---
>  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?

I think I'll queue this for 2.11.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode
  2017-11-08  8:53   ` Cornelia Huck
@ 2017-11-08  9:19     ` Pierre Morel
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre Morel @ 2017-11-08  9:19 UTC (permalink / raw)
  To: Cornelia Huck, Christian Borntraeger
  Cc: qemu-devel, qemu-s390x, Halil Pasic, Alexander Graf,
	Richard Henderson, Yi Min Zhao

On 08/11/2017 09:53, Cornelia Huck wrote:
> On Tue,  7 Nov 2017 18:54:55 +0100
> Christian Borntraeger <borntraeger@de.ibm.com> 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 <borntraeger@de.ibm.com>
>> Acked-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
>> Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
>> ---
>>   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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode
  2017-11-07 17:54 ` [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode Christian Borntraeger
  2017-11-08  8:53   ` Cornelia Huck
@ 2017-11-08 11:05   ` Cornelia Huck
  1 sibling, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2017-11-08 11:05 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: qemu-devel, qemu-s390x, Halil Pasic, Alexander Graf,
	Richard Henderson, Yi Min Zhao, Pierre Morel

On Tue,  7 Nov 2017 18:54:55 +0100
Christian Borntraeger <borntraeger@de.ibm.com> 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 <borntraeger@de.ibm.com>
> Acked-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
> Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
> ---
>  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 "

Thanks, queued to s390-fixes.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-08 11:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 17:54 [Qemu-devel] [PATCH 0/1] s390/pci more enhancements Christian Borntraeger
2017-11-07 17:54 ` [Qemu-devel] [PATCH 1/1] s390x/pci: let pci devices start in configured mode Christian Borntraeger
2017-11-08  8:53   ` Cornelia Huck
2017-11-08  9:19     ` Pierre Morel
2017-11-08 11:05   ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).