linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: John Rose <johnrose@austin.ibm.com>
Cc: External, Santiago Leon <saleon@us.ibm.com>,
	List <linuxppc-dev@ozlabs.org>
Subject: Re: iommu hypervisor hypothetical
Date: Wed, 27 Sep 2006 12:07:23 -0500	[thread overview]
Message-ID: <20060927120723.678eee22@localhost.localdomain> (raw)
In-Reply-To: <1159375671.19103.3.camel@sinatra.austin.ibm.com>

On Wed, 27 Sep 2006 11:47:51 -0500 John Rose <johnrose@austin.ibm.com> wrote:

> Suppose the hypervisor added new failure codes for the hcall that does
> tce_build().  Suppose that the device driver needed to expect such
> failures when alloc_[coherent,consistent] is not successful, and handle
> that case accordingly.
> 
> Is this something we can accommodate without rewriting the iommu stuff
> for various platforms?  All these functions in machdep.h are defined to
> return NULL.  Is this because we haven't had a reasonable expectation of
> failure, or because device drivers _have_ to assume success for such
> operations?

iommu_alloc can already fail. So just change the prototype of tce_build
to return success/failure, and handle it accordingly in iommu_alloc
(DMA_ERROR_CODE). The error should move on up the stack from there.

Or did I misunderstand your question in the first place? It's sort of
sparse on details. :-)


-Olof

  reply	other threads:[~2006-09-27 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-27 16:47 iommu hypervisor hypothetical John Rose
2006-09-27 17:07 ` Olof Johansson [this message]
2006-09-27 18:25   ` John Rose
2006-09-27 18:40     ` Olof Johansson
2006-09-27 23:11     ` Benjamin Herrenschmidt

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=20060927120723.678eee22@localhost.localdomain \
    --to=olof@lixom.net \
    --cc=johnrose@austin.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=saleon@us.ibm.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 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).