Print this page
NEX-14951 teach libdiskmgt about nvme, sata and xen
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
NEX-14565 port upstream Xen-related fixes
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
re #13140 rb4270 hvm_sd module missing dependencies on scsi and cmlb
re #13166 rb4270 Check for Xen HVM even if CPUID signature returns Microsoft Hv
re #13187 rb4270 Fix Xen HVM related warnings


 270                 return (DDI_FAILURE);
 271         }
 272         if (ndi_event_bind_set(xpvd_ndi_event_handle, &xpvd_ndi_events,
 273             NDI_SLEEP) != NDI_SUCCESS) {
 274                 (void) ndi_event_free_hdl(xpvd_ndi_event_handle);
 275                 xpvd_dip = NULL;
 276                 return (DDI_FAILURE);
 277         }
 278         if (ddi_create_minor_node(devi, "devctl", S_IFCHR,
 279             ddi_get_instance(devi), DDI_PSEUDO, 0) != DDI_SUCCESS) {
 280                 (void) ndi_event_unbind_set(xpvd_ndi_event_handle,
 281                     &xpvd_ndi_events, NDI_SLEEP);
 282                 (void) ndi_event_free_hdl(xpvd_ndi_event_handle);
 283                 xpvd_dip = NULL;
 284                 return (DDI_FAILURE);
 285         }
 286 
 287 #ifdef XPV_HVM_DRIVER
 288         (void) ddi_prop_update_int(DDI_DEV_T_NONE, devi, DDI_NO_AUTODETACH, 1);
 289 
 290         /*
 291          * Report our version to dom0.
 292          */
 293         if (xenbus_printf(XBT_NULL, "guest/xpvd", "version", "%d",
 294             HVMPV_XPVD_VERS))
 295                 cmn_err(CE_WARN, "xpvd: couldn't write version\n");
 296 #endif /* XPV_HVM_DRIVER */
 297 
 298         /* watch both frontend and backend for new devices */
 299         if (DOMAIN_IS_INITDOMAIN(xen_info))
 300                 (void) xs_register_xenbus_callback(xvdi_watch_devices);
 301         else
 302                 xvdi_watch_devices(XENSTORE_UP);
 303 
 304         xpvd_dip = devi;
 305         ddi_report_dev(devi);
 306 
 307         return (DDI_SUCCESS);
 308 }
 309 
 310 /*ARGSUSED*/
 311 static int
 312 xpvd_detach(dev_info_t *devi, ddi_detach_cmd_t cmd)
 313 {
 314         return (DDI_FAILURE);
 315 }




 270                 return (DDI_FAILURE);
 271         }
 272         if (ndi_event_bind_set(xpvd_ndi_event_handle, &xpvd_ndi_events,
 273             NDI_SLEEP) != NDI_SUCCESS) {
 274                 (void) ndi_event_free_hdl(xpvd_ndi_event_handle);
 275                 xpvd_dip = NULL;
 276                 return (DDI_FAILURE);
 277         }
 278         if (ddi_create_minor_node(devi, "devctl", S_IFCHR,
 279             ddi_get_instance(devi), DDI_PSEUDO, 0) != DDI_SUCCESS) {
 280                 (void) ndi_event_unbind_set(xpvd_ndi_event_handle,
 281                     &xpvd_ndi_events, NDI_SLEEP);
 282                 (void) ndi_event_free_hdl(xpvd_ndi_event_handle);
 283                 xpvd_dip = NULL;
 284                 return (DDI_FAILURE);
 285         }
 286 
 287 #ifdef XPV_HVM_DRIVER
 288         (void) ddi_prop_update_int(DDI_DEV_T_NONE, devi, DDI_NO_AUTODETACH, 1);
 289 
 290         /* Report our version to dom0 */
 291         (void) xenbus_printf(XBT_NULL, "guest/xpvd", "version", "%d",
 292             HVMPV_XPVD_VERS);



 293 #endif /* XPV_HVM_DRIVER */
 294 
 295         /* watch both frontend and backend for new devices */
 296         if (DOMAIN_IS_INITDOMAIN(xen_info))
 297                 (void) xs_register_xenbus_callback(xvdi_watch_devices);
 298         else
 299                 xvdi_watch_devices(XENSTORE_UP);
 300 
 301         xpvd_dip = devi;
 302         ddi_report_dev(devi);
 303 
 304         return (DDI_SUCCESS);
 305 }
 306 
 307 /*ARGSUSED*/
 308 static int
 309 xpvd_detach(dev_info_t *devi, ddi_detach_cmd_t cmd)
 310 {
 311         return (DDI_FAILURE);
 312 }