xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Malcolm Crossley <malcolm.crossley@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [RFC PATCH 2/7] iommu: add iommu_lookup_page to lookup guest gfn for a particular IOMMU mapping
Date: Wed, 24 Feb 2016 15:10:39 +0000	[thread overview]
Message-ID: <56CDC7EF.4000704@citrix.com> (raw)
In-Reply-To: <CAFLBxZY2E33dYW=i71YAo4Vgv_f1hy9M+EHhtgSSzvU_5TZZAA@mail.gmail.com>

On 24/02/16 15:08, George Dunlap wrote:
> On Wed, Feb 17, 2016 at 8:22 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
>>> +    {
>>> +        *gfn = bfn;
>>> +        return 0;
>>> +    }
>>> +
>>> +    if ( !iommu_enabled || !hd->platform_ops ||
>>> +            !hd->platform_ops->lookup_page )
>>> +        return -ENOMEM;
>> -ENOMEM ? ENXIO ? Or maybe -ENOSYS for the case when hd->platform_ops
>> is not set nor ->lookup_page?
> I think ENOTSUPP, perhaps?  ENOMEM means a memory allocation failed
> (which it hasn't); ENOSYS means this is an invalid system call (which
> it isn't).  ESRCH could be close too, but it seems like that would be
> more appropriate when you try to lookup a non-existent BFN.

Xen (fairly) consistently uses ESRCH for "domain not found".  I would
recommend -ENOTSUPP here.

~Andrew

  reply	other threads:[~2016-02-24 15:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1455099035-17649-1-git-send-email-malcolm.crossley@citrix.com>
2016-02-10 10:10 ` [RFC PATCH 1/7] common/pv-iommu: Add stub hypercall for PV-IOMMU Malcolm Crossley
2016-02-10 10:36   ` Malcolm Crossley
2016-02-17 20:09   ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 2/7] iommu: add iommu_lookup_page to lookup guest gfn for a particular IOMMU mapping Malcolm Crossley
2016-02-17 20:22   ` Konrad Rzeszutek Wilk
2016-02-24 15:08     ` George Dunlap
2016-02-24 15:10       ` Andrew Cooper [this message]
2016-02-10 10:10 ` [RFC PATCH 3/7] VT-d: Add iommu_lookup_page support Malcolm Crossley
2016-02-17 20:32   ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 4/7] common/pv-iommu: Add query, map and unmap ops Malcolm Crossley
2016-02-17 21:05   ` Konrad Rzeszutek Wilk
2016-02-17 21:07     ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 5/7] x86/m2b: Add a tracking structure for mfn to bfn mappings per page Malcolm Crossley
2016-02-24 17:07   ` George Dunlap
2016-02-10 10:10 ` [RFC PATCH 6/7] common/pv-iommu: Add foreign ops to PV-IOMMU interface Malcolm Crossley
2016-02-17 21:11   ` Konrad Rzeszutek Wilk
2016-02-10 10:10 ` [RFC PATCH 7/7] common/pv-iommu: Allow hardware_domain to pre IOMMU map foreign memory Malcolm Crossley
2016-02-10 10:33 ` [RFC PATCH 0/7] Implement Xen PV-IOMMU interface Malcolm Crossley
2016-02-17 20:12   ` Konrad Rzeszutek Wilk
2016-02-24 18:08   ` George Dunlap
2016-11-22 16:21   ` Martin Cerveny

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=56CDC7EF.4000704@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=malcolm.crossley@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 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).