qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
@ 2020-10-15 13:16 Matthew Rosato
  2020-10-15 13:32 ` Christian Borntraeger
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matthew Rosato @ 2020-10-15 13:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: thuth, pmorel, david, cohuck, schnelle, farman, pasic,
	borntraeger, qemu-s390x, rth

Currently, a subsystem reset event leaves PCI devices enabled, causing
issues post-reset in the guest (an example would be after a kexec).  These
devices need to be reset during a subsystem reset, allowing them to be
properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
of qdevs to be reset during subsystem reset.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index e52182f..2e90033 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
     "s390-sclp-event-facility",
     "s390-flic",
     "diag288",
+    TYPE_S390_PCI_HOST_BRIDGE,
 };
 
 static void subsystem_reset(void)
-- 
1.8.3.1



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

* Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
  2020-10-15 13:16 [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset Matthew Rosato
@ 2020-10-15 13:32 ` Christian Borntraeger
  2020-10-15 13:34   ` Christian Borntraeger
  2020-10-16 15:36 ` Halil Pasic
  2020-10-20  9:57 ` Cornelia Huck
  2 siblings, 1 reply; 7+ messages in thread
From: Christian Borntraeger @ 2020-10-15 13:32 UTC (permalink / raw)
  To: Matthew Rosato, qemu-devel
  Cc: thuth, pmorel, david, cohuck, schnelle, farman, pasic, qemu-s390x, rth



On 15.10.20 15:16, Matthew Rosato wrote:
> Currently, a subsystem reset event leaves PCI devices enabled, causing
> issues post-reset in the guest (an example would be after a kexec).  These
> devices need to be reset during a subsystem reset, allowing them to be
> properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
> of qdevs to be reset during subsystem reset.
> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> Reviewed-by: Eric Farman <farman@linux.ibm.com>

Makese sense. 
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>


> ---
>  hw/s390x/s390-virtio-ccw.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index e52182f..2e90033 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
>      "s390-sclp-event-facility",
>      "s390-flic",
>      "diag288",
> +    TYPE_S390_PCI_HOST_BRIDGE,
>  };
>  
>  static void subsystem_reset(void)
> 


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

* Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
  2020-10-15 13:32 ` Christian Borntraeger
@ 2020-10-15 13:34   ` Christian Borntraeger
  2020-10-15 13:37     ` Niklas Schnelle
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Borntraeger @ 2020-10-15 13:34 UTC (permalink / raw)
  To: Matthew Rosato, qemu-devel
  Cc: thuth, pmorel, david, cohuck, schnelle, farman, pasic, qemu-s390x, rth



On 15.10.20 15:32, Christian Borntraeger wrote:
> 
> 
> On 15.10.20 15:16, Matthew Rosato wrote:
>> Currently, a subsystem reset event leaves PCI devices enabled, causing
>> issues post-reset in the guest (an example would be after a kexec).  These
>> devices need to be reset during a subsystem reset, allowing them to be
>> properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
>> of qdevs to be reset during subsystem reset.
>>
>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>> Reviewed-by: Eric Farman <farman@linux.ibm.com>
> 
> Makese sense. 
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

A question. Is this a stable candidate?

> 
> 
>> ---
>>  hw/s390x/s390-virtio-ccw.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>> index e52182f..2e90033 100644
>> --- a/hw/s390x/s390-virtio-ccw.c
>> +++ b/hw/s390x/s390-virtio-ccw.c
>> @@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
>>      "s390-sclp-event-facility",
>>      "s390-flic",
>>      "diag288",
>> +    TYPE_S390_PCI_HOST_BRIDGE,
>>  };
>>  
>>  static void subsystem_reset(void)
>>


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

* Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
  2020-10-15 13:34   ` Christian Borntraeger
@ 2020-10-15 13:37     ` Niklas Schnelle
  2020-10-15 13:45       ` Matthew Rosato
  0 siblings, 1 reply; 7+ messages in thread
From: Niklas Schnelle @ 2020-10-15 13:37 UTC (permalink / raw)
  To: Christian Borntraeger, Matthew Rosato, qemu-devel
  Cc: thuth, pmorel, david, cohuck, farman, pasic, qemu-s390x, rth



On 10/15/20 3:34 PM, Christian Borntraeger wrote:
> 
> 
> On 15.10.20 15:32, Christian Borntraeger wrote:
>>
>>
>> On 15.10.20 15:16, Matthew Rosato wrote:
>>> Currently, a subsystem reset event leaves PCI devices enabled, causing
>>> issues post-reset in the guest (an example would be after a kexec).  These
>>> devices need to be reset during a subsystem reset, allowing them to be
>>> properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
>>> of qdevs to be reset during subsystem reset.
>>>
>>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>>> Reviewed-by: Eric Farman <farman@linux.ibm.com>
>>
>> Makese sense. 
>> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> 
> A question. Is this a stable candidate?

As this can prevent a SUSE guest (which does kexec during boot because of grub)
from seeing any PCI devices I'd say yes.

> 
>>
>>
>>> ---
>>>  hw/s390x/s390-virtio-ccw.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>>> index e52182f..2e90033 100644
>>> --- a/hw/s390x/s390-virtio-ccw.c
>>> +++ b/hw/s390x/s390-virtio-ccw.c
>>> @@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
>>>      "s390-sclp-event-facility",
>>>      "s390-flic",
>>>      "diag288",
>>> +    TYPE_S390_PCI_HOST_BRIDGE,
>>>  };
>>>  
>>>  static void subsystem_reset(void)
>>>


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

* Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
  2020-10-15 13:37     ` Niklas Schnelle
@ 2020-10-15 13:45       ` Matthew Rosato
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Rosato @ 2020-10-15 13:45 UTC (permalink / raw)
  To: Niklas Schnelle, Christian Borntraeger, qemu-devel
  Cc: thuth, pmorel, david, cohuck, farman, pasic, qemu-s390x, rth

On 10/15/20 9:37 AM, Niklas Schnelle wrote:
> 
> 
> On 10/15/20 3:34 PM, Christian Borntraeger wrote:
>>
>>
>> On 15.10.20 15:32, Christian Borntraeger wrote:
>>>
>>>
>>> On 15.10.20 15:16, Matthew Rosato wrote:
>>>> Currently, a subsystem reset event leaves PCI devices enabled, causing
>>>> issues post-reset in the guest (an example would be after a kexec).  These
>>>> devices need to be reset during a subsystem reset, allowing them to be
>>>> properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
>>>> of qdevs to be reset during subsystem reset.
>>>>
>>>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
>>>> Reviewed-by: Eric Farman <farman@linux.ibm.com>
>>>
>>> Makese sense.
>>> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
>>
>> A question. Is this a stable candidate?
> 
> As this can prevent a SUSE guest (which does kexec during boot because of grub)
> from seeing any PCI devices I'd say yes.
> 

Yes, agreed.

>>
>>>
>>>
>>>> ---
>>>>   hw/s390x/s390-virtio-ccw.c | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>>>> index e52182f..2e90033 100644
>>>> --- a/hw/s390x/s390-virtio-ccw.c
>>>> +++ b/hw/s390x/s390-virtio-ccw.c
>>>> @@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
>>>>       "s390-sclp-event-facility",
>>>>       "s390-flic",
>>>>       "diag288",
>>>> +    TYPE_S390_PCI_HOST_BRIDGE,
>>>>   };
>>>>   
>>>>   static void subsystem_reset(void)
>>>>



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

* Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
  2020-10-15 13:16 [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset Matthew Rosato
  2020-10-15 13:32 ` Christian Borntraeger
@ 2020-10-16 15:36 ` Halil Pasic
  2020-10-20  9:57 ` Cornelia Huck
  2 siblings, 0 replies; 7+ messages in thread
From: Halil Pasic @ 2020-10-16 15:36 UTC (permalink / raw)
  To: Matthew Rosato
  Cc: thuth, pmorel, schnelle, farman, cohuck, david, qemu-devel,
	borntraeger, qemu-s390x, rth

On Thu, 15 Oct 2020 09:16:07 -0400
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> Currently, a subsystem reset event leaves PCI devices enabled, causing
> issues post-reset in the guest (an example would be after a kexec).  These
> devices need to be reset during a subsystem reset, allowing them to be
> properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
> of qdevs to be reset during subsystem reset.
> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> Reviewed-by: Eric Farman <farman@linux.ibm.com>

Acked-by: Halil Pasic <pasic@linux.ibm.com>
> ---
>  hw/s390x/s390-virtio-ccw.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index e52182f..2e90033 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
>      "s390-sclp-event-facility",
>      "s390-flic",
>      "diag288",
> +    TYPE_S390_PCI_HOST_BRIDGE,
>  };
>  
>  static void subsystem_reset(void)



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

* Re: [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset
  2020-10-15 13:16 [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset Matthew Rosato
  2020-10-15 13:32 ` Christian Borntraeger
  2020-10-16 15:36 ` Halil Pasic
@ 2020-10-20  9:57 ` Cornelia Huck
  2 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2020-10-20  9:57 UTC (permalink / raw)
  To: Matthew Rosato
  Cc: thuth, pmorel, david, farman, schnelle, qemu-devel, pasic,
	borntraeger, qemu-s390x, rth

On Thu, 15 Oct 2020 09:16:07 -0400
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> Currently, a subsystem reset event leaves PCI devices enabled, causing
> issues post-reset in the guest (an example would be after a kexec).  These
> devices need to be reset during a subsystem reset, allowing them to be
> properly re-enabled afterwards.  Add the S390 PCI host bridge to the list
> of qdevs to be reset during subsystem reset.
> 
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> Reviewed-by: Eric Farman <farman@linux.ibm.com>
> ---
>  hw/s390x/s390-virtio-ccw.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index e52182f..2e90033 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
>      "s390-sclp-event-facility",
>      "s390-flic",
>      "diag288",
> +    TYPE_S390_PCI_HOST_BRIDGE,
>  };
>  
>  static void subsystem_reset(void)

Thanks, applied (with cc:stable added.)



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

end of thread, other threads:[~2020-10-20  9:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 13:16 [PATCH] s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset Matthew Rosato
2020-10-15 13:32 ` Christian Borntraeger
2020-10-15 13:34   ` Christian Borntraeger
2020-10-15 13:37     ` Niklas Schnelle
2020-10-15 13:45       ` Matthew Rosato
2020-10-16 15:36 ` Halil Pasic
2020-10-20  9:57 ` 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).