qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0
@ 2019-07-09 12:25 Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value Cornelia Huck
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-07-09 12:25 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-s390x, Cornelia Huck, qemu-devel

The following changes since commit 3a1acf5d47295d22ffdae0982a2fd808b802a7da:

  Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2019-07-08 09:46:19 +0100)

are available in the Git repository at:

  https://github.com/cohuck/qemu tags/s390x-20190709

for you to fetch changes up to 92b9afe45e10edd8eaed6329366201c2165a8065:

  s390x/tcg: move fallthrough annotation (2019-07-09 10:37:44 +0200)

----------------------------------------------------------------
Fixes in cpu models, tcg, and vfio-ccw.

----------------------------------------------------------------

Alex Williamson (1):
  vfio-ccw: Test vfio_set_irq_signaling() return value

Christian Borntraeger (1):
  s390: cpumodel: fix description for the new vector facility

Cornelia Huck (1):
  s390x/tcg: move fallthrough annotation

Pierre Morel (1):
  s390x/cpumodel: Set up CPU model for AQIC interception

 hw/vfio/ccw.c                       | 5 ++---
 target/s390x/cpu_features_def.inc.h | 3 ++-
 target/s390x/cpu_models.c           | 1 +
 target/s390x/gen-features.c         | 1 +
 target/s390x/translate_vx.inc.c     | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

-- 
2.20.1



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

* [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value
  2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
@ 2019-07-09 12:25 ` Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 2/4] s390x/cpumodel: Set up CPU model for AQIC interception Cornelia Huck
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-07-09 12:25 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Cornelia Huck, Alex Williamson, qemu-devel, Eric Auger,
	qemu-s390x, Philippe Mathieu-Daudé

From: Alex Williamson <alex.williamson@redhat.com>

Coverity doesn't like that most callers of vfio_set_irq_signaling() check
the return value and doesn't understand the equivalence of testing the
error pointer instead.  Test the return value consistently.

Reported-by: Coverity (CID 1402783)
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Message-Id: <156209642116.14915.9598593247782519613.stgit@gimli.home>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 hw/vfio/ccw.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 6d0296fe4d9c..16f200e6fe6a 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -327,9 +327,8 @@ static void vfio_ccw_unregister_io_notifier(VFIOCCWDevice *vcdev)
 {
     Error *err = NULL;
 
-    vfio_set_irq_signaling(&vcdev->vdev, VFIO_CCW_IO_IRQ_INDEX, 0,
-                           VFIO_IRQ_SET_ACTION_TRIGGER, -1, &err);
-    if (err) {
+    if (vfio_set_irq_signaling(&vcdev->vdev, VFIO_CCW_IO_IRQ_INDEX, 0,
+                               VFIO_IRQ_SET_ACTION_TRIGGER, -1, &err)) {
         error_reportf_err(err, VFIO_MSG_PREFIX, vcdev->vdev.name);
     }
 
-- 
2.20.1



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

* [Qemu-devel] [PULL for-4.1 2/4] s390x/cpumodel: Set up CPU model for AQIC interception
  2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value Cornelia Huck
@ 2019-07-09 12:25 ` Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 3/4] s390: cpumodel: fix description for the new vector facility Cornelia Huck
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-07-09 12:25 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Tony Krowiak, Pierre Morel, Cornelia Huck, qemu-devel,
	Halil Pasic, Christian Borntraeger, qemu-s390x

From: Pierre Morel <pmorel@linux.ibm.com>

Let's add support for the AP-Queue interruption facility to the CPU
model.

The S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, CPU facility indicates
whether the PQAP instruction with the AQIC command is available
to the guest.
This feature will be enabled only if the AP instructions are
available on the linux host and AQIC facility is installed on
the host.

This feature must be turned on from userspace to intercept AP
instructions on the KVM guest. The QEMU command line to turn
this feature on looks something like this:

    qemu-system-s390x ... -cpu xxx,apqi=on ...
or
    ... -cpu host

Right now AP pass-through devices do not support migration,
which means that we do not have to take care of migrating
the interrupt data:
virsh migrate apguest --live qemu+ssh://root@target.lan/system
error: Requested operation is not valid: domain has assigned non-USB host devices

Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[rebase to newest qemu and fixup description]
Message-Id: <20190705153249.12525-1-borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/cpu_features_def.inc.h | 1 +
 target/s390x/cpu_models.c           | 1 +
 target/s390x/gen-features.c         | 1 +
 3 files changed, 3 insertions(+)

diff --git a/target/s390x/cpu_features_def.inc.h b/target/s390x/cpu_features_def.inc.h
index c20c780f2ea7..ef190e2fc783 100644
--- a/target/s390x/cpu_features_def.inc.h
+++ b/target/s390x/cpu_features_def.inc.h
@@ -77,6 +77,7 @@ DEF_FEAT(SEMAPHORE_ASSIST, "sema", STFL, 59, "Semaphore-assist facility")
 DEF_FEAT(TIME_SLICE_INSTRUMENTATION, "tsi", STFL, 60, "Time-slice Instrumentation facility")
 DEF_FEAT(MISC_INSTRUCTION_EXT3, "minste3", STFL, 61, "Miscellaneous-Instruction-Extensions Facility 3")
 DEF_FEAT(RUNTIME_INSTRUMENTATION, "ri", STFL, 64, "CPU runtime-instrumentation facility")
+DEF_FEAT(AP_QUEUE_INTERRUPT_CONTROL, "apqi", STFL, 65, "AP-Queue interruption facility")
 DEF_FEAT(ZPCI, "zpci", STFL, 69, "z/PCI facility")
 DEF_FEAT(ADAPTER_EVENT_NOTIFICATION, "aen", STFL, 71, "General-purpose-adapter-event-notification facility")
 DEF_FEAT(ADAPTER_INT_SUPPRESSION, "ais", STFL, 72, "General-purpose-adapter-interruption-suppression facility")
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 2cb09c078055..1d16d7d5e794 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -818,6 +818,7 @@ static void check_consistency(const S390CPUModel *model)
         { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
         { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
         { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
+        { S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP },
     };
     int i;
 
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index af06be3e3b98..9f216219ff53 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -519,6 +519,7 @@ static uint16_t full_GEN12_GA1[] = {
     S390_FEAT_EDAT_2,
     S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
     S390_FEAT_AP_QUERY_CONFIG_INFO,
+    S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL,
     S390_FEAT_AP_FACILITIES_TEST,
     S390_FEAT_AP,
 };
-- 
2.20.1



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

* [Qemu-devel] [PULL for-4.1 3/4] s390: cpumodel: fix description for the new vector facility
  2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 2/4] s390x/cpumodel: Set up CPU model for AQIC interception Cornelia Huck
@ 2019-07-09 12:25 ` Cornelia Huck
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 4/4] s390x/tcg: move fallthrough annotation Cornelia Huck
  2019-07-09 13:15 ` [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-07-09 12:25 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Christian Borntraeger, qemu-s390x, Cornelia Huck, qemu-devel

From: Christian Borntraeger <borntraeger@de.ibm.com>

The new facility is called "Vector-Packed-Decimal-Enhancement Facility"
and not "Vector BCD enhancements facility 1". As the shortname might
have already found its way into some backports, let's keep vxbeh.

Fixes: 54d65de0b525 ("s390x/cpumodel: vector enhancements")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20190708150931.93448-1-borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/cpu_features_def.inc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/cpu_features_def.inc.h b/target/s390x/cpu_features_def.inc.h
index ef190e2fc783..3118a9f89228 100644
--- a/target/s390x/cpu_features_def.inc.h
+++ b/target/s390x/cpu_features_def.inc.h
@@ -104,7 +104,7 @@ DEF_FEAT(CMM_NT, "cmmnt", STFL, 147, "CMM: ESSA-enhancement (no translate) facil
 DEF_FEAT(VECTOR_ENH2, "vxeh2", STFL, 148, "Vector Enhancements facility 2")
 DEF_FEAT(ESORT_BASE, "esort-base", STFL, 150, "Enhanced-sort facility (excluding subfunctions)")
 DEF_FEAT(DEFLATE_BASE, "deflate-base", STFL, 151, "Deflate-conversion facility (excluding subfunctions)")
-DEF_FEAT(VECTOR_BCD_ENH, "vxbeh", STFL, 152, "Vector BCD enhancements facility 1")
+DEF_FEAT(VECTOR_BCD_ENH, "vxbeh", STFL, 152, "Vector-Packed-Decimal-Enhancement Facility")
 DEF_FEAT(MSA_EXT_9, "msa9-base", STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)")
 DEF_FEAT(ETOKEN, "etoken", STFL, 156, "Etoken facility")
 
-- 
2.20.1



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

* [Qemu-devel] [PULL for-4.1 4/4] s390x/tcg: move fallthrough annotation
  2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
                   ` (2 preceding siblings ...)
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 3/4] s390: cpumodel: fix description for the new vector facility Cornelia Huck
@ 2019-07-09 12:25 ` Cornelia Huck
  2019-07-09 13:15 ` [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-07-09 12:25 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Stefan Weil, qemu-s390x, Cornelia Huck, qemu-devel

...so that the compiler properly recognizes it.

Reported-by: Stefan Weil <sw@weilnetz.de>
Fixes: f180da83c039 ("s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO")
Message-Id: <20190708125433.16927-3-cohuck@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/translate_vx.inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c
index 7b1d31cba5cf..41d5cf869f94 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -577,8 +577,8 @@ static DisasJumpType op_vllez(DisasContext *s, DisasOps *o)
             enr = 0;
             break;
         }
-    default:
         /* fallthrough */
+    default:
         gen_program_exception(s, PGM_SPECIFICATION);
         return DISAS_NORETURN;
     }
-- 
2.20.1



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

* Re: [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0
  2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
                   ` (3 preceding siblings ...)
  2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 4/4] s390x/tcg: move fallthrough annotation Cornelia Huck
@ 2019-07-09 13:15 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2019-07-09 13:15 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: qemu-s390x, QEMU Developers

On Tue, 9 Jul 2019 at 13:25, Cornelia Huck <cohuck@redhat.com> wrote:
>
> The following changes since commit 3a1acf5d47295d22ffdae0982a2fd808b802a7da:
>
>   Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2019-07-08 09:46:19 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/cohuck/qemu tags/s390x-20190709
>
> for you to fetch changes up to 92b9afe45e10edd8eaed6329366201c2165a8065:
>
>   s390x/tcg: move fallthrough annotation (2019-07-09 10:37:44 +0200)
>
> ----------------------------------------------------------------
> Fixes in cpu models, tcg, and vfio-ccw.
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2019-07-09 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 2/4] s390x/cpumodel: Set up CPU model for AQIC interception Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 3/4] s390: cpumodel: fix description for the new vector facility Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 4/4] s390x/tcg: move fallthrough annotation Cornelia Huck
2019-07-09 13:15 ` [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Peter Maydell

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).