pc: Fix crash when attempting to hotplug CPU with negative ID
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': 1 }}" may causeQEMU SIGSEGV at: piix4_cpu_hotplug_req () ... g>sts[cpu_id / 8] |= (1 << (cpu_id % 8)); ...
Since for PC in current implementation id should be in range [0...maxcpus)...
Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into staging
xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)
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 bypc_init1 and qemu-xen-traditional....
xen: remove xen_vcpu_init
No need for xen_vcpu_init anymore:
- the RTC emulator doesn't have any periodic timers continuously runningeven in absence of guest interactions anymore;
- qemu_dummy_start_vcpu takes care of disabling TCG for us, so we don't...
xen: use pc_init_pci instead of pc_init_pci_no_kvmclock
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>
xen_machine_pv: do not create a dummy CPU in machine->init
This fixes a regression introduced by:
commit 62fc403f11523169eb4264de31279745f48e3eccAuthor: Igor Mammedov <imammedo@redhat.com>Date: Mon Apr 29 18:54:13 2013 +0200
target-i386: Attach ICC bus to CPU on its creation...
refer to FWCfgState explicitly
Currently some places use pointer-to-void even though they meanpointer-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>
isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)
The isapc machine with seabios currently requires the BIOS regionto be read/write memory rather than read-only memory.
KVM currently cannot support the BIOS as a ROM region, but qemuin non-KVM mode can. Based on this, isapc machine currently only...
pci-assign: Add MSI affinity support
To support guest MSI affinity changes update the MSI message any timethe guest writes to the address or data fields.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
Revert "pc: Kill the "use flash device for BIOS unless KVM" misfeature"
This reverts commit 9953f8822cc316eec9962f0a2858c3439a80adec.While Markus's analysis is entirely correct, there are 1.6 patchesthat fix the bug for real and without requiring machine type hacks....
remove double semicolons
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
target-i386: n270 can MOVBE
The Atom core (cpu name "n270" in QEMU speak) supports MOVBE. This isneeded when booting 3.8 and later linux kernels built with the MATOMtarget because we require MOVBE in order to boot properly now.
Signed-off-by: Borislav Petkov <bp@suse.de>...
kvmvapic: add ioport read accessor
Necessary since memory region accessor assumes read and writemethods are registered. Otherwise reading I/O port 0x7e segfaults.
https://bugzilla.redhat.com/show_bug.cgi?id=954306
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>...
target-i386: Replace cpuid_*features fields with a feature word array
This replaces the feature-bit fields on both X86CPU and x86_def_tstructs with an array.
With this, we will be able to simplify code that simply does the sameoperation on all feature words (e.g. kvm_check_features_against_host(),...
target-i386: Move APIC to ICC bus
It allows APIC to be hotplugged.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
pc: Implement QEMUMachine::hot_add_cpu hook
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: Introduce ICC bus/device/bridge
Provides a hotpluggable bus for APIC and CPU.
target-i386: Attach ICC bus to CPU on its creation
X86CPU should have parent bus so it could provide bus for child APIC.
target-i386: Replace MSI_SPACE_SIZE with APIC_SPACE_SIZE
Put APIC_SPACE_SIZE in a public header so that it can bereused elsewhere later.
kvmvapic: Make dependency on sysbus.h explicit
Allows kvmvapic to compile if sysbus.h is removed from apic_internal.h,from which it is indirectly included.sysbus.h will be removed from apic_internal.h after convertingAPICs to ICCDevice.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
pc: Update rtc_cmos on CPU hot-plug
It provides updated currently available CPUs count to BIOS on reboot.
target-i386: Introduce apic-id CPU property
The property is used from board level to set APIC ID for CPUs itcreates. Do so in a new pc_new_cpu() helper, to be reused for hot-plug.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>...
pvpanic: create pvpanic by default for machine 1.5
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...
pc_piix: remove undesired change in pc_init1
Introduced when applying commit f81222b (audio: look for the ISA andPCI buses, 2013-04-18).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1367330432-14417-1-git-send-email-pbonzini@redhat.com...
audio: enable PCI audio cards for all PCI-enabled targets
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366303444-24620-9-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
audio: look for the ISA and PCI buses
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366303444-24620-8-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: QOM'ify port 92
Introduce type constant and cast macro to obsolete DO_UPCAST().
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-12-git-send-email-afaerber@suse.de...
fdc: QOM'ify ISA floppy controller
Introduce type constant and cast macro to obsolete DO_UPCAST().Reuse type constant for PC machine compatibility settings.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Andreas Färber <afaerber@suse.de>...
i8259: QOM cleanups
Eliminate DO_UPCAST() for PICCommonState. Prepares for ISA realizefn.
Also give the i8259_common type registration functions unique nameswhile at it.
pc: Kill the "use flash device for BIOS unless KVM" misfeature
Use of a flash memory device for the BIOS was added in series "[PATCHv10 0/8] PC system flash support", commit 4732dca..1b89faf, v1.1.
Flash vs. ROM is a guest-visible difference. Thus, flash use had to...
pc: Inline pc_init_pci_1_3() into pc_init_pci_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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: Split pc_init_pci_1_0() off pc_init_pci_1_2()
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
ich9: kill cmos_s3
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366799842-18550-1-git-send-email-hutao@cn.fujitsu.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvmvapic: Replace FROM_SYSBUS() with QOM type cast
... and define type name and type cast macro for kvmvapic accordingto accepted convention.
acpi: move declarations from pc.h to acpi.h
Functions defined in acpi/ should be declared inacpi.h
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move interrupt controllers to hw/intc/, configure with default-configs/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move other devices to hw/misc/, configure with default-configs/
hw: move hw/kvm/ to hw/i386/kvm
Peter requested the KVM GIC to be in hw/intc.
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move more files to hw/xen/
hw: move char devices to hw/char/, configure via default-configs/
hw: move ISA bridges and devices to hw/isa/, configure with default-configs/
hw: move PCI bridges to hw/pci-* or hw/ARCH
hw: move watchdogs to hw/watchdog, configure via default-configs/
hw: move MC146818RTC to hw/timer/, configure via default-configs/
hw: move block devices to hw/block/, configure via default-configs/
hw: move display devices to hw/display/, configure via default-configs/
hw: make all of hw/pci/ configurable via default-configs/
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESS
A common dependency of the constant's current users:- hw/apic_common.c- hw/i386/kvmvapic.c- target-i386/cpu.cis "target-i386/cpu.h".
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
Introduce IO_APIC_DEFAULT_ADDRESS for 0xfec00000
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-10-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc_acpi_init(): don't bail as soon as failing to find default DSDT
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-11-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
acpi_table_add(): accept QemuOpts and parse it with OptsVisitor
As one consequence, strtok() -- which modifies its argument -- is replacedwith g_strsplit().
like acpi_table_install(), acpi_table_add() should propagate Errors
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-8-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/i386/pc: format load_linux function
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
Signed-off-by: Andreas Färber <afaerber@suse.de>
exec: Pass CPUState to cpu_reset_interrupt()
Move it to qom/cpu.c to avoid build failures depending on include orderof cpu-qom.h and exec/cpu-all.h.
Change opaques of various ..._irq_handler() functions to theappropriate CPU type to facilitate using cpu_reset_interrupt()....
cpu: Pass CPUState to cpu_interrupt()
Move it to qom/cpu.h to avoid issues with include order.
Change pc_acpi_smi_interrupt() opaque to X86CPU.
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
hw: move boards and other isolated files to hw/ARCH
i386: move files referencing CPU to hw/i386/
hw: Add test device for unittests execution
Add a test device which supports the kvmctl ioports,so one can run the KVM unittest suite.
Intended Usage:
qemu-system-x86_64 -nographic \ -device pc-testdev \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \...
add isa-debug-exit device.
When present it makes qemu exit on any write.Mapped to port 0x501 by default.
Without this patch Anthony doesn't allow me toremove the bochs bios debug ports because histest suite uses this.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pci: move pci core code to hw/pci
Move files and modify makefiles to pick them at thenew location.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
q35: Introduce q35 pc based chipset emulator
pc q35 based chipset emulator to support pci express natively. Based onAnthony Liguori's suggestion, the machine name is 'q35-next', with an aliasof 'q35'. At this point, there are no compatibility guarantees. When the...
ich9: Add the lpc chip
Add support for the ICH9 LPC chip.
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>
Introduce Xen PCI Passthrough, MSI
A more complete history can be found here:git://xenbits.xensource.com/qemu-xen-unstable.git
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>Signed-off-by: Shan Haitao <haitao.shan@intel.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
Introduce XenHostPCIDevice to access a pci device on the host.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Introduce Xen PCI Passthrough, qdevice
Signed-off-by: Allen Kay <allen.m.kay@intel.com>Signed-off-by: Guy Zana <guy@neocleus.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
make: automatically include dependencies in recursive subdir rules (v2)
I think I understand enough of what's going on in these rules to ensure this isright. But I could certainly use a second or third opinion...
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
build: move obj-TARGET-y variables to nested Makefile.objs
Also drop duplicate occurrence of device-hotplug.o.