Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

vmmon.patch

By: a guest on Aug 20th, 2010  |  syntax: Diff  |  size: 1.07 KB  |  views: 1,394  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/vmmon-only/linux/iommu.c b/vmmon-only/linux/iommu.c
  2. index a279a26..9de467b 100644
  3. --- a/vmmon-only/linux/iommu.c
  4. +++ b/vmmon-only/linux/iommu.c
  5. @@ -153,7 +153,7 @@ IOMMU_SetupMMU(VMLinux *vmLinux,               // IN: virtual machine descriptor
  6.           map_to =  PPN_2_PA(mpn);
  7.           map_prot = IOMMU_READ | IOMMU_WRITE;
  8.        }
  9. -      if ((status = iommu_map_range(vmLinux->iommuDomain,
  10. +      if ((status = iommu_map(vmLinux->iommuDomain,
  11.                                      PPN_2_PA(ppn),
  12.                                      map_to, PAGE_SIZE, map_prot))) {
  13.           printk(KERN_ERR "%s: IOMMU Mapping of PPN 0x%x -> MPN 0x%x "
  14. @@ -400,7 +400,7 @@ IOMMU_VMCleanup(VMLinux *vmLinux)  // IN: virtual machine descriptor
  15.  
  16.     /* Relinquish the IOMMU domain used by this VM. */
  17.     for (ppn = 0; ppn < vmLinux->numPages; ppn++) {
  18. -      iommu_unmap_range(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE);
  19. +      iommu_unmap(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE);
  20.     }
  21.     if (vmLinux->iommuDomain) {
  22.        iommu_domain_free(vmLinux->iommuDomain);