ide: change cast to DO_UPCAST
Patchworks-ID: 35293Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: Remove cast in pci_register_bar
We already have a PCIDevice at that point
Patchworks-ID: 35296Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: Remove duplicated definitions
Patchworks-ID: 35297Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: remove uselsess casts from void *
Patchworks-ID: 35298Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: create ide/pci.h for common ide pci definitions
Patchworks-ID: 35299Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: export needed ide-pci functions for split
Patchworks-ID: 35300Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: split cmd646 and piix from pci.c
This patch splits cmd646 specific code from pci.c.This patch splits piix4 specific code from pci.c.And compile new piix.o and cmd646.o when they are needed.The only change that is not code movemet is removal of cmd646 specific parts...
ide: PCIIDEState type field is not needed anymore
We have split the functions that needed it for cmd646
Patchworks-ID: 35302Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix bswap in comment
Replace bsawp -> bswap.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Move dependency generation falgs out of configure
Signed-off-by: malc <av1474@comtv.ru>
configure: clean up temporary dependency files
winwave: pause/restore playing upon seeing VOICE_DISABLE/ENABLE
winwave: close event handle and delete wait object after closing HWAVEOUT
To avoid possibly being called back and thus racing.
winwave: remove wait object when finalizing DAC voice
CRIS: Segmented addressing only for kernel mode.
Segmented translation through the CRIS MMU is only done foraccesses in kernel mode. In user-mode, all accesses are treatedas paged regardless of the mode config in RW_MM_CFG.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Fix Windows host breakage by 45a50b1668822c23afc2a89f724654e176518bc4 (TeLeMan)
winwave: poll mode
Windows Waveform Audio driver (no ADC support yet)
pcnet: Restart poll timer on pcnet_start
Just like we call into pcnet_poll_timer on stop, we need to call it onstart to trigger the setup of the poll timer.
Patchworks-ID: 35313Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pcnet: Drop unused recv_pos field
This state field was never used, simply remained 0. Drop it from thePCNetState and update the save/restore code accordingly, keepingbackward compatibility.
Patchworks-ID: 35314Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
monitor: Convert do_quit() do QObject
Patchworks-ID: 35345Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_stop() to QObject
Patchworks-ID: 35343Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_system_reset() to QObject
Patchworks-ID: 35347Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_system_powerdown() to QObject
Patchworks-ID: 35346Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_cont() to QObject
Appropriate error handling support will be needed to haveencrypted images working under the future machine protocol,but this initial conversion will work with the currentuser protocol.
Patchworks-ID: 35348Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Convert do_balloon() to QObject
It is important to note that it never fails, as big refactoringof the virtio code would be needed to get the proper error code.
Patchworks-ID: 35349Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_info_version() to QObject
The returned data is always a QString.
Also introduces monitor_print_qobject(), which can be used asa standard way to print QObjects in the user protocol format.
Patchworks-ID: 35350Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Convert do_info_balloon() to QObject
On success return a QInt with the balloon's value.
This also introduces monitor_print_balloon() to print theballoon information in the user protocol.
Please, note that errors are not being converted yet.
Patchworks-ID: 35351...
monitor: Convert do_info_cpus() to QObject
Each CPU information is stored in a QDict and the returnedQObject is a QList of all CPUs.
The QDict contains the following information:
- "CPU": cpu index- "current": "yes" or "no" - "pc": current PC- "halted": "yes" or "no"...
Introduce QList
QList is a high-level data type that can be used to store QObjectsin a singly-linked list.
The following functions are available:
- qlist_new() Create a new QList- qlist_append() Append a QObject to the list- qlist_iter() Iterate over stored QObjects...
Introduce QList unit-tests
This suite contains tests to assure that QList API works as expected.
To execute it you should have check installed and build QEMU withcheck support enabled (--enable-check-utests) and then run:
$ ./check-qlist
Patchworks-ID: 35333...
monitor: Convert mon_cmd_t initializations to C99 style
Patchworks-ID: 35335Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: union for info handlers
This commit adds a union to mon_cmd_t for info handlers andconverts do_info() and info_cmds[] array to use it.
This improves type safety.
Next commit will convert command handlers.
Patchworks-ID: 35336Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: union for command handlers
This commits adds a new union member to mon_cmd_t for commandhandlers and convert monitor_handle_command() and qemu-monitor.hxto use it.
Patchworks-ID: 35337Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Add user_print() to mon_cmd_t
This new struct member will store a pointer to a function thatshould be used to output data in the user protocol format.
It will also serve as a flag to say if a given handler has alreadybeen converted to the new QObject style....
monitor: Handle new and old style handlers
This commit changes monitor_handle_command() to support old styleand new style handlers.
New style handlers are protocol independent, they return theirdata to the Monitor, which in turn decides how to print them...
monitor: do_info(): handle new and old info handlers
do_info() is special, its job is to call 'info handlers'.This is similar to what monitor_handle_command() does,therefore do_info() also has to distinguish among new andold style info handlers.
This commit converts do_info() to the new QObject style and...
Only compile sd0323 when one target uses it
Patchworks-ID: 35217Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile ads7846 when one target uses it
Patchworks-ID: 35218Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile max111x when one target uses it
Patchworks-ID: 35219Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile ssi-sd when one target uses it
Patchworks-ID: 35220Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile ssi when one target uses it
Patchworks-ID: 35221Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QObject: Accept NULL
It is convenient that QDECREF and QINCREF accept the QObjectparameter to be NULL, so that we don't duplicate 'if' tests inthe callers.
Patchworks-ID: 35332Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile tmp105 when one target uses it
Patchworks-ID: 35214Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile stellaris_input when one target uses it
Patchworks-ID: 35213Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile sd0303 when one target uses it
Patchworks-ID: 35216Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile twl92230 when one target uses it
Patchworks-ID: 35212Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile tsc2005 when one target uses it
Patchworks-ID: 35215Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile lm832x when one target uses it
Patchworks-ID: 35211Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile wm8750 when one target uses it
Patchworks-ID: 35209Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile ptimer when one target uses it
Patchworks-ID: 35207Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile sd when one target uses it
Patchworks-ID: 35208Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile max7310 when one target uses it
Patchworks-ID: 35210Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile ecc when one target uses it
Patchworks-ID: 35203Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile esp when one target uses it
Patchworks-ID: 35206Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile escc when one target uses it
Patchworks-ID: 35205Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile m48t59 when one target uses it
Patchworks-ID: 35204Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Generate gdbstub-xml.c only when needed
First user of new config-devices.mak
Patchworks-ID: 35198Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile usb_ohci when one target uses it
Patchworks-ID: 35199Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile isa_mmio when one target uses it
Patchworks-ID: 35200Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile qdev_addr when one target uses it
Patchworks-ID: 35201Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Only compile nand when one target uses it
Patchworks-ID: 35202Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add new config-devices.mak for each target
We generate config-devices.h from there automatically.We need to do it in main Makefile, because we are going to need a mainMakefile for them.
Patchworks-ID: 35196Signed-off-by: Juan Quintela <quintela@redhat.com>...
Generate config-devices.h
Generate config-devices.h for each target and config-all-devices.h forcommon library. We don't want to name both config-devices.h to avoidpath problems
Patchworks-ID: 35195Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Move generation of config-target.h to Makefile from configure
Patchworks-ID: 35194Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Move generation of config-host.h to Makefile from configure
Use timestamp based appreach to avoid not needed recompilation.Add it to rules.mak
Many thanks to Paolo Bonzini for helpding the design, and the debug.
Patchworks-ID: 35190Signed-off-by: Juan Quintela <quintela@redhat.com>...
Remove useless check for config-host.mak
If config-host.mak dont' exist, we have exited in the check atthe beginning of the file.Once here, move the bits to the else part of the test at the beginning ofthe file.
Patchworks-ID: 35191Signed-off-by: Juan Quintela <quintela@redhat.com>...
Rename config.{h, mak} config-target.{h, mak}
Add config.h file that includes config-target.h and config-host.h
Patchworks-ID: 35193Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Don't include config-host.mak from inside config.mak
Include it directly in Makefile.target
Patchworks-ID: 35189Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
CRIS: Update PR_EDA on TLB faults.
Warn if value of qdev_init() isn't checked
After qdev_init() fails, the device is gone. Failure to check runs ahigh risk of use-after-free.
Patchworks-ID: 35166Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Clean up test for qdev_init() failure
Some callers test for != 0, some for < 0. Normalize to < 0.
Patchworks-ID: 35171Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Check return value of qdev_init()
But do so only where it may actually fail. Leave the rest for thenext commit.
Patchworks-ID: 35167Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Make isa_create() terminate program on failure
Callers don't check the return value anyway.
Patchworks-ID: 35172Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Make qdev_init() destroy the device on failure
Before, every caller had to do this. Only two actually did.
Patchworks-ID: 35170Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Unbreak USB autoconnect filters
Commit 22f84e73 added a qdev_init() missing on the path throughusb_host_device_open(), but that broke the path throughusb_host_auto_scan(), which already had one. Remove that one.
Patchworks-ID: 35169Signed-off-by: Markus Armbruster <armbru@redhat.com>...
tcg: improve output log
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-i386: fix ARPL
The arpl implementation in target-i386/translate.c uses cpu_A0temporary across a brcond op. This patch fixes that issue.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
configure and Makefile are not generated in qemu
Just say it to make
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: move comment
Move comment back next to main_system_bus to avoid confusion.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
AIOLIBS is not used anywhere
optionrom: remove use of implicit RM variable
add build-all to .PHONY rules
optionrom: create .PHONY variable
Don't use implicit rules for Makefile
This remove implicit rules + implicit variables.Explicit rules like the generation of %.h and %.c from %.hx still worksas expected.
As an added bonus, now the output of make -d is readable.
As another added bonus, time spend on Makefiles is way smaller....
Port host_net_add monitor command to QemuOpts
Here is where we rely on qemu_opts_parse() to handle an empty string.We could alternatively explicitly handle this here by usingqemu_opts_create() when we're not supplied any parameters, but itscleaner this way....
Port usb net to QemuOpts
We need net_client_init_from_opts() exported for this
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Port PCI NIC hotplug to QemuOpts
Final net cleanup after conversion to QemuOpts
Now that net_client_init() has no users, kill it off and renamenet_client_init_from_opts().
There is no further need for the old code in net_client_parse() either.We use qemu_opts_parse() 'firstname' facitity for that. Instead, move...
qemu/pci: clarify pci config load routine
PCI load routine has to be called with size equal to 256 (otherwise itwill crash in weird ways). So assert this, making code clearer.Also avoid dynamically sized array on stack - good for portability.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
qemu/pci: make pci not depend on msix
Making pci device cleanup msix automatically makes pci.c depend onmsix.c, which is IMO messy. Since devices do msix_init it's easy andnatural for them to also do msix_uninit.
Port -net none and -net nic to QemuOpts
We use a table of network types to look up the initialization functionand parameter descriptions in net_client_init().
For now, we use QemuOpts for the 'none' and 'nic' types. Subsequentpatches port the other types too and the special casing is removed....
Port -net user to QemuOpts
The handling of guestfwd and hostfwd requires the previous changesto allow multiple values for each parameter. The only way to accessthose multiple values is to use qemu_opt_foreach().
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
Port -net tap to QemuOpts
Some parameters are not valid with fd=. Rather than having a separateparameter description table for validating fd=, it's easir to justcheck for those invalid parameters later.
Note, the need to possible lookup a file descriptor name from the...
Port -net socket to QemuOpts
Port -net vde to QemuOpts
The net_vde_init() change is needed because we now pass NULL pointersinstead of empty strings for group/sock if they're not set.
Port -net dump to QemuOpts
Note, not incrementing nb_host_devs in net_init_dump() is intentional.
Clean up legacy code in net_client_init()
Now that we've ported everything over to QemuOpts, we can kill offall the cruft in net_client_init().
Note, the 'channel' type requires special handling as it uses aformat that QemuOpts can't parse
Add qemu_net_opts
The first step in porting -net to QemuOpts. We do not include parameterdescriptions in the QemuOptsList because we use the first parameter tochoose which descriptions validate against.