Fix Sparse warnings: add "static"
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
esp: handle "select without attention"
Up to now "select without attention" was handled the same way as"select with attention". According to
http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR53C9X.txt
select without ATN sends the CDB (Command Descriptor Block) directly,...
Include sys-queue.h early to override system queue definitions on BSD
Shuffle lines to avoid gcc 3 warning about redundant redeclaration
Bring pcbios, seabios, and vgabios into the tree as git submodules. Right now,they aren't integrated into the build but we can do that incrementally.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce QString unit-tests
This suite contains tests to assure that QString 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-qstring
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
Introduce QDict test data file
This file is used by the QDict stress test, it adds 5k nodeson the dictionary and performs various operations.
My original file had 21k entries and almost 400k of size. Aftersome discussion with Eduardo Habkost, I decided to reduce the...
Introduce QDict unit-tests
This suite contains tests to assure that QDict API works as expected.
$ ./check-qdict
mips malta: Fix fdc regression and use qdev for i8042 setup
8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc)breaks MIPS Malta:
Tried to create isa device isa-fdc with no isa bus present
Fix this by creating an isa bus for piix4.This change also requires some more qdev related changes...
monitor: fail when 'i' type is greater than 32-bit
The 'i' argument type is for 32-bit only and most handlerswill use an 'int' to store its value.
It's better to fail gracefully when the user enters a valuegreater than 32-bit than to get subtle casting bugs....
monitor: Update supported types documentation
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add check support
Check is a unit testing framework for C.
All the QObjects have unit-tests and more will be written for thefuture data types.
More info about check can be found at:
http://check.sourceforge.net/
Introduce QInt unit-tests
This suite contains tests to assure that QInt API works as expected.
$ ./check-qint
monitor: Drop handler_8 and handler_9
Commit 79c4f6b08009a1d23177c2be8bd003253cf3686a added handler_8 andhandler_9 handling, but there isn't any command handler with thosenumber of arguments.
Just drop them.
monitor: Port handler_10 to use QDict
This commit ports command handlers that receive ten arguments to usethe new monitor's dictionary.
monitor: Split monitor_handle_command()
In order to help the integration with unit-tests and having a betterdesign, this commit splits monitor_handle_command() into two parts.
The parsing code is moved to a function called monitor_parse_command(),while allocating memory and calling the handler is still done by...
monitor: Drop unused macros
GET_TLONG() and GET_TPHYSADDR() are not needed anymore, QInt canhandle such conversions.
monitor: Drop str_allocated[]
It's not used anymore, as QDict is now used to handle stringmemory allocation/deallocation.
monitor: Drop args[] handling code
This commit drops all the code used to handle the 'args[]' array,as now we use a dictionary to pass arguments.
monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to usethe new monitor's dictionary.
monitor: Port handler_2 to use QDict
This commit ports command handlers that receive two arguments to usethe new monitor's dictionary.
monitor: Port handler_3 to use QDict
This commit ports command handlers that receive three arguments to usethe new monitor's dictionary.
monitor: Port handler_4 to use QDict
This commit ports command handlers that receive four arguments to usethe new monitor's dictionary.
Note that GET_TLONG() and GET_TPHYSADDR() macros are not used anymore.
monitor: Port handler_5 to use QDict
This commit ports command handlers that receive five arguments to usethe new monitor's dictionary.
monitor: Port handler_6 to use QDict
This commit ports command handlers that receive six arguments to usethe new monitor's dictionary.
monitor: Port handler_7 to use QDict
This commit ports command handlers that receive seven arguments touse the new monitor's dictionary.
monitor: Setup a QDict with arguments to handlers
With this commit monitor_handle_command() will be able to setup aQDict with arguments to command handlers.
However, the current 'args[]' method is still being used, nextchanges will port commands to get their arguments from the dictionary....
monitor: Export QDict header
Command handlers will have to use QDict functions, so exportqdict.h through monitor.h.
monitor: Port handler_0 to use QDict
This commit ports command handlers that receive no arguments to usethe new monitor's dictionary.
It might seem no sense to do this, as the handlers have no arguments,but at the end of this porting work all handlers will have the same...
Introduce QInt
QInt is a high-level data type that can be used to represent integers,internally it stores an int64_t value.
The following functions are available:
- qint_from_int() Create a new QInt- qint_get_int() Get the stored integer
Introduce QString
QString is a high-level data type that can be used to representC strings.
- qstring_from_str() Create a new QString- qstring_get_str() Get a pointer to the stored string
Note that qstring_get_str() is too low-level for a data type like...
Introduce QDict
QDict is a high-level dictionary data type that can be used to store acollection of QObjects. A unique key is associated with only oneQObject.
- qdict_new() Create a new QDict- qdict_put() Add a new 'key:object' pair...
Add wrappers to functions used by the Monitor
Some functions exported to be used by the Monitor as commandhandlers are also called in other places as regular functions.
When those functions got ported to use the Monitor dictionaryto pass argments, the callers will have to setup a dictionary...
monitor: New format for handlers argument types
Current handlers argument types, as defined in qemu-monitor.hx file,are a sequence of chars where each one represents one argument typeof the command handler. The number of chars is also used to know howmany arguments a given handler accepts....
Introduce QObject
This commit introduces the qobject.h header file, it containsbasic QObject definitions and helper macros.
do not issue ioctl from within the io thread
According to Documentation/kvm/api.txt, (and well, to common sense),we should not be calling vcpu ioctls from within the iothread.Since vcpu initialization issues a vcpu ioctl, move it a little bitfurther in time to prevent it....
net: Fix send queue ordering
Ensure that packets enqueued for delayed delivery are dequeued in FIFOorder. At least one simplistic guest TCP/IP stack became unhappy due tosporadically reordered packet streams.
At this chance, switch the send queue implementation to TAILQ....
Support for multiple -monitor devices
Rebased version of Anthony's patch: Allow to specify more than onemonitor terminal via the -monitor command line switch. This isparticularly useful when libvirt or some other management tool alreadyoccupies the primary monitor but you need another one for debugging....
ide: pass down DriveInfo instead of BlockDriverState
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: move cmd+irq from IDEState to IDEBus.
These variables are per bus, not per drive. Lets move them andcleanup things a bit. And fix the cmd migration bug for real.
piix3: use new vmstate infrastructure
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
add documentation for multi-core features
extend QEMU's internal help and man page to cover the recentlyadded multi-core feature.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove typedef for bool from eepro100.c
eepro100.c shouldn't have the need to do this in its local header file.
And I recently started getting this:
$ make -j3... CC x86_64-softmmu/eepro100.o/home/amit/src/qemu/hw/eepro100.c:112: error: two or more data types...
Delay sighandler_setup()
If we are using --serial telnet:0:5555,server or similar, ^C will notkill qemu. We need to first connect using telnet, and the the ^C takeseffect.
pci_irq_levels[] belong to PIIX3State
With previous cleanups, now it is possible to put it where it belongs
Update SaveVM versions
Now that we have all fields belonging to a PCIDevice, save each fieldon the device that it belongs. This means moving pci_irq_levelsfrom PCII440FXState to PIIX3State.Old formats are loaded, but we only save on the new saner format....
VMState: Fix sub-structs versioning
We can't check the version in a substruct, it is not stored anywhere
i440fx: use new vmstate infrastructure
Create PIIX3State instead of using PCIDevice for PIIX3
Introduce PIIX3IrqState for piix3 irq's state
Fold piix3_init() intto i440fx_init
i440fx_init will now work properly if we don't setup piix3
We can add piix3_dev now to PIIX3IrqState
Save irq_state into PCII440FXState
Use PCII440FXState instead of generic PCIDevice
Move smm_enabled and isa_memory_mappings to PCII440FXState
We want the argument pass to set_irq to be opaque
piix_pci want to pass more things that the pic
piix4 don't use pci_irq_levels at all
Split piix4 support from piix_pci.c
Now mips_malta uses piix4 and pc's use piix_pci definitions
low_set_irq is not used anywhere
microblaze: Trap on illegal load/store sizes.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Correct FPU decoding masks.
microblaze: Compute masks for alignment checks at translation time.
Thanks to Blue Swirl for reporting.Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Trap on bus accesses to unmapped areas.
microblaze: MMU shows more respect to synthesis config.
The microblaze MMU can be synthesized in different configurations.Have the MMU model show more respect to the chosen configuration.
microblaze: Trap on unaligned data accesses.
Untested...
microblaze: Trap on divizions by zero.
microblaze: Correct mfs into r0.
microblaze: Catch illegal insns and privilege violations.
Raise illegal instruction exceptions when executing instructions thatrequire units not available on the particulare microblaze configuration.
Also trap priviliege violations made by userspace.
microblaze: Add infrastructure for supporting hw exceptions.
microblaze: Clear exception in dslot ESR bit if not in dslot.
microblaze: Correct MMU debug log.
Fix warning on x86_64
audio/esdaudio.c: In function 'qesd_thread_out':audio/esdaudio.c:136: error: format '%d' expects type 'int', butargument 3 has type 'ssize_t'audio/esdaudio.c: In function 'qesd_thread_in':audio/esdaudio.c:366: error: format '%d' expects type 'int', but...
Sparc32: port sun4c interrupt controller to VMState design
Sparc32: port timers to VMState design
Sparc32: timer field is never NULL
Add VMState support for ptimers
esp (sparc32) Extra scsi data.
ESP: Message Accepted (12)ESP: Transfer status (sense=0)ESP: read reg5: 0x20ESP: read reg4: 0x07ESP: read reg7: 0x02Extra scsi data. Fatal error.
It looks like "Message Accepted" shouldn't write a response. At least...
Fix compiler warnings
Starting with commit df7a86ed735eafefbd046c8cad7134652fe3f600,mingw32 builds result in a compiler warning for dns_addr:
CC slirp/slirp.o/home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:50: warning: missing braces around initializer...
Fix breakage due to __thread
Thread-local storage is not supported on all hosts.
Fix gcc 3 warning: comparison is always true due to limited range of data type
Fix gcc 3 warning about uninitialized variable
If nb_sectors is 0, cluster_offset will not be initialized.
Sparc32: port Slavio misc devices to VMState design
Sparc32: port ECC memory controller to VMState design
Sparc32: port IOMMU to VMState design
Sparc32: port DMA controller to VMState design
Sparc32: port TCX to VMState design
Sparc32: port interrupt controller to VMState design
Update OpenBIOS images to r569
Suppress kraxelisms
Fix Sparc64 breakage: add dummy ISA irqs
Fix merge of 59f2a78793b6d17634f39646d604e84af51e0919
Don't compile aio code if CONFIG_LINUX_AIO is undefined
This patch fixes linker errors when building QEMU without Linux AIO support.
It is based on suggestions from malc and Kevin Wolf.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix sb16 breakage due to unassigned s->irq
Signed-off-by: malc <av1474@comtv.ru>
Fix formatting
Merge commit 'linux-user/linux-user-for-upstream' into staging
e1000 cleanup
Remove un needed casts from void *.Use DO_UPCAST() instead of blind casts
Relax pthreads check to avoid win32
pcnet: Change casts to DO_UPCAST() for PCIPCNetState
pcnet: remove useless casts This are casts to the very type of the function
pcnet: Add pci_pcnet_{save/load} functions, then remove PCNetState pci_dev field