summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/i86hvm
diff options
context:
space:
mode:
authorRao Shoaib <Rao.Shoaib@Sun.COM>2009-07-17 14:17:33 -0700
committerRao Shoaib <Rao.Shoaib@Sun.COM>2009-07-17 14:17:33 -0700
commit62b885670cb2373723bdad8e9fc26c05f8dabfb6 (patch)
tree6f196b4c85165d485868241d240968435d90f71b /usr/src/uts/i86pc/i86hvm
parent51144063f3afc862c6cb3f54fd4341724f765075 (diff)
downloadillumos-joyent-62b885670cb2373723bdad8e9fc26c05f8dabfb6.tar.gz
6807622 When booting a Solaris HVM guest via PXE the creation of the xnf device happens too late
Diffstat (limited to 'usr/src/uts/i86pc/i86hvm')
-rw-r--r--usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c b/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c
index 95b9df1a82..d3e3d91399 100644
--- a/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c
+++ b/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/modctl.h>
#include <sys/sunddi.h>
#include <sys/sunndi.h>
@@ -42,21 +40,29 @@
* these nodes (which usually happens when mounting the root disk device
* in an hvm environment). See the block comments at the top of pv_cmdk.c
* for more information about why this is necessary.
+ *
+ * hvmboot_rootconf() also force attaches xnf network driver nodes so
+ * that boot interface can be plumbed when booted via the network.
*/
int
hvmboot_rootconf()
{
dev_info_t *xpvd_dip;
- major_t xdf_major;
+ major_t dev_major;
- xdf_major = ddi_name_to_major("xdf");
- if (xdf_major == (major_t)-1)
+ dev_major = ddi_name_to_major("xdf");
+ if (dev_major == (major_t)-1)
cmn_err(CE_PANIC, "unable to load xdf disk driver");
if (resolve_pathname("/xpvd", &xpvd_dip, NULL, NULL) != 0)
cmn_err(CE_PANIC, "unable to configure /xpvd nexus");
- (void) ndi_devi_config_driver(xpvd_dip, 0, xdf_major);
+ (void) ndi_devi_config_driver(xpvd_dip, 0, dev_major);
+
+ dev_major = ddi_name_to_major("xnf");
+ if (dev_major == (major_t)-1)
+ cmn_err(CE_PANIC, "unable to load xnf network driver");
+ (void) ndi_devi_config_driver(xpvd_dip, 0, dev_major);
ndi_rele_devi(xpvd_dip);
return (0);