summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* hw/9pfs: Use export_flag for indicating whether fs driver use path names.Aneesh Kumar K.V2011-10-156-14/+10
| | | | | | This allows us to remove another member from the struct Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Use fs driver specific lstatM. Mohan Kumar2011-10-151-10/+23
| | | | | | | Use file system driver specific lstat instead of generic lstat. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* scripts: Simpletrace log analysis script for pretty-printing 9p log.Harsh Prateek Bora2011-10-151-0/+142
| | | | | | | | | | | | | | | | | | | | This python script allows to pretty print 9p simpletrace logs and can be further enhanced to filter 9p logs based on command line arguments. Sample output: TGETATTR (tag = 1 , fid = 0 , request_mask = 0x7ff ) RGETATTR (tag = 1 , result_mask = 0x7ff , mode = 040777 , uid = 500 , gid = 500 ) TXATTRWALK (tag = 1 , fid = 0 , newfid = 1 , xattr name = 36832096 ) RXATTRWALK (tag = 1 , xattrsize = 18446744073709551555 ) TXATTRWALK (tag = 1 , fid = 0 , newfid = 1 , xattr name = 36744768 ) RXATTRWALK (tag = 1 , xattrsize = 18446744073709551555 ) TGETATTR (tag = 1 , fid = 1 , request_mask = 0x3fff ) RGETATTR (tag = 1 , result_mask = 0x17ff , mode = 040777 , uid = 500 , gid = 500 ) TWALK (tag = 1 , fid = 1 , newfid = 2 , nwnames = 1 ) RWALK (tag = 1 , nwnames = 1 , qids = 0x230aea0 ) Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Remove virtio-9p-debug.* infra to be replaced by Qemu Tracing.Harsh Prateek Bora2011-10-154-661/+1
| | | | | | | | | Removing the existing debug infrastrucure as proposed to be replaced by Qemu Tracing infrastructure. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Introduce tracing for 9p pdu handlersHarsh Prateek Bora2011-10-152-0/+118
| | | | | | | | | | | | | | | | | 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 filtered using an analysis script. Note: Because of current simpletrace limitations, the trace events are logging at max 6 args, however, once the more args are supported, we can change trace events to log more info as well. Also, This initial patch only provides a replacement for existing debug infra. More trace events to be added later for newly added handlers and sub-routines. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add st_gen support for handle based fs driverHarsh Prateek Bora2011-10-151-0/+51
| | | | | Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add st_gen support in getattr replyHarsh Prateek Bora2011-10-157-1/+116
| | | | | | | | | | | | | 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 ["M. Mohan Kumar" <mohan@in.ibm.com> we can do ioctl only for regular files and directories on the server] Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add open flag mappingM. Mohan Kumar2011-10-152-1/+76
| | | | | | | | | | 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 <jvrao@linux.vnet.ibm.com> Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Ensure an error is reported to user if 9pfs mount tag is too longDaniel P. Berrange2011-10-151-1/+3
| | | | | | | | | | | | 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 too long Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* virtio-9p: Use 9P specific Lock constantsM. Mohan Kumar2011-10-152-1/+6
| | | | | | | Use 9P specific lock constants instead of arch specific lock constants. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Fix build error on platform that don't support futimensAneesh Kumar K.V2011-10-152-28/+40
| | | | | | | 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 <aneesh.kumar@linux.vnet.ibm.com>
* qemu-options.hx: Update virtfs command documentationAneesh Kumar K.V2011-10-151-50/+69
| | | | | | | Clarify the virtfs option better Updates from:Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add new virtfs option writeout=immediate skip host page cacheAneesh Kumar K.V2011-10-1210-17/+91
| | | | | | | writeout=immediate implies the after pwritev we do a sync_file_range. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Use ioeventfd for 9pAneesh Kumar K.V2011-10-123-5/+7
| | | | | | | | | | | | | | | | | 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 131072+0 records in 131072+0 records out 1073741824 bytes (1.1 GB) copied, 65.3361 s, 16.4 MB/s Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2011-10-1034-452/+959
|\
| * qapi: Convert system_powerdownLuiz Capitulino2011-10-045-2/+26
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert system_resetLuiz Capitulino2011-10-047-16/+21
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert stopLuiz Capitulino2011-10-047-15/+25
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert quitLuiz Capitulino2011-10-047-17/+26
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-commandsLuiz Capitulino2011-10-043-25/+44
| | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-chardevLuiz Capitulino2011-10-046-34/+58
| | | | | | | | | | | | | | Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-uuidLuiz Capitulino2011-10-046-27/+55
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-statusLuiz Capitulino2011-10-047-79/+106
| | | | | | | | | | | | | | | | | | Please, note that the RunState type as defined in sysemu.h and its runstate_as_string() function are being dropped in favor of the RunState type generated by the QAPI. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * RunState: Rename enum values as generated by the QAPILuiz Capitulino2011-10-0411-101/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Next commit will convert the query-status command to use the RunState type as generated by the QAPI. In order to "transparently" replace the current enum by the QAPI one, we have to make some changes to some enum values. As the changes are simple renames, I'll do them in one shot. The changes are: - Rename the prefix from RSTATE_ to RUN_STATE_ - RUN_STATE_SAVEVM to RUN_STATE_SAVE_VM - RUN_STATE_IN_MIGRATE to RUN_STATE_INMIGRATE - RUN_STATE_PANICKED to RUN_STATE_INTERNAL_ERROR - RUN_STATE_POST_MIGRATE to RUN_STATE_POSTMIGRATE - RUN_STATE_PRE_LAUNCH to RUN_STATE_PRELAUNCH - RUN_STATE_PRE_MIGRATE to RUN_STATE_PREMIGRATE - RUN_STATE_RESTORE to RUN_STATE_RESTORE_VM - RUN_STATE_PRE_MIGRATE to RUN_STATE_FINISH_MIGRATE Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * RunState: Drop the RSTATE_NO_STATE valueLuiz Capitulino2011-10-042-13/+7
| | | | | | | | | | | | | | | | | | The QAPI framework won't generate it, so we need to get rid of it. In order to do that, this commit makes RSTATE_PRE_LAUNCH the initial state and change qemu_vmstop_requested() to use RSTATE_MAX. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * vl: Change qemu_vmstop_requested() to return a boolLuiz Capitulino2011-10-041-6/+10
| | | | | | | | | | | | | | | | The stop reason is returned in the RunState argument. This is a preparation for a future commit which will convert the query-status command to the QAPI. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-kvmLuiz Capitulino2011-10-046-35/+62
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-versionLuiz Capitulino2011-10-046-43/+76
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: convert query-nameAnthony Liguori2011-10-047-28/+108
| | | | | | | | | | | | | | | | A simple example conversion 'info name'. This also adds the new files for QMP and HMP. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Automatically generate a _MAX value for enumsLuiz Capitulino2011-10-041-1/+4
| | | | | | | | | | | | | | It's the last value in the enum and is very useful for the C implementation. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Don't use c_var() on enum stringsLuiz Capitulino2011-10-041-1/+1
| | | | | | | | | | | | | | | | | | Otherwise if we have something like 'foo-bar' in the schema, it will be generated as 'foo_bar' in the string lookup table. c_var() is good for C variables, but not for enum strings. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: modify visitor code generation for list iterationMichael Roth2011-10-044-16/+60
| | | | | | | | | | | | | | | | | | | | | | | | Modify logic such that we never assign values to the list head argument to progress through the list on subsequent iterations, instead rely only on having our return value passed back in as an argument on the next call. Also update QMP I/O visitors and test cases accordingly, and add a missing test case for QmpOutputVisitor. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: dealloc visitor, support freeing of nested listsMichael Roth2011-10-041-7/+21
| | | | | | | | | | | | | | | | | | | | Previously our logic for keeping track of when we're visiting the head of a list was done via a global bool. This can be overwritten if dealing with nested lists, so use stack entries to track this instead. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: add test cases for generated free functionsMichael Roth2011-10-041-0/+29
| | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: generate qapi_free_* functions for *List typesMichael Roth2011-10-041-0/+2
| | | | | | | | | | | | Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: dealloc visitor, fix premature free and iteration logicMichael Roth2011-10-041-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we do 3 things wrong: 1) The list iterator, in practice, is used in a manner where the pointer we pass in is the same as the pointer we assign the output to from visit_next_list(). This causes an infinite loop where we keep freeing the same structures. 2) We attempt to free list->value rather than list. visit_type_<type> handles this. We should only be concerned with the containing list. 3) We free prematurely: iterator function will continue accessing values we've already freed. This patch should fix all of these issues. QmpOutputVisitor also suffers from 1). Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: fixup command generation for functions that return list typesAnthony Liguori2011-10-041-8/+15
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: use middle mode in QMP serverAnthony Liguori2011-10-045-8/+24
| | | | | | | | | | | | | | Use the new middle mode within the existing QMP server. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: add code generation support for middle modeAnthony Liguori2011-10-044-15/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get the ball rolling merging QAPI, this patch introduces a "middle mode" to the code generator. In middle mode, the code generator generates marshalling functions that are compatible with the current QMP server. We absolutely need to replace the current QMP server in order to support proper asynchronous commands but using a middle mode provides a middle-ground that lets us start converting commands in tree. Note that all of the commands have been converted already in my glib branch. Middle mode only exists until we finish merging them from my branch into the main tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qerror: add qerror_report_err()Anthony Liguori2011-10-042-0/+35
| | | | | | | | | | | | | | | | | | | | | | This provides a bridge between Error (new error mechanism) and QError (old error mechanism). Errors can be propagated whereas QError cannot. The minor evilness avoids layering violations. Since QError should go away RSN, it seems like a reasonable hack. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * error: let error_is_type take a NULL errorAnthony Liguori2011-10-041-0/+4
| | | | | | | | | | | | Reported-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-10-106-17/+16
|\ \
| * | linux-user: Remove unused codeStefan Weil2011-10-051-4/+1
| | | | | | | | | | | | | | | | | | | | | The code is unused since 8 years, so remove it. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | Fix mismatching allocation and deallocationStefan Weil2011-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | This error was reported by cppcheck. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | target-arm: Fix typoAndreas Färber2011-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The command line option is called -kernel, not -kenrel. Cc: Paul Brook <paul@codesourcery.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | lsi: Fix tag reference in debug printJan Kiszka2011-10-051-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | gt64xxx.c: remove reference to non-existing ISD_handle fieldAntony Pavlov2011-10-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The commit fc2bf44972349b078d8310466c3866615500e67f removed ISD_handle field from struct GT64120State, so remove the field from DPRINTF too. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | gt64xxx.c: fix length modifier in DPRINTF format stringAntony Pavlov2011-10-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit fc2bf44972349b078d8310466c3866615500e67f changed the type of val argument of the function gt64120_writel() from uint32_t to uint64_t, so we need to change the corresponding length modifier from "%x" to "%" PRIx64. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | makefile: extract tools-obj-yPaolo Bonzini2011-10-051-4/+5
| |/ | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'qemu-kvm-tmp/uq/master' into stagingAnthony Liguori2011-10-103-1/+18
|\ \
OpenPOWER on IntegriCloud