xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Wang <wei.wang2@amd.com>
To: JBeulich@suse.com, xen-devel@lists.xen.org
Subject: [PATCH 2 of 3] amd iommu: Use next_level instead of recalculating it
Date: Mon, 13 Aug 2012 17:46:06 +0200	[thread overview]
Message-ID: <273471c6dedd1e66caab.1344872766@gran.amd.com> (raw)
In-Reply-To: <patchbomb.1344872764@gran.amd.com>

# HG changeset patch
# User Wei Wang <wei.wang2@amd.com>
# Date 1344872313 -7200
# Node ID 273471c6dedd1e66caab7e4eede72130e4e0c00f
# Parent  b6ca536658ac712c5f03b5ffedce3bb61d55adaf
amd iommu: Use next_level instead of recalculating it.

Signed-off-by: Wei Wang <wei.wang2@amd.com>

diff -r b6ca536658ac -r 273471c6dedd xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c	Mon Aug 13 17:38:30 2012 +0200
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c	Mon Aug 13 17:38:33 2012 +0200
@@ -408,8 +408,10 @@ static void deallocate_next_page_table(s
             if ( (next_table_maddr != 0) && (next_level != 0)
                 && iommu_is_pte_present((u32*)pde) )
             {
+                /* We do not support skip level yet */
+                ASSERT( next_level == level - 1 );
                 deallocate_next_page_table(
-                    maddr_to_page(next_table_maddr), level - 1);
+                    maddr_to_page(next_table_maddr), next_level);
             }
         }
     }

  parent reply	other threads:[~2012-08-13 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 15:46 [PATCH 0 of 3] amd iommu: Clean up iommu page table deallocation Wei Wang
2012-08-13 15:46 ` [PATCH 1 of 3] amd iommu: Add 2 helper functions: iommu_is_pte_present and iommu_next_level Wei Wang
2012-08-13 15:46 ` Wei Wang [this message]
2012-08-13 15:46 ` [PATCH 3 of 3] amd iommu: Remove unnecessary map/unmap for l1 page tables Wei Wang
2012-08-13 16:09 ` [PATCH 0 of 3] amd iommu: Clean up iommu page table deallocation Jan Beulich
2012-08-14  9:08   ` Wei Wang

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=273471c6dedd1e66caab.1344872766@gran.amd.com \
    --to=wei.wang2@amd.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /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 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).