scsi: add/fix header protection.
Also delete the leftover and unused scsi-disk.h file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scsi: create common SCSIRequest structure.
Rename the SCSIRequest structs in scsi-disk.c and scsi-generic.c toSCSIDiskReq and SCSIGenericReq. Create a SCSIRequest struct and movethe common elements over.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
scsi: move request lists to QTAILQ.
Changes: * Move from open-coded lists to QTAILQ macros. * Move the struct elements to the common data structures (SCSIDevice + SCSIRequest). * Drop free request pools. * Fix request cleanup in the destroy callback....
scsi: move SCSIRequest management to common code.
Create generic functions to allocate, find and release SCSIRequeststructs. Make scsi-disk and scsi-generic use them.
net: add qemu_foreach_nic()
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: fix qemu_announce_self()
Now that we have a way to iterate NICs.
net: print correct error for '-netdev ""'
Reported-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: fix TAP networking on host kernels without IFF_VNET_HDR support
vnet_hdr is initialized at 1 by default. We need to reset it to 0 ifthe kernel doesn't support IFF_VNET_HDR.
Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
net: check for TUNSETOFFLOAD support before trying to enable offload features
This avoids the "TUNSETOFFLOAD ioctl() failed: Invalid argument" messageon kernels without TUNSETOFFLOAD support.
net: initialize vnet_hdr in net_init_tap()
net_tap_init() always sets vnet_hdr using qemu_opt_get_bool(), butinitialize it in net_init_tap() just to reduce confusion.
net: fix vnet_hdr handling in solaris tap code
Print an error if the user specifies vnet_hdr=1 on the cmdline.
net: convert usb-net to NICState
net: convert xilinx_ethlite to NICState
net: move parse_macaddr() to net/util.[ch]
net: convert xen to NICState
net: remove qemu_new_vlan_client()
... and VLANClientState::opaque and qemu_find_vlan_client().
All of these are now unused
net: remove VLANClientState members now in NetClientInfo
Add a NetClientInfo pointer to VLANClientState and use thatfor the typecode and function pointers.
net: convert mipsnet to NICState
net: convert musicpal to NICState
net: convert smc91c111 to NICState
net: convert stellaris to NICState
net: convert eepro100 to NICState
net: convert dp8393x to NICState
net: convert etrax to NICState
net: convert LAN9118 to NICState
net: convert mcf_fec to NICState
net: convert e1000 to NICState
net: convert rtl8139 to NICState
net: convert ne2000 to NICState
net: convert pcnet to NICState
net: convert slirp to NetClientInfo
net: convert vde to NetClientInfo
net: convert socket to NetClientInfo
net: convert dump to NetClientInfo
aliguori: fix uninitialized use of pcap_len
net: introduce NICState and qemu_new_nic()
Common state for all NICs.
The opaque member will replace the opaque member in VLANClientStatesince only NICs need it.
The conf member will allow us to iterate over NICs, access the MACaddr for the NIC and send a packet from each NIC in qemu_announce_self()....
net: convert virtio to NICState
net: remove NICInfo::private
Was used by hot-unplug, but not anymore.
net: introduce NetClientInfo
This structure holds data which is common to all instances of a givennet client type/model.
net: introduce qemu_new_net_client()
A replacement for qemu_new_vlan_client(), using NetClientInfo toreplace most arguments.
qdev: move DO_UPCAST() into osdep.h
Nothing qdev specific about this, make it available throughtout.
net: convert tap to NetClientInfo
net: convert tap-win32 to NetClientInfo
net: move vde code from net.c to net/vde.c
net: move socket backend code from net.c to net/socket.c
net: move dump backend code from net.c to net/dump.c
net: clean up includes in net.c
This is probably a little drastic, but the includes in this file arenow totally out of control when compared with what includes areactually needed.
This may break the build on e.g. *BSD, but it will be easily fixed byre-instating an include....
net: remove NICInfo::vc
Since 1cc33683, this field is not set for most devices, so justremove it and its remaining few uses.
ac97: port to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: move slirp code from net.c to net/slirp.c
c4231a: port to vmstate
gus: port to vmstate
ac97: sizeof needs %zd
This change makes DEBUG_AC97 to compile again
ac97: recalculate active after loadvm
ac97: up savevm version and remove active from state
QMP: Introduce qmp-shell
This is a very simple shell written in Python for demonstrationpurposes.
Unfortunately it's a bit awkward right now, as the user hasto specify the arguments names and the printed data can bea raw dictionary or list, like the following example:...
QMP: Introduce vm-info
A Python script which uses qmp.py to print some simple VM info.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
audio: fix compilation of DEBUG_PLIVE
audio: port to vmstate
sb16: port to vmstate
es1370: port to vmstate
QMP: Introduce basic asynchronous events
Debug, shutdown, reset, powerdown and stop are all basic events,as they are very simple they can be added in the same commit.
QMP: Disable monitor print functions
We still have handlers which will call monitor print functionsin several places. Usually to report errors.
If they do this when we are in control mode, we will be emittinggarbage to our clients.
To avoid this problem, this commit adds a way to disable those...
QMP: Introduce README file
QMP: Introduce specification
QMP: Introduce qmp-events.txt
QMP: Output support
In the new Monitor output is always performed by only twofunctions: do_info() and monitor_call_handler().
To support QMP output, we modify those functions to check if weare in control mode. If so, we call monitor_protocol_emitter()...
QMP: do_info() checks
This commit adds specific QMP checks to do_info(), so thatit behaves as expected in QMP mode.
QMP: Input support
The JSON stream parser is used to do QMP input. When thereare enough characters to be parsed it calls Monitor'shandle_qmp_command() function to handle the input.
This function's job is to check if the input is correct andcall the appropriate handler. In other words, it does for QMP...
QMP: Allow 'query-' commands
The 'info' command makes sense for the user protocol, but for QMPit doesn't, as its return data is not well defined. That is, itcan return anything.
To fix this Avi proposes having 'query-' commands when in protocolmode. For example, 'info balloon' would become 'query-balloon'....
QMP: Asynchronous events infrastructure
Asynchronous events are generated with a call tomonitor_protocol_event().
This function builds the right data-type and emit the eventright away. The emitted data is always a JSON object and itsformat is as follows:...
monitor: Introduce monitor_find_command()
This commit moves the loop which searches for the commandentry corresponding to a command name to its own function.
It will be used by QMP code as well.
monitor: Rename monitor_handle_command()
As this series will add a new kind of Monitor command, it's betterto rename monitor_handle_command() to what it really is:handle_user_command().
This will avoid confusion.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Introduce 'info commands'
List QMP available commands. Only valid in control mode, wherehas to be used as 'query-commands.
QError: Add errors needed by QMP
Only QERR_QMP_BAD_INPUT_OBJECT is QMP specific, the others canbe used in different contexts by other subsystems.
Please, note that QERR_JSON_PARSING signals any parsing errorfrom the json parser. We will need it until the parser gets...
QMP: Initial support
This commit adds initial QMP support in QEMU. It's importantto notice that most QMP code will be part of the Monitor.
Input will be read by monitor_control_read(). Currently itdoes nothing but next patches will add proper input support....
QError: Add QERR_DEVICE_NOT_ACTIVE
New class for device not active errors.
QError: Add QERR_KVM_MISSING_CAP
New class for KVM unavailable features errors.
monitor: do_info_balloon(): Use QError
monitor: Introduce MONITOR_USE_CONTROL flag
This flag will be set when Monitor enters "control mode", inwhich the output will be defined by the QEMU Monitor Protocol.
This also introduces a macro to check if the flag is set.
monitor: Command-line flag to enable control mode
This commit adds a flag called 'control' to the '-monitor'command-line option. This flag enables control mode.
The syntax is:
qemu [...] -monitor control,<device>
Where <device> is a chardev (excluding 'vc', for obvious reasons)....
monitor: Introduce monitor_call_handler()
This commit moves the code which calls Monitor handlers toits own function, as it will be used by QMP code as well.
Introduce QError
QError is a high-level data type which represents an exceptionin QEMU, it stores the following error information:
- class Error class name (eg. "ServiceUnavailable")- description A detailed error description, which can contain...
monitor: QError support
This commit adds QError support in the Monitor.
A QError member is added to the Monitor struct. This new memberstores error information and is also used to check if an errorhas occurred when the called handler returns.
Additionally, a new macro called qemu_error_new() is introduced....
QError: Add QERR_DEVICE_NOT_FOUND
New class for device not found errors.
qdev: Use QError for 'device not found' error
Please, note that we will lose the "Try -device '?' for a list" hint as it's qdev specific.
QString: Introduce qstring_append_chr()
It appends a C char to a QString.
QString: Introduce qstring_append_int()
QString: Introduce qstring_from_substr()
Note that we can now write qstring_from_str() as a wrapper.
utests: Add qstring_append_chr() unit-test
utests: Add qstring_from_substr() unit-test
QJSON: Introduce qobject_from_jsonv()
It accepts a va_list and will be used by QError. Also simplifiesthe code a little, as the other qobject_from_() functions canuse it.
fix I2C slave addressing
With the recent device handling changes the I2C slave addressing codewas broken. With current code, if a slave with the correct address is
not found on the bus the last scanned slave on the bus will beaddressed. This is wrong. Please find attached a patch to fix it....
Fix qdev property type definition for isa serial/parallel devices
Use the correct qdev property type for these devices.
Fix qemu_free use in scsi-generic.c
scsi-generic.c is using free() instead of qemu_free().Fix it.
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix free use in xen_backend.c
xen_backend.c is using qemu_free() instead of free().Fix it.
Fix qemu_malloc/qemu_free use in rtl8139.c
rtl8139.c is using malloc()/free() instead of qemu_malloc()/qemu_free().Fix it.
Fix qemu_free use in baum.c
baum.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in nand.c
nand.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in bt-l2cap.c
bt-l2cap.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in nseries.c
nseries.c is using free() instead of qemu_free().Fix it.