* [Qemu-devel] [PATCH 1/2] ./configure: add option for disabling VirtFS
2012-02-26 17:44 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
@ 2012-02-26 17:44 ` Aneesh Kumar K.V
2012-02-26 17:44 ` [Qemu-devel] [PATCH 2/2] hw/9pfs: Endian fixes for virtfs Aneesh Kumar K.V
2012-02-28 15:33 ` [Qemu-devel] [PULL] VirtFS update Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Aneesh Kumar K.V @ 2012-02-26 17:44 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori, Meador Inge, Aneesh Kumar K.V
From: Meador Inge <meadori@codesourcery.com>
Signed-off-by: Meador Inge <meadori@codesourcery.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
Makefile | 2 ++
configure | 25 +++++++++++++++++++------
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index c67493e..ac82afe 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,9 @@ HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
ifdef BUILD_DOCS
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
+endif
else
DOCS=
endif
diff --git a/configure b/configure
index 037f7f7..05a778d 100755
--- a/configure
+++ b/configure
@@ -121,6 +121,7 @@ docs=""
fdt=""
nptl=""
sdl=""
+virtfs=""
vnc="yes"
sparse="no"
uuid=""
@@ -586,6 +587,10 @@ for opt do
;;
--enable-sdl) sdl="yes"
;;
+ --disable-virtfs) virtfs="no"
+ ;;
+ --enable-virtfs) virtfs="yes"
+ ;;
--disable-vnc) vnc="no"
;;
--enable-vnc) vnc="yes"
@@ -993,6 +998,8 @@ echo " --disable-strip disable stripping binaries"
echo " --disable-werror disable compilation abort on warning"
echo " --disable-sdl disable SDL"
echo " --enable-sdl enable SDL"
+echo " --disable-virtfs disable VirtFS"
+echo " --enable-virtfs enable VirtFS"
echo " --disable-vnc disable VNC"
echo " --enable-vnc enable VNC"
echo " --enable-cocoa enable COCOA (Mac OS X only)"
@@ -2805,8 +2812,15 @@ confdir=$sysconfdir$confsuffix
tools=
if test "$softmmu" = yes ; then
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
- if [ "$cap" = "yes" -a "$linux" = "yes" ] ; then
- tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
+ 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)"
+ else
+ if test "$virtfs" = yes; then
+ feature_not_found "virtfs"
+ fi
+ fi
fi
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) $tools"
@@ -2871,6 +2885,7 @@ echo "Audio drivers $audio_drv_list"
echo "Extra audio cards $audio_card_list"
echo "Block whitelist $block_drv_whitelist"
echo "Mixer emulation $mixemu"
+echo "VirtFS support $virtfs"
echo "VNC support $vnc"
if test "$vnc" = "yes" ; then
echo "VNC TLS support $vnc_tls"
@@ -3160,10 +3175,8 @@ fi
if test "$libattr" = "yes" ; then
echo "CONFIG_LIBATTR=y" >> $config_host_mak
fi
-if test "$linux" = "yes" ; then
- if test "$attr" = "yes" ; then
- echo "CONFIG_VIRTFS=y" >> $config_host_mak
- fi
+if test "$virtfs" = "yes" ; then
+ echo "CONFIG_VIRTFS=y" >> $config_host_mak
fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak
--
1.7.9
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] hw/9pfs: Endian fixes for virtfs
2012-02-26 17:44 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
2012-02-26 17:44 ` [Qemu-devel] [PATCH 1/2] ./configure: add option for disabling VirtFS Aneesh Kumar K.V
@ 2012-02-26 17:44 ` Aneesh Kumar K.V
2012-02-28 15:33 ` [Qemu-devel] [PULL] VirtFS update Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Aneesh Kumar K.V @ 2012-02-26 17:44 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori, Aneesh Kumar K.V, David Gibson
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This patch fixes several endian bugs in virtfs.
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
hw/9pfs/virtio-9p.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index a72ffc3..c633fb9 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1349,7 +1349,9 @@ static void v9fs_open(void *opaque)
if (s->proto_version == V9FS_PROTO_2000L) {
err = pdu_unmarshal(pdu, offset, "dd", &fid, &mode);
} 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) {
goto out_nofid;
@@ -3260,9 +3262,9 @@ void handle_9p_output(VirtIODevice *vdev, VirtQueue *vq)
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];
- memcpy(&pdu->tag, ptr + 5, 2);
+ pdu->tag = le16_to_cpu(*(uint16_t *)(ptr + 5));
qemu_co_queue_init(&pdu->complete);
submit_pdu(s, pdu);
}
--
1.7.9
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL] VirtFS update
2012-02-26 17:44 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
2012-02-26 17:44 ` [Qemu-devel] [PATCH 1/2] ./configure: add option for disabling VirtFS Aneesh Kumar K.V
2012-02-26 17:44 ` [Qemu-devel] [PATCH 2/2] hw/9pfs: Endian fixes for virtfs Aneesh Kumar K.V
@ 2012-02-28 15:33 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2012-02-28 15:33 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: qemu-devel
On 02/26/2012 11:44 AM, Aneesh Kumar K.V wrote:
> Hi Anthony,
>
> Please pull the below VirtFS update
>
> -aneesh
>
> The following changes since commit 235fe3bfd46b1104575b540d0bc3fdf584030b99:
>
> qom: add test tools (2012-02-22 12:18:26 -0600)
>
> are available in the git repository at:
>
> git://github.com/kvaneesh/QEMU.git for-upstream
>
> for you to fetch changes up to 67d6fa53629f1eb3401974d740310c10e03fa1c9:
>
> hw/9pfs: Endian fixes for virtfs (2012-02-24 14:01:19 +0530)
Pulled. Thanks.
Regards,
Anthony Liguori
>
> ----------------------------------------------------------------
> Benjamin Herrenschmidt (1):
> hw/9pfs: Endian fixes for virtfs
>
> Meador Inge (1):
> ./configure: add option for disabling VirtFS
>
> Makefile | 2 ++
> configure | 25 +++++++++++++++++++------
> hw/9pfs/virtio-9p.c | 8 +++++---
> 3 files changed, 26 insertions(+), 9 deletions(-)
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread