linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system
@ 2020-04-22 13:30 Suravee Suthikulpanit
  2020-04-26  0:28 ` Suravee Suthikulpanit
  2020-05-01 11:21 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Suravee Suthikulpanit @ 2020-04-22 13:30 UTC (permalink / raw)
  To: linux-kernel, iommu; +Cc: joro, jon.grimm, Suravee Suthikulpanit

Currently, system fails to boot because the legacy interrupt remapping
mode does not enable 128-bit IRTE (GA), which is required for x2APIC
support.

Fix by using AMD_IOMMU_GUEST_IR_LEGACY_GA mode when booting with
kernel option amd_iommu_intr=legacy instead. The initialization
logic will check GASup and automatically fallback to using
AMD_IOMMU_GUEST_IR_LEGACY if GA mode is not supported.

Fixes: 3928aa3f5775 ("iommu/amd: Detect and enable guest vAPIC support")
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
 drivers/iommu/amd_iommu_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 6be3853..2b9a67e 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -2936,7 +2936,7 @@ static int __init parse_amd_iommu_intr(char *str)
 {
 	for (; *str; ++str) {
 		if (strncmp(str, "legacy", 6) == 0) {
-			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY;
+			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY_GA;
 			break;
 		}
 		if (strncmp(str, "vapic", 5) == 0) {
-- 
1.8.3.1


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

* Re: [PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system
  2020-04-22 13:30 [PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Suravee Suthikulpanit
@ 2020-04-26  0:28 ` Suravee Suthikulpanit
  2020-05-01 11:21 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Suravee Suthikulpanit @ 2020-04-26  0:28 UTC (permalink / raw)
  To: linux-kernel, iommu; +Cc: joro, jon.grimm

Ping.

Thanks,
Suravee

On 4/22/20 8:30 PM, Suravee Suthikulpanit wrote:
> Currently, system fails to boot because the legacy interrupt remapping
> mode does not enable 128-bit IRTE (GA), which is required for x2APIC
> support.
> 
> Fix by using AMD_IOMMU_GUEST_IR_LEGACY_GA mode when booting with
> kernel option amd_iommu_intr=legacy instead. The initialization
> logic will check GASup and automatically fallback to using
> AMD_IOMMU_GUEST_IR_LEGACY if GA mode is not supported.
> 
> Fixes: 3928aa3f5775 ("iommu/amd: Detect and enable guest vAPIC support")
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
>   drivers/iommu/amd_iommu_init.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
> index 6be3853..2b9a67e 100644
> --- a/drivers/iommu/amd_iommu_init.c
> +++ b/drivers/iommu/amd_iommu_init.c
> @@ -2936,7 +2936,7 @@ static int __init parse_amd_iommu_intr(char *str)
>   {
>   	for (; *str; ++str) {
>   		if (strncmp(str, "legacy", 6) == 0) {
> -			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY;
> +			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY_GA;
>   			break;
>   		}
>   		if (strncmp(str, "vapic", 5) == 0) {
> 

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

* Re: [PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system
  2020-04-22 13:30 [PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Suravee Suthikulpanit
  2020-04-26  0:28 ` Suravee Suthikulpanit
@ 2020-05-01 11:21 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2020-05-01 11:21 UTC (permalink / raw)
  To: Suravee Suthikulpanit; +Cc: linux-kernel, iommu, jon.grimm

On Wed, Apr 22, 2020 at 08:30:02AM -0500, Suravee Suthikulpanit wrote:
> Currently, system fails to boot because the legacy interrupt remapping
> mode does not enable 128-bit IRTE (GA), which is required for x2APIC
> support.
> 
> Fix by using AMD_IOMMU_GUEST_IR_LEGACY_GA mode when booting with
> kernel option amd_iommu_intr=legacy instead. The initialization
> logic will check GASup and automatically fallback to using
> AMD_IOMMU_GUEST_IR_LEGACY if GA mode is not supported.
> 
> Fixes: 3928aa3f5775 ("iommu/amd: Detect and enable guest vAPIC support")
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
>  drivers/iommu/amd_iommu_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied for v5.7, thanks Suravee.

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

end of thread, other threads:[~2020-05-01 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 13:30 [PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Suravee Suthikulpanit
2020-04-26  0:28 ` Suravee Suthikulpanit
2020-05-01 11:21 ` Joerg Roedel

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