summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Register Linux dyntick timer as per-thread signalJan Kiszka2011-07-233-0/+20
| | | | | | | | | | | | | | | | | | Derived from kvm-tool patch http://thread.gmane.org/gmane.comp.emulators.kvm.devel/74309 Ingo Molnar pointed out that sending the timer signal to the whole process, just blocking it everywhere, is suboptimal with an increasing number of threads. QEMU is also using this pattern so far. Linux provides a (non-portable) way to restrict the signal to a single thread: We can use SIGEV_THREAD_ID unless we are forced to emulate signalfd via an additional thread. That case could theoretically be optimized as well, but it doesn't look worth bothering. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* mc146818rtc: Handle host clock resetsJan Kiszka2011-07-231-0/+20
| | | | | | | | | Make use of the new clock reset notifier to update the RTC whenever rtc_clock is the host clock and that happens to jump backward. This avoids that the RTC stalls for the period the host clock was set back. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-timer: Introduce clock reset notifierJan Kiszka2011-07-232-1/+33
| | | | | | | | | | | | | | | QEMU_CLOCK_HOST is based on the system time which may jump backward in case the admin or NTP adjusts it. RTC emulations and other device models can suffer in this case as timers will stall for the period the clock was tuned back. This adds a detection mechanism that checks on every host clock readout if the new time is before the last result. If that is the case a notifier list is informed. Device models interested in this event can register a notifier with the clock. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* notifier: Pass data argument to callbackJan Kiszka2011-07-2313-23/+23
| | | | | | | | | | | This allows to pass additional information to the notifier callback which is useful if sender and receiver do not share any other distinct data structure. Will be used first for the clock reset notifier. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide: Turn properties any IDE device must have into bus propertiesMarkus Armbruster2011-07-231-1/+4
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-serial: Turn props any virtio-serial-bus device must have into bus propsMarkus Armbruster2011-07-232-4/+5
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-serial: Clean up virtser_bus_dev_print() outputMarkus Armbruster2011-07-231-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old version looks like this in info qtree (last four lines): dev: virtconsole, id "" dev-prop: is_console = 1 dev-prop: nr = 0 dev-prop: chardev = <null> dev-prop: name = <null> dev-prop-int: id: 0 dev-prop-int: guest_connected: 1 dev-prop-int: host_connected: 0 dev-prop-int: throttled: 0 Indentation is off, and "dev-prop-int" suggests these are properties you can configure with -device, which isn't the case. The other buses' print_dev() callbacks don't do that. For instance, PCI's output looks like this: class Ethernet controller, addr 00:03.0, pci id 1af4:1000 (sub 1af4:0001) bar 0: i/o at 0xffffffffffffffff [0x1e] bar 1: mem at 0xffffffffffffffff [0xffe] bar 6: mem at 0xffffffffffffffff [0xfffe] Change virtser_bus_dev_print() to that style. Result: dev: virtconsole, id "" dev-prop: is_console = 1 dev-prop: nr = 0 dev-prop: chardev = <null> dev-prop: name = <null> port 0, guest on, host off, throttle off Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* usb-ccid: Drop unused CCIDCardInfo callback print()Markus Armbruster2011-07-232-12/+0
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove unused USES_X509_AUTH macro from VNC sasl codeDaniel P. Berrange2011-07-231-7/+0
| | | | | | | | | The USES_X509_AUTH macro is defined in several VNC files, but not used in all of them. Remove the unused definition. * ui/vnc-auth-sasl.c: Remove USES_X509_AUTH macro Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce a 'client_add' monitor command accepting an open FDDaniel P. Berrange2011-07-238-6/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow client connections for VNC and socket based character devices to be passed in over the monitor using SCM_RIGHTS. One intended usage scenario is to start QEMU with VNC on a UNIX domain socket. An unprivileged user which cannot access the UNIX domain socket, can then connect to QEMU's VNC server by passing an open FD to libvirt, which passes it onto QEMU. { "execute": "get_fd", "arguments": { "fdname": "myclient" } } { "return": {} } { "execute": "add_client", "arguments": { "protocol": "vnc", "fdname": "myclient", "skipauth": true } } { "return": {} } In this case 'protocol' can be 'vnc' or 'spice', or the name of a character device (eg from -chardev id=XXXX) The 'skipauth' parameter can be used to skip any configured VNC authentication scheme, which is useful if the mgmt layer talking to the monitor has already authenticated the client in another way. * console.h: Define 'vnc_display_add_client' method * monitor.c: Implement 'client_add' command * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED * qmp-commands.hx: Declare 'client_add' command * ui/vnc.c: Implement 'vnc_display_add_client' method Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Store VNC auth scheme per-client as well as per-serverDaniel P. Berrange2011-07-234-26/+41
| | | | | | | | | | | | | | | A future patch will introduce a situation where different clients may have different authentication schemes set. When a new client arrives, copy the 'auth' and 'subauth' fields from VncDisplay into the client's VncState, and use the latter in all authentication functions. * ui/vnc.h: Add 'auth' and 'subauth' to VncState * ui/vnc-auth-sasl.c, ui/vnc-auth-vencrypt.c, ui/vnc.c: Make auth functions pull auth scheme from VncState instead of VncDisplay Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* do not reset no_shutdown after we shutdown the vmWen Congyang2011-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | Daniel P. Berrange sent a libvirt's patch to support reboots with the QEMU driver. He implements it in json model like this: 1. add -no-shutdown in the qemu's option: qemu -no-shutdown xxxx 2. shutdown the vm by monitor command system_powerdown 3. wait for shutdown event 4. reset the vm by monitor command system_reset no_shutdown will be reset to 0 if the vm is powered down. We only can reboot the vm once. If no_shutdown is not reset to 0, we can reboot the vm many times. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vl.c: Don't limit node count by smp countSasha Levin2011-07-231-2/+2
| | | | | | | | | | | | | [I've sent this patch couple of months ago and noticed it didn't make it's way in - so I'm sending it again] It is possible to create CPU-less NUMA nodes, node amount shouldn't be limited by amount of CPUs. Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com> Acked-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: Fix type of lfb/map_addr/end.Richard Henderson2011-07-231-5/+5
| | | | | | | | | | These addresses have been passed through pci_to_cpu_addr, and thus need to be full target_phys_addr_t. Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: Print strerror message on failureKevin Wolf2011-07-238-83/+117
| | | | | | | | | | | | The only way for chardev drivers to communicate an error was to return a NULL pointer, which resulted in an error message that said _that_ something went wrong, but not _why_. This patch changes the interface to return 0/-errno and updates qemu_chr_open_opts to use strerror to display a more helpful error message. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-timer: change unix timer to dynticksPaolo Bonzini2011-07-231-12/+28
| | | | | | | | | | | A timer that wakes up every millisecond puts a lot of stress on the iothread. The large amount of IPIs causes very high context switch activity, making emulation slow and the UI unusable. This is by the way the same reason why the Windows timers were switched to dynticks. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* iothread: replace fair_mutex with a condition variablePaolo Bonzini2011-07-231-15/+9
| | | | | | | | | | | | | This conveys the intention better, and scales to more than >1 threads contending the mutex with the iothread (as long as all of them have a "quiescent point" like the TCG thread has). Also, on Mac OS X the fair_mutex somehow didn't work as intended and deadlocked. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* multiboot: Support commas in module parametersAdam Lackorzynski2011-07-231-9/+9
| | | | | | | | | Support commas in the parameter list of multiboot modules as well as for the kernel command line, by using double commas (via get_opt_value()). Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* report serial devices created with -device in the PIIX4 config spacePaolo Bonzini2011-07-233-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Serial and parallel devices created with -device are not reported in the PIIX4 configuration space, and are hence not picked up by the DSDT. This upsets Windows, which hides them altogether from the guest. To avoid this, check at the end of machine initialization whether the corresponding I/O ports have been registered. The new function in ioport.c does this; this also requires a tweak to isa_unassign_ioport. I left the comment in piix4_pm_initfn since the registers I moved do seem to match the 82371AB datasheet. There are some quirks though. We are setting this bit: "Device 8 EIO Enable (EIO_EN_DEV8)—R/W. 1=Enable PCI access to the device 8 enabled I/O ranges to be claimed by PIIX4 and forwarded to the ISA/EIO bus. 0=Disable. The LPT_MON_EN must be set to enable the decode." but not LPT_MON_EN (bit 18 at 50h): LPT Port Enable (LPT_MON_EN)—R/W. 1=Enable accesses to parallel port address range (LPT_DEC_SEL) to generate a device 8 (parallel port) decode event. 0=Disable. We're also setting the LPT_DEC_SEL field (that's the 0x60 written to 63h) to 11, which means reserved, rather than to 01 (378h-37Fh). Likewise we're not setting SA_MON_EN, SB_MON_EN (respectively bit 14 and bit 16 at address 50h) for the serial ports. However, we're setting COMA_DEC_SEL and COMB_DEC_SEL correctly, unlike the corresponding register for the parallel port. All these fields are left as they are, since they are probably only meant to be used in the DSDT. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* .gitignore: ignore qemu-ga and qapi-generatedAlexandre Raymond2011-07-231-0/+2
| | | | | | | Add a new binary and generation directory to the gitignore file Signed-off-by: Alexandre Raymond <cerbere@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* guest agent: use QERR_UNSUPPORTED for disabled RPCsMichael Roth2011-07-231-3/+3
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: Consistently use qemu_macaddr_default_if_unsetJan Kiszka2011-07-239-17/+11
| | | | | | | | | | | | | | | | | Drop the open-coded MAC assignment from net_init_nic and replace it with standard qemu_macaddr_default_if_unset which is also used by qdev. That avoid creating colliding MACs when instantiating NICs via different mechanisms. This change requires to store the MAC as MACAddr in NICInfo, and the remaining nd_table users need to be updated. Based on suggestion by Peter Maydell. CC: Markus Armbruster <armbru@redhat.com> CC: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: Dump client type 'info network'Jan Kiszka2011-07-231-3/+12
| | | | | | | | | | | | | | | | Include the client type name into the output of 'info network'. The result looks like this: (qemu) info network VLAN 0 devices: rtl8139.0: type=nic,model=rtl8139,macaddr=52:54:00:12:34:57 Devices not on any VLAN: virtio-net-pci.0: type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 \ network1: type=tap,fd=5 CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: Refactor net_client_typesJan Kiszka2011-07-233-15/+23
| | | | | | | | | | | | | | Position entries of net_client_types according to the corresponding values of NET_CLIENT_TYPE_*. The array size is now defined by NET_CLIENT_TYPE_MAX. This will allow to obtain entries based on type value in later patches. At this chance rename NET_CLIENT_TYPE_SLIRP to NET_CLIENT_TYPE_USER for the sake of consistency. CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: Improve layout of 'info network'Jan Kiszka2011-07-231-5/+9
| | | | | | | | | | | | | | | | | | | | Improve the layout when listing non-vlan clients via 'info network'. The result looks like this: (qemu) info network Devices not on any VLAN: orphan: net=10.0.2.0, restricted=n virtio-net-pci.0: model=virtio-net-pci,macaddr=52:54:00:12:34:56 \ network2: fd=5 e1000.0: model=e1000,macaddr=52:54:00:12:34:57 \ network1: net=10.0.2.0, restricted=n rtl8139.0: model=rtl8139,macaddr=52:54:00:12:34:58 ie. peers are grouped, orphans are listed as before. CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Forward ICMP echo requests via unprivileged socketsJan Kiszka2011-07-237-1/+147
| | | | | | | | | | | | Linux 3.0 gained support for unprivileged ICMP ping sockets. Use this feature to forward guest pings to the outer world. The host admin has to set the ping_group_range in order to grant access to those sockets. To allow ping for the users group (GID 100): echo 100 100 > /proc/sys/net/ipv4/ping_group_range Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Put forked exec into separate process groupJan Kiszka2011-07-231-1/+2
| | | | | | | | | | Recent smb daemons tend to terminate themselves via a process group SIGTERM. If the daemon is still in qemu's group by that time, qemu will die as well. Avoid this by always pushing fork_exec processes into a group of their own, not just (unused) type 2 execs. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Replace m_freem with m_freeJan Kiszka2011-07-237-19/+16
| | | | | | | Remove this pointless wrapping. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Strictly associate DHCP/BOOTP and TFTP with virtual hostJan Kiszka2011-07-231-5/+8
| | | | | | | | Instead of accepting every DHCP/BOOTP and TFTP packet, only invoke the built-in servers if the target is the virtual host. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Canonicalize restrict syntaxJan Kiszka2011-07-232-8/+17
| | | | | | | | | | | | All other boolean arguments accept on|off - except for slirp's restrict. Fix that while still accepting the formerly allowed yes|y|no|n, but reject everything else. This avoids accidentally allowing external connections because syntax errors were so far interpreted as 'restrict=no'. CC: Gleb Natapov <gleb@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Fix restricted modeJan Kiszka2011-07-233-25/+6
| | | | | | | | | | | | This aligns the code to what the documentation claims: Allow everything but requests that would have to be routed outside of the virtual LAN. So we need to drop the unneeded IP-level filter, allow TFTP requests, and add the missing protocol-level filter to ICMP. CC: Gleb Natapov <gleb@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Deprecate -M command line optionsJan Kiszka2011-07-231-25/+20
| | | | | | | | Superseded by -machine. Therefore, this patch removes -M from the help list and pushes -machine at the same place in the output. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Generalize -machine command line optionJan Kiszka2011-07-233-22/+46
| | | | | | | | | | | | | | | -machine somehow suggests that it selects the machine, but it doesn't. Fix that before this command is set in stone. Actually, -machine should supersede -M and allow to introduce arbitrary per-machine options to the command line. That will change the internal realization again, but we will be able to keep the user interface stable. Tested-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* guest-agent: fix build with OpenBSDAnthony Liguori2011-07-221-11/+52
| | | | | | FS-Freeze only works with Linux. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* xen: fix xen-mapcache build on non-Xen capable targetsAvi Kivity2011-07-221-0/+32
| | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2011-07-221-2/+2
|\
| * target-sparc: Fix compiler errors (format strings)Stefan Weil2011-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | This change is needed because commit 06e12b65 now uses an unsigned long long value (uint64_t && unsigned long long => unsigned long long). Cc: Tsuneo Saito <tsnsaito@gmail.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge remote-tracking branch 'spice/spice.v39' into stagingAnthony Liguori2011-07-222-3/+12
|\ \
| * | qxl: upon reset, if spice worker is stopped, the command rings can be not emptyYonit Halperin2011-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spice worker does no longer process commands when it is stopped. Otherwise, it might crash during migration when attempting to process commands while the guest is not completely loaded. Cc: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | spice: add sanity check for spice portsGerd Hoffmann2011-07-201-1/+10
| | | | | | | | | | | | | | | | | | | | | Make sure at least one port (port=.. or tls-port=...) is specified. Also apply range checks to the port numbers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'qmp/for-anthony' into stagingAnthony Liguori2011-07-2240-31/+4842
|\ \ \
| * | | guest agent: add guest agent RPCs/commandsMichael Roth2011-07-217-3/+768
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the initial set of QMP/QAPI commands provided by the guest agent: guest-sync guest-ping guest-info guest-shutdown guest-file-open guest-file-read guest-file-write guest-file-seek guest-file-flush guest-file-close guest-fsfreeze-freeze guest-fsfreeze-thaw guest-fsfreeze-status The input/output specification for these commands are documented in the schema. Example usage: host: qemu -device virtio-serial \ -chardev socket,path=/tmp/vs0.sock,server,nowait,id=qga0 \ -device virtserialport,chardev=qga0,name=org.qemu.quest_agent.0 ... echo "{'execute':'guest-info'}" | socat stdio unix-connect:/tmp/qga0.sock guest: qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 \ -p /var/run/qemu-guest-agent.pid -d Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | guest agent: qemu-ga daemonMichael Roth2011-07-214-3/+660
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the actual guest daemon, it listens for requests over a virtio-serial/isa-serial/unix socket channel and routes them through to dispatch routines, and writes the results back to the channel in a manner similar to QMP. A shorthand invocation: qemu-ga -d Is equivalent to: qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 \ -f /var/run/qemu-ga.pid -d Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | guest agent: command state classMichael Roth2011-07-214-1/+102
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | qerror: add QERR_JSON_PARSE_ERROR to qerror.cMichael Roth2011-07-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing from previous addition of error to qerror.h. Needed for qerror_format() and friends. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | qapi: add QAPI code generation documentationMichael Roth2011-07-211-0/+316
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | qapi: add test-qmp-commands, tests for gen. marshalling/dispatch codeMichael Roth2011-07-212-1/+120
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | qapi: add test-visitor, tests for gen. visitor codeMichael Roth2011-07-212-2/+323
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | qapi: test schema used for unit testsMichael Roth2011-07-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is how QMP commands/parameters/types would be defined. We use a subset of that functionality here to implement functions/types for unit testing. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
| * | | qapi: add qapi-commands.py code generatorMichael Roth2011-07-211-0/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the code generator for qapi command marshaling/dispatch. Currently only generators for synchronous qapi/qmp functions are supported. This script generates the following files: $(prefix)qmp-marshal.c: command marshal/dispatch functions for each QMP command defined in the schema. Functions generated by qapi-visit.py are used to convert qobjects recieved from the wire into function parameters, and uses the same visiter functions to convert native C return values to qobjects from transmission back over the wire. $(prefix)qmp-commands.h: Function prototypes for the QMP commands specified in the schema. $(prefix) is used in the same manner as with qapi-types.py Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
OpenPOWER on IntegriCloud