From: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: paul.durrant@citrix.com, keir@xen.org, george.dunlap@citrix.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v3 2/3] svm: iommu: Only call guest_iommu_init() after initialized HVM domain
Date: Tue, 31 May 2016 16:11:44 -0500 [thread overview]
Message-ID: <a2a5510a-8bac-065f-e8e1-e45f1cf1f49e@amd.com> (raw)
In-Reply-To: <574727F702000078000E92C5@prv-mh.provo.novell.com>
On 5/26/2016 10:44 AM, Jan Beulich wrote:
>>>> Suravee Suthikulanit <suravee.suthikulpanit@amd.com> 05/25/16 9:01 PM >>>
>> On 5/23/2016 6:54 AM, Jan Beulich wrote:
>>>>>> On 22.05.16 at 01:42, <suravee.suthikulpanit@amd.com> wrote:
>>>> From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>>>>
>>>> The guest_iommu_init() is currently called by the following code path:
>>>>
>>>> arch/x86/domain.c: arch_domain_create()
>>>> ]- drivers/passthrough/iommu.c: iommu_domain_init()
>>>> |- drivers/passthrough/amd/pci_amd_iommu.c: amd_iommu_domain_init();
>>>> |- drivers/passthrough/amd/iommu_guest.c: guest_iommu_init()
>>>>
>>>> At this point, the hvm_domain_initialised() has not been called.
>>>> So register_mmio_handler() in guest_iommu_init() silently fails.
>>>> This patch moves the iommu_domain_init() to a later point after the
>>>> hvm_domain_intialise() instead.
>>>
>>> That's one possible approach, which I continue to be not really
>>> happy with. guest_iommu_init() really is HVM-specific, so maybe
>>> no longer calling it from amd_iommu_domain_init() would be the
>>> better solution (instead calling it from hvm_domain_initialise()
>>> would then seem to be the better option). Thoughts?
>>
>> Then, this goes back to the approach I proposed in the v1 of this patch
>> series, where I call guest_iommu_init/destroy() in the
>> svm_domain_initialise/destroy().
>>
>> However, I'm still not quite clear in why the iommu_domain_init() is
>> needed before hvm_domain_initialise().
>
> I think the two things are only lightly related. Changing the order of calls is
> generally fine, but recognizing that guest_iommu_init() really would better be
> called elsewhere makes that re-ordering simply unnecessary.
>
> Jan
So, let discussing these two things separately. I would propose to:
1. Let's just remove the guest_iommu_init() for now since it's not
functioning, and it seems to not being called at a proper place
according to Jan. We will revisit this when we re-introduce and fully
test out the feature.
2. As for the ordering of the iommu_domain_init() and hvm_domain_init()
, let's continue to discuss to find proper ordering if it needs changing.
Let me know what you guys thinks.
Thanks,
Suravee
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-31 21:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-21 23:42 [PATCH v3 0/3] Fix xen crash when starting HVM guest due to missing io handler suravee.suthikulpanit
2016-05-21 23:42 ` [PATCH v3 1/3] x86/hvm: Add check when register " suravee.suthikulpanit
2016-05-23 8:17 ` Paul Durrant
2016-05-23 11:46 ` Jan Beulich
2016-05-25 19:04 ` Suravee Suthikulanit
2016-05-21 23:42 ` [PATCH v3 2/3] svm: iommu: Only call guest_iommu_init() after initialized HVM domain suravee.suthikulpanit
2016-05-23 8:21 ` Paul Durrant
2016-05-23 11:54 ` Jan Beulich
2016-05-25 19:00 ` Suravee Suthikulanit
2016-05-26 15:44 ` Jan Beulich
2016-05-31 21:11 ` Suravee Suthikulanit [this message]
2016-06-01 7:55 ` Jan Beulich
2016-05-21 23:42 ` [PATCH v3 3/3] AMD IOMMU: Check io_handler before registering mmio handler suravee.suthikulpanit
2016-05-23 8:23 ` Paul Durrant
2016-05-25 18:52 ` Suravee Suthikulanit
2016-05-26 8:28 ` Paul Durrant
2016-05-26 15:47 ` Jan Beulich
2016-05-21 23:47 ` [PATCH v3 0/3] Fix xen crash when starting HVM guest due to missing io handler Suravee Suthikulpanit
-- strict thread matches above, loose matches on Subject: below --
2016-05-21 23:33 suravee.suthikulpanit
2016-05-21 23:33 ` [PATCH v3 2/3] svm: iommu: Only call guest_iommu_init() after initialized HVM domain 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=a2a5510a-8bac-065f-e8e1-e45f1cf1f49e@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.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.