xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Brian Woods <brian.woods@amd.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 7/7] x86/IOMMU: initialize iommu_ops in vendor-independent code
Date: Tue, 2 Apr 2019 11:16:43 +0100	[thread overview]
Message-ID: <c5babaad-cee3-f16c-e7df-9bfe4ab5f516@citrix.com> (raw)
In-Reply-To: <5C9DE2250200007800222B61@prv1-mh.provo.novell.com>

On 29/03/2019 09:15, Jan Beulich wrote:
>>>> On 28.03.19 at 18:50, <andrew.cooper3@citrix.com> wrote:
>> On 28/03/2019 14:54, Jan Beulich wrote:
>>> --- a/xen/drivers/passthrough/x86/iommu.c
>>> +++ b/xen/drivers/passthrough/x86/iommu.c
>>> @@ -26,6 +26,19 @@
>>>  const struct iommu_init_ops *__initdata iommu_init_ops;
>>>  struct iommu_ops __read_mostly iommu_ops;
>>>  
>>> +int __init iommu_hardware_setup(void)
>>> +{
>>> +    if ( !iommu_init_ops )
>>> +        return -ENODEV;
>>> +
>>> +    if ( !iommu_ops.init )
>>> +        iommu_ops = *iommu_init_ops->ops;
>>> +    else
>>> +        ASSERT(iommu_ops.init == iommu_init_ops->ops->init);
>> What is this ASSERT() intended to catch?  We pass through this function
>> exactly once, making the else path dead.
> iommu_ops may have got set already during x2APIC IR enabling (see
> patch 6).

In which case a

/* x2apic setup may have previously initialised the IOMMU ops. */

or similar would do nicely, to explain this logic.

With that, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-04-02 10:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 14:43 [PATCH 0/7] x86: eliminate Intel-isms from x2APIC setup Jan Beulich
2019-03-28 14:48 ` [PATCH 1/7] x86/entry: drop unused header inclusions Jan Beulich
2019-03-28 16:11   ` Andrew Cooper
2019-04-02  2:57   ` Tian, Kevin
2019-04-05 14:24   ` Boris Ostrovsky
2019-04-05 14:24     ` [Xen-devel] " Boris Ostrovsky
2019-03-28 14:49 ` [PATCH 2/7] x86/APIC: suppress redundant "Switched to ..." messages Jan Beulich
2019-03-28 16:33   ` Andrew Cooper
2019-03-28 14:49 ` [PATCH 3/7] x86/ACPI: also parse AMD IOMMU tables early Jan Beulich
2019-03-28 16:43   ` Andrew Cooper
2019-03-29  9:00     ` Jan Beulich
2019-04-05 14:28   ` Woods, Brian
2019-04-05 14:28     ` [Xen-devel] " Woods, Brian
2019-03-28 14:51 ` [PATCH 4/7] x86/IOMMU: introduce init-ops structure Jan Beulich
2019-03-28 17:01   ` Andrew Cooper
2019-04-02  3:00   ` Tian, Kevin
2019-04-05 14:29   ` Woods, Brian
2019-04-05 14:29     ` [Xen-devel] " Woods, Brian
2019-03-28 14:52 ` [PATCH 5/7] x86/IOMMU: abstract Intel-specific iommu_supports_eim() Jan Beulich
2019-03-28 17:03   ` Andrew Cooper
2019-04-02  3:02   ` Tian, Kevin
2019-03-28 14:53 ` [PATCH 6/7] x86/IOMMU: abstract Intel-specific iommu_{en, dis}able_x2apic_IR() Jan Beulich
2019-03-28 17:37   ` Andrew Cooper
2019-03-29  9:13     ` Jan Beulich
2019-04-02  3:24       ` Tian, Kevin
2019-04-02 10:18         ` Andrew Cooper
2019-04-02 13:17         ` Jan Beulich
2019-04-03  0:58           ` Tian, Kevin
2019-03-28 14:54 ` [PATCH 7/7] x86/IOMMU: initialize iommu_ops in vendor-independent code Jan Beulich
2019-03-28 17:50   ` Andrew Cooper
2019-03-29  9:15     ` Jan Beulich
2019-04-02 10:16       ` Andrew Cooper [this message]
2019-04-02  3:26   ` Tian, Kevin
2019-04-05 14:30   ` Woods, Brian
2019-04-05 14:30     ` [Xen-devel] " Woods, Brian
2019-04-05  8:05 ` Ping: [PATCH 0/7] x86: eliminate Intel-isms from x2APIC setup Jan Beulich
2019-04-05  8:05   ` [Xen-devel] " 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=c5babaad-cee3-f16c-e7df-9bfe4ab5f516@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=brian.woods@amd.com \
    --cc=julien.grall@arm.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).