xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Wang2 <wei.wang2@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xensource.com, keir@xen.org
Subject: Re: [PATCH 07 of 16] amd iommu: Add 2 hypercalls for libxc
Date: Wed, 14 Dec 2011 17:57:33 +0100	[thread overview]
Message-ID: <201112141757.33690.wei.wang2@amd.com> (raw)
In-Reply-To: <4EE8E0720200007800067DDD@nat28.tlf.novell.com>

On Wednesday 14 December 2011 17:44:18 Jan Beulich wrote:
> >>> On 14.12.11 at 16:29, Wei Wang <wei.wang2@amd.com> wrote:
> >
> > # HG changeset patch
> > # User Wei Wang <wei.wang2@amd.com>
> > # Date 1323875772 -3600
> > # Node ID ef5698887d044ad58293bee3549eaa20310c2b17
> > # Parent  fbed4e6011fce13d3a521bbc339f4959bf32a06c
> > amd iommu: Add 2 hypercalls for libxc
> >
> > iommu_set_msi: used by qemu to inform hypervisor iommu vector number in
> > guest
> > space. Hypervisor needs this vector to inject msi into guest when PPR
> > logging
> > happens.
>
> And this cannot be done with the existing MSI emulation?
It looks like MSI emulation are used for passthru devices. I only add
virtual amd iommu device and do not passthru amd iommu device. So no physcal 
msi are required and therefore complicate msi emulation might not be very 
necessary?

> > iommu_bind_bdf: used by xl to bind guest bdf number to machine bdf
> > number. IOMMU emulations codes receives commands from guest iommu driver
> > and forwards
> > them to host iommu. But virtual device id from guest should be converted
> > into
> > physical before sending to real hardware.
>
> The whole logic here needs to take the segment into account. No new
> code should again ignore the segment numbers.
Sure, I will fix that.

> > --- a/xen/include/public/domctl.h	Wed Dec 14 16:16:11 2011 +0100
> > +++ b/xen/include/public/domctl.h	Wed Dec 14 16:16:12 2011 +0100
> > @@ -848,6 +848,31 @@ struct xen_domctl_set_access_required {
> >  typedef struct xen_domctl_set_access_required
> > xen_domctl_set_access_required_t;
> >  DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_access_required_t);
> >
> > +#if defined(__i386__) || defined(__x86_64__)
>
> What is x86-specific about these?
These hypercalls are only used by AMD. so ia64 should be avoided

Thanks,
Wei

> Jan
>
> > +/* Support for guest iommu emulation */
> > +struct xen_domctl_guest_iommu_op {
> > +    /* XEN_DOMCTL_GUEST_IOMMU_OP_* */
> > +#define XEN_DOMCTL_GUEST_IOMMU_OP_SET_MSI               0
> > +#define XEN_DOMCTL_GUEST_IOMMU_OP_BIND_BDF              1
> > +    uint8_t op;
> > +    union {
> > +        struct iommu_msi {
> > +        uint8_t  vector;
> > +        uint8_t  dest;
> > +        uint8_t  dest_mode;
> > +        uint8_t  delivery_mode;
> > +        uint8_t  trig_mode;
> > +        } msi;
> > +        struct bdf_bind {
> > +            uint32_t            g_bdf;
> > +            uint32_t            m_bdf;
> > +        } bdf_bind;
> > +    } u;
> > +};
> > +typedef struct xen_domctl_guest_iommu_op xen_domctl_guest_iommu_op_t;
> > +DEFINE_XEN_GUEST_HANDLE(xen_domctl_guest_iommu_op_t);
> > +#endif
> > +
> >  struct xen_domctl {
> >      uint32_t cmd;
> >  #define XEN_DOMCTL_createdomain                   1

  reply	other threads:[~2011-12-14 16:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 15:29 [PATCH 00 of 16] [RFC] amd iommu: support ATS device passthru on IOMMUv2 systems Wei Wang
2011-12-14 15:29 ` [PATCH 01 of 16] amd iommu: Refactoring iommu ring buffer definition Wei Wang
2011-12-14 15:29 ` [PATCH 02 of 16] amd iommu: Introduces new helper functions to simplify iommu bitwise operations Wei Wang
2011-12-14 15:29 ` [PATCH 03 of 16] amd iommu: Add iommu emulation for hvm guest Wei Wang
2011-12-15 13:35   ` Tim Deegan
2011-12-15 14:09     ` Wei Wang2
2011-12-15 14:13       ` Jan Beulich
2011-12-15 14:30         ` Wei Wang2
2011-12-14 15:29 ` [PATCH 04 of 16] amd iommu: Enable ppr log Wei Wang
2011-12-14 15:29 ` [PATCH 05 of 16] amd iommu: Enable guest level translation Wei Wang
2011-12-14 15:29 ` [PATCH 06 of 16] amd iommu: add ppr log processing into iommu interrupt handling Wei Wang
2011-12-14 15:29 ` [PATCH 07 of 16] amd iommu: Add 2 hypercalls for libxc Wei Wang
2011-12-14 16:44   ` Jan Beulich
2011-12-14 16:57     ` Wei Wang2 [this message]
2011-12-14 17:03       ` Jan Beulich
2011-12-15 10:02         ` Wei Wang2
2011-12-14 15:29 ` [PATCH 08 of 16] amd iommu: Add a hypercall for hvmloader Wei Wang
2011-12-14 15:29 ` [PATCH 09 of 16] amd iommu: add iommu mmio handler Wei Wang
2011-12-14 15:29 ` [PATCH 10 of 16] amd iommu: Enable FC bit in iommu host level PTE Wei Wang
2011-12-14 15:29 ` [PATCH 11 of 16] amd iommu: Add a new flag to indication iommuv2 feature enabled or not Wei Wang
2011-12-15 13:39   ` Tim Deegan
2011-12-15 14:05     ` Wei Wang2
2011-12-14 15:29 ` [PATCH 12 of 16] hvmloader: Build IVRS table Wei Wang
2011-12-15 12:29   ` Ian Campbell
2011-12-14 15:29 ` [PATCH 13 of 16] libxc: add wrappers for new hypercalls Wei Wang
2011-12-14 15:29 ` [PATCH 14 of 16] libxl: bind virtual bdf to physical bdf after device assignment Wei Wang
2011-12-15 14:26   ` Ian Campbell
2011-12-14 15:29 ` [PATCH 15 of 16] libxl: Introduce a new guest config file parameter Wei Wang
2011-12-15 16:27   ` Ian Jackson
2011-12-14 15:29 ` [PATCH 16 of 16] libxl: add iommu parameter to qemu-dm Wei Wang
2011-12-15 14:30   ` Ian Campbell
2011-12-15 14:52     ` Wei Wang2
2011-12-15 16:59       ` Ian Campbell
2011-12-15 17:10         ` Wei Wang2
2011-12-16 11:44           ` Ian Campbell
2011-12-15 10:23 ` [PATCH 00 of 16] [RFC] amd iommu: support ATS device passthru on IOMMUv2 systems Jan Beulich
2011-12-15 11:18   ` Wei Wang2
  -- strict thread matches above, loose matches on Subject: below --
2011-12-23 11:29 [PATCH 00 of 16] [V2] " Wei Wang
2011-12-23 11:29 ` [PATCH 07 of 16] amd iommu: Add 2 hypercalls for libxc Wei Wang
2012-01-02 12:15   ` 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=201112141757.33690.wei.wang2@amd.com \
    --to=wei.wang2@amd.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --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).