[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Grant unmap error checking in Dom0



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.