aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-01-04hw/9pfs: man page for proxy helperM. Mohan Kumar2-1/+70
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Documentation changes related to proxy fsM. Mohan Kumar1-9/+16
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Proxy getversionM. Mohan Kumar3-0/+119
Add proxy getversion to get generation number Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: xattr interfaces in proxy filesystem driverM. Mohan Kumar3-8/+219
Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: File ownership and othersM. Mohan Kumar4-13/+214
Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Add stat/readlink/statfs for proxy FSM. Mohan Kumar3-8/+414
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Create other filesystem objectsM. Mohan Kumar3-23/+313
Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Open and create filesM. Mohan Kumar3-9/+368
Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: File system helper process for qemu 9p proxy FSM. Mohan Kumar4-0/+331
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> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Add new proxy filesystem driverM. Mohan Kumar7-1/+426
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> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Add validation to {un}marshal codeM. Mohan Kumar3-194/+434
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Move pdu_marshal/unmarshal code to a seperate fileM. Mohan Kumar5-323/+401
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 <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Move opt validation to FsDriver callbackAneesh Kumar K.V7-61/+83
This remove all conditional code from common code path and make opt validation a FSDriver callback. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-03Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into stagingAnthony Liguori27-415/+703
* qemu-kvm/memory/page_desc: (22 commits) Remove cpu_get_physical_page_desc() sparc: avoid cpu_get_physical_page_desc() virtio-balloon: avoid cpu_get_physical_page_desc() vhost: avoid cpu_get_physical_page_desc() kvm: avoid cpu_get_physical_page_desc() memory: remove CPUPhysMemoryClient xen: convert to MemoryListener API memory: temporarily add memory_region_get_ram_addr() xen, vga: add API for registering the framebuffer vhost: convert to MemoryListener API kvm: convert to MemoryListener API kvm: switch kvm slots to use host virtual address instead of ram_addr_t memory: add API for observing updates to the physical memory map memory: replace cpu_physical_sync_dirty_bitmap() with a memory API framebuffer: drop use of cpu_physical_sync_dirty_bitmap() loader: remove calls to cpu_get_physical_page_desc() framebuffer: drop use of cpu_get_physical_page_desc() memory: introduce memory_region_find() memory: add memory_region_is_logging() memory: add memory_region_is_rom() ...
2012-01-03Remove cpu_get_physical_page_desc()Avi Kivity2-12/+0
No longer used. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-03sparc: avoid cpu_get_physical_page_desc()Avi Kivity1-1/+4
This reaches into the innards of the memory core, which are being changed. Switch to a memory API version. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-03virtio-balloon: avoid cpu_get_physical_page_desc()Avi Kivity1-4/+9
This reaches into the innards of the memory core, which are being changed. Switch to a memory API version. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-03vhost: avoid cpu_get_physical_page_desc()Avi Kivity2-8/+41
This reaches into the innards of the memory core, which are being changed. Switch to a memory API version. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-03kvm: avoid cpu_get_physical_page_desc()Avi Kivity1-17/+10
This reaches into the innards of the memory core, which are being changed. Switch to a memory API version. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-03memory: remove CPUPhysMemoryClientAvi Kivity5-208/+5
No longer used. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-03xen: convert to MemoryListener APIAvi Kivity2-59/+83
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-12-27Fix qapi code generation wrt parallel buildAvi Kivity4-18/+86
Make's multiple output syntax x.c x.h: x.template gen < x.template actually invokes the command once for x.c and once for x.h (with differing $@ in each invocation). During a parallel build, the two commands may be invoked in parallel; this opens up a race, where the second invocation trashes a file supposedly produced during the first, and now in use by a dependent command. The various qapi code generators are susceptible to this; fix by making them generate just one file per invocation. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-27Merge remote-tracking branch 'aneesh/for-upstream' into stagingAnthony Liguori5-143/+174
* aneesh/for-upstream: scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations. hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values. hw/9pfs: Use the correct signed type for different variables hw/9pfs: replace iovec manipulation with QEMUIOVector
2011-12-27Merge remote-tracking branch 'bonzini/nbd-for-anthony' into stagingAnthony Liguori19-530/+1087
* bonzini/nbd-for-anthony: (26 commits) nbd: add myself as maintainer qemu-nbd: throttle requests qemu-nbd: asynchronous operation qemu-nbd: add client pointer to NBDRequest qemu-nbd: move client handling to nbd.c qemu-nbd: use common main loop link the main loop and its dependencies into the tools qemu-nbd: introduce NBDRequest qemu-nbd: introduce NBDExport qemu-nbd: introduce nbd_do_receive_request qemu-nbd: more robust handling of invalid requests qemu-nbd: introduce nbd_do_send_reply qemu-nbd: simplify nbd_trip move corking functions to osdep.c qemu-nbd: remove data_size argument to nbd_trip qemu-nbd: remove offset argument to nbd_trip Update ioctl order in nbd_init() to detect EBUSY nbd: add support for NBD_CMD_TRIM nbd: add support for NBD_CMD_FLUSH nbd: add support for NBD_CMD_FLAG_FUA ...
2011-12-22enable architectural PMU cpuid leaf for kvmGleb Natapov1-4/+13
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-12-22Set numa topology for max_cpusVasilis Liaskovitis2-5/+5
qemu-kvm passes numa/SRAT topology information for smp_cpus to SeaBIOS. However SeaBIOS always expects to setup max_cpus number of SRAT cpu entries (MaxCountCPUs variable in build_srat function of Seabios). When qemu-kvm runs with smp_cpus != max_cpus (e.g. -smp 2,maxcpus=4), Seabios will mistakenly use memory SRAT info for setting up CPU SRAT entries for the offline CPUs. Wrong SRAT memory entries are also created. This breaks NUMA in a guest. Fix by setting up SRAT info for max_cpus in qemu-kvm. Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-12-22kvm: x86: Drop redundant apic base and tpr update from kvm_get_sregsJan Kiszka1-3/+2
The latter was already commented out, the former is redundant as well. We always get the latest changes after return from the guest via kvm_arch_post_run. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-12-22kvm: x86: Avoid runtime allocation of xsave bufferJan Kiszka2-9/+9
Keep a per-VCPU xsave buffer for kvm_put/get_xsave instead of continuously allocating and freeing it on state sync. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-12-22kvm: x86: Use symbols for all xsave fieldJan Kiszka1-6/+8
Field 0 (FCW+FSW) and 1 (FTW+FOP) were hard-coded so far. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-12-22nbd: add myself as maintainerPaolo Bonzini1-0/+7
Not planning to do much else, hence listing it as "Odd Fixes". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: throttle requestsPaolo Bonzini1-3/+22
Limiting the number of in-flight requests is implemented very simply with a can_read callback. It does not require a semaphore, unlike the client side in block/nbd.c, because we can throttle directly the creation of coroutines. The client side can have a coroutine created at any time when an I/O request is made. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: asynchronous operationPaolo Bonzini1-21/+53
Using coroutines enable asynchronous operation on both the network and the block side. Network can be owned by two coroutines at the same time, one writing and one reading. On the send side, mutual exclusion is guaranteed by a CoMutex. On the receive side, mutual exclusion is guaranteed because new coroutines immediately start receiving data, and no new coroutines are created as long as the previous one is receiving. Between receive and send, qemu-nbd can have an arbitrary number of in-flight block transfers. Throttling is implemented by the next patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: add client pointer to NBDRequestPaolo Bonzini1-21/+27
By attaching a client to an NBDRequest, we can avoid passing around the socket descriptor and data buffer. Also, we can now manage the reference count for the client in nbd_request_get/put request instead of having to do it ourselved in nbd_read. This simplifies things when coroutines are used. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: move client handling to nbd.cPaolo Bonzini3-15/+66
This patch sets up the fd handler in nbd.c instead of qemu-nbd.c. It introduces NBDClient, which wraps the arguments to nbd_trip in a single structure, so that we can add a notifier to it. This way, qemu-nbd can know about disconnections. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: use common main loopPaolo Bonzini1-67/+45
Using a single main loop for sockets will help yielding from the socket coroutine back to the main loop, and later reentering it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22link the main loop and its dependencies into the toolsPaolo Bonzini7-68/+80
Using the main loop code from QEMU enables tools to operate fully asynchronously. Advantages include better Windows portability (for some definition of portability) over glib's. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: introduce NBDRequestPaolo Bonzini1-14/+51
Move the buffer from NBDExport to a new structure, so that it will be possible to have multiple in-flight requests for the same export (and for the same client too---we get that for free). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: introduce NBDExportPaolo Bonzini3-29/+61
Wrap the common parameters of nbd_trip and nbd_negotiate in a single opaque struct. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: introduce nbd_do_receive_requestPaolo Bonzini1-21/+47
Group the receiving of a response and the associated data into a new function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: more robust handling of invalid requestsPaolo Bonzini1-27/+30
Fail invalid requests with EINVAL instead of dropping them into the void. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: introduce nbd_do_send_replyPaolo Bonzini1-14/+32
Group the sending of a reply and the associated data into a new function. Without corking, the caller would be forced to leave 12 free bytes at the beginning of the data pointer. Not too ugly, but still ugly. :) Using nbd_do_send_reply everywhere will help when the routine will set up the write handler that re-enters the send coroutine. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: simplify nbd_tripPaolo Bonzini1-17/+8
Use TCP_CORK to remove a violation of encapsulation, that would later require nbd_trip to know too much about an NBD reply. We could also switch to sendmsg (qemu_co_sendv) later, it is even easier once coroutines are in. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22move corking functions to osdep.cPaolo Bonzini3-18/+12
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: remove data_size argument to nbd_tripPaolo Bonzini3-7/+7
The size of the buffer is in practice part of the protocol. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22qemu-nbd: remove offset argument to nbd_tripPaolo Bonzini3-8/+5
The argument is write-only. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22Update ioctl order in nbd_init() to detect EBUSYChunyan Liu1-18/+9
Update ioctl(s) in nbd_init() to detect device busy early. Current nbd_init() issues NBD_CLEAR_SOCKET before NBD_SET_SOCKET, if issuing "qemu-nbd -c /dev/nbd0 disk.img" twice, the second time won't detect EBUSY in nbd_init(), but in nbd_client will report EBUSY and do clear socket (the 1st time command will be affacted too because of no socket any more.) No change to previous version. Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22nbd: add support for NBD_CMD_TRIMPaolo Bonzini2-2/+38
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22nbd: add support for NBD_CMD_FLUSHPaolo Bonzini2-9/+51
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22nbd: add support for NBD_CMD_FLAG_FUAPaolo Bonzini2-2/+15
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-12-22nbd: fix error handling in the serverPaolo Bonzini1-9/+12
bdrv_read and bdrv_write return negative errno values, not -1. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>