aboutsummaryrefslogtreecommitdiffstats
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-09-18pxa2xx: remove useless checksBlue Swirl1-1/+1
Remove checks which were made useless by r5849, 8da3ff180974732fc4272cb4433fef85c1822961. This also avoids a warning with GCC flag -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-18Use range_covers_byteBlue Swirl2-8/+11
Use range_covers_byte() instead of comparisons. This avoids some warnings with GCC flag -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-18Introduce range.hBlue Swirl6-31/+5
Extract range functions from pci.h. These will be used by later patches by non-PCI devices. Adjust current users. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-18Check for errors during BIOS or kernel loadBlue Swirl4-13/+18
Because of the use of unsigned types, possible errors during BIOS or kernel load were ignored. Fix by using a signed type. This also avoids some warnings with GCC flag -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-15serial: Update parameters after loadMichal Novotny1-0/+1
This is the patch to update serial port parameters after guest is already loaded. Signed-off-by: Michal Novotny <minovotn@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-14Remove wrong semicolon in macro definitionStefan Weil1-2/+2
Macros normally should not end with a semicolon, otherwise their usage results in two statements where only one statement was expected. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-13serial: Wrap debug prints around a DPRINTF macroMichal Novotny1-12/+13
Signed-off-by: Michal Novotny <minovotn@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-11ESP: fix ESP DMA access when DMA is not enabledBlue Swirl5-18/+88
Sending ESP a command caused it to trigger DMA immediately even if DMA was not enabled at the DMA controller. Add a signal from DMA controller to ESP to tell ESP about changes in DMA enable bit. Also use the correct function for setting up GPIO outputs. This fixes NetBSD 1.6.1 through 3.0 boot. Thanks to Artyom Tarasenko for extensive debugging of the problem. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10vmware_vga: Replace the few tab-indents with spaces (clean-up).Andrzej Zaborowski1-9/+9
Use 4 spaces instead of 2, too.
2010-09-10vmware_vga: Add checks to deal with non-atomic fifo writes.Andrzej Zaborowski1-8/+56
Janne Huttunen noticed that the FIFO end pointer is updated by the guest after writing each word to the FIFO, at least the X.org driver which is open does this. This means that there's no way for the host to know if the guest is in the middle a write operation. Qemu thus needs to read the beginning of the command up to when it's able to tell how many words are expected for the given command. It will abort reading and rewind the FIFO if there aren't enough words yet, this should be relatively rare but it is suspected to have been the cause of the occasional FIFO overrun that killed the display.
2010-09-10hw/omap: Fix default setup for OMAP UART devicesStefan Weil4-8/+19
Character devices created by qemu_chr_open don't allow duplicate device names, so naming all UART devices "null" no longer works. Running "qemu-system-arm -M n800" (and some other machines) results in this error message: qemu-system-arm: Duplicate ID 'null' for chardev Can't create serial device, empty char device This is fixed by setting a default label "uart1", "uart2" or "uart3". Cc: Andrzej Zaborowski <andrew.zaborowski@intel.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-09-09trace: Trace virtqueue operationsStefan Hajnoczi1-0/+8
This patch adds trace events for virtqueue operations including adding/removing buffers, notifying the guest, and receiving a notify from the guest. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace virtio-blk, multiwrite, and paio_submitStefan Hajnoczi1-0/+7
This patch adds trace events that make it possible to observe virtio-blk. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09elf: Calculate symbol size if neededStefan Weil1-0/+5
Symbols with a size of 0 are unusable for the disassembler. Example: While running an arm linux kernel, no symbolic names are used in qemu.log when the cpu is executing an assembler function. Assume that the size of such symbols is the difference to the next symbol value. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-08Revert "PPC: Qdev'ify e500 pci"Anthony Liguori1-73/+33
This reverts commit 13b7fdeffa68e3382231a70308593ae6a75d96c3. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-09-08Revert "PPC: Make e500 pci byte swap config data"Anthony Liguori1-1/+1
This reverts commit cfb207e643d94e3e96d456b1df14c5e36f6aa9e5. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-09-08Merge remote branch 'agraf/ppc-next' into stagingAnthony Liguori2-33/+84
2010-09-08Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori7-44/+158
2010-09-08Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori9-32/+175
2010-09-08virtio-9p: Change handling of flags in open() path for 9P2000.LSripathi Kodi1-13/+1
This patch applies on top of 9P2000.L patches that we have on the list. I took a look at how 9P server is handling open() flags in 9P2000.L path. I think we can do away with the valid_flags() function and simplify the code. The reasoning is as follows: O_NOCTTY: (If the file is a terminal, don't make it the controlling terminal of the process even though the process does not have a controlling terminal) By the time the control reaches 9P client it is clear that what we have is not a terminal device. Hence it does not matter what we do with this flag. In any case 9P server can filter this flag out before making the syscall. O_NONBLOCK: (Don't block if i) Can't read/write to the file ii) Can't get locks) This has an impact on FIFOs, but also on file locks. Hence we can pass it down to the system call. O_ASYNC: From the manpage: O_ASYNC Enable signal-driven I/O: generate a signal (SIGIO by default, but this can be changed via fcntl(2)) when input or output becomes pos- sible on this file descriptor. This feature is only available for terminals, pseudo-terminals, sockets, and (since Linux 2.6) pipes and FIFOs. See fcntl(2) for further details. Again, this does not make any impact on regular files handled by 9P. Also, we don't want 9P server to receive SIGIO. Hence I think 9P server can filter this flag out before making the syscall. O_CLOEXEC: This flag makes sense only on the client. If guest user space sets this flag the guest VFS will take care of calling close() on the fd if an exec() happens. Hence 9P client need not be bothered with this flag. Also I think QEMU will not do an exec, but if it does, it makes sense to close these fds. Hence we can pass this flag down to the syscall. O_CREAT: Since we are in open() path it means we have confirmed that the file exists. Hence there is no need to pass O_CREAT flag down to the system. In fact on some versions of glibc this causes problems, because we pass O_CREAT flag, but don't have permission bits. Hence we can just mask this flag out. So in summary: Mask out: O_NOCTTY O_ASYNC O_CREAT Pass-through: O_NONBLOCK O_CLOEXEC Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server.Arun R Bharadwaj2-6/+15
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] Remove all instances of unnecessary dotu variable.Arun R Bharadwaj3-82/+62
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08virtio-9p: Add support for removing xattrAneesh Kumar K.V3-5/+38
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Fix the memset usageAneesh Kumar K.V1-2/+1
The arguments are wrong. Use qemu_mallocz directly Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Use lchown which won't follow symlinkAneesh Kumar K.V1-1/+1
We should always use functions which don't follow symlink on the server Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Add SM_NONE security modelAneesh Kumar K.V3-15/+52
This is equivalent to SM_PASSTHROUGH security model. The only exception is, failure of privilige operation like chown are ignored. This makes a passthrough like security model usable for people who runs kvm as non root Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Hide user.virtfs xattr in case of mapped security.Aneesh Kumar K.V1-1/+70
With mapped security mode we use "user.virtfs" namespace is used to store the virtFs related attributes. So hide it from user. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Implement TXATTRCREATEAneesh Kumar K.V5-7/+152
TXATTRCREATE: Prepare a fid for setting xattr value on a file system object. size[4] TXATTRCREATE tag[2] fid[4] name[s] attr_size[8] flags[4] size[4] RXATTRWALK tag[2] txattrcreate gets a fid pointing to xattr. This fid can later be used to get set the xattr value. flag value is derived from set Linux setxattr. The manpage says "The flags parameter can be used to refine the semantics of the operation. XATTR_CREATE specifies a pure create, which fails if the named attribute exists already. XATTR_REPLACE specifies a pure replace operation, which fails if the named attribute does not already exist. By default (no flags), the extended attribute will be created if need be, or will simply replace the value if the attribute exists." The actual setxattr operation happens when the fid is clunked. At that point the written byte count and the attr_size specified in TXATTRCREATE should be same otherwise an error will be returned. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Implement TXATTRWALKAneesh Kumar K.V5-2/+231
TXATTRWALK: Descend a ATTR namespace size[4] TXATTRWALK tag[2] fid[4] newfid[4] name[s] size[4] RXATTRWALK tag[2] size[8] txattrwalk gets a fid pointing to xattr. This fid can later be used to get read the xattr value. If name is NULL the fid returned can be used to get the list of extended attribute associated to the file system object. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Add fidtype so that we can do type specific operationAneesh Kumar K.V2-56/+78
We want to add type specific operation during read/write Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08[virtio-9p] qemu: virtio-9p: Implement LOPENM. Mohan Kumar2-5/+31
Implement 9p2000.L version of open(LOPEN) interface in qemu 9p server. For LOPEN, no need to convert the flags to and from 9p mode to VFS mode. Synopsis: size[4] Tlopen tag[2] fid[4] mode[4] size[4] Rlopen tag[2] qid[13] iounit[4] Current qemu 9p server does not support following flags: O_NOCTTY, O_NONBLOCK, O_ASYNC & O_CLOEXEC [Fix mode format - jvrao@linux.vnet.ibm.com] Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08rename - change name of file or directoryM. Mohan Kumar2-44/+123
size[4] Trename tag[2] fid[4] newdirfid[4] name[s] size[4] Rrename tag[2] Implement the 2000.L rename operation. A new function v9fs_complete_rename is introduced that acts as a common entry point for 2000.L rename operation and 2000.U rename opearation (via wstat). As part of this change the field 'nname' (used only for rename) is removed from the structure V9fsWstatState. Instead a new structure V9fsRenameState is used for rename operations both by 2000.U and 2000.L code paths. Both 2000.U and 2000.L rename code paths construct the V9fsRenameState structure and passes that to v9fs_complete_rename function. Changes from previous version: Use qemu_mallocz to initialize Use strcpy,strcat functions instead of memcpy Changed the variable name to newdirfid Introduced post rename function Error checking Removed nname field from V9fsWstatState Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08qemu: virtio-9p: Implement TMKDIRM. Mohan Kumar3-5/+91
Synopsis size[4] Tmkdir tag[2] fid[4] name[s] mode[4] gid[4] size[4] Rmkdir tag[2] qid[13] Description mkdir asks the file server to create a directory with given name, mode and gid. The qid for the new directory is returned with the mkdir reply message. Note: 72 is selected as the opcode for TMKDIR from the reserved list. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> [jvrao@linux.vnet.ibm.com: Fix perm handling when creating directory] Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08qemu: virtio-9p: Implement TMKNODM. Mohan Kumar3-7/+107
Implement TMKNOD as part of 2000.L Work Synopsis size[4] Tmknod tag[2] fid[4] name[s] mode[4] major[4] minor[4] gid[4] size[4] Rmknod tag[2] qid[13] Description mknod asks the file server to create a device node with given device type, mode and gid. The qid for the new device node is returned with the mknod reply message. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] This patch implements TLCREATE for 9p2000.L protocol.Venkateswararao Jujjuri (JV)3-7/+119
SYNOPSIS size[4] Tlcreate tag[2] fid[4] name[s] flags[4] mode[4] gid[4] size[4] Rlcreate tag[2] qid[13] iounit[4] DESCRIPTION The Tlreate request asks the file server to create a new regular file with the name supplied, in the directory (dir) represented by fid. The mode argument specifies the permissions to use. New file is created with the uid if the fid and with supplied gid. The flags argument represent Linux access mode flags with which the caller is requesting to open the file with. Protocol allows all the Linux access modes but it is upto the server to allow/disallow any of these acess modes. If the server doesn't support any of the access mode, it is expected to return error. To start with we will not restricit/limit any Linux flags on this server. If needed, We can start restricting as we move forward with various use cases. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] Define and implement TSYMLINK for 9P2000.LVenkateswararao Jujjuri (JV)3-6/+97
This patch implements creating a symlink for TSYMLINK request and responds with RSYMLINK. In the case of error, we return RERROR. SYNOPSIS size[4] Tsymlink tag[2] fid[4] name[s] symtgt[s] gid[4] size[4] Rsymlink tag[2] qid[13] DESCRIPTION Create a symbolic link named 'name' pointing to 'symtgt'. gid represents the effective group id of the caller. The permissions of a symbolic link are irrelevant hence it is omitted from the protocol. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] Implement TLINK for 9P2000.LVenkateswararao Jujjuri (JV)3-0/+49
Create a Hardlink. SYNOPSIS size[4] Tlink tag[2] dfid[4] oldfid[4] newpath[s] size[4] Rlink tag[2] DESCRIPTION Create a link 'newpath' in directory pointed by dfid linking to oldfid path. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08virtio-9p: Implement server side of setattr for 9P2000.L protocol.Sripathi Kodi3-1/+182
SYNOPSIS size[4] Tsetattr tag[2] attr[n] size[4] Rsetattr tag[2] DESCRIPTION The setattr command changes some of the file status information. attr resembles the iattr structure used in Linux kernel. It specifies which status parameter is to be changed and to what value. It is laid out as follows: valid[4] specifies which status information is to be changed. Possible values are: ATTR_MODE (1 << 0) ATTR_UID (1 << 1) ATTR_GID (1 << 2) ATTR_SIZE (1 << 3) ATTR_ATIME (1 << 4) ATTR_MTIME (1 << 5) ATTR_CTIME (1 << 5) ATTR_ATIME_SET (1 << 7) ATTR_MTIME_SET (1 << 8) The last two bits represent whether the time information is being sent by the client's user space. In the absense of these bits the server always uses server's time. mode[4] File permission bits uid[4] Owner id of file gid[4] Group id of the file size[8] File size atime_sec[8] Time of last file access, seconds atime_nsec[8] Time of last file access, nanoseconds mtime_sec[8] Time of last file modification, seconds mtime_nsec[8] Time of last file modification, nanoseconds Explanation of the patches: -------------------------- *) The kernel just copies relevent contents of iattr structure to p9_iattr_dotl structure and passes it down to the client. The only check it has is calling inode_change_ok() *) The p9_iattr_dotl structure does not have ctime and ia_file parameters because I don't think these are needed in our case. The client user space can request updating just ctime by calling chown(fd, -1, -1). This is handled on server side without a need for putting ctime on the wire. *) The server currently supports changing mode, time, ownership and size of the file. *) 9P RFC says "Either all the changes in wstat request happen, or none of them does: if the request succeeds, all changes were made; if it fails, none were." I have not done anything to implement this specifically because I don't see a reason. [jvrao@linux.vnet.ibm.com: Parts of code for handling chown(-1,-1) Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] Make v9fs_do_utimensat accept timespec structures instead of v9stat.Sripathi Kodi1-19/+18
Currently v9fs_do_utimensat takes a V9fsStat argument and builds timespec structures. It sets tv_nsec values to 0 by default. Instead of this it should take struct timespec[2] and pass it down to the system directly. This will make it more generic and useful elsewhere. Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08virtio-9p: Do not reset atimeM. Mohan Kumar3-13/+25
Current code resets file's atime to 0 when there is a change in mtime. This results in resetting the atime to "1970-01-01 05:30:00". For example, truncate -s 0 filename results in changing the mtime to the truncate time, but resets the atime to "1970-01-01 05:30:00". utime system call does not have any provision to set only mtime or atime. So change v9fs_wstat_post_chmod function to use utimensat function to change the atime and mtime fields. If tv_nsec field is set to the special value "UTIME_OMIT", corresponding file time stamp is not updated. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08virtio-9p: getattr server implementation for 9P2000.L protocol.Sripathi Kodi3-0/+177
SYNOPSIS size[4] Tgetattr tag[2] fid[4] request_mask[8] size[4] Rgetattr tag[2] lstat[n] DESCRIPTION The getattr transaction inquires about the file identified by fid. request_mask is a bit mask that specifies which fields of the stat structure is the client interested in. The reply will contain a machine-independent directory entry, laid out as follows: st_result_mask[8] Bit mask that indicates which fields in the stat structure have been populated by the server qid.type[1] the type of the file (directory, etc.), represented as a bit vector corresponding to the high 8 bits of the file's mode word. qid.vers[4] version number for given path qid.path[8] the file server's unique identification for the file st_mode[4] Permission and flags st_uid[4] User id of owner st_gid[4] Group ID of owner st_nlink[8] Number of hard links st_rdev[8] Device ID (if special file) st_size[8] Size, in bytes st_blksize[8] Block size for file system IO st_blocks[8] Number of file system blocks allocated st_atime_sec[8] Time of last access, seconds st_atime_nsec[8] Time of last access, nanoseconds st_mtime_sec[8] Time of last modification, seconds st_mtime_nsec[8] Time of last modification, nanoseconds st_ctime_sec[8] Time of last status change, seconds st_ctime_nsec[8] Time of last status change, nanoseconds st_btime_sec[8] Time of creation (birth) of file, seconds st_btime_nsec[8] Time of creation (birth) of file, nanoseconds st_gen[8] Inode generation st_data_version[8] Data version number request_mask and result_mask bit masks contain the following bits #define P9_STATS_MODE 0x00000001ULL #define P9_STATS_NLINK 0x00000002ULL #define P9_STATS_UID 0x00000004ULL #define P9_STATS_GID 0x00000008ULL #define P9_STATS_RDEV 0x00000010ULL #define P9_STATS_ATIME 0x00000020ULL #define P9_STATS_MTIME 0x00000040ULL #define P9_STATS_CTIME 0x00000080ULL #define P9_STATS_INO 0x00000100ULL #define P9_STATS_SIZE 0x00000200ULL #define P9_STATS_BLOCKS 0x00000400ULL #define P9_STATS_BTIME 0x00000800ULL #define P9_STATS_GEN 0x00001000ULL #define P9_STATS_DATA_VERSION 0x00002000ULL #define P9_STATS_BASIC 0x000007ffULL #define P9_STATS_ALL 0x00003fffULL This patch implements the client side of getattr implementation for 9P2000.L. It introduces a new structure p9_stat_dotl for getting Linux stat information along with QID. The data layout is similar to stat structure in Linux user space with the following major differences: inode (st_ino) is not part of data. Instead qid is. device (st_dev) is not part of data because this doesn't make sense on the client. All time variables are 64 bit wide on the wire. The kernel seems to use 32 bit variables for these variables. However, some of the architectures have used 64 bit variables and glibc exposes 64 bit variables to user space on some architectures. Hence to be on the safer side we have made these 64 bit in the protocol. Refer to the comments in include/asm-generic/stat.h There are some additional fields: st_btime_sec, st_btime_nsec, st_gen, st_data_version apart from the bitmask, st_result_mask. The bit mask is filled by the server to indicate which stat fields have been populated by the server. Currently there is no clean way for the server to obtain these additional fields, so it sends back just the basic fields. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
2010-09-08virtio-9p: Compute iounit based on host filesystem block sizeM. Mohan Kumar2-19/+86
Compute iounit based on the host filesystem block size and pass it to client with open/create response. Also return iounit as statfs's f_bsize for optimal block size transfers. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewd-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[V4] virtio-9p: readdir implementation for 9p2000.LSripathi Kodi3-0/+137
This patch implements the server part of readdir() implementation for 9p2000.L SYNOPSIS size[4] Treaddir tag[2] fid[4] offset[8] count[4] size[4] Rreaddir tag[2] count[4] data[count] DESCRIPTION The readdir request asks the server to read the directory specified by 'fid' at an offset specified by 'offset' and return as many dirent structures as possible that fit into count bytes. Each dirent structure is laid out as follows. qid.type[1] the type of the file (directory, etc.), represented as a bit vector corresponding to the high 8 bits of the file's mode word. qid.vers[4] version number for given path qid.path[8] the file server's unique identification for the file offset[8] offset into the next dirent. type[1] type of this directory entry. name[256] name of this directory entry. Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08virtio-9p: Return correct error from v9fs_removeSripathi Kodi1-5/+6
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> In v9fs_remove_post_remove() we currently ignore the error returned by the previous call to remove() and return an error only if freeing the fid fails. However, the client expects to see the error from remove(). Currently the client falsely thinks that the remove call has always succeeded. For example, doing rmdir on a non-empty directory does not return ENOTEMPTY. With this patch we ignore the error from free_fid(). The client cannot use this error value anyway. Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08qemu: virtio-9p: Implement statfs support in serverM. Mohan Kumar4-0/+94
Implement statfs support in qemu server based on Sripathi's initial statfs patch. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08qemu: virtio-9p: Recognize 9P2000.L protocolM. Mohan Kumar2-1/+11
Make 9P server recognize 9P2000.L protocol version Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08scsi-disk: add some optional scsi commandsBernhard Kohl1-1/+35
I use a legacy OS which depends on some optional SCSI commands. In fact this implementation does nothing special, but provides minimum support for the following commands: REZERO UNIT WRITE AND VERIFY(10) WRITE AND VERIFY(12) WRITE AND VERIFY(16) MODE SELECT(6) MODE SELECT(10) SEEK(6) SEEK(10) Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-09-08Improve ATA IDENTIFY word 64 contents.Jonathan A. Kollasch1-2/+2
Fill in word 64 of IDENTIFY data to indicate support for PIO modes 3 and 4. This allows NetBSD guests to use UltraDMA modes instead of just PIO mode 0. Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-09-08scsi: fix and improve debug printsBernhard Kohl3-10/+20
Some of them are not compile clean. Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-09-08scsi-disk: fix the check of the DBD bit in the MODE SENSE commandBernhard Kohl1-1/+1
The DBD bit does not work as expected. SCSI-Spec: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.2.10 "A disable block descriptors (DBD) bit of zero indicates that the target may return zero or more block descriptors in the returned MODE SENSE data (see 8.3.3), at the target's discretion. A DBD bit of one specifies that the target shall not return any block descriptors in the returned MODE SENSE data." Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>