iommu/amd: Enable ga_log_intr when enabling guest_mode
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Thu, 6 Jul 2017 02:29:59 +0000 (21:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:49:30 +0000 (08:49 -0700)
commit efe6f241602cb61466895f6816b8ea6b90f04d4e upstream.

IRTE[GALogIntr] bit should set when enabling guest_mode, which enables
IOMMU to generate entry in GALog when IRTE[IsRun] is not set, and send
an interrupt to notify IOMMU driver.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Joerg Roedel <jroedel@suse.de>
Fixes: d98de49a53e48 ('iommu/amd: Enable vAPIC interrupt remapping mode by default')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu.c

index 41800b6..c380b7e 100644 (file)
@@ -4294,6 +4294,7 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)
                /* Setting */
                irte->hi.fields.ga_root_ptr = (pi_data->base >> 12);
                irte->hi.fields.vector = vcpu_pi_info->vector;
+               irte->lo.fields_vapic.ga_log_intr = 1;
                irte->lo.fields_vapic.guest_mode = 1;
                irte->lo.fields_vapic.ga_tag = pi_data->ga_tag;