Skip to content

Commit

Permalink
HVM-429 vnic support should be a proper qemu configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
rmustacc committed Jun 27, 2011
1 parent a6e5c17 commit 4e52328
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
7 changes: 0 additions & 7 deletions Makefile.objs
Expand Up @@ -47,13 +47,6 @@ net-nested-$(CONFIG_VDE) += vde.o
net-nested-$(CONFIG_SUNOS_VNIC) += vnic.o
net-obj-y += $(addprefix net/, $(net-nested-y))

#
# We need to link against libdlpi if we have CONFIG_SUNOS_VNIC
#
ifeq ($(CONFIG_SUNOS_VNIC),y)
LDFLAGS+=-ldlpi
endif

ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS),yy)
# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
# only pull in the actual virtio-9p device if we also enabled virtio.
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Expand Up @@ -27,5 +27,10 @@ echo "==> Running configure"
--kerneldir=$(cd `pwd`/../kvm; pwd) \
--cpu=x86_64

if [[ $? != 0 ]]; then
echo "Failed to configure, bailing"
exit 1
fi

echo "==> Make"
gmake -j10
35 changes: 33 additions & 2 deletions configure
Expand Up @@ -139,6 +139,7 @@ xen=""
linux_aio=""
attr=""
vhost_net=""
sunos_vnic=""
xfs=""

gprof="no"
Expand Down Expand Up @@ -749,6 +750,10 @@ for opt do
;;
--enable-rbd) rbd="yes"
;;
--disable-sunos-vnic) sunos_vnic="no"
;;
--enable-sunos-vnic) sunos_vnic="yes"
;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
Expand Down Expand Up @@ -942,6 +947,8 @@ echo " --enable-docs enable documentation build"
echo " --disable-docs disable documentation build"
echo " --disable-vhost-net disable vhost-net acceleration support"
echo " --enable-vhost-net enable vhost-net acceleration support"
echo " --disable-sunos-vnic disable support for crossbow vnics"
echo " --enable-sunos-vnic enable support for crossbow vnics"
echo " --enable-trace-backend=B Set trace backend"
echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends)
echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
Expand Down Expand Up @@ -1900,6 +1907,24 @@ EOF
fi
fi


##########################################
# test for sunos vnic

if test "$sunos_vnic" != "no"; then
cat > $TMPC <<EOF
#include <libdlpi.h>
int main(void) { return 0; }
EOF
if compile_prog "" "-ldlpi" ; then
sunos_vnic=yes
else
if test "sunos_vnic" = "yes" ; then
feature_not_found "sunos-vnic"
fi
fi
fi

##########################################
# pthread probe
PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
Expand Down Expand Up @@ -2612,6 +2637,7 @@ echo "madvise $madvise"
echo "posix_madvise $posix_madvise"
echo "uuid support $uuid"
echo "vhost-net support $vhost_net"
echo "SunOS VNIC support $sunos_vnic"
echo "Trace backend $trace_backend"
echo "Trace output file $trace_file-<pid>"
echo "spice support $spice"
Expand Down Expand Up @@ -2694,8 +2720,6 @@ fi
if test "$solaris" = "yes" ; then
echo "CONFIG_SOLARIS=y" >> $config_host_mak
echo "CONFIG_SOLARIS_VERSION=$solarisrev" >> $config_host_mak
# XXX rm needs to test / make this be a part of configure
echo "CONFIG_SUNOS_VNIC=y" >> $config_host_mak
if test "$needs_libsunmath" = "yes" ; then
echo "CONFIG_NEEDS_LIBSUNMATH=y" >> $config_host_mak
fi
Expand Down Expand Up @@ -2896,6 +2920,13 @@ if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=y" >> $config_host_mak
fi

if test "$sunos_vnic" = "yes" ; then
echo "CONFIG_SUNOS_VNIC=y" >> $config_host_mak
LDFLAGS="-ldlpi $LDFLAGS"
else
echo "failed"
fi

# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
echo "CONFIG_BSD=y" >> $config_host_mak
Expand Down

0 comments on commit 4e52328

Please sign in to comment.