sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

3393 Commits

Author SHA1 Message Date
Luiz Capitulino 9eedeb3b88 QMP: Introduce WATCHDOG event
It's emitted whenever the watchdog device's timer expires. The action
taken is provided in the 'data' member.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-09 08:47:27 -06:00
Gerd Hoffmann bd87813e8c kbd leds: usb kbd
Add led status notification support to the usb kbd driver.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-09 08:47:20 -06:00
Gerd Hoffmann 6937b3766f kbd leds: ps/2 kbd
Add led status notification support to the ps/2 kbd driver.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-09 08:47:20 -06:00
Markus Armbruster 32bb404a6a scsi: Make device scsi-disk reject /dev/sg*
You're supposed to use scsi-generic for that.  Which rejects anything
but /dev/sg*.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-09 08:47:20 -06:00
Markus Armbruster 27f3f8a362 qdev: Catch attempt to attach more than one device to a netdev
Guest device and host netdev are peers, i.e. it's a 1:1 relation.
However, we fail to enforce that:

    $ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio
    QEMU 0.12.50 monitor - type 'help' for more information
    (qemu) info network
    Devices not on any VLAN:
      net0: net=10.0.2.0, restricted=n peer=virtio-net-pci.0
      e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=net0
      virtio-net-pci.0: model=virtio-net-pci,macaddr=52:54:00:12:34:57 peer=net0

It's all downhill from there.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-09 08:47:20 -06:00
Markus Armbruster 6bf38816df qdev: Improve diagnostics for bad property values
Property "vlan" reports "failed to parse" even when the value parses
just fine, but the result doesn't name an existing VLAN.

Similarly, properties "drive", "chr" and "netdev" misleadingly report
"failed to parse" when the value doesn't name an existing host device.

Change PropertyInfo method parse to return an error code, so that
qdev_prop_parse() can report the error more accurately.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-09 08:47:19 -06:00
Amit Shah 573fb60c97 virtio-pci: Use DEV_NVECTORS_UNSPECIFIED instead of -1 for virtio-serial
Use the named constant instead of -1.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-08 11:30:09 -06:00
Amit Shah 75422b0d38 qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors
net.c used a constant to signify no MSI vectors were specified. Extend
that to all qdev devices.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-08 11:30:09 -06:00
Chris Kilgour 1a8e2aaa3f pcnet APROMWE bit location (retry)
According to AMD document 21485D pp.141, APROMWE is bit 8 of BCR2.

Signed-off-by: Christopher Kilgour <techie@whiterocker.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-08 11:30:09 -06:00
Izik Eidus cf602c7bf0 adding helper pci functions
Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-08 11:30:09 -06:00
Luiz Capitulino 80cd34787f QMP: Introduce RTC_CHANGE event
Emitted whenever the RTC time changes.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-08 11:30:09 -06:00
Luiz Capitulino 554a310bfe block: Emit BLOCK_IO_ERROR before vm_stop() call
The next commit will move the STOP event into do_vm_stop(), to
have the expected event sequence we need to emit the I/O error
event before calling vm_stop().

The expected sequence is:

{ "event": "BLOCK_IO_ERROR" [...] }
{ "event": "STOP" }

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-08 11:30:01 -06:00
Aurelien Jarno 921e169d61 ppc: don't define bamboo-0.13 as the default machine
It has been broken by commit 977b6b91ce.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-08 12:31:27 +01:00
Blue Swirl 70539e1850 Update to a hopefully more future proof FSF address
See also 8167ee8839,
530e7615ce and
fad6cb1a56.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-07 15:48:43 +00:00
Christoph Hellwig 99aba0c41b scsi: update comment on the standards revision
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 23:05:59 +01:00
Amit Shah 21be440c6a ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type
Disable the MULTIPORT feature and MSI vectors for the 0.12 machine
types; those features are added only for 0.13 onwards.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 22:56:54 +01:00
Amit Shah 977b6b91ce ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat
Add a 0.12 machine type for compatibility with older versions. Mark the
default one as 0.13.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 22:56:53 +01:00
Amit Shah ad509737f8 s390-virtio: Fix compile error for virtio-block init
Commit 428c149b0b modified the argument
that virtio_blk_init takes. Update the s390 bus code that calls this
function.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 22:55:18 +01:00
Aurelien Jarno cdee7bdfee hw/serial.c: fix THRE interrupt clearing
UART_IIR_THRI is not a mask, but a possible value for the IIR ID.
Use UART_IIR_ID to extract this value.

Broken by commit 71e605f803.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 22:28:07 +01:00
Aurelien Jarno 2f4f22bd44 hw/serial.c: fix indentation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 20:23:09 +01:00
Anthony Liguori f374e826e3 Merge remote branch 'qemu-kvm/uq/master' into pulls 2010-03-04 09:14:24 -06:00
Jan Kiszka 6cb2996cef x86: Extend validity of bsp_to_cpu
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals
cpu_index, bsp_to_cpu can also be based on the latter directly. This
will help an early user of it: KVM while initializing mp_state.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-03-04 00:29:32 -03:00
Jan Kiszka ea375f9ab8 KVM: Rework VCPU state writeback API
This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:

- cpu_synchronize_all_states in qemu_savevm_state_complete
  (initial sync from kernel before vmsave)
- cpu_synchronize_all_post_init in qemu_loadvm_state
  (writeback after vmload)
- cpu_synchronize_all_post_init in main after machine init
- cpu_synchronize_all_post_reset in qemu_system_reset
  (writeback after system reset)

These writeback points + the existing one of VCPU exec after
cpu_synchronize_state map on three levels of writeback:

- KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run)
- KVM_PUT_RESET_STATE   (on synchronous system reset, all VCPUs stopped)
- KVM_PUT_FULL_STATE    (on init or vmload, all VCPUs stopped as well)

This level is passed to the arch-specific VCPU state writing function
that will decide which concrete substates need to be written. That way,
no writer of load, save or reset functions that interact with in-kernel
KVM states will ever have to worry about synchronization again. That
also means that a lot of reasons for races, segfaults and deadlocks are
eliminated.

cpu_synchronize_state remains untouched, just as Anthony suggested. We
continue to need it before reading or writing of VCPU states that are
also tracked by in-kernel KVM subsystems.

Consequently, this patch removes many cpu_synchronize_state calls that
are now redundant, just like remaining explicit register syncs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-03-04 00:29:28 -03:00
Avi Kivity 60e4c6317b Allocate memory below 4GB as one chunk
Instead of allocating a separate chunk for the first 640KB and another
for 1MB+, allocate one large chunk.  This plays well in terms of alignment
and size with large pages.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-03-04 00:28:41 -03:00
Stefan Weil 78728c92a4 eepro100: Keep includes sorted
I always try to keep standard includes sorted
and add a comment why they are there (so they
can be removed when they are no longer needed).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:47:53 +02:00
Stefan Weil e7493b25c0 eepro100: Remove C++ comments
C++ comments are unwanted, so this is fixed here.

* Replace C++ comments by C comments.
* Put code which was deactivated by a C++ comment in #if 0...#endif.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:47:45 +02:00
Stefan Weil f80a7fc34e eepro100: Add diagnose command
Real hardware would run an internal self-test.
The emulation just returns a passed status.

Original patch was from Reimar Döffinger, thanks.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:44:32 +02:00
Stefan Weil 3d0f4b9bb5 eepro100: New function for reading command block
Move code which reads the command block to the
new function read_cb. The patch also fixes some
endianess issues related to the command block
and moves declarations of local variables to
the beginning of the block.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:44:20 +02:00
Stefan Weil ec1d02d8de eepro100: Use tx.status
There is no need for a local variable "status".
Using tx.status makes it clearer which status
is addressed.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:19 +02:00
Stefan Weil cc02c66cc8 eepro100: Prettify code (no functional changes)
* Fix indentation.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:17 +02:00
Stefan Weil cb25a3fb60 eepro100: Fix CU Start command
CU Start is allowed when the CU is in the idle or suspended state.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:10 +02:00
Stefan Weil e824012bc2 eepro100: Support RNR interrupt
The RNR interrupt is triggered under these conditions:

* the RU is not ready to receive a frame due to missing resources
* the RU is ready and a RU abort command was requested

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:07 +02:00
Stefan Weil e715c8e84c eepro100: Replace variable name to fix a compiler warning
When compiling with -Wshadow, gcc gives a warning
which is fixed by renaming stat -> status.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:06 +02:00
Stefan Weil b1e87018f2 eepro100: Use symbolic names for bits in EEPROM id
V2 - Use UPPER_CASE for enum values

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:04 +02:00
Stefan Weil c5bac30252 eepro100: Remove old unused code
This code is no longer needed.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:02 +02:00
Stefan Weil ced5296ab7 eepro100: Use symbolic names and BIT macros in binary operations
Instead of magic numbers like 0x8000, symbolic names are used
for the SCB command and status bits.

There are too many configuration bits to use symbolic names
there, too. Using the BIT macro is a little help when comparing
code and documentation.

For the same reason, some other constants were replaced by
the BITS macro.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:34:01 +02:00
Stefan Weil 762401e2f8 eepro100: Add device descriptions
Add descriptions for all devices.
These descriptions are shown when users call
		qemu -device ?

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:59 +02:00
Stefan Weil 230a167c29 eepro100: Update copyright notice
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:57 +02:00
Stefan Weil ba19f2dea5 eepro100: Add TODO list
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:55 +02:00
Stefan Weil da51e79b7f eepro100: Support gpxe boot for all eepro100 devices
Only two boot ROM files are needed for all devices.

* Add these GPXE ROM files using new naming convention
  (as discussed on qemu-devel). Both files were created
  with http://rom-o-matic.net/, PCI vendor / device ids
  as in ROM filenames and option BANNER_TIMEOUT = 0.

* Remove old PXE ROM file for i82559er.
  It was replaced by gpxe-eepro100-80861209.rom.

* Update pc-bios/README (and sort entries).

Full support still needs additional eepro100 fixes.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:52 +02:00
Stefan Weil 6cded3a43a eepro100: Fix PXE boot
The phy handling was wrong for PXE, GPXE boot:
GPXE's eepro100 driver did not detect a valid link.

This is fixed here.

V2 - Use UPPER_CASE for enum values

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:50 +02:00
Stefan Weil 0908bba157 eepro100: Add missing SCB register names
Some system control block registers were addressed
using their offset value. Use symbolic names now
and clean the documentation.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:48 +02:00
Stefan Weil ce0e58b394 eepro100: Fix compiler errors from debug messages
When debug output was enabled (by defining DEBUG_EEPRO100),
some debug messages resulted in a compiler error.

This is fixed here.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:46 +02:00
Paul Brook 35bed8ee91 Move ioport.h out of cpu-all.h
Only include ioport.h where it is actually needed.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-03-01 03:29:21 +00:00
Richard Henderson 6049f4f831 alpha-linux-user: Implement signals.
Move userland PALcode handling into linux-user main loop so that
we can send signals from there.  This also makes alpha_palcode.c
system-level only, so don't build it for userland.  Add defines
for GENTRAP PALcall mapping to signals.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-28 17:54:52 +01:00
Liu Yu 75bb6589c9 powerpc/e500: adjust fdt and ramdisk loading addr
Since kernel uimage is getting bigger,
old fixed loading bases will result in regions overlap.

Add pad for fdt and ramdisk, so that they won't overlap with uimage.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-27 19:48:00 +01:00
Aurelien Jarno dbf916d85b powerpc: fix compilation with CONFIG_FDT undefined
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-27 19:47:22 +01:00
Liu Yu 04088adbe0 powerpc/booke: move fdt loading to rom infrastructure
It's convinent to use rom to checking overlap, to reset etc.
And uImage and ramdisk loading has already moved to it.

Also, after we add fdt to rom, free it.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-27 16:30:21 +01:00
Liu Yu c49638177f target-ppc: add synchronize register for booke init
So that the following registers init could be flushed back to kvm.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Acked-by: Hollis Blanchard <hollis@penguinppc.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-27 16:21:04 +01:00
Paul Brook d44168fffa Fix -usbdevice crash
If -usbdevice is used on a machine with no USB busses, usb_create
will fail and return NULL.  Patch below handles this failure gracefully
rather than crashing when we try to init the device.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-02-25 13:29:06 +00:00