xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Wang <wei.wang2@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 0 of 7 V4] amd iommu: support ATS/GPGPU passthru on IOMMUv2 systems
Date: Fri, 20 Jan 2012 16:54:20 +0100	[thread overview]
Message-ID: <4F198E2C.3090703@amd.com> (raw)
In-Reply-To: <patchbomb.1327074280@gran.amd.com>

Sorry forgot to CC xen-devel
Thanks,
Wei

Hi all, this is patch v4.
ATS devices with PRI and PASID capabilities can communicate with iommuv2 
to perform two level (nested) address translation and demand paging for 
DMA. To passthru such devices, iommu driver has to beenenabled in guest 
OS. This patch set adds initial
iommu emulation for hvm guests to support ATS device passthru.

This patch set should work together with following hw & sw systems:

* Host system with AMD trinity APU which has enhanced iommu(iommuv2).
* AMD Radeon HD 7900 series graphic card.
* Linux 3.3 or later which has included iommuv2 kernel driver.
* AMD catalyst or open source Radeon driver in guest that support HD7900.

Most of the works is done by hypervisor. a new guest config parameter
guest_iommu = {1,0} is introduced to en/disable iommu emulation.
3 hyper-calls are added to support communications among different xen 
components.

* iommu_set_msi: used by qemu to inform hypervisor iommu vector number 
in guest space. Hypervisor needs this vector to inject msi into guest 
after write PPR log entry into guest buffer.

* iommu_bind_bdf: used by xl to bind virtual bdf of passthru device to 
machine bdf. IOMMU emulator receives iommu cmd from guest OS and then 
forwards them  to host iommu. But virtual device id in cmds from guest 
should be converted into physical id before sending them to real hardware.

* guest_iommu_set_base: IOMMU MMIO base address is dynamically allocated 
by firmware. This hypercall allows hvmloader to notify hypervisor where 
the iommu mmio pages are.

I had a picture to explain this better, pls refer to the link.

http://www.amd64.org/pub/iommuv2.png

Thanks,
Wei

======================================================================

changes in v4:
* Only tools part in this version, since hypervisor patches have already 
been committed.
* rename guest config option from "iommu = {0,1}" to "guest_iommu = {0,1}"
* add description into docs/man/xl.cfg.pod.5


changes in v3:
* Use xenstore to receive guest iommu configuration instead of adding in 
a new field in hvm_info_table.
* Support pci segment in vbdf to mbdf bind.
* Make hypercalls visible for non-x86 platforms.
* A few code cleanups according to comments from Jan and Ian.

Changes in v2:
* Do not use linked list to access guest iommu tables.
* Do not parse iommu parameter in libxl_device_model_info again.
* Fix incorrect logical calculation in patch 11.
* Fix hypercall definition for non-x86 systems.

Thanks,
Wei
_______________________________________________
osrc-patches mailing list
osrc-patches@elbe.amd.com
https://elbe.amd.com/mailman/listinfo/osrc-patches

       reply	other threads:[~2012-01-20 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <patchbomb.1327074280@gran.amd.com>
2012-01-20 15:54 ` Wei Wang [this message]
2012-01-20 16:16 ` [PATCH 0 of 7 V4] amd iommu: support ATS/GPGPU passthru on IOMMUv2 systems Jan Beulich
     [not found] ` <20249.37479.802666.184751@mariner.uk.xensource.com>
     [not found]   ` <4F199485.4050304@amd.com>
2012-01-20 16:26     ` Jan Beulich
2012-01-20 16:37       ` Wei Wang
2012-01-20 16:38         ` Jan Beulich

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=4F198E2C.3090703@amd.com \
    --to=wei.wang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /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).