/* If the hypervisor indicates that the API setting * calls are unsupported, by returning HV_EBADTRAP or * HV_ENOTSUPPORTED, we assume that API groups with the * PRE_API flag set are major 1 minor 0.
*/ struct api_info { unsignedlong group; unsignedlong major; unsignedlong minor; unsignedint refcnt; unsignedint flags; #define FLAG_PRE_API 0x00000001
};
/* Register a hypervisor API specification. It indicates the * API group and desired major+minor. * * If an existing API registration exists '0' (success) will * be returned if it is compatible with the one being registered. * Otherwise a negative error code will be returned. * * Otherwise an attempt will be made to negotiate the requested * API group/major/minor with the hypervisor, and errors returned * if that does not succeed.
*/ int sun4v_hvapi_register(unsignedlong group, unsignedlong major, unsignedlong *minor)
{ struct api_info *p; unsignedlong flags; int ret;
spin_lock_irqsave(&hvapi_lock, flags);
p = __get_info(group);
ret = -EINVAL; if (p) { if (p->refcnt) {
ret = -EINVAL; if (p->major == major) {
*minor = p->minor;
ret = 0;
}
} else { unsignedlong actual_minor; unsignedlong hv_ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.