All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Yang Zhang <yang.z.zhang@intel.com>,
	xen-devel@lists.xenproject.org,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v2] xen/iommu: fix usage of shared EPT/IOMMU page tables on PVH guests
Date: Tue, 10 Mar 2015 13:18:43 +0000	[thread overview]
Message-ID: <54FEEF33.7010201@linaro.org> (raw)
In-Reply-To: <54FEFA5102000078000680F7@mail.emea.novell.com>

On 10/03/15 13:06, Jan Beulich wrote:
>>>> On 10.03.15 at 13:51, <julien.grall@linaro.org> wrote:
>> Hi,
>>
>> On 27/02/15 11:33, Roger Pau Monne wrote:
>>> diff --git a/xen/drivers/passthrough/iommu.c 
>> b/xen/drivers/passthrough/iommu.c
>>> index cc12735..7fcbbb1 100644
>>> --- a/xen/drivers/passthrough/iommu.c
>>> +++ b/xen/drivers/passthrough/iommu.c
>>> @@ -332,7 +332,8 @@ void iommu_share_p2m_table(struct domain* d)
>>>  {
>>>      const struct iommu_ops *ops = iommu_get_ops();
>>>  
>>> -    if ( iommu_enabled && is_hvm_domain(d) )
>>> +    ASSERT( hap_enabled(d) );
>>
>> This line is breaking compilation on ARM.
>>
>> Shouldn't it be replaced by iommu_use_hap_pt?
> 
> No, that's a different thing. But shouldn't ARM have a stub
> hap_enabled() evaluating to constant true?

I'm not sure if we should introduce hap_enabled. It's not something that
we should used in general.

What are we trying to catch with this ASSERT? I guess wrong caller?

If so, every share_p2m callbacks have a check "if iommu_use_hap_pt()"
which contains a check to hap_enabled on x86.

So I don't think this check is worthwhile in the common iommu code.

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-03-10 13:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 11:33 [PATCH v2] xen/iommu: fix usage of shared EPT/IOMMU page tables on PVH guests Roger Pau Monne
2015-03-04 16:53 ` David Vrabel
2015-03-05  9:49 ` Tim Deegan
2015-03-09  3:30 ` Tian, Kevin
2015-03-09  9:02   ` Roger Pau Monné
2015-03-10 12:51 ` Julien Grall
2015-03-10 13:06   ` Jan Beulich
2015-03-10 13:18     ` Julien Grall [this message]
2015-03-10 13:35       ` Jan Beulich
2015-03-11 10:52         ` Julien Grall

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=54FEEF33.7010201@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=JBeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yang.z.zhang@intel.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 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.