From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: xen-devel@lists.xen.org, David Vrabel <david.vrabel@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Grant unmap error checking in Dom0
Date: Tue, 18 Mar 2014 13:21:18 +0000 [thread overview]
Message-ID: <5328484E.5060701@citrix.com> (raw)
Hi,
Just out of curiosity I've checked how Dom0 handles errors during grant
unmapping. Usually there is a BUG_ON(ret) for the return value of
gnttab_unmap_refs in blkback and netback, gntdev drops just a WARN.
The return value can be non-zero only if Xen failed to copy the map
operations back and forth to the guest supplied memory, so it's
reasonable to crash there. However I'm wondering why gntdev is happy
with just a WARN.
Another thing, we don't check the status of the operations if the return
value is zero. We shouldn't normally do that, Xen logs info messages in
some cases, but not always (e.g. XSM or IOMMU problems). For debugging
purposes however it could be useful to have the ability to turn on
checking in Dom0. A quick and dirty way to do this is to use
printk_get_level to figure out if the loglevel is e.g. KERN_NOTICE or
lower, but I'm sure there is a better way to do this :) It would be an
overkill to introduce new config option, I'm thinking a runtime
parameter to check in an unlikely(), so it won't cause performance
penalty for normal operation. Any opinions on that?
Zoli
next reply other threads:[~2014-03-18 13:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 13:21 Zoltan Kiss [this message]
2014-03-18 13:38 ` Grant unmap error checking in Dom0 Konrad Rzeszutek Wilk
2014-03-18 15:42 ` Zoltan Kiss
2014-03-18 15:54 ` Konrad Rzeszutek Wilk
2014-03-18 21:56 ` Zoltan Kiss
2014-03-19 12:56 ` Konrad Rzeszutek Wilk
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=5328484E.5060701@citrix.com \
--to=zoltan.kiss@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=david.vrabel@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.