Statistics
| Branch: | Revision:

root / hw / 9pfs @ f487b677

# Date Author Comment
c7e587b7 05/28/2013 12:53 pm Aneesh Kumar K.V

hw/9pfs: Fix segfault with 9p2000.u

When guest tries to chmod a block or char device file over 9pfs,
the qemu process segfaults. With 9p2000.u protocol we use wstat to
change mode bits and client don't send extension information for
chmod. We need to check for size field to check whether extension...

aed858ce 05/28/2013 12:53 pm Aneesh Kumar K.V

hw/9pfs: use O_NOFOLLOW for mapped readlink operation

With mapped security models like mapped-xattr and mapped-file, we save the
symlink target as file contents. Now if we ever expose a normal directory
with mapped security model and find real symlinks in export path, never...

0ceb092e 05/28/2013 12:53 pm Aneesh Kumar K.V

hw/9pfs: Use O_NOFOLLOW when opening files on server

9p server should never follow a symlink. So use O_NOFOLLOW with all open
syscall

Tested-by: "M. Mohan Kumar" <>
Signed-off-by: Aneesh Kumar K.V <>

db431f6a 05/28/2013 12:53 pm Gabriel de Perthuis

hw/9pfs: Be robust against paths without FS_IOC_GETVERSION

9P optionally uses the FS_IOC_GETVERSION ioctl to get information about
a file's version (sometimes called generation number).

The code checks for supported filesystems at mount time, but some paths...

c7e775e4 05/12/2013 12:25 pm Dong Xu Wang

remove double semicolons

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Michael Tokarev <>

181103cd 04/24/2013 07:50 pm KONRAD Frederic

virtio: remove the function pointer.

This remove the function pointer in VirtIODevice, and use only
VirtioDeviceClass function pointer.

Signed-off-by: KONRAD Frederic <>
Message-id: ...

e7303c43 04/23/2013 06:37 pm KONRAD Frederic

virtio-9p: add the virtio-9p device.

Create virtio-9p-device which extends virtio-device, so it can be connected on
virtio-bus.

Signed-off-by: KONRAD Frederic <>
Message-id: ...

234a336f 04/23/2013 06:37 pm KONRAD Frederic

virtio-9p-pci: switch to the new API.

Here the virtio-9p-pci is modified for the new API. The device
virtio-9p-pci extends virtio-pci. It creates and connects a
virtio-9p-device during the init. The properties are not changed.

Signed-off-by: KONRAD Frederic <>...

e8111e50 04/23/2013 06:37 pm KONRAD Frederic

virtio-9p: cleanup: init function.

This remove old init function as it is no longer needed.

Signed-off-by: KONRAD Frederic <>
Message-id:
Signed-off-by: Anthony Liguori <>

13daf6ca 04/23/2013 06:37 pm KONRAD Frederic

virtio-9p: cleanup: QOM casts.

As the virtio-9p-pci is switched to the new API, we can use QOM casts.

Signed-off-by: KONRAD Frederic <>
Message-id:
Signed-off-by: Anthony Liguori <>

93b48c20 04/09/2013 03:47 pm Hans de Goede

virtio-9p: Fix virtio-9p no longer building after hw-dirs branch merge

Signed-off-by: Hans de Goede <>
Message-id:
Cc: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

60653b28 03/01/2013 02:57 pm Paolo Bonzini

virtio-9p: remove PCI dependencies from hw/9pfs/

Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency
with the corresponding .c file.

Signed-off-by: Paolo Bonzini <>

b4a42f81 03/01/2013 02:54 pm Paolo Bonzini

hw: move qdev-monitor.o to toplevel directory

qdev-monitor.c is the only "core qdev" file that is not used in
user-mode emulation, and it does not define anything that is used
by hardware models. Remove it from the hw/ directory and
remove hw/qdev-monitor.h from hw/qdev.h too; this requires...

312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
a911a182 02/06/2013 04:29 pm Aneesh Kumar K.V

qemu/9p: Don't ignore error in fid clunk

We use the clunk request to do the actual xattr operation. So don't
ignore the error value for fid clunk.

Security model "none" don't support posix acl. Without this patch
guest won't get EOPNOTSUPP error on setxattr("system.posix_acl_access")...

6528499f 01/30/2013 12:14 pm Markus Armbruster

g_malloc(0) and g_malloc0(0) return NULL; simplify

Once upon a time, it was decided that qemu_malloc(0) should abort.
Switching to glib retired that bright idea. Some code that was added
to cope with it (e.g. in commits 702ef63, b76b6e9) is still around....

c64f50d1 01/30/2013 12:14 pm Markus Armbruster

g_strdup(NULL) returns NULL; simplify

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

d3f8e138 01/30/2013 12:14 pm Markus Armbruster

hw/9pfs: Fix unchecked strdup() by converting to g_strdup()

Note: the allocation in virtio_9p_init() is still leaked. To be fixed
in a followup commit.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

8e9a8681 01/14/2013 06:23 pm Anthony Liguori

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci,virtio

This further optimizes MSIX handling in virtio-pci.
Also included is pci cleanup by Paolo, and pci device
assignment fix by Alex.

Signed-off-by: Michael S. Tsirkin <>...

8c43a6f0 01/10/2013 11:11 pm Andreas Färber

Make all static TypeInfos const

Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all
types natively through QEMU Object Model), TypeInfo as used in
the common, non-iterative pattern is no longer amended with information
and should therefore be const....

13744bd0 01/08/2013 08:24 pm Paolo Bonzini

virtio-9p: use symbolic constant, add to pci-ids.txt

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Michael S. Tsirkin <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

caf71f86 12/19/2012 09:31 am Paolo Bonzini

migration: move include files to include/migration/

Signed-off-by: Paolo Bonzini <>

cb9c377f 12/19/2012 09:31 am Paolo Bonzini

janitor: add guards to headers

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

f8fe7964 12/19/2012 09:29 am Paolo Bonzini

janitor: do not include qemu-char everywhere

Touching char/char.h basically causes the whole of QEMU to
be rebuilt. Avoid this, it is usually unnecessary.

Signed-off-by: Paolo Bonzini <>

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
c9159fe9 10/06/2012 12:07 am Stefan Weil

Remove libhw

The entries for libhw* are no longer needed in .gitignore.

There is also no longer a difference between common-obj-y and
hw-obj-y, so one of those two macros is sufficient.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

a79b5f8b 10/05/2012 03:58 pm Jim Meyering

hw/9pfs: avoid buffer overrun

v9fs_add_dir_node and qemu_v9fs_synth_add_file used strncpy
to form node->name, which requires NUL-termination, but
strncpy does not ensure NUL-termination.
Use pstrcpy, which does.

Acked-by: Aneesh Kumar K.V <>...

9238c209 10/05/2012 03:58 pm Jim Meyering

virtio-9p: avoid unwarranted uses of strncpy

In all of these cases, the uses of strncpy were unnecessary, since
at each point of use we know that the NUL-terminated source bytes
fit in the destination buffer. Use memcpy in place of strncpy.

Acked-by: Aneesh Kumar K.V <>...

4cdc0789 07/31/2012 07:31 pm Aneesh Kumar K.V

hw/9pfs: Fix assert when disabling migration

For 9p we can get the attach request multiple times for the
same export. So don't adding migration blocker for every
attach request.

Signed-off-by: Aneesh Kumar K.V <>

23797df3 07/09/2012 08:35 pm Anthony Liguori

Merge remote-tracking branch 'mjt/mjt-iov2' into staging

  • mjt/mjt-iov2:
    rewrite iov_send_recv() and move it to iov.c
    cleanup qemu_co_sendv(), qemu_co_recvv() and friends
    export iov_send_recv() and use it in iov_send() and iov_recv()
    rename qemu_sendv to iov_send, change proto and move declarations to iov.h...
1b093c48 06/11/2012 10:12 pm Michael Tokarev

consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent

qemu_iovec_concat() is currently a wrapper for
qemu_iovec_copy(), use the former (with extra
"0" arg) in a few places where it is used.

Change skip argument of qemu_iovec_copy() from...

be1029ec 06/07/2012 10:21 am Paolo Bonzini

build: convert libhw to nested Makefile.objs

After this patch, the libhw* directories will have a hierarchy
that mimics the source tree. This is useful because we do have
a couple of files there that are in the top source directory.

Signed-off-by: Paolo Bonzini <>

c353f261 06/07/2012 10:21 am Paolo Bonzini

build: move per-target hw/ objects to nested Makefile.objs

This completes the move to nested Makefiles for virtio and a few
other files that were not part of obj-TARGET-y, but still were
compiled separately for each target.

Signed-off-by: Paolo Bonzini <>

67d6fa53 02/24/2012 10:31 am Benjamin Herrenschmidt

hw/9pfs: Endian fixes for virtfs

This patch fixes several endian bugs in virtfs.

Cc: Aneesh Kumar K.V <>

Signed-off-by: Benjamin Herrenschmidt <>
Signed-off-by: David Gibson <>...

83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

dc717bfd 02/08/2012 03:23 pm Anthony Liguori

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

  • aneesh/for-upstream:
    hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode
    hw/9pfs: Update MAINTAINERS file
    fsdev: Fix parameter parsing for proxy helper
    hw/9pfs: Fix crash when mounting with synthfs...
39bffca2 02/03/2012 06:41 pm Anthony Liguori

qdev: register all types natively through QEMU Object Model

This was done in a mostly automated fashion. I did it in three steps and then
rebased it into a single step which avoids repeatedly touching every file in
the tree.

The first step was a sed-based addition of the parent type to the subclass...

eed96860 01/30/2012 07:24 am Daniel P. Berrange

hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode

When 2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903 added support for
the 'readonly' flag against 9p filesystems, it also made QEMU
add the O_NOATIME flag as a side-effect.

The O_NOATIME flag, however, may only be set by the file owner,...

2d40564a 01/30/2012 07:24 am M. Mohan Kumar

hw/9pfs: Preserve S_ISGID

In passthrough security model in local fs driver, after a file creation
chown and chmod are done to set the file credentials and mode as requested
by 9p client. But if there was a request to create a file with S_ISGID
bit, doing chown on that file resets the S_ISGID bit. So first call...

71f86cd6 01/30/2012 07:24 am Aneesh Kumar K.V

hw/9pfs: Fix crash when mounting with synthfs

Some Fsdriver backend don't have fs_root. So check for that in
migrate message.

Signed-off-by: Aneesh Kumar K.V <>

40021f08 01/27/2012 06:50 pm Anthony Liguori

pci: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

e855761c 01/27/2012 06:50 pm Anthony Liguori

qdev: prepare source tree for code conversion

These are various small stylistic changes which help make things more
consistent such that the automated conversion script can be simpler.

It's not necessary to agree or disagree with these style changes because all...

2c30dd74 01/19/2012 08:51 am Aneesh Kumar K.V

hw/9pfs: Add new security model mapped-file.

This enable us to do passthrough equivalent security model on NFS directory.
NFS server mostly do root squashing and don't support xattr. Hence we cannot
use 'passthrough' or 'mapped' security model

Also added "mapped-xattr" security to indicate earlier "mapped" security model...

2afee49f 01/06/2012 08:50 pm Peter Maydell

virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts

Fix a compile failure on 32 bit hosts (integer constant is too large
for 'unsigned long' type) by correcting a typo where the mask used
for filling in the second f_fsid word had too many 'F's in it....

84a87cc4 01/04/2012 05:53 pm M. Mohan Kumar

hw/9pfs: Add support to use named socket for proxy FS

Add option to use named socket for communicating between proxy helper
and qemu proxy FS. Access to socket can be given by using command line
options -u and -g.

Signed-off-by: M. Mohan Kumar <>...

d090e452 01/04/2012 04:50 pm M. Mohan Kumar

hw/9pfs: Proxy getversion

Add proxy getversion to get generation number

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

d52b09e4 01/04/2012 04:50 pm M. Mohan Kumar

hw/9pfs: xattr interfaces in proxy filesystem driver

Add xattr support for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

ea75fc4e 01/04/2012 04:49 pm M. Mohan Kumar

hw/9pfs: File ownership and others

Add file ownership interfaces like chmod/chown, utime update, rename,
remove and truncating files for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

b178adc3 01/04/2012 04:49 pm M. Mohan Kumar

hw/9pfs: Add stat/readlink/statfs for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

39f8c32c 01/04/2012 04:48 pm M. Mohan Kumar

hw/9pfs: Create other filesystem objects

Add interfaces to create filesystem objects like directory,
device nodes, symbolic links, links for proxy filesytem driver

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

daf0b9ac 01/04/2012 04:44 pm M. Mohan Kumar

hw/9pfs: Open and create files

Add interfaces to open and create files for proxy file system driver.

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

17bff52b 01/04/2012 04:44 pm M. Mohan Kumar

hw/9pfs: File system helper process for qemu 9p proxy FS

Provide root privilege access to QEMU 9p proxy filesystem using socket
communication.

Proxy helper is started by root user as:
~ # virtfs-proxy-helper -f|--fd <socket descriptor> -p|--path <path-to-share>...

4c793dda 01/04/2012 04:43 pm M. Mohan Kumar

hw/9pfs: Add new proxy filesystem driver

Add new proxy filesystem driver to add root privilege to qemu process.
It needs a helper process to be started by root user.

Following command line can be used to utilize proxy filesystem driver
-virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd>...

ddca7f86 01/04/2012 04:23 pm M. Mohan Kumar

hw/9pfs: Add validation to {un}marshal code

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

99519f0a 01/04/2012 04:21 pm Aneesh Kumar K.V

hw/9pfs: Move opt validation to FsDriver callback

This remove all conditional code from common code path and
make opt validation a FSDriver callback.

Signed-off-by: Aneesh Kumar K.V <>

10925bf0 01/04/2012 04:21 pm M. Mohan Kumar

hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

Move p9 marshaling/unmarshaling code to a separate file so that
proxy filesytem driver can use these calls. Also made marshaling
code generic to accept "struct iovec" instead of V9fsPDU.

Signed-off-by: M. Mohan Kumar <>...

2f008a8c 12/21/2011 09:07 am Aneesh Kumar K.V

hw/9pfs: Use the correct signed type for different variables

Signed-off-by: Aneesh Kumar K.V <>

e4027caf 12/21/2011 09:07 am Aneesh Kumar K.V

hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values.

Kernel internal values can change, add protocol values for these constant and
use them.

Signed-off-by: Aneesh Kumar K.V <>

302a0d3e 12/21/2011 09:07 am Stefan Hajnoczi

hw/9pfs: replace iovec manipulation with QEMUIOVector

The v9fs_read() and v9fs_write() functions rely on iovec[] manipulation
code should be replaced with QEMUIOVector to avoid duplicating code.
In the future it may be possible to make the code even more concise by...

3a93113a 12/06/2011 11:56 am Dong Xu Wang

fix typo: delete redundant semicolon

Double semicolons should be single.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

66a0a2cb 12/06/2011 11:56 am Dong Xu Wang

fix spelling in hw sub directory

Correct obvious spelling errors in qemu/hw directory.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

e9a0152b 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: use migration blockers to prevent live migration when virtfs export path is mounted

Now when you try to migrate with VirtFS export path mounted, you get a proper QMP error:

(qemu) migrate tcp:localhost:4444
Migration is disabled when VirtFS export path '/tmp/' is mounted in the guest using mount_tag 'v_tmp'...

b41e2992 12/04/2011 07:05 pm Deepak C Shetty

hw/9pfs: Reset server state during TVERSION

As per the 9p rfc, during TVERSION its necessary to clean all the active
fids, so that we start the session from a clean state. Its also needed in
scenarios where the guest is booting off 9p, and boot fails, and client...

8798d6c9 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: Add qdev.reset callback for virtio-9p-pci device

Add the device reset callback

Signed-off-by: Aneesh Kumar K.V <>

8b888272 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: Use the correct file descriptor in Fsdriver Callback

Fsdriver callback that operate on file descriptor need to
differentiate between directory fd and file fd.

Based on the original patch from Sassan Panahinejad <>

Signed-off-by: Aneesh Kumar K.V <>

77eec1b3 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: Improve portability to older systems

handle fs driver require a set of newly added syscalls. Don't
Compile handle FS driver if those syscalls are not available.
Instead of adding #ifdef for all those syscalls we check for
open by handle syscall. If that is available then rest of the...

2507718b 11/29/2011 12:19 am Aneesh Kumar K.V

9pfs: improve portability to older systems

I guess we can also make sure we don't call local_ioc_getversion at
all.

Reported-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

ae0f940e 11/28/2011 07:36 pm Paolo Bonzini

9pfs: improve portability to older systems

Small requirements on "new" features have percolated to virtio-9p-local.c.
In particular, the utimensat wrapper actually only supports dirfd = AT_FDCWD
and flags = AT_SYMLINK_NOFOLLOW in the fallback code. Remove the arguments...

930b5883 11/21/2011 10:58 pm Paolo Bonzini

9p: pass dotl flags to the unlinkat method

AT_REMOVEDIR is not defined on all systems. Pass the raw flags from the
9p protocol, which are always there.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

f5654039 11/21/2011 10:58 pm Paolo Bonzini

9p: allow compiling the dummy virtio-9p-handle.c code on Linux

Avoid a conflict on the definition of struct file_handle by
using a replacement name.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

4f26f2b6 11/09/2011 08:06 pm Avi Kivity

configure: fix detection for xattr.h on modern distributions

Modern distributions place xattr.h in /usr/include/sys, and fold
libattr.so into libc. They also don't have an ENOATTR.

Make configure detect this, and add a qemu-xattr.h file that
directs the #include to the right place....

779b5b04 11/02/2011 09:27 am Stefan Hajnoczi

hw/9pfs: use g_vasprintf() instead of rolling our own

Markus Armbruster <> sent fixes for va_list vararg
issues in v9fs_string_alloc_printf(). It turns out the function
duplicates g_vasprintf() and can therefore be eliminated entirely.
...

9db221ae 10/31/2011 09:04 am Aneesh Kumar K.V

hw/9pfs: Add synthetic file system support using 9p

This patch create a synthetic file system with mount tag
v_synth when -virtfs_synth command line option is specified
in qemu. The synthetic file system can be mounted in guest
using 9p using the below command line...

2583e443 10/31/2011 09:04 am Harsh Prateek Bora

hw/9pfs: Replace rwlocks with RCU variants of interfaces.

Use QLIST_INSERT_HEAD_RCU and rcu_read_lock/unlock instead of rwlocks.
Use v9fs_synth_mutex as a write-only mutex to handle concurrent writers.

Signed-off-by: Harsh Prateek Bora <>...

2c74c2cb 10/31/2011 09:04 am M. Mohan Kumar

hw/9pfs: Read-only support for 9p export

A new fsdev parameter "readonly" is introduced to control accessing 9p export.
"readonly" can be used to specify the access type. By default "rw" access
is given to 9p export.

Signed-off-by: M. Mohan Kumar <>...

cc720ddb 10/31/2011 09:04 am Aneesh Kumar K.V

hw/9pfs: Abstract open state of fid to V9fsFidOpenState

To implement synthetic file system in Qemu we may not really
require file descriptor and Dir *. Make generic code use
V9fsFidOpenState instead.

Signed-off-by: Aneesh Kumar K.V <>

17b1971f 10/31/2011 09:04 am Aneesh Kumar K.V

hw/9pfs: Fix error handling in local_mknod

Update local_chown to remove unnecessary if loop

Signed-off-by: Aneesh Kumar K.V <>

7999f7e1 10/30/2011 11:05 am Aneesh Kumar K.V

hw/9pfs: Make VirtFS tracing work correctly

this patch fix multiple issues with VirtFS tracing.
a) Add tracepoint to the correct code path. We handle error in complete_pdu
b) Fix indentation in python script
c) Fix variable naming issue in python script
...

9844081b 10/15/2011 01:00 pm M. Mohan Kumar

hw/9pfs: Add open flag mapping

Some of the flags are OS/arch dependent we need to use
9P defined value on wire,

Based on the original patch from Venkateswararao Jujjuri <>

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

e06a765e 10/15/2011 01:00 pm Harsh Prateek Bora

hw/9pfs: Add st_gen support in getattr reply

This patch use file system specific ioctl for getting i_generation
value. Not all file system support the ioctl. So we add an export
specific extended operation and assign right callback for the
file system that support i_generation ioctl...

edb9eb73 10/15/2011 01:00 pm Harsh Prateek Bora

hw/9pfs: Add st_gen support for handle based fs driver

Signed-off-by: Harsh Prateek Bora <>
Signed-off-by: Aneesh Kumar K.V <>

c572f23a 10/15/2011 01:00 pm Harsh Prateek Bora

hw/9pfs: Introduce tracing for 9p pdu handlers

Plan is to replace the existing debug infrastructure with Qemu tracing
infrastructure so that user can dynamically enable/disable trace events and
therefore a meaningful trace log can be generated which can be further...

46604b39 10/15/2011 01:00 pm Harsh Prateek Bora

hw/9pfs: Remove virtio-9p-debug.* infra to be replaced by Qemu Tracing.

Removing the existing debug infrastrucure as proposed to be replaced by
Qemu Tracing infrastructure.

Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Harsh Prateek Bora <>...

7cca27df 10/15/2011 01:00 pm M. Mohan Kumar

hw/9pfs: Use fs driver specific lstat

Use file system driver specific lstat instead of generic lstat.

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

c98f1d4a 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Use export_flag for indicating whether fs driver use path names.

This allows us to remove another member from the struct

Signed-off-by: Aneesh Kumar K.V <>

fbcbf101 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS code

Signed-off-by: Aneesh Kumar K.V <>

b97400ca 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Use export flag for indicating security model

This helps to remove some of the structure members

Signed-off-by: Aneesh Kumar K.V <>

d2042378 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Fix build error on platform that don't support futimens

Also don't do glibc version check to find handle support. Instead
do handle syscall support in configure.

Signed-off-by: Aneesh Kumar K.V <>

ea60f315 10/15/2011 01:00 pm M. Mohan Kumar

virtio-9p: Use 9P specific Lock constants

Use 9P specific lock constants instead of arch specific lock constants.

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

a2f507d9 10/15/2011 01:00 pm Daniel P. Berrange

hw/9pfs: Ensure an error is reported to user if 9pfs mount tag is too long

If the 9pfs mount tag is longer than MAX_TAG_LEN bytes, rather than
silently truncating the tag which will likely break the guest OS,
report an immediate error and exit QEMU

  • hw/9pfs/virtio-9p-device.c: Report error & exit if mount tag is...
5745e38a 10/12/2011 04:41 pm Aneesh Kumar K.V

hw/9pfs: Use ioeventfd for 9p

With ioeventfd:
[root@qemu-img-64 storage]# dd if=/dev/zero of=/storage/testx bs=8k count=131072 oflag=direct
131072+0 records in
131072+0 records out
1073741824 bytes (1.1 GB) copied, 26.767 s, 40.1 MB/s

Without:
[root@qemu-img-64 storage]# dd if=/dev/zero of=/storage/testx bs=8k count=131072 oflag=direct...

d3ab98e6 10/12/2011 04:41 pm Aneesh Kumar K.V

hw/9pfs: Add new virtfs option writeout=immediate skip host page cache

writeout=immediate implies the after pwritev we do a sync_file_range.

Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Aneesh Kumar K.V <>

5f542225 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add handle based fs driver

Signed-off-by: Aneesh Kumar K.V <>

532decb7 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add fs driver specific details to fscontext

Add a new context flag PATHNAME_FSCONTEXT and indicate whether
the fs driver track fid using path names. Also add a private
pointer that help us to track fs driver specific values in there

Signed-off-by: Aneesh Kumar K.V <>

ce421a19 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Avoid unnecessary get_fid in v9fs_clunk

Signed-off-by: Aneesh Kumar K.V <>

bccacf6c 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Implement TFLUSH operation

Signed-off-by: Aneesh Kumar K.V <>