diff options
author | Filippo Sironi <sironi@amazon.de> | 2018-11-12 12:26:30 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-11-12 15:04:24 +0100 |
commit | ab99be4683d9db33b100497d463274ebd23bd67e (patch) | |
tree | e72bcff52e088e092af1508292060dcadd2f19dc /drivers/iommu | |
parent | e5b78f2e349eef5d4fca5dc1cf5a3b4b2cc27abd (diff) | |
download | linux-stable-ab99be4683d9db33b100497d463274ebd23bd67e.tar.gz linux-stable-ab99be4683d9db33b100497d463274ebd23bd67e.tar.bz2 linux-stable-ab99be4683d9db33b100497d463274ebd23bd67e.zip |
amd/iommu: Fix Guest Virtual APIC Log Tail Address Register
This register should have been programmed with the physical address
of the memory location containing the shadow tail pointer for
the guest virtual APIC log instead of the base address.
Fixes: 8bda0cfbdc1a ('iommu/amd: Detect and initialize guest vAPIC log')
Signed-off-by: Filippo Sironi <sironi@amazon.de>
Signed-off-by: Wei Wang <wawei@amazon.de>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index bb2cd29e1658..d8f7000a466a 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -797,7 +797,8 @@ static int iommu_init_ga_log(struct amd_iommu *iommu) entry = iommu_virt_to_phys(iommu->ga_log) | GA_LOG_SIZE_512; memcpy_toio(iommu->mmio_base + MMIO_GA_LOG_BASE_OFFSET, &entry, sizeof(entry)); - entry = (iommu_virt_to_phys(iommu->ga_log) & 0xFFFFFFFFFFFFFULL) & ~7ULL; + entry = (iommu_virt_to_phys(iommu->ga_log_tail) & + (BIT_ULL(52)-1)) & ~7ULL; memcpy_toio(iommu->mmio_base + MMIO_GA_LOG_TAIL_OFFSET, &entry, sizeof(entry)); writel(0x00, iommu->mmio_base + MMIO_GA_HEAD_OFFSET); |