Commit Graph

4444 Commits

Author SHA1 Message Date
Blue Swirl c74b88dffc vga-isa: make optional
Ignore failure with vga-isa device creation, but print a warning
message.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:34:44 +00:00
Blue Swirl 7435b791ca vga-isa: convert to qdev
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:34:31 +00:00
Blue Swirl 17801c78fe fdc: make optional
Ignore failure with fdc device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:34:06 +00:00
Blue Swirl 63ffb564dc fdc: refactor device creation
Turn fdc_init_isa into an inline function.

Get floppy geometry directly from the drives.

Don't expose FDCtrl.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:33:46 +00:00
Blue Swirl d288c7ba7b fdc: use FDriveType for floppy drive type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:33:26 +00:00
Blue Swirl 5bbdbb4676 fdc: move floppy geometry guessing to block.c
Other geometry guessing functions already reside in block.c.

Remove some unused or debugging only fields.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:33:17 +00:00
Blue Swirl 9b13ef9f4c serial: make optional
Ignore failure with serial device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:33:03 +00:00
Blue Swirl e22cf21efd serial: refactor device creation
Turn serial_init into an inline function.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:32:50 +00:00
Blue Swirl cd1b8a8b0d ne2000_isa: make optional
Ignore failure with ne2000_isa device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:32:35 +00:00
Blue Swirl 60a14ad31e ne2000_isa: refactor device creation
Turn isa_ne2000_init into an inline function.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:32:26 +00:00
Blue Swirl 7353153891 parallel: make optional
Ignore failure with parallel device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:31:57 +00:00
Blue Swirl defdb20e1a parallel: refactor device creation
Turn parallel_init into an inline function.

Don't expose ParallelState.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-20 09:31:21 +00:00
Marcelo Tosatti e14da0af64 Fix vmport segfault (v2)
Fix regression caused by qdev conversion.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-17 19:34:52 +00:00
Anthony Liguori c5d69e6bbf Merge remote branch 'qemu-kvm/uq/master' into staging 2011-02-16 08:47:07 -06:00
Dmitry Eremin-Solenikov 459505a264 Merge mainstone.h header into mainstone.c
Now the only user of mainstone.h is mainstone.c file. Merge header
into board file.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-16 02:04:51 +01:00
Dmitry Eremin-Solenikov cb380f615c mainstone: convert FPGA emulation code to use QDev/SysBus
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-16 02:04:03 +01:00
Dmitry Eremin-Solenikov 43d91709c1 mainstone: correct and simplify irq handling
Simplify IRQ handling to stop setting an input irq pin. As a win, also get
correct IRQ status after save/load cycle.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-16 02:00:27 +01:00
Gleb Natapov 0fbfbb59a9 correctly check ppr priority during interrupt injection]
TPR blocks all interrupts in a priority class, so simple "less or
equal" check is not enough.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-14 08:43:30 -06:00
Jan Kiszka 0ec329dab9 kvm: x86: Introduce kvmclock device to save/restore its state
If kvmclock is used, which implies the kernel supports it, register a
kvmclock device with the sysbus. Its main purpose is to save and restore
the kernel state on migration, but this will also allow to visualize it
one day.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
CC: Glauber Costa <glommer@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-02-14 12:43:09 -02:00
Jan Kiszka 638a84af9f cirrus: Remove obsolete kvm.h include
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-02-14 12:39:47 -02:00
Anthony PERARD e5896b12e2 Introduce log_start/log_stop in CPUPhysMemoryClient
In order to use log_start/log_stop with Xen as well in the vga code,
this two operations have been put in CPUPhysMemoryClient.

The two new functions cpu_physical_log_start,cpu_physical_log_stop are
used in hw/vga.c and replace the kvm_log_start/stop. With this, vga does
no longer depends on kvm header.

[ Jan: rebasing and style fixlets ]

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-02-14 12:39:47 -02:00
Jan Kiszka e07bbac542 Improve vm_stop reason declarations
Define and use dedicated constants for vm_stop reasons, they actually
have nothing to do with the EXCP_* defines used so far. At this chance,
specify more detailed reasons so that VM state change handlers can
evaluate them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-02-14 12:39:46 -02:00
Blue Swirl 8668f61d20 vmmouse: fix queue_size field initialization
Initialize the field queue_size, dropped by
91c9e09147.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 17:44:11 +00:00
Blue Swirl dd703b991c hpet: make optional
Ignore failure with hpet device creation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 09:45:06 +00:00
Blue Swirl 4912371fc3 sysbus: add creation function that may fail
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 09:45:03 +00:00
Blue Swirl 86d864140b x86: make vmmouse optional
Compile vmmouse in hwlib. Ignore failure if vmmouse device can't be
created.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 09:43:44 +00:00
Blue Swirl 86f4a9a5c7 isa: add creation function that may fail
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 09:43:41 +00:00
Blue Swirl 91c9e09147 vmmouse: convert to qdev
Convert to qdev, also add a proper reset function.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 09:34:56 +00:00
Blue Swirl 6872ef610b vmport: convert to qdev
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 08:28:24 +00:00
Blue Swirl 7ba7e49e6a x86,MIPS: make vmware_vga optional
Allow failure with vmware_vga device creation and use standard
VGA instead.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 08:28:22 +00:00
Blue Swirl 7cc050b165 pci: add creation functions that may fail
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 08:27:58 +00:00
Blue Swirl 0bcdeda7e4 qdev: add creation function that may fail
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 08:27:55 +00:00
Blue Swirl 5c81e4ca9e vmware_vga: refactor device creation
Turn vmsvga_init into an inline function.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-02-12 08:27:53 +00:00
Andrzej Zaborowski 55619bb667 mst_fpga: Drop one more pxa.h inclusion.
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:35:20 +01:00
Dmitry Eremin-Solenikov c8ba63f829 pxa2xx: convert i2c master to use qdev/vmsd
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:31:17 +01:00
Dmitry Eremin-Solenikov 987e8b3b03 max7310: finish qdev'ication
1) Move GPIO-related functionality to qdev. Now one can use directly
qdev_get_gpio_in()/qdev_connect_gpio_out() on max7310 devices.

2) Make reset to be called through qdev.reset callback.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:31:17 +01:00
Dmitry Eremin-Solenikov 2e4b4e79c6 tosa: we aren't connected to VBus, pass this info to Linux kernel
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:31:16 +01:00
Dmitry Eremin-Solenikov bb70651e45 mainstone: pass one irq to the mst_fpga instead of the whole PIC
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:31:16 +01:00
Dmitry Eremin-Solenikov 21c75ddbf9 Drop unnecessary inclusions of pxa.h header
Seceral files contained onnecessary dependencies on hw/pxa.h header.
Drop unused references.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:31:16 +01:00
Dmitry Eremin-Solenikov 7fe63a170a Add scoop post_load callback that sets IRQs to loaded levels
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 23:31:16 +01:00
Dmitry Eremin-Solenikov f23c1b2a38 tc6393xb: correct NAND isr assertion
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 01:52:04 +01:00
Dmitry Eremin-Solenikov 0fba9fd6c3 sysbus: print number of irqs in dev_print
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-02-11 01:13:52 +01:00
Marcelo Tosatti 84fb392526 blockdev: add refcount to DriveInfo
The host part of a block device can be deleted with in progress
block migration.

To fix this, add a reference count to DriveInfo, freeing resources
on last reference.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 12:51:19 +01:00
Alexander Graf 2c4b9d0ea4 ahci: make number of ports runtime determined
Different AHCI controllers have a different number of ports, so the core
shouldn't care about the amount of ports available.

This patch makes the number of ports available to the AHCI core runtime
configurable, allowing us to have multiple different AHCI implementations
with different amounts of ports.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 11:40:31 +01:00
Alexander Graf 760c3e44d3 ahci: Implement HBA reset
The ahci code was missing its soft reset functionality. This wasn't really an
issue for Linux guests, but Windows gets confused when the controller doesn't
reset when it tells it so.

Using this patch I can now successfully boot Windows 7 from AHCI using AHCI
enabled SeaBIOS.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 11:38:57 +01:00
Alexander Graf 87e62065bb ahci: send init d2h fis on fis enable
The drive sends a d2h init fis on initialization. Usually, the guest doesn't
receive fises yet at that point though, so the delivery is deferred.

Let's reflect that by sending the init fis on fis receive enablement.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 11:38:35 +01:00
Alexander Graf 7fb6577b13 ahci: split ICH and AHCI even more
Sebastian's patch already did a pretty good job at splitting up ICH-9
AHCI code and the AHCI core. We need some more though. Copyright was missing,
the lspci dump belongs to ICH-9, we don't need the AHCI core to have its
own qdev device duplicate.

So let's split them a bit more in this patch, making things easier to
read an understand.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 11:37:17 +01:00
Alexander Graf f83a40dcd7 ahci: add license header in ahci.h
Due to popular request, this patch adds a license header to ahci.h

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 11:35:03 +01:00
Sebastian Herbszt 03c7a6a8e7 ahci: split ICH9 from core
There are multiple ahci devices out there. The currently implemented ich-9
is only one of the many. So let's split that one out into a separate file
to stress the difference.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-07 11:14:01 +01:00
Jan Kiszka 1f5e71a8e6 ioapic: Style & magics cleanup
Fix a few style issues and convert magic numbers into prober symbolic
constants, also fixing the wrong but unused IOAPIC_DM_SIPI value.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-04 06:33:26 -06:00