From: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Shin, Jacob" <Jacob.Shin@amd.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] AMD IOMMU: fill msi_desc fields required by commit fe017c59
Date: Mon, 6 May 2013 17:43:23 -0500 [thread overview]
Message-ID: <5188320B.4090608@amd.com> (raw)
In-Reply-To: <517E4C9D02000078000D1812@nat28.tlf.novell.com>
This looks fine and tested. Thanks for the patch.
Suravee
On 4/29/2013 3:34 AM, Jan Beulich wrote:
> Since the AMD IOMMU code relies on the x86 generic MSI code, it also
> needs to be updated to match "x86/MSI: cleanup to prepare for multi-
> vector MSI".
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -775,9 +775,16 @@ static bool_t __init set_iommu_interrupt
> control = pci_conf_read16(iommu->seg, PCI_BUS(iommu->bdf),
> PCI_SLOT(iommu->bdf), PCI_FUNC(iommu->bdf),
> iommu->msi.msi_attrib.pos + PCI_MSI_FLAGS);
> - iommu->msi.msi_attrib.maskbit = !!(control & PCI_MSI_FLAGS_MASKBIT);
> - desc->handler = control & PCI_MSI_FLAGS_MASKBIT ?
> - &iommu_maskable_msi_type : &iommu_msi_type;
> + iommu->msi.msi.nvec = 1;
> + if ( is_mask_bit_support(control) )
> + {
> + iommu->msi.msi_attrib.maskbit = 1;
> + iommu->msi.msi.mpos = msi_mask_bits_reg(iommu->msi.msi_attrib.pos,
> + is_64bit_address(control));
> + desc->handler = &iommu_maskable_msi_type;
> + }
> + else
> + desc->handler = &iommu_msi_type;
> ret = request_irq(irq, iommu_interrupt_handler, 0, "amd_iommu", iommu);
> if ( ret )
> {
>
>
>
next prev parent reply other threads:[~2013-05-06 22:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 8:34 [PATCH] AMD IOMMU: fill msi_desc fields required by commit fe017c59 Jan Beulich
2013-05-02 14:55 ` Jan Beulich
2013-05-06 22:43 ` Suravee Suthikulanit [this message]
2013-05-07 7:56 ` Jan Beulich
2013-05-07 13:47 ` Suravee Suthikulanit
2013-05-07 14:06 ` Jan Beulich
2013-05-08 5:21 ` Suravee Suthikulpanit
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=5188320B.4090608@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=JBeulich@suse.com \
--cc=Jacob.Shin@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.