summaryrefslogtreecommitdiff
path: root/hw/i386/pc_piix.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-04pc: pass PCI hole ranges to GuestsMichael S. Tsirkin1-1/+15
Guest currently has to jump through lots of hoops to guess the PCI hole ranges. It's fragile, and makes us change BIOS each time we add a new chipset. Let's report the window in a ROM file, to make BIOS do exactly what QEMU intends. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-07-04pci: store PCI hole ranges in guestinfo structureMichael S. Tsirkin1-1/+13
Will be used to pass hole ranges to guests. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-06-25Move hardcoded initialization of xen-platform device.Paul Durrant1-3/+7
Creation of the xen-platform device is currently hardcoded into machine type pc's initialization code, guarded by a test for the whether the xen accelerator is enabled. This patch moves the creation of xen-platform into the initialization code of the xenfv machine type. This maintains backwards compatibility for that machine type but allows more flexibility if another machine type is used with Xen HVM domains. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-06-25Allow use of pc machine type (accel=xen) for Xen HVM domains.Paul Durrant1-3/+5
Xen HVM domains normally spawn QEMU with a dedicated xenfv machine type. The initialization code for this machine type can easily be pulled into the generic pc initialization code and guarded with a test for whether the xen accelerator options is specified, which is more consistent with the way other accelerators are used. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-06-25Revert "xen: start PCI hole at 0xe0000000 (same as pc_init1 and ↵Stefano Stabellini1-3/+3
qemu-xen-traditional)" This reverts commit 9f24a8030a70ea4954b5b8c48f606012f086f65f. The start of the PCI hole is actually set to 0xf0000000 by hvmloader. In order to retain ABI compatibility with Xen we leave the start of the PCI hole at 0xf0000000 in QEMU (for Xen) too. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-06-24usb: fix serial number for hid devicesGerd Hoffmann1-0/+12
commit 7b074a22dab4bdda9864b933f1bc811a3db42845 changed the serial number of hid devices. Add compat properties to keep the old serial number for qemu 0.12 and older. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-15Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpuBlue Swirl1-1/+1
* 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu: qdev: Drop FROM_QBUS() macro isa: QOM'ify ISADevice isa: QOM'ify ISABus i8259: Convert PICCommonState to use QOM realizefn kvm/i8259: QOM'ify some more i8259: QOM'ify some more i8254: Convert PITCommonState to QOM realizefn kvm/i8254: QOM'ify some more i8254: QOM'ify some more isa: Use realizefn for ISADevice cs4231a: QOM'ify some more gus: QOM'ify some more
2013-06-10target-i386: Update model values on Conroe/Penryn/Nehalem CPU modelsEduardo Habkost1-0/+4
The CPUID model values on Conroe, Penryn, and Nehalem are too conservative and don't reflect the values found on real Conroe, Penryn, and Nehalem CPUs. This causes at least one known problems: Windows XP disables sysenter when (family == 6 && model <= 2), but Skype tries to use the sysenter instruction anyway because it is reported as available on CPUID, making it crash. This patch sets appropriate model values that correspond to real Conroe, Penryn, and Nehalem CPUs. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10pc: Create pc-*-1.6 machine-typesEduardo Habkost1-2/+12
Some CPU model fixes are going to be included and they will require compatibility properties in the pc-*-1.5 machine-types. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07isa: QOM'ify ISADeviceAndreas Färber1-1/+1
Rename its parent field and use DEVICE() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-04Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into stagingAnthony Liguori1-6/+5
* sstabellini/xen_fixes_20130603: xen: use pc_init_pci instead of pc_init_pci_no_kvmclock xen: remove xen_vcpu_init xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional) xen_machine_pv: do not create a dummy CPU in machine->init main_loop: do not set nonblocking if xen_enabled() xen: simplify xen_enabled Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-03xen: use pc_init_pci instead of pc_init_pci_no_kvmclockStefano Stabellini1-2/+2
Call kvmclock_create only if kvmclock_enabled. Use pc_init_pci on Xen rather than pc_init_pci_no_kvmclock. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-06-03xen: remove xen_vcpu_initStefano Stabellini1-1/+0
No need for xen_vcpu_init anymore: - the RTC emulator doesn't have any periodic timers continuously running even in absence of guest interactions anymore; - qemu_dummy_start_vcpu takes care of disabling TCG for us, so we don't need to do it manually here. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2013-06-03xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)Stefano Stabellini1-3/+3
We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END, that is 0xf0000000. Start the PCI hole at 0xe0000000 instead, that is the same value used by pc_init1 and qemu-xen-traditional. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: qemu-stable@nongnu.org
2013-06-02refer to FWCfgState explicitlyLaszlo Ersek1-1/+1
Currently some places use pointer-to-void even though they mean pointer-to-FWCfgState. Clean them up. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-05-29isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)Jordan Justen1-0/+5
The isapc machine with seabios currently requires the BIOS region to be read/write memory rather than read-only memory. KVM currently cannot support the BIOS as a ROM region, but qemu in non-KVM mode can. Based on this, isapc machine currently only works with KVM. To work-around this isapc issue, this change avoids marking the BIOS as readonly for isapc. This change also will allow KVM to start supporting ROM mode via KVM_CAP_READONLY_MEM. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1369816047-16384-2-git-send-email-jordan.l.justen@intel.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-13Revert "pc: Kill the "use flash device for BIOS unless KVM" misfeature"Paolo Bonzini1-3/+0
This reverts commit 9953f8822cc316eec9962f0a2858c3439a80adec. While Markus's analysis is entirely correct, there are 1.6 patches that fix the bug for real and without requiring machine type hacks. Let's think of the children who will have to read this code, and avoid a complicated mess of semantics that differ between <1.5, 1.5, and >1.5. Conflicts: hw/i386/pc_piix.c hw/i386/pc_q35.c include/hw/i386/pc.h Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1368189483-7915-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06target-i386: n270 can MOVBEBorislav Petkov1-0/+1
The Atom core (cpu name "n270" in QEMU speak) supports MOVBE. This is needed when booting 3.8 and later linux kernels built with the MATOM target because we require MOVBE in order to boot properly now. Signed-off-by: Borislav Petkov <bp@suse.de> [ehabkost: added compat code to disable MOVBE on pc-*-1.4 and older] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01pc: Implement QEMUMachine::hot_add_cpu hookIgor Mammedov1-0/+1
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Attach ICC bus to CPU on its creationIgor Mammedov1-1/+1
X86CPU should have parent bus so it could provide bus for child APIC. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Introduce ICC bus/device/bridgeIgor Mammedov1-0/+7
Provides a hotpluggable bus for APIC and CPU. * icc-bridge will serve as a parent for icc-bus and provide mmio mapping services to child icc-devices. * icc-device will replace SysBusDevice as a parent of APIC and IOAPIC devices. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-04-30pvpanic: create pvpanic by default for machine 1.5Hu Tao1-0/+12
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: f840042f0e1205041f8feaf0d39ca639884f3a00.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30pc_piix: remove undesired change in pc_init1Paolo Bonzini1-0/+1
Introduced when applying commit f81222b (audio: look for the ISA and PCI buses, 2013-04-18). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1367330432-14417-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29audio: enable PCI audio cards for all PCI-enabled targetsPaolo Bonzini1-2/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366303444-24620-9-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29audio: look for the ISA and PCI busesPaolo Bonzini1-2/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366303444-24620-8-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29fdc: QOM'ify ISA floppy controllerAndreas Färber1-1/+1
Introduce type constant and cast macro to obsolete DO_UPCAST(). Reuse type constant for PC machine compatibility settings. Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-4-git-send-email-afaerber@suse.de Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24pc: Kill the "use flash device for BIOS unless KVM" misfeatureMarkus Armbruster1-1/+9
Use of a flash memory device for the BIOS was added in series "[PATCH v10 0/8] PC system flash support", commit 4732dca..1b89faf, v1.1. Flash vs. ROM is a guest-visible difference. Thus, flash use had to be suppressed for machine types pc-1.0 and older. This was accomplished by adding a dummy device "pc-sysfw" with property "rom_only": * Non-zero rom_only means "use ROM". Default for pc-1.0 and older. * Zero rom_only means "maybe use flash". Default for newer machines. Not only is the dummy device ugly, it was also retroactively added to the older machine types! Fortunately, it's not guest-visible (thus no immediate guest ABI breakage), and has no vmstate (thus no immediate migration breakage). Breakage occurs only if the user unwisely enables flash by setting rom_only to zero. Patch review FAIL #1. Why "maybe use flash"? Flash didn't (and still doesn't) work with KVM. Therefore, rom_only=0 really means "use flash, except when KVM is enabled, use ROM". This is a Bad Idea, because it makes enabling/ disabling KVM guest-visible. Patch review FAIL #2. Aside: it also precludes migrating between KVM on and off, but that's not possible for other reasons anyway. Fix as follows: 1. Change the meaning of rom_only=0 to mean "use flash, no ifs, buts, or maybes" for pc-i440fx-1.5 and pc-q35-1.5. Don't change anything for older machines (to remain bug-compatible). 2. Change the default value from 0 to 1 for these machines. Necessary, because 0 doesn't work with KVM. Once it does, we can flip the default back to 0. 3. Don't revert the retroactive addition of device "pc-sysfw" to older machine types. Seems not worth the trouble. 4. Add a TODO comment asking for device "pc-sysfw" to be dropped once flash works with KVM. Net effect is that you get a BIOS ROM again even when KVM is disabled, just like for machines predating the introduction of flash. To get flash instead, use "--global pc-sysfw.rom_only=0". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1365780303-26398-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24pc: Split pc_init_pci_1_0() off pc_init_pci_1_2()Markus Armbruster1-4/+12
Just to make the next commit easier to review. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1365780303-26398-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-24pc: Inline pc_init_pci_1_3() into pc_init_pci_1_2()Markus Armbruster1-1/+2
Just to make the commit after next easier to review. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1365780303-26398-2-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-15acpi: move declarations from pc.h to acpi.hMichael S. Tsirkin1-0/+1
Functions defined in acpi/ should be declared in acpi.h Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move headers to include/Paolo Bonzini1-4/+4
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-12cpu: Pass CPUState to cpu_interrupt()Andreas Färber1-1/+2
Move it to qom/cpu.h to avoid issues with include order. Change pc_acpi_smi_interrupt() opaque to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-03-10Merge remote-tracking branch 'bonzini/hw-dirs' into stagingAnthony Liguori1-0/+717
* bonzini/hw-dirs: sh: move files referencing CPU to hw/sh4/ ppc: move more files to hw/ppc ppc: move files referencing CPU to hw/ppc/ m68k: move files referencing CPU to hw/m68k/ i386: move files referencing CPU to hw/i386/ arm: move files referencing CPU to hw/arm/ hw: move boards and other isolated files to hw/ARCH ppc: express FDT dependency of pSeries and e500 boards via default-configs/ build: always link device_tree.o into emulators if libfdt available hw: include hw header files with full paths ppc: do not use ../ in include files vt82c686: vt82c686 is not a PCI host bridge virtio-9p: remove PCI dependencies from hw/9pfs/ virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX hw: move device-hotplug.o to toplevel, compile it once hw: move qdev-monitor.o to toplevel directory hw: move fifo.[ch] to libqemuutil hw: move char backends to backends/ Conflicts: backends/baum.c backends/msmouse.c hw/a15mpcore.c hw/arm/Makefile.objs hw/arm/pic_cpu.c hw/dataplane/event-poll.c hw/dataplane/virtio-blk.c include/char/baum.h include/char/msmouse.h qemu-char.c vl.c Resolve conflicts caused by header movements. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-01hw: move boards and other isolated files to hw/ARCHPaolo Bonzini1-0/+713
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>