Commit graph

8726 commits

Author SHA1 Message Date
Luiz Capitulino 5a1a235649 Introduce QObject
This commit introduces the qobject.h header file, it contains
basic QObject definitions and helper macros.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:28 -05:00
Gerd Hoffmann 9cdd03a791 ide: move cmd+irq from IDEState to IDEBus.
These variables are per bus, not per drive.  Lets move them and
cleanup things a bit.  And fix the cmd migration bug for real.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:27 -05:00
Gerd Hoffmann f455e98cf4 ide: pass down DriveInfo instead of BlockDriverState
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:27 -05:00
Jan Kiszka ddd9bbd93b Support for multiple -monitor devices
Rebased version of Anthony's patch: Allow to specify more than one
monitor terminal via the -monitor command line switch. This is
particularly useful when libvirt or some other management tool already
occupies the primary monitor but you need another one for debugging.
The current clumsy workaround is to multiplex such additional terminals
over a qemu character device (e.g. -serial mon:<device>).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:27 -05:00
Jan Kiszka 9da4318706 net: Fix send queue ordering
Ensure that packets enqueued for delayed delivery are dequeued in FIFO
order. At least one simplistic guest TCP/IP stack became unhappy due to
sporadically reordered packet streams.

At this chance, switch the send queue implementation to TAILQ.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:27 -05:00
Glauber Costa 4e2f73ce3d 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 bit
further in time to prevent it.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:27 -05:00
Juan Quintela 67b3b71d51 Delay sighandler_setup()
If we are using --serial telnet:0:5555,server  or similar, ^C will not
kill qemu.  We need to first connect using telnet, and the the ^C takes
effect.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:26 -05:00
Amit Shah b84a5c6fa7 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
in declaration specifiers
/home/amit/src/qemu/hw/eepro100.c:112: warning: useless type name in
empty declaration
make[1]: *** [eepro100.o] Error 1

so just remove the typedef and include <stdbool.h> instead.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:26 -05:00
Andre Przywara 58a04db187 add documentation for multi-core features
extend QEMU's internal help and man page to cover the recently
added multi-core feature.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:26 -05:00
Juan Quintela d1f171bd3a piix3: use new vmstate infrastructure
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:26 -05:00
Juan Quintela 0c7d19e538 i440fx: use new vmstate infrastructure
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:25 -05:00
Juan Quintela fa3aad24d9 VMState: Fix sub-structs versioning
We can't check the version in a substruct, it is not stored anywhere

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:25 -05:00
Juan Quintela da64182c4e Update SaveVM versions
Now that we have all fields belonging to a PCIDevice, save each field
on the device that it belongs.  This means moving pci_irq_levels
from PCII440FXState to PIIX3State.
Old formats are loaded, but we only save on the new saner format.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:25 -05:00
Juan Quintela 8372615d3f pci_irq_levels[] belong to PIIX3State
With previous cleanups, now it is possible to put it where it belongs

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:25 -05:00
Juan Quintela 867a0d7dd0 Save irq_state into PCII440FXState
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:24 -05:00
Juan Quintela fd83e9b9dc We can add piix3_dev now to PIIX3IrqState
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:24 -05:00
Juan Quintela 85a750ca90 Fold piix3_init() intto i440fx_init
i440fx_init will now work properly if we don't setup piix3

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:24 -05:00
Juan Quintela bd7dce87ea Introduce PIIX3IrqState for piix3 irq's state
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:24 -05:00
Juan Quintela fd37d8813c Create PIIX3State instead of using PCIDevice for PIIX3
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:24 -05:00
Juan Quintela 5d4e84c8b9 We want the argument pass to set_irq to be opaque
piix_pci want to pass more things that the pic

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:23 -05:00
Juan Quintela 6c009fa446 Move smm_enabled and isa_memory_mappings to PCII440FXState
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:23 -05:00
Juan Quintela 0a3bacf34c Use PCII440FXState instead of generic PCIDevice
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:23 -05:00
Juan Quintela 15dc11286f low_set_irq is not used anywhere
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:22 -05:00
Juan Quintela 823e675a07 Split piix4 support from piix_pci.c
Now mips_malta uses piix4 and pc's use piix_pci definitions

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:22 -05:00
Juan Quintela a4bf1f3e17 piix4 don't use pci_irq_levels at all
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:22 -05:00
Edgar E. Iglesias 0187688f32 microblaze: Trap on illegal load/store sizes.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-04 10:38:59 +02:00
Edgar E. Iglesias 329bfa7739 microblaze: Correct FPU decoding masks.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-04 09:40:49 +02:00
Edgar E. Iglesias 3aa8098843 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>
2009-09-03 22:28:21 +02:00
Edgar E. Iglesias faed1c2a23 microblaze: Trap on bus accesses to unmapped areas.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 13:25:09 +02:00
Edgar E. Iglesias 3c50a71fc9 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.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 13:04:02 +02:00
Edgar E. Iglesias 968a40f6fa microblaze: Trap on unaligned data accesses.
Untested...

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 12:59:46 +02:00
Edgar E. Iglesias 821ebb33e4 microblaze: Trap on divizions by zero.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 12:52:01 +02:00
Edgar E. Iglesias ee7dbcf834 microblaze: Correct mfs into r0.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 11:18:55 +02:00
Edgar E. Iglesias 1567a00568 microblaze: Catch illegal insns and privilege violations.
Raise illegal instruction exceptions when executing instructions that
require units not available on the particulare microblaze configuration.

Also trap priviliege violations made by userspace.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 11:12:30 +02:00
Edgar E. Iglesias cedb936bfc microblaze: Add infrastructure for supporting hw exceptions.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 10:25:00 +02:00
Edgar E. Iglesias a75cf0c52d microblaze: Clear exception in dslot ESR bit if not in dslot.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 10:15:17 +02:00
Edgar E. Iglesias 21d2063605 microblaze: Correct MMU debug log.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03 10:13:08 +02:00
Kirill A. Shutemov f9c7b77c8e Fix warning on x86_64
audio/esdaudio.c: In function 'qesd_thread_out':
audio/esdaudio.c:136: error: format '%d' expects type 'int', but
argument 3 has type 'ssize_t'
audio/esdaudio.c: In function 'qesd_thread_in':
audio/esdaudio.c:366: error: format '%d' expects type 'int', but
argument 3 has type 'ssize_t'

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: malc <av1474@comtv.ru>
2009-09-02 16:46:13 +04:00
Blue Swirl 9902571dcd Sparc32: port sun4c interrupt controller to VMState design
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 19:30:21 +00:00
Blue Swirl f4b19cd021 Sparc32: port timers to VMState design
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 19:30:18 +00:00
Blue Swirl 9ebec28b6c Sparc32: timer field is never NULL
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 19:30:17 +00:00
Blue Swirl 55a6e51f2a Add VMState support for ptimers
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 19:30:15 +00:00
Artyom Tarasenko 4e2a68c1e1 esp (sparc32) Extra scsi data.
> ESP: Message Accepted (12)
> ESP: Transfer status (sense=0)
> ESP: read reg[5]: 0x20
> ESP: read reg[4]: 0x07
> ESP: read reg[7]: 0x02
> Extra scsi data. Fatal error.

It looks like "Message Accepted" shouldn't write a response. At least
ESP_RFLAGS must definetely be 0. With the following fix OBP goes one
step further:

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 17:12:11 +00:00
Stefan Weil 9e3a95ef47 Fix compiler warnings
Starting with commit df7a86ed73,
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
/home/stefan/src/qemu/savannah/qemu/slirp/slirp.c:50: warning: (near initialization for ‘dns_addr.S_un’)

Removing the assignment fixes the warning without the need of special code
for mingw32 (and also saves some bytes in the resulting binary).

To fix another potential compiler warning, the missing 'static'
attribute was added.

The same changes were applied to dns_addr_time.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 15:41:53 +00:00
Blue Swirl 528e93a978 Fix breakage due to __thread
Thread-local storage is not supported on all hosts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-31 15:14:40 +00:00
Blue Swirl 757506d282 Fix gcc 3 warning: comparison is always true due to limited range of data type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-29 16:37:34 +03:00
Blue Swirl 2000cbc50d Fix gcc 3 warning about uninitialized variable
If nb_sectors is 0, cluster_offset will not be initialized.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-29 16:37:26 +03:00
Blue Swirl d37adb099c Sparc32: port Slavio misc devices to VMState design
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-29 16:37:09 +03:00
Blue Swirl c21011a963 Sparc32: port ECC memory controller to VMState design
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-29 16:36:58 +03:00
Blue Swirl db3c9e08e0 Sparc32: port IOMMU to VMState design
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-28 20:46:21 +00:00