From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Avi Kivity <avi@qumranet.com>
Cc: chrisw@redhat.com, kvm-devel@lists.sourceforge.net,
allen.m.kay@intel.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Glauber Costa <gcosta@redhat.com>,
Ben-Ami Yassour1 <BENAMI@il.ibm.com>
Subject: Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices
Date: Wed, 30 Apr 2008 09:05:13 +0300 [thread overview]
Message-ID: <20080430060513.GB7378@il.ibm.com> (raw)
In-Reply-To: <4817A5C6.7070704@qumranet.com>
On Wed, Apr 30, 2008 at 01:48:38AM +0300, Avi Kivity wrote:
> Amit Shah wrote:
>>
>>>> + if (is_error_page(host_page)) {
>>>> + printk(KERN_INFO "%s: gfn %p not valid\n",
>>>> + __func__, (void *)page_gfn);
>>>> + r = -1;
>>>>
>>> r = -1 is not really informative. Better use some meaningful error.
>>>
>>
>> The error's going to the guest. The guest, as we know, has already
>> done a successful DMA allocation. Something went wrong in the
>> hypercall, and we don't know why (bad page). Any kind of error here
>> isn't going to be intelligible to the guest anyway. It's mostly a
>> host thing if we ever hit this.
>>
>
> If the guest is not able to handle it, why bother returning an
> error? Better to kill it.
>
> But in any case, -1 is not a good error number.
The guest should be able to deal with transient DMA mapping errors,
either by retrying, or quiescing the device. This is in line with how
HW IOMMUs work - they may run out of mappings for example and the
driver should be able to cope with it. Killing the guest is a last
resort.
Cheers,
Muli
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next prev parent reply other threads:[~2008-04-30 6:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 10:37 PV DMA for PCI passthrough devices for KVM Amit Shah
2008-04-29 10:37 ` [PATCH] x86 DMA: Handle devices assigned to the guest by the host Amit Shah
2008-04-29 10:37 ` [PATCH] KVM x86: Handle hypercalls for assigned PCI devices Amit Shah
2008-04-29 10:37 ` [PATCH] KVM PV Guest: Implement paravirtualized DMA Amit Shah
2008-04-29 13:31 ` Andi Kleen
2008-04-29 13:59 ` Amit Shah
2008-04-29 14:44 ` [PATCH] KVM x86: Handle hypercalls for assigned PCI devices Glauber Costa
2008-04-29 15:58 ` Amit Shah
2008-04-29 22:48 ` Avi Kivity
2008-04-30 6:05 ` Muli Ben-Yehuda [this message]
2008-05-01 13:18 ` Amit Shah
2008-04-29 13:14 ` [PATCH] x86 DMA: Handle devices assigned to the guest by the host Andi Kleen
2008-04-29 13:49 ` Amit Shah
2008-04-30 6:29 ` Muli Ben-Yehuda
2008-04-29 13:15 ` PV DMA for PCI passthrough devices for KVM Andi Kleen
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=20080430060513.GB7378@il.ibm.com \
--to=muli@il.ibm.com \
--cc=BENAMI@il.ibm.com \
--cc=allen.m.kay@intel.com \
--cc=avi@qumranet.com \
--cc=chrisw@redhat.com \
--cc=gcosta@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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