All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: pbonzini@redhat.com
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	frankja@linux.ibm.com, borntraeger@linux.ibm.com,
	hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com,
	thuth@redhat.com, david@redhat.com,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>
Subject: [GIT PULL 05/42] s390/airq: pass more TPI info to airq handlers
Date: Thu, 21 Jul 2022 18:12:25 +0200	[thread overview]
Message-ID: <20220721161302.156182-6-imbrenda@linux.ibm.com> (raw)
In-Reply-To: <20220721161302.156182-1-imbrenda@linux.ibm.com>

From: Matthew Rosato <mjrosato@linux.ibm.com>

A subsequent patch will introduce an airq handler that requires additional
TPI information beyond directed vs floating, so pass the entire tpi_info
structure via the handler.  Only pci actually uses this information today,
for the other airq handlers this is effectively a no-op.

Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20220606203325.110625-6-mjrosato@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
---
 arch/s390/include/asm/airq.h     | 3 ++-
 arch/s390/kvm/interrupt.c        | 4 +++-
 arch/s390/pci/pci_irq.c          | 9 +++++++--
 drivers/s390/cio/airq.c          | 2 +-
 drivers/s390/cio/qdio_thinint.c  | 6 ++++--
 drivers/s390/crypto/ap_bus.c     | 9 ++++++---
 drivers/s390/virtio/virtio_ccw.c | 4 +++-
 7 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/arch/s390/include/asm/airq.h b/arch/s390/include/asm/airq.h
index 01936fdfaddb..7918a7d09028 100644
--- a/arch/s390/include/asm/airq.h
+++ b/arch/s390/include/asm/airq.h
@@ -12,10 +12,11 @@
 
 #include <linux/bit_spinlock.h>
 #include <linux/dma-mapping.h>
+#include <asm/tpi.h>
 
 struct airq_struct {
 	struct hlist_node list;		/* Handler queueing. */
-	void (*handler)(struct airq_struct *airq, bool floating);
+	void (*handler)(struct airq_struct *airq, struct tpi_info *tpi_info);
 	u8 *lsi_ptr;			/* Local-Summary-Indicator pointer */
 	u8 lsi_mask;			/* Local-Summary-Indicator mask */
 	u8 isc;				/* Interrupt-subclass */
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index af96dc0549a4..17ff475157d8 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -28,6 +28,7 @@
 #include <asm/switch_to.h>
 #include <asm/nmi.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 #include "kvm-s390.h"
 #include "gaccess.h"
 #include "trace-s390.h"
@@ -3311,7 +3312,8 @@ int kvm_s390_gisc_unregister(struct kvm *kvm, u32 gisc)
 }
 EXPORT_SYMBOL_GPL(kvm_s390_gisc_unregister);
 
-static void gib_alert_irq_handler(struct airq_struct *airq, bool floating)
+static void gib_alert_irq_handler(struct airq_struct *airq,
+				  struct tpi_info *tpi_info)
 {
 	inc_irq_stat(IRQIO_GAL);
 	process_gib_alert_list();
diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
index 500cd2dbdf53..b805c75252ed 100644
--- a/arch/s390/pci/pci_irq.c
+++ b/arch/s390/pci/pci_irq.c
@@ -11,6 +11,7 @@
 
 #include <asm/isc.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 
 static enum {FLOATING, DIRECTED} irq_delivery;
 
@@ -216,8 +217,11 @@ static void zpci_handle_fallback_irq(void)
 	}
 }
 
-static void zpci_directed_irq_handler(struct airq_struct *airq, bool floating)
+static void zpci_directed_irq_handler(struct airq_struct *airq,
+				      struct tpi_info *tpi_info)
 {
+	bool floating = !tpi_info->directed_irq;
+
 	if (floating) {
 		inc_irq_stat(IRQIO_PCF);
 		zpci_handle_fallback_irq();
@@ -227,7 +231,8 @@ static void zpci_directed_irq_handler(struct airq_struct *airq, bool floating)
 	}
 }
 
-static void zpci_floating_irq_handler(struct airq_struct *airq, bool floating)
+static void zpci_floating_irq_handler(struct airq_struct *airq,
+				      struct tpi_info *tpi_info)
 {
 	unsigned long si, ai;
 	struct airq_iv *aibv;
diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c
index c0ed364bf446..230eb5b5b64e 100644
--- a/drivers/s390/cio/airq.c
+++ b/drivers/s390/cio/airq.c
@@ -99,7 +99,7 @@ static irqreturn_t do_airq_interrupt(int irq, void *dummy)
 	rcu_read_lock();
 	hlist_for_each_entry_rcu(airq, head, list)
 		if ((*airq->lsi_ptr & airq->lsi_mask) != 0)
-			airq->handler(airq, !tpi_info->directed_irq);
+			airq->handler(airq, tpi_info);
 	rcu_read_unlock();
 
 	return IRQ_HANDLED;
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c
index 8e09bf3a2fcd..9b9335dd06db 100644
--- a/drivers/s390/cio/qdio_thinint.c
+++ b/drivers/s390/cio/qdio_thinint.c
@@ -15,6 +15,7 @@
 #include <asm/qdio.h>
 #include <asm/airq.h>
 #include <asm/isc.h>
+#include <asm/tpi.h>
 
 #include "cio.h"
 #include "ioasm.h"
@@ -93,9 +94,10 @@ static inline u32 clear_shared_ind(void)
 /**
  * tiqdio_thinint_handler - thin interrupt handler for qdio
  * @airq: pointer to adapter interrupt descriptor
- * @floating: flag to recognize floating vs. directed interrupts (unused)
+ * @tpi_info: interrupt information (e.g. floating vs directed -- unused)
  */
-static void tiqdio_thinint_handler(struct airq_struct *airq, bool floating)
+static void tiqdio_thinint_handler(struct airq_struct *airq,
+				   struct tpi_info *tpi_info)
 {
 	u64 irq_time = S390_lowcore.int_clock;
 	u32 si_used = clear_shared_ind();
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 5c13d2079d96..1b85f21c151b 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -27,6 +27,7 @@
 #include <linux/kthread.h>
 #include <linux/mutex.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 #include <linux/atomic.h>
 #include <asm/isc.h>
 #include <linux/hrtimer.h>
@@ -131,7 +132,8 @@ static int ap_max_adapter_id = 63;
 static struct bus_type ap_bus_type;
 
 /* Adapter interrupt definitions */
-static void ap_interrupt_handler(struct airq_struct *airq, bool floating);
+static void ap_interrupt_handler(struct airq_struct *airq,
+				 struct tpi_info *tpi_info);
 
 static bool ap_irq_flag;
 
@@ -452,9 +454,10 @@ static enum hrtimer_restart ap_poll_timeout(struct hrtimer *unused)
 /**
  * ap_interrupt_handler() - Schedule ap_tasklet on interrupt
  * @airq: pointer to adapter interrupt descriptor
- * @floating: ignored
+ * @tpi_info: ignored
  */
-static void ap_interrupt_handler(struct airq_struct *airq, bool floating)
+static void ap_interrupt_handler(struct airq_struct *airq,
+				 struct tpi_info *tpi_info)
 {
 	inc_irq_stat(IRQIO_APB);
 	tasklet_schedule(&ap_tasklet);
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index 97e51c34e6cf..58cca50996ee 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -33,6 +33,7 @@
 #include <asm/virtio-ccw.h>
 #include <asm/isc.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 
 /*
  * virtio related functions
@@ -204,7 +205,8 @@ static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info)
 	write_unlock_irqrestore(&info->lock, flags);
 }
 
-static void virtio_airq_handler(struct airq_struct *airq, bool floating)
+static void virtio_airq_handler(struct airq_struct *airq,
+				struct tpi_info *tpi_info)
 {
 	struct airq_info *info = container_of(airq, struct airq_info, airq);
 	unsigned long ai;
-- 
2.36.1


  parent reply	other threads:[~2022-07-21 16:13 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 16:12 [GIT PULL 00/42] KVM: s390: PCI, CPU topology, PV features Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 01/42] s390/sclp: detect the zPCI load/store interpretation facility Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 02/42] s390/sclp: detect the AISII facility Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 03/42] s390/sclp: detect the AENI facility Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 04/42] s390/sclp: detect the AISI facility Claudio Imbrenda
2022-07-21 16:12 ` Claudio Imbrenda [this message]
2022-07-21 16:12 ` [GIT PULL 06/42] s390/airq: allow for airq structure that uses an input vector Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 07/42] s390/pci: externalize the SIC operation controls and routine Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 08/42] s390/pci: stash associated GISA designation Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 09/42] s390/pci: stash dtsm and maxstbl Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 10/42] vfio/pci: introduce CONFIG_VFIO_PCI_ZDEV_KVM Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 11/42] KVM: s390: pci: add basic kvm_zdev structure Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 12/42] KVM: s390: pci: do initial setup for AEN interpretation Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 13/42] KVM: s390: pci: enable host forwarding of Adapter Event Notifications Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 14/42] KVM: s390: mechanism to enable guest zPCI Interpretation Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 15/42] KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 16/42] KVM: s390: pci: add routines to start/stop interpretive execution Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 17/42] vfio-pci/zdev: add open/close device hooks Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 18/42] vfio-pci/zdev: add function handle to clp base capability Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 19/42] vfio-pci/zdev: different maxstbl for interpreted devices Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 20/42] KVM: s390: add KVM_S390_ZPCI_OP to manage guest zPCI devices Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 21/42] MAINTAINERS: additional files related kvm s390 pci passthrough Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 22/42] KVM: s390: drop unexpected word 'and' in the comments Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 23/42] s390: Add attestation query information Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 24/42] KVM: s390/pci: fix include duplicates Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 25/42] Documentation: kvm: extend KVM_S390_ZPCI_OP subheading underline Claudio Imbrenda
2022-07-22  1:40   ` Bagas Sanjaya
2022-07-21 16:12 ` [GIT PULL 26/42] KVM: s390: Add facility 197 to the allow list Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 27/42] KVM: s390: pv: leak the topmost page table when destroy fails Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 28/42] KVM: s390: pv: handle secure storage violations for protected guests Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 29/42] KVM: s390: pv: handle secure storage exceptions for normal guests Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 30/42] KVM: s390: pv: refactor s390_reset_acc Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 31/42] KVM: s390: pv: usage counter instead of flag Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 32/42] KVM: s390: pv: add export before import Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 33/42] KVM: s390: pv: clear the state without memset Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 34/42] KVM: s390: pv: Add kvm_s390_cpus_from_pv to kvm-s390.h and add documentation Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 35/42] KVM: s390: pv: add mmu_notifier Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 36/42] s390/mm: KVM: pv: when tearing down, try to destroy protected pages Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 37/42] KVM: s390: pv: refactoring of kvm_s390_pv_deinit_vm Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 38/42] KVM: s390: pv: destroy the configuration before its memory Claudio Imbrenda
2022-07-21 16:12 ` [GIT PULL 39/42] KVM: s390: pv: don't present the ecall interrupt twice Claudio Imbrenda
2022-07-21 16:13 ` [GIT PULL 40/42] KVM: s390: Cleanup ipte lock access and SIIF facility checks Claudio Imbrenda
2022-07-21 16:13 ` [GIT PULL 41/42] KVM: s390: guest support for topology function Claudio Imbrenda
2022-07-21 16:13 ` [GIT PULL 42/42] KVM: s390: resetting the Topology-Change-Report Claudio Imbrenda
2022-07-22  7:17 ` [GIT PULL 00/42] KVM: s390: PCI, CPU topology, PV features Paolo Bonzini
2022-07-22 10:52   ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220721161302.156182-6-imbrenda@linux.ibm.com \
    --to=imbrenda@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pmorel@linux.ibm.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.