summaryrefslogtreecommitdiffstats
path: root/hw/pc.c
Commit message (Collapse)AuthorAgeFilesLines
* target-i386: Pass X86CPU to cpu_x86_set_a20()Andreas Färber2013-02-011-3/+4
| | | | | | | | | Prepares for cpu_interrupt() changing argument to CPUState. While touching it, rename to x86_cpu_...() now that it takes an X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
* pc: Set fw_cfg data based on APIC ID calculationEduardo Habkost2013-01-271-5/+35
| | | | | | | | | This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* fw_cfg: Remove FW_CFG_MAX_CPUS from fw_cfg_init()Eduardo Habkost2013-01-271-1/+1
| | | | | | | | PC will not use max_cpus for that field, so move it outside the common code so it can use a different value on PC. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* sysbus: Drop sysbus_from_qdev() cast macroAndreas Färber2013-01-211-2/+2
| | | | | | | | | | | Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion. Avoids the old macro creeping into new code. Resolve a Coding Style warning in openpic code. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fw_cfg: Use void *, size_t instead of uint8_t *, uint32_t for blobsMarkus Armbruster2013-01-191-7/+6
| | | | | | | | | | | Many callers pass size_t, which gets silently truncated to uint32_t. Harmless, because all practical sizes are well below 4GiB. Clean it up anyway. Size overflow now fails assertions. Bonus: saves a whole bunch of silly casts. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pc: Clean up bochs_bios_init()'s (non-)use of sizeofMarkus Armbruster2013-01-191-3/+3
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pc: Fix unchecked strdup() by switching to fw_cfg_add_string()Markus Armbruster2013-01-191-3/+1
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* hw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return valueJulien Grall2013-01-121-2/+2
| | | | | | | | The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilation for i386. ULL need to be specify for uint64_t value. Signed-off-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2013-01-111-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: hw/pc.c: Fix converting of ioport_register* to MemoryRegion Replace remaining gmtime, localtime by gmtime_r, localtime_r savevm: Remove MinGW specific code which is no longer needed qga/channel-posix.c: Explicitly include string.h configure: Fix comment (copy+paste bug) readline: avoid memcpy() of overlapping regions Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * hw/pc.c: Fix converting of ioport_register* to MemoryRegionJulien Grall2013-01-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 258711 introduced MemoryRegion to replace ioport_region* for ioport 80h and F0h. A MemoryRegion needs to have both read and write callback otherwise a segfault will occur when an access is made. The previous behaviour of this both ioport is to return 0xffffffffffffffff. So keep this behaviour. Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Julien Grall <julien.grall@citrix.com> Tested-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Make all static TypeInfos constAndreas Färber2013-01-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'kraxel/testdev.1' into stagingAnthony Liguori2013-01-041-41/+0
|\ | | | | | | | | | | | | | | | | | | * kraxel/testdev.1: pc: remove bochs bios debug ports hw: Add test device for unittests execution add isa-debug-exit device. switch debugcon to memory api Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * pc: remove bochs bios debug portsGerd Hoffmann2013-01-041-41/+0
| | | | | | | | | | | | | | | | | | Prehistoric leftover, zap it. We poweroff via acpi these days. And having a port (0x501,0x502) where any random guest write will make qemu exit -- with no way to turn it off -- is a bad joke anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | acpi: autoload dsdtGerd Hoffmann2013-01-041-0/+23
|/ | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-4/+4
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* monitor: move include files to include/monitor/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* pci: update all users to look in pci/Michael S. Tsirkin2012-12-171-2/+2
| | | | | | update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* hw/pc.c: Replace register_ioport_*Julien Grall2012-12-041-9/+40
| | | | | | | | | | Replace all register_ioport_*() with portio_*() or a MemoryRegion. This permits to use the new Memory stuff like listeners. Signed-off-by: Julien Grall <julien.grall@citrix.com> Acked-by: Avi Kivity <avi@redhat.com> [AF: Rebased onto hwaddr] Signed-off-by: Andreas Färber <afaerber@suse.de>
* pc: Move ioapic_init() from pc_piix.c to pc.cJason Baron2012-11-261-0/+24
| | | | | | | | | | Move ioapic_init() from pc_piix.c to pc.c, to make it a common function. Rename ioapic_init() -> ioapic_init_gsi(). Move to pc.h so q35 can use them as well. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pc, pc_piix: split out pc nic initializationIsaku Yamahata2012-11-261-0/+15
| | | | | | | | | | | | Factor out pc nic initialization. This simplifies the pc initialization and will reduce the code duplication of q35 pc initialization. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-i386: Initialize APIC at CPU levelIgor Mammedov2012-10-301-51/+5
| | | | | | | | | | | | | (L)APIC is a part of cpu [1] so move APIC initialization inside of x86_cpu object. Since cpu_model and override flags currently specify whether APIC should be created or not, APIC creation&initialization is moved into x86_cpu_apic_init() which is called from x86_cpu_realize(). [1] - all x86 cpus have integrated APIC if we overlook existence of i486, and it's more convenient to model after majority of them. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* pc port92: convert PIO to new memory api read/writeAlexander Graf2012-10-291-8/+11
| | | | Signed-off-by: Alexander Graf <agraf@suse.de>
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-2/+2
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: split serial.cGerd Hoffmann2012-10-221-0/+1
| | | | | | | | | | Split serial.c into serial.c, serial.h and serial-isa.c. While being at creating a serial.h header file move the serial prototypes from pc.h to the new serial.h. The latter leads to s/pc.h/serial.h/ in tons of boards which just want the serial bits from pc.h Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pc: use the new pci_vga_init() and isa_vga_init() functionsAurelien Jarno2012-10-061-29/+6
| | | | | | | The CONFIG_SPICE is now tested in vl.c and thus not needed anymore. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* vga: rename isa_vga_init() to isa_std_vga_init()Aurelien Jarno2012-10-061-1/+1
| | | | | | | This better explains what is this function about. Adjust all callers. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* vga: rename pci_vga_init() into pci_std_vga_init()Aurelien Jarno2012-10-061-1/+1
| | | | | | | | | | | | | This better explains what is this function about. Adjust all callers. Cc: Alexander Graf <agraf@suse.de> Cc: Andreas Färber <andreas.faerber@web.de> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* pc: Drop practically unused BOCHS BIOS debug portsJan Kiszka2012-09-171-27/+0
| | | | | | | | We have debugcon these days to listen on those ports that receive debug messages. Also drop the others that have no effect anymore. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pc: Fix RTC CMOS info on RAM for ram_size < 1MiBMarkus Armbruster2012-08-181-13/+18
| | | | | | | | | | | | pc_cmos_init() always claims 640KiB base memory, and ram_size - 1MiB extended memory. The latter can underflow to "lots of extended memory". Fix both, and clean up some. Note: SeaBIOS currently requires 1MiB of RAM, and doesn't check whether it got enough. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add one new file vga-pci.h and cleanup on all platformszhlcindy@gmail.com2012-08-151-0/+1
| | | | | | | | | | | | Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all platforms. This patch also cleans up on all platforms. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* kvm: Move kvm_allows_irq0_override() to target-i386, fix return typePeter Maydell2012-08-091-0/+1
| | | | | | | | | | | | | kvm_allows_irq0_override() is a totally x86 specific concept: move it to the target-specific source file where it belongs. This means we need a new header file for the prototype: kvm_i386.h, in line with the existing kvm_ppc.h. While we are moving it, fix the return type to be 'bool' rather than 'int'. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
* Fixes related to processing of qemu's -numa optionChegu Vinod2012-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -numa option to qemu is used to create [fake] numa nodes and expose them to the guest OS instance. There are a couple of issues with the -numa option: a) Max VCPU's that can be specified for a guest while using the qemu's -numa option is 64. Due to a typecasting issue when the number of VCPUs is > 32 the VCPUs don't show up under the specified [fake] numa nodes. b) KVM currently has support for 160VCPUs per guest. The qemu's -numa option has only support for upto 64VCPUs per guest. This patch addresses these two issues. Below are examples of (a) and (b) a) >32 VCPUs are specified with the -numa option: /usr/local/bin/qemu-system-x86_64 \ -enable-kvm \ 71:01:01 \ -net tap,ifname=tap0,script=no,downscript=no \ -vnc :4 ... Upstream qemu : -------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 6 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 32 33 34 35 36 37 38 39 40 41 node 0 size: 131072 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 42 43 44 45 46 47 48 49 50 51 node 1 size: 131072 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 52 53 54 55 56 57 58 59 node 2 size: 131072 MB node 3 cpus: 30 node 3 size: 131072 MB node 4 cpus: node 4 size: 131072 MB node 5 cpus: 31 node 5 size: 131072 MB With the patch applied : ----------------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 6 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 node 0 size: 131072 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 node 1 size: 131072 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 node 2 size: 131072 MB node 3 cpus: 30 31 32 33 34 35 36 37 38 39 node 3 size: 131072 MB node 4 cpus: 40 41 42 43 44 45 46 47 48 49 node 4 size: 131072 MB node 5 cpus: 50 51 52 53 54 55 56 57 58 59 node 5 size: 131072 MB b) >64 VCPUs specified with -numa option: /usr/local/bin/qemu-system-x86_64 \ -enable-kvm \ -cpu Westmere,+rdtscp,+pdpe1gb,+dca,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+d-vnc :4 ... Upstream qemu : -------------- only 63 CPUs in NUMA mode supported. only 64 CPUs in NUMA mode supported. QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 8 nodes node 0 cpus: 6 7 8 9 38 39 40 41 70 71 72 73 node 0 size: 65536 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 42 43 44 45 46 47 48 49 50 51 74 75 76 77 78 79 node 1 size: 65536 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 52 53 54 55 56 57 58 59 60 61 node 2 size: 65536 MB node 3 cpus: 30 62 node 3 size: 65536 MB node 4 cpus: node 4 size: 65536 MB node 5 cpus: node 5 size: 65536 MB node 6 cpus: 31 63 node 6 size: 65536 MB node 7 cpus: 0 1 2 3 4 5 32 33 34 35 36 37 64 65 66 67 68 69 node 7 size: 65536 MB With the patch applied : ----------------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 8 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 node 0 size: 65536 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 node 1 size: 65536 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 node 2 size: 65536 MB node 3 cpus: 30 31 32 33 34 35 36 37 38 39 node 3 size: 65536 MB node 4 cpus: 40 41 42 43 44 45 46 47 48 49 node 4 size: 65536 MB node 5 cpus: 50 51 52 53 54 55 56 57 58 59 node 5 size: 65536 MB node 6 cpus: 60 61 62 63 64 65 66 67 68 69 node 6 size: 65536 MB node 7 cpus: 70 71 72 73 74 75 76 77 78 79 Signed-off-by: Chegu Vinod <chegu_vinod@hp.com>, Jim Hull <jim.hull@hp.com>, Craig Hada <craig.hada@hp.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-i386: move cpu_reset and reset callback to cpu.cIgor Mammedov2012-08-011-8/+1
| | | | | | | | | | | | | | | | Moving reset callback into cpu object from board level and resetting cpu at the end of x86_cpu_realize() will allow properly create cpu object during run-time (hotplug) without calling reset externaly. When reset over QOM hierarchy is implemented, reset callback should be removed. v2: - leave cpu_reset in pc_new_cpu() for now, it's to be cleaned up when APIC init is moved in cpu.c Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-i386: move cpu halted decision into x86_cpu_resetIgor Mammedov2012-08-011-9/+0
| | | | | | | | | | | | | | | | | | | | | MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this. However there is no point in implementing MP initialization protocol in qemu. Thus first CPU is always marked as BSP. This patch: - moves decision to designate BSP from board into cpu, making cpu self-sufficient in this regard. Later it will allow to cleanup hw/pc.c and remove cpu_reset and wrappers from there. - stores flag that CPU is BSP in IA32_APIC_BASE to model behavior described in Inted SDM vol 3a part 1 chapter 8.4.1 - uses MSR_IA32_APICBASE_BSP flag in apic_base for checking if cpu is BSP patch is based on Jan Kiszka's proposal: http://thread.gmane.org/gmane.comp.emulators.qemu/100806 Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hd-geometry: Compute BIOS CHS translation in one placeMarkus Armbruster2012-07-171-15/+4
| | | | | | | | | | | Currently, it is split between hd_geometry_guess() and pc_cmos_init_late(). Confusing. info qtree shows the result of the former. Also confusing. Fold the part done in pc_cmos_init_late() into hd_geometry_guess(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Geometry and translation hints are now useless, purge themMarkus Armbruster2012-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There are two producers of these hints: drive_init() on behalf of -drive, and hd_geometry_guess(). The only consumer of the hint is hd_geometry_guess(). The callers of hd_geometry_guess() call it only when drive_init() didn't set the hints. Therefore, drive_init()'s hints are never used. Thus, hd_geometry_guess() only ever sees hints it produced itself in a prior call. Only the first call computes something, subsequent calls just repeat the first call's results. However, hd_geometry_guess() is never called more than once: the device models don't, and the block device is destroyed on unplug. Thus, dropping the repeat feature doesn't break anything now. If a block device wasn't destroyed on unplug and could be reused with a new device, then repeating old results would be wrong. Thus, dropping the repeat feature prevents future breakage. This renders the hints unused. Purge them from the block layer. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* ide pc: Cut out the block layer geometry middlemanMarkus Armbruster2012-07-171-24/+27
| | | | | | | | | | PC BIOS setup needs IDE geometry information. Get it directly from the device model rather than through the block layer. In preparation of purging geometry from the block layer, which will happen later in this series. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* fdc: Move floppy geometry guessing back from block.cMarkus Armbruster2012-07-171-9/+2
| | | | | | | | | | | | | | | | | Commit 5bbdbb46 moved it to block.c because "other geometry guessing functions already reside in block.c". Device-specific functionality should be kept in device code, not the block layer. Move it back. Disk geometry guessing is still in block.c. To be moved out in a later patch series. Bonus: the floppy type used in pc_cmos_init() now obviously matches the one in the FDrive. Before, we relied on bdrv_get_floppy_geometry_hint() picking the same type both in fd_revalidate() and in pc_cmos_init(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Add PIIX4 properties to control PM system states.Gleb Natapov2012-06-191-1/+2
| | | | | | | | | | | | | | | | | | This patch adds two things. First it allows QEMU to distinguish between regular powerdown and S4 powerdown. Later separate QMP notification will be added for S4 powerdown. Second it allows S3/S4 states to be disabled from QEMU command line. Some guests known to be broken with regards to power management, but allow to use it anyway. Using new properties management will be able to disable S3/S4 for such guests. Supported system state are passed to a firmware using new fw_cfg file. The file contains 6 byte array. Each byte represents one system state. If byte at offset X has its MSB set it means that system state X is supported and to enter it guest should use the value from lowest 3 bits. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pc: Pass X86CPU to pc_cpu_reset()Andreas Färber2012-06-041-4/+5
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* pc: Use cpu_x86_init() to obtain X86CPUAndreas Färber2012-06-041-4/+6
| | | | | | | | | Needed for pc_cpu_reset(). Also change return type to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2012-06-031-9/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/uq/master: virtio/vhost: Add support for KVM in-kernel MSI injection msix: Add msix_nr_vectors_allocated kvm: Enable use of kvm_irqchip_in_kernel in hwlib code kvm: Introduce kvm_irqchip_add/remove_irqfd kvm: Make kvm_irqchip_commit_routes an internal service kvm: Publicize kvm_irqchip_release_virq kvm: Introduce kvm_irqchip_add_msi_route kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route msix: Introduce vector notifiers msix: Invoke msix_handle_mask_update on msix_mask_all msix: Factor out msix_get_message kvm: update vmxcap for EPT A/D, INVPCID, RDRAND, VMFUNC kvm: Enable in-kernel irqchip support by default kvm: Add support for direct MSI injections kvm: Update kernel headers kvm: x86: Wire up MSI support for in-kernel irqchip pc: Enable MSI support at APIC level kvm: Introduce basic MSI support for in-kernel irqchips Introduce MSIMessage structure kvm: Refactor KVMState::max_gsi to gsi_count
| * pc: Enable MSI support at APIC levelJan Kiszka2012-05-161-9/+0
| | | | | | | | | | | | | | | | | | | | Push msi_supported enabling to the APIC implementations where we can encapsulate the decision more cleanly, hiding the details from the generic code. Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | Merge remote-tracking branch 'sstabellini/for_1.1_rc3' into stagingAnthony Liguori2012-05-291-10/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sstabellini/for_1.1_rc3: Call xc_domain_shutdown with the reboot flag when the guest requests a reboot. xen: Fix PV-on-HVM xen_disk: properly update stats in ioreq_release() xen_disk: use bdrv_aio_flush instead of bdrv_flush xen_disk: remove syncwrite option xen: disable rtc_clock xen: do not initialize the interval timer and PCSPK emulator
| * | xen: do not initialize the interval timer and PCSPK emulatorStefano Stabellini2012-05-171-10/+13
| |/ | | | | | | | | | | | | | | PIT and PCSPK are emulated by the hypervisor so we don't need to emulate them in Qemu: this patch prevents Qemu from waking up needlessly at PIT_FREQ on Xen. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | fdc: floppy drive should be visible after start without mediaPavel Hrdina2012-05-251-1/+1
|/ | | | | | | | If you start guest with floppy drive but without media inserted, guest still should see floppy drive pressent. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* xen: add a dummy xc_hvm_inject_msi for Xen < 4.2Stefano Stabellini2012-04-171-1/+1
| | | | | | | | | | xc_hvm_inject_msi is only available on Xen >= 4.2: add a dummy compatibility function for Xen < 4.2. Also enable msi support only on Xen >= 4.2. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
* Xen: Add xen-apic support and hook it up.Wei Liu2012-04-131-0/+8
| | | | | | Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud