diff mbox series

s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset

Message ID 1602767767-32713-1-git-send-email-mjrosato@linux.ibm.com
State New
Headers show
Series s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset | expand

Commit Message

Matthew Rosato Oct. 15, 2020, 1:16 p.m. UTC
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(+)

Comments

Christian Borntraeger Oct. 15, 2020, 1:32 p.m. UTC | #1
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)

>
Christian Borntraeger Oct. 15, 2020, 1:34 p.m. UTC | #2
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)

>>
Niklas Schnelle Oct. 15, 2020, 1:37 p.m. UTC | #3
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)

>>>
Matthew Rosato Oct. 15, 2020, 1:45 p.m. UTC | #4
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)

>>>>
Halil Pasic Oct. 16, 2020, 3:36 p.m. UTC | #5
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)
Cornelia Huck Oct. 20, 2020, 9:57 a.m. UTC | #6
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.)
diff mbox series

Patch

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)