All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model
@ 2019-02-12 11:23 David Hildenbrand
  2019-02-12 13:12 ` Cornelia Huck
  2019-02-13 15:54 ` Farhan Ali
  0 siblings, 2 replies; 5+ messages in thread
From: David Hildenbrand @ 2019-02-12 11:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-s390x, Thomas Huth, Halil Pasic, Christian Borntraeger,
	Janosch Frank, Cornelia Huck, Richard Henderson,
	David Hildenbrand

As we now always have PCI support, let's add it to the "qemu" CPU model,
taking care of backwards compatibility.

Signed-off-by: David Hildenbrand <david@redhat.com>
---

v1 -> v2:
- Use correct model identifiction of the z12 we emulate

 hw/s390x/s390-virtio-ccw.c  | 3 +++
 target/s390x/gen-features.c | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 3fb5c88af9..1a3414b642 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -657,7 +657,10 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true);
 
 static void ccw_machine_3_1_instance_options(MachineState *machine)
 {
+    static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V3_1 };
     ccw_machine_4_0_instance_options(machine);
+
+    s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat);
 }
 
 static void ccw_machine_3_1_class_options(MachineClass *mc)
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index b0e9b271e2..19bb8ac7f8 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -560,7 +560,7 @@ static uint16_t qemu_V2_11[] = {
     S390_FEAT_ZARCH,
 };
 
-static uint16_t qemu_LATEST[] = {
+static uint16_t qemu_V3_1[] = {
     S390_FEAT_DAT_ENH,
     S390_FEAT_IDTE_SEGMENT,
     S390_FEAT_STFLE,
@@ -592,13 +592,16 @@ static uint16_t qemu_LATEST[] = {
     S390_FEAT_MSA_EXT_4,
 };
 
+static uint16_t qemu_LATEST[] = {
+    S390_FEAT_ZPCI,
+};
+
 /* add all new definitions before this point */
 static uint16_t qemu_MAX[] = {
     /* z13+ features */
     S390_FEAT_STFLE_53,
     /* generates a dependency warning, leave it out for now */
     S390_FEAT_MSA_EXT_5,
-    S390_FEAT_ZPCI,
 };
 
 /****** END FEATURE DEFS ******/
@@ -708,6 +711,7 @@ static FeatGroupDefSpec FeatGroupDef[] = {
  *******************************/
 static FeatGroupDefSpec QemuFeatDef[] = {
     QEMU_FEAT_INITIALIZER(V2_11),
+    QEMU_FEAT_INITIALIZER(V3_1),
     QEMU_FEAT_INITIALIZER(LATEST),
     QEMU_FEAT_INITIALIZER(MAX),
 };
-- 
2.17.2

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

* Re: [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model
  2019-02-12 11:23 [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model David Hildenbrand
@ 2019-02-12 13:12 ` Cornelia Huck
  2019-02-13 15:54 ` Farhan Ali
  1 sibling, 0 replies; 5+ messages in thread
From: Cornelia Huck @ 2019-02-12 13:12 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: qemu-devel, qemu-s390x, Thomas Huth, Halil Pasic,
	Christian Borntraeger, Janosch Frank, Richard Henderson

On Tue, 12 Feb 2019 12:23:23 +0100
David Hildenbrand <david@redhat.com> wrote:

> As we now always have PCI support, let's add it to the "qemu" CPU model,
> taking care of backwards compatibility.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> 
> v1 -> v2:
> - Use correct model identifiction of the z12 we emulate
> 
>  hw/s390x/s390-virtio-ccw.c  | 3 +++
>  target/s390x/gen-features.c | 8 ++++++--
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 

Played around a bit with different machines and cpu models and got what
I expected.

Thanks, applied.

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

* Re: [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model
  2019-02-12 11:23 [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model David Hildenbrand
  2019-02-12 13:12 ` Cornelia Huck
@ 2019-02-13 15:54 ` Farhan Ali
  2019-02-13 16:26   ` Cornelia Huck
  1 sibling, 1 reply; 5+ messages in thread
From: Farhan Ali @ 2019-02-13 15:54 UTC (permalink / raw)
  To: David Hildenbrand, qemu-devel
  Cc: Thomas Huth, Janosch Frank, Cornelia Huck, Halil Pasic,
	Christian Borntraeger, qemu-s390x, Richard Henderson

I noticed the qemu-iotests 200 was failing due to the commit
"703fef6fcf3 : s390x/pci: Warn when adding PCI devices without the 
'zpci' feature".

This patch fixes the failure :).

Thanks
Farhan

On 02/12/2019 06:23 AM, David Hildenbrand wrote:
> As we now always have PCI support, let's add it to the "qemu" CPU model,
> taking care of backwards compatibility.
> 
> Signed-off-by: David Hildenbrand<david@redhat.com>
> ---
> 
> v1 -> v2:
> - Use correct model identifiction of the z12 we emulate
> 
>   hw/s390x/s390-virtio-ccw.c  | 3 +++
>   target/s390x/gen-features.c | 8 ++++++--
>   2 files changed, 9 insertions(+), 2 deletions(-)

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

* Re: [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model
  2019-02-13 15:54 ` Farhan Ali
@ 2019-02-13 16:26   ` Cornelia Huck
  2019-02-13 16:29     ` Farhan Ali
  0 siblings, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2019-02-13 16:26 UTC (permalink / raw)
  To: Farhan Ali
  Cc: David Hildenbrand, qemu-devel, Thomas Huth, Janosch Frank,
	Halil Pasic, Christian Borntraeger, qemu-s390x,
	Richard Henderson

On Wed, 13 Feb 2019 10:54:23 -0500
Farhan Ali <alifm@linux.ibm.com> wrote:

> I noticed the qemu-iotests 200 was failing due to the commit
> "703fef6fcf3 : s390x/pci: Warn when adding PCI devices without the 
> 'zpci' feature".
> 
> This patch fixes the failure :).

Huh. So it was testing without pci before and now with and it's also
working? Awesome :)

> 
> Thanks
> Farhan
> 
> On 02/12/2019 06:23 AM, David Hildenbrand wrote:
> > As we now always have PCI support, let's add it to the "qemu" CPU model,
> > taking care of backwards compatibility.
> > 
> > Signed-off-by: David Hildenbrand<david@redhat.com>
> > ---
> > 
> > v1 -> v2:
> > - Use correct model identifiction of the z12 we emulate
> > 
> >   hw/s390x/s390-virtio-ccw.c  | 3 +++
> >   target/s390x/gen-features.c | 8 ++++++--
> >   2 files changed, 9 insertions(+), 2 deletions(-)  
> 

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

* Re: [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model
  2019-02-13 16:26   ` Cornelia Huck
@ 2019-02-13 16:29     ` Farhan Ali
  0 siblings, 0 replies; 5+ messages in thread
From: Farhan Ali @ 2019-02-13 16:29 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: David Hildenbrand, qemu-devel, Thomas Huth, Janosch Frank,
	Halil Pasic, Christian Borntraeger, qemu-s390x,
	Richard Henderson



On 02/13/2019 11:26 AM, Cornelia Huck wrote:
> On Wed, 13 Feb 2019 10:54:23 -0500
> Farhan Ali <alifm@linux.ibm.com> wrote:
> 
>> I noticed the qemu-iotests 200 was failing due to the commit
>> "703fef6fcf3 : s390x/pci: Warn when adding PCI devices without the
>> 'zpci' feature".
>>
>> This patch fixes the failure :).
> 
> Huh. So it was testing without pci before and now with and it's also
> working? Awesome :)

It was testing with pci, but the reason it fails was because qemu was 
spitting out the warning due to commit 703fef6fcf3. Now David's commit 
adds the zpci to qemu cpu model and qemu doesn't give out a warning message.
> 
>>
>> Thanks
>> Farhan
>>
>> On 02/12/2019 06:23 AM, David Hildenbrand wrote:
>>> As we now always have PCI support, let's add it to the "qemu" CPU model,
>>> taking care of backwards compatibility.
>>>
>>> Signed-off-by: David Hildenbrand<david@redhat.com>
>>> ---
>>>
>>> v1 -> v2:
>>> - Use correct model identifiction of the z12 we emulate
>>>
>>>    hw/s390x/s390-virtio-ccw.c  | 3 +++
>>>    target/s390x/gen-features.c | 8 ++++++--
>>>    2 files changed, 9 insertions(+), 2 deletions(-)
>>
> 
> 

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

end of thread, other threads:[~2019-02-13 16:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 11:23 [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model David Hildenbrand
2019-02-12 13:12 ` Cornelia Huck
2019-02-13 15:54 ` Farhan Ali
2019-02-13 16:26   ` Cornelia Huck
2019-02-13 16:29     ` Farhan Ali

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.