Merge remote-tracking branch 'aneesh/for-upstream' into staging

* aneesh/for-upstream:
  hw/9pfs: Endian fixes for virtfs
  ./configure: add option for disabling VirtFS
This commit is contained in:
Anthony Liguori 2012-02-27 11:19:27 -06:00
commit b55c952aea
3 changed files with 26 additions and 9 deletions

View File

@ -40,7 +40,9 @@ HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
ifdef BUILD_DOCS ifdef BUILD_DOCS
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
ifdef CONFIG_VIRTFS
DOCS+=fsdev/virtfs-proxy-helper.1 DOCS+=fsdev/virtfs-proxy-helper.1
endif
else else
DOCS= DOCS=
endif endif

21
configure vendored
View File

@ -122,6 +122,7 @@ docs=""
fdt="" fdt=""
nptl="" nptl=""
sdl="" sdl=""
virtfs=""
vnc="yes" vnc="yes"
sparse="no" sparse="no"
uuid="" uuid=""
@ -597,6 +598,10 @@ for opt do
;; ;;
--enable-sdl) sdl="yes" --enable-sdl) sdl="yes"
;; ;;
--disable-virtfs) virtfs="no"
;;
--enable-virtfs) virtfs="yes"
;;
--disable-vnc) vnc="no" --disable-vnc) vnc="no"
;; ;;
--enable-vnc) vnc="yes" --enable-vnc) vnc="yes"
@ -1004,6 +1009,8 @@ echo " --disable-strip disable stripping binaries"
echo " --disable-werror disable compilation abort on warning" echo " --disable-werror disable compilation abort on warning"
echo " --disable-sdl disable SDL" echo " --disable-sdl disable SDL"
echo " --enable-sdl enable SDL" echo " --enable-sdl enable SDL"
echo " --disable-virtfs disable VirtFS"
echo " --enable-virtfs enable VirtFS"
echo " --disable-vnc disable VNC" echo " --disable-vnc disable VNC"
echo " --enable-vnc enable VNC" echo " --enable-vnc enable VNC"
echo " --enable-cocoa enable COCOA (Mac OS X only)" echo " --enable-cocoa enable COCOA (Mac OS X only)"
@ -2820,8 +2827,15 @@ confdir=$sysconfdir$confsuffix
tools= tools=
if test "$softmmu" = yes ; then if test "$softmmu" = yes ; then
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
if [ "$cap" = "yes" -a "$linux" = "yes" ] ; then if test "$virtfs" != no ; then
if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
virtfs=yes
tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
else
if test "$virtfs" = yes; then
feature_not_found "virtfs"
fi
fi
fi fi
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) $tools" tools="qemu-nbd\$(EXESUF) $tools"
@ -2886,6 +2900,7 @@ echo "Audio drivers $audio_drv_list"
echo "Extra audio cards $audio_card_list" echo "Extra audio cards $audio_card_list"
echo "Block whitelist $block_drv_whitelist" echo "Block whitelist $block_drv_whitelist"
echo "Mixer emulation $mixemu" echo "Mixer emulation $mixemu"
echo "VirtFS support $virtfs"
echo "VNC support $vnc" echo "VNC support $vnc"
if test "$vnc" = "yes" ; then if test "$vnc" = "yes" ; then
echo "VNC TLS support $vnc_tls" echo "VNC TLS support $vnc_tls"
@ -3175,11 +3190,9 @@ fi
if test "$libattr" = "yes" ; then if test "$libattr" = "yes" ; then
echo "CONFIG_LIBATTR=y" >> $config_host_mak echo "CONFIG_LIBATTR=y" >> $config_host_mak
fi fi
if test "$linux" = "yes" ; then if test "$virtfs" = "yes" ; then
if test "$attr" = "yes" ; then
echo "CONFIG_VIRTFS=y" >> $config_host_mak echo "CONFIG_VIRTFS=y" >> $config_host_mak
fi fi
fi
if test "$blobs" = "yes" ; then if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak echo "INSTALL_BLOBS=yes" >> $config_host_mak
fi fi

View File

@ -1349,7 +1349,9 @@ static void v9fs_open(void *opaque)
if (s->proto_version == V9FS_PROTO_2000L) { if (s->proto_version == V9FS_PROTO_2000L) {
err = pdu_unmarshal(pdu, offset, "dd", &fid, &mode); err = pdu_unmarshal(pdu, offset, "dd", &fid, &mode);
} else { } else {
err = pdu_unmarshal(pdu, offset, "db", &fid, &mode); uint8_t modebyte;
err = pdu_unmarshal(pdu, offset, "db", &fid, &modebyte);
mode = modebyte;
} }
if (err < 0) { if (err < 0) {
goto out_nofid; goto out_nofid;
@ -3260,9 +3262,9 @@ void handle_9p_output(VirtIODevice *vdev, VirtQueue *vq)
ptr = pdu->elem.out_sg[0].iov_base; ptr = pdu->elem.out_sg[0].iov_base;
memcpy(&pdu->size, ptr, 4); pdu->size = le32_to_cpu(*(uint32_t *)ptr);
pdu->id = ptr[4]; pdu->id = ptr[4];
memcpy(&pdu->tag, ptr + 5, 2); pdu->tag = le16_to_cpu(*(uint16_t *)(ptr + 5));
qemu_co_queue_init(&pdu->complete); qemu_co_queue_init(&pdu->complete);
submit_pdu(s, pdu); submit_pdu(s, pdu);
} }