All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] iommu/amd: Fix for pasid initialization
@ 2014-07-08 14:30 ` Oded Gabbay
  0 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2014-07-08 14:30 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, Alexey Skidanov, Oded Gabbay

From: Alexey Skidanov <Alexey.Skidanov@amd.com>

The pasid wasn't properly initialized before caling to invalid PPR calback

Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
 drivers/iommu/amd_iommu_v2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c
index 499b436..92fb77c 100644
--- a/drivers/iommu/amd_iommu_v2.c
+++ b/drivers/iommu/amd_iommu_v2.c
@@ -612,6 +612,7 @@ static int ppr_notifier(struct notifier_block *nb, unsigned long e, void *data)
 	fault->state     = pasid_state;
 	fault->tag       = tag;
 	fault->finish    = finish;
+	fault->pasid     = iommu_fault->pasid;
 	fault->flags     = iommu_fault->flags;
 	INIT_WORK(&fault->work, do_fault);
 
-- 
1.9.1


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

* [PATCH 1/2] iommu/amd: Fix for pasid initialization
@ 2014-07-08 14:30 ` Oded Gabbay
  0 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2014-07-08 14:30 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Alexey Skidanov, linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: Alexey Skidanov <Alexey.Skidanov-5C7GfCeVMHo@public.gmane.org>

The pasid wasn't properly initialized before caling to invalid PPR calback

Signed-off-by: Alexey Skidanov <Alexey.Skidanov-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Oded Gabbay <oded.gabbay-5C7GfCeVMHo@public.gmane.org>
---
 drivers/iommu/amd_iommu_v2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c
index 499b436..92fb77c 100644
--- a/drivers/iommu/amd_iommu_v2.c
+++ b/drivers/iommu/amd_iommu_v2.c
@@ -612,6 +612,7 @@ static int ppr_notifier(struct notifier_block *nb, unsigned long e, void *data)
 	fault->state     = pasid_state;
 	fault->tag       = tag;
 	fault->finish    = finish;
+	fault->pasid     = iommu_fault->pasid;
 	fault->flags     = iommu_fault->flags;
 	INIT_WORK(&fault->work, do_fault);
 
-- 
1.9.1

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

* [PATCH 2/2] iommu/amd: Moving PPR fault flags macros definitions
@ 2014-07-08 14:30   ` Oded Gabbay
  0 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2014-07-08 14:30 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, Alexey Skidanov, Oded Gabbay

From: Alexey Skidanov <Alexey.Skidanov@amd.com>

Any kernel source registering the invalid PPR calback may include the header file with PPR fault flags macros definitions.
Thus we move them to include/linux/amd-iommu.h

Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
 drivers/iommu/amd_iommu_types.h | 6 ------
 include/linux/amd-iommu.h       | 7 +++++++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 557a20e..8e43b7c 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -390,12 +390,6 @@ struct amd_iommu_fault {
 
 };
 
-#define PPR_FAULT_EXEC	(1 << 1)
-#define PPR_FAULT_READ  (1 << 2)
-#define PPR_FAULT_WRITE (1 << 5)
-#define PPR_FAULT_USER  (1 << 6)
-#define PPR_FAULT_RSVD  (1 << 7)
-#define PPR_FAULT_GN    (1 << 8)
 
 struct iommu_domain;
 
diff --git a/include/linux/amd-iommu.h b/include/linux/amd-iommu.h
index 15f6b9e..2b08e79 100644
--- a/include/linux/amd-iommu.h
+++ b/include/linux/amd-iommu.h
@@ -119,6 +119,13 @@ typedef int (*amd_iommu_invalid_ppr_cb)(struct pci_dev *pdev,
 extern int amd_iommu_set_invalid_ppr_cb(struct pci_dev *pdev,
 					amd_iommu_invalid_ppr_cb cb);
 
+#define PPR_FAULT_EXEC	(1 << 1)
+#define PPR_FAULT_READ  (1 << 2)
+#define PPR_FAULT_WRITE (1 << 5)
+#define PPR_FAULT_USER  (1 << 6)
+#define PPR_FAULT_RSVD  (1 << 7)
+#define PPR_FAULT_GN    (1 << 8)
+
 /**
  * amd_iommu_device_info() - Get information about IOMMUv2 support of a
  *			     PCI device
-- 
1.9.1


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

* [PATCH 2/2] iommu/amd: Moving PPR fault flags macros definitions
@ 2014-07-08 14:30   ` Oded Gabbay
  0 siblings, 0 replies; 6+ messages in thread
From: Oded Gabbay @ 2014-07-08 14:30 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Alexey Skidanov, linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: Alexey Skidanov <Alexey.Skidanov-5C7GfCeVMHo@public.gmane.org>

Any kernel source registering the invalid PPR calback may include the header file with PPR fault flags macros definitions.
Thus we move them to include/linux/amd-iommu.h

Signed-off-by: Alexey Skidanov <Alexey.Skidanov-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Oded Gabbay <oded.gabbay-5C7GfCeVMHo@public.gmane.org>
---
 drivers/iommu/amd_iommu_types.h | 6 ------
 include/linux/amd-iommu.h       | 7 +++++++
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 557a20e..8e43b7c 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -390,12 +390,6 @@ struct amd_iommu_fault {
 
 };
 
-#define PPR_FAULT_EXEC	(1 << 1)
-#define PPR_FAULT_READ  (1 << 2)
-#define PPR_FAULT_WRITE (1 << 5)
-#define PPR_FAULT_USER  (1 << 6)
-#define PPR_FAULT_RSVD  (1 << 7)
-#define PPR_FAULT_GN    (1 << 8)
 
 struct iommu_domain;
 
diff --git a/include/linux/amd-iommu.h b/include/linux/amd-iommu.h
index 15f6b9e..2b08e79 100644
--- a/include/linux/amd-iommu.h
+++ b/include/linux/amd-iommu.h
@@ -119,6 +119,13 @@ typedef int (*amd_iommu_invalid_ppr_cb)(struct pci_dev *pdev,
 extern int amd_iommu_set_invalid_ppr_cb(struct pci_dev *pdev,
 					amd_iommu_invalid_ppr_cb cb);
 
+#define PPR_FAULT_EXEC	(1 << 1)
+#define PPR_FAULT_READ  (1 << 2)
+#define PPR_FAULT_WRITE (1 << 5)
+#define PPR_FAULT_USER  (1 << 6)
+#define PPR_FAULT_RSVD  (1 << 7)
+#define PPR_FAULT_GN    (1 << 8)
+
 /**
  * amd_iommu_device_info() - Get information about IOMMUv2 support of a
  *			     PCI device
-- 
1.9.1

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

* Re: [PATCH 1/2] iommu/amd: Fix for pasid initialization
@ 2014-07-09 14:04   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2014-07-09 14:04 UTC (permalink / raw)
  To: Oded Gabbay; +Cc: iommu, linux-kernel, Alexey Skidanov

On Tue, Jul 08, 2014 at 05:30:16PM +0300, Oded Gabbay wrote:
> From: Alexey Skidanov <Alexey.Skidanov@amd.com>
> 
> The pasid wasn't properly initialized before caling to invalid PPR calback
> 
> Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
> ---
>  drivers/iommu/amd_iommu_v2.c | 1 +
>  1 file changed, 1 insertion(+)

Applied both, thanks Oded.



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

* Re: [PATCH 1/2] iommu/amd: Fix for pasid initialization
@ 2014-07-09 14:04   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2014-07-09 14:04 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Alexey Skidanov, linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Tue, Jul 08, 2014 at 05:30:16PM +0300, Oded Gabbay wrote:
> From: Alexey Skidanov <Alexey.Skidanov-5C7GfCeVMHo@public.gmane.org>
> 
> The pasid wasn't properly initialized before caling to invalid PPR calback
> 
> Signed-off-by: Alexey Skidanov <Alexey.Skidanov-5C7GfCeVMHo@public.gmane.org>
> Signed-off-by: Oded Gabbay <oded.gabbay-5C7GfCeVMHo@public.gmane.org>
> ---
>  drivers/iommu/amd_iommu_v2.c | 1 +
>  1 file changed, 1 insertion(+)

Applied both, thanks Oded.

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

end of thread, other threads:[~2014-07-09 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 14:30 [PATCH 1/2] iommu/amd: Fix for pasid initialization Oded Gabbay
2014-07-08 14:30 ` Oded Gabbay
2014-07-08 14:30 ` [PATCH 2/2] iommu/amd: Moving PPR fault flags macros definitions Oded Gabbay
2014-07-08 14:30   ` Oded Gabbay
2014-07-09 14:04 ` [PATCH 1/2] iommu/amd: Fix for pasid initialization Joerg Roedel
2014-07-09 14:04   ` Joerg Roedel

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.