History | View | Annotate | Download (17.9 kB)
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route
We will add kvm_irqchip_add_msi_route, so let's make the differenceclearer.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Avi Kivity <avi@redhat.com>
kvm: Make kvm_irqchip_commit_routes an internal service
Automatically commit route changes after kvm_add_routing_entry andkvm_irqchip_release_virq. There is no performance relevant use case forwhich collecting multiple route changes is beneficial. This makes...
pc: Add back PCI.rombar compat property
This was erroneously dropped in d6c730086cbf24382eb8cff25551798769edfd84(pc: reduce duplication in compat machine types).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>...
usb/vmstate: add parent dev path
... to make vmstate id string truely unique with multiple hostcontrollers, i.e. move from "1/usb-ptr" to "0000:00:01.3/1/usb-ptr" (usb tabled connected to piix3 uhci).
This obviously breaks migration. To handle this the usb bus...
Merge remote-tracking branch 'kiszka/queues/pending' into staging
vapic: Disable for pre-1.1 machines
The kvmvapic was not present in older QEMU versions, thus must bedisabled in compat machines.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
virtio-pci: change virtio balloon PCI class code
Currently the virtio balloon device, when using the virtio-pci interfaceadvertises itself with PCI class code MEMORY_RAM. This is wrong; theballoon is vaguely related to memory, but is nothing like a PCI memory...
pc: reduce duplication in compat machine types
Make it easier to add compat properties, byadding macros for properties duplicated acrossmachine types.
Note: there could be bugs in compat properties,this patch does not attempt to address them,the code is bug for bug identical to the original....
qdev: add children before qdev_init
We want the composition tree to to be in order by the time we callqdev_init, so that a single set of the toplevel realize property canpropagate all the way down the composition tree.
This is not the case so far. Unfortunately, this is incompatible...
qtest: IRQ interception infrastructure
Since /i440fx/piix3 is being removed from the composition tree, theIO-APIC is placed under /i440fx. This is wrong and should be changedas soon as the /i440fx/piix3 path is put back.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
usb: zap hw/ush-{ohic,uhci}.h + init wrappers
Remove the uhci and ohci init wrappers, which all wrapped apci_create_simple() one-liner. Switch callsites to callpci_create_simple directly. Remove the header files wherethe wrappers where declared.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
fdc: add a 'check media rate' property. Not used yet
Set it to true for current Qemu versions, and false for previous ones
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
suspend: switch acpi s3 to new infrastructure.
This patch switches pc s3 suspend over to the new infrastructure.The cmos_s3 qemu_irq is killed, the new notifier is used instead.The xen hack goes away with that too, the hypercall can simply bedone in a notifier function now....
hw/pc_piix: remove is_default for pc-0.15
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pc_piix: add pc-1.1
pc_piix/pc_sysfw: enable flash by default
Now, the pc-sysfw:rom_only property will defaultto false which enables flash by default.
All pc types below pc-1.1 set rom_only to true.This prevents flash from being enabled on thesepc machine types.
For pc-1.1 rom_only will use the default (false),...
kvm: Implement kvm_irqchip_in_kernel like kvm_enabled
To both avoid that kvm_irqchip_in_kernel always has to be paired withkvm_enabled and that the former ends up in a function call, implement itlike the latter. This means keeping the state in a global variable and...
qom: move properties from qdev to object
This is mostly code movement although not entirely. This makes properties partof the Object base class which means that we can now start using Object in ameaningful way outside of qdev.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: x86: Add user space part for in-kernel i8259
Introduce the alternative 'kvm-i8259' device model that exploits KVMin-kernel acceleration.
The PIIX3 initialization code is furthermore extended by KVM specificIRQ route setup. GSI injection differs in KVM mode from the user space...
kvm: x86: Add user space part for in-kernel IOAPIC
This introduces the KVM-accelerated IOAPIC model 'kvm-ioapic' andextends the IRQ routing setup by the 0->2 redirection when needed.
The kvm-ioapic model has a property that allows to define its GSI base...
kvm: Move kvmclock into hw/kvm folder
More KVM-specific devices will come, so let's start with moving thekvmclock into a dedicated folder.
isapc: Fix segfault during initialization
Obviously, linking the RTC device state to the PIIX does not belong intothe common path that is shared with the isapc.
audio: remove unused parameter isa_pic
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions
NULL is a valid bus/device, so there is no change in behaviour.
pc: give ISA bus to ISA methods
pc: fix event_idx compatibility for virtio devices
event_idx was introduced in 0.15 and must be disabled for all virtio-pci devices(including virtio-balloon-pci).
pc: add pc-0.15
rtc: make piix3 set the rtc as a child (v2)
qom: add vga node to the pc composition tree
pc_piix: set qxl revision to 2 for pc-0.14
The default is still 3, and I didn't change older machine types.
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ac97: don't override the pci subsystem id
This patch removes the code lines which set the subsystem id for theemulated ac97 card to 8086:0000. Due to the device id being zero thesubsystem id isn't vaild anyway. With the patch applied the sound cardgets the default qemu subsystem id (1af4:1100) instead....
pc: add 1.0 machine type
This patch adds a pc-1.0 machine type.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: Fix floppy drives with if=none
Commit 63ffb564 broke floppy devices specified on the command line like-drive file=...,if=none,id=floppy -global isa-fdc.driveA=floppy because itrelies on drive_get() which works only with -fda/-drive if=floppy.
This patch resembles what we're already doing for IDE, i.e. remember the floppy...
pc: Convert GSIState::i8259_irq into array
Will be required when we no longer let i8259_init allocate the PIC IRQsbut convert that chips to qdev.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pc: Generalize ISA IRQs to GSIs
The ISA bus IRQ range is 0..15. What isa_irq_handler and IsaIrqState areactually dealing with are the Global System Interrupts. Refactor thecode to clarify this.
pc: Re-order pc_init1 to initialize the ISA bus before ISA devices
In particular, the i8259 was being initialized before the ISA bus,leading to a crash.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
isa: Pass i/o address space to isa_bus_new
Not used yet, but at least we're provided with the correct region.
isapc: give system address space when pci is disabled
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: Unbreak ROM mapping for ISA machine
This is based on the original fix by Hervé Poussineau: pc_memory_initactually takes a memory region for mapping BIOS and extension ROMs. Thatequals the PCI memory region if PCI is available, but must be systemmemory in the ISA case....
pc: Disable HPET for ISA machine
There was no HPET on ISA boxes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
440fx: fix PAM, PCI holes
The current implementation of PAM and the PCI holes is broken in severalways:
- PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored)...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
pci: pass I/O address space to new PCI bus
This lets us register BARs in the I/O address space.
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'agraf/xen-next' into staging
pc: grab system_memory
While eventually this should come from the machine initialization function,take a short cut to avoid converting all machines now.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: move global memory map out of pc_init1() and into its callers
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: pass address space to pci bus when created
This is now done sloppily, via get_system_memory(). Eventually callerswill be converted to stop using that.
xen: implement unplug protocol in xen_platform
The unplug protocol is necessary to support PV drivers in the guest: thedrivers expect to be able to "unplug" emulated disks and nics beforeinitializing the Xen PV interfaces.It is responsibility of the guest to make sure that the unplug is done...
Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts: hw/usb-uhci.c
xen: Add the Xen platform pci device
Introduce a new emulated PCI device, specific to fully virtualized Xenguests. The device is necessary for PV on HVM drivers to work.
Signed-off-by: Steven Smith <ssmith@xensource.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
xen: fix interrupt routing
Compared to the last version I only added a comment to the code.
- remove i440FX-xen and i440fx_write_config_xenwe don't need to intercept pci config writes to i440FX anymore;
- introduce PIIX3-xen and piix3_write_config_xen...
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
virtio: compat event idx support
Disable event index for compat machine types.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
xen: Add Xen hypercall for sleep state in the cmos_s3 callback.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: Introduce Xen Interrupt Controller
Every set_irq call makes a Xen hypercall.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
pc_memory_init: Move memory calculation to the caller.
This patch moves above_4g_mem_size and below_4g_mem_size calculation inthe caller of pc_memory_init (pc_init1). And the prototype ofpc_memory_init is changed because there is no need anymore to have...
xen: Add xenfv machine
Introduce the Xen FV (Fully Virtualized) machine to Qemu, some more Xenspecific call will be added in further patches.
pc, Disable vmport initialisation with Xen.
This is because there is not synchronisation of the vcpu registerbetween Xen and QEMU, so vmport can't work properly.
This patch introduces no_vmport parameter to pc_basic_device_init.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
piix_pci: Introduces Xen specific call for irq.
This patch introduces Xen specific call in piix_pci.
The specific part for Xen is in write_config, set_irq and get_pirq.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
smbus_eeprom: consolidate smbus eeprom creation oc pc_piix, mips_mapta, mips_fulong
consolidate smbus initialization for pc_piix, mips_malta and mips_fulong.
Cc: Aurelien Jarno <aurelien@aurel32.net>Cc: Huacai Chen <zltjiangshi@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
ide: consolidate drive_get(IF_IDE)
factor out ide initialization to call drive_get(IF_IDE)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
isa-bus: Remove bogus IRQ sharing check
Nothing prevented IRQ sharing on the ISA bus in principle. Not allboards supported this, neither each and every card nor driver and OS.Still, there existed valid IRQ sharing scenarios, (at least) two of themcan also be found in QEMU: >2 PC UARTs and the PREP IDE buses....
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>
kvm: x86: Introduce kvmclock device to save/restore its state
If kvmclock is used, which implies the kernel supports it, register akvmclock device with the sysbus. Its main purpose is to save and restorethe kernel state on migration, but this will also allow to visualize it...
vmport: convert to qdev
audio: consolidate audio_init()
consolidate audio_init() and remove references to shoundhw.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
pc/piix: fix mismerge of b1aeb92666d2fde413c34578b3b42bbfe5f2a506
The change set of b1aeb92666d2fde413c34578b3b42bbfe5f2a506 in pci branchwas mismerged. The compatibility should be kept for 0.13, not for 0.14.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci: make command SERR bit writable
pcie aer needs SERR bit to be writable, and the PCI spec requiresthis as well. For compatibility, introduce compat global propertycommand_serr_enable and make this bit readonly for a pre 0.14 pcmachine.
pc: add 0.13 pc machine type
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtfs: enable MSI-X
This patch enables MSI-X for virtfs-9p-pci. It also adds acompat property to pc-0.13 which turns it of there to staycompatible to 0.13-stable.
vgabios update: handle compatibility with older qemu versions
As pointed out by avi the vgabios update is guest-visible and thus hasmigration implications.
One change is that the vga has a valid pci rom bar now. We already havea pci bus property to enable/disable the rom bar and we'll load the bios...
isapc: fix segfault.
https://bugs.launchpad.net/bugs/611646reports that ./i386-softmmu/qemu -M isapc segfaults.This patch fixes the segfault introduced byf885f1eaa8711c06033ceb1599e3750fb37c306f
It's because i440fx_state in pc_init1() isn't initialized....
Rearrange block headers
Changing block.h or blockdev.h resulted in recompiling most objects.
Move DriveInfo typedef and BlockInterfaceType enum definitionsto qemu-common.h and rearrange blockdev.h use to decrease churn.
virtio-serial: Fix compat property name
Starting with qemu -M pc-0.12 -device virtio-serial
results in
-device virtio-serial: Property 'virtio-serial-pci.max_nr_ports' not found
The property name 'max_ports' is incorrectly named 'max_nr_ports'. Fixthat....
pc: Fix CMOS info for drives defined with -device
Drives defined with drive if=ide get get created along with the IDEcontroller, inside machine>init(). That's before cmos_init().Drives defined with -device get created during generic device init.That's after cmos_init(). Because of that, CMOS has no information on...
Remove useless device dependency of HAS_AUDIO
System architecture dictates whether HAS_AUDIO is defined. It's thenuseless to check for HAS_AUDIO in files which are only used on thosearchitectures which always have audio.
ioapic: convert to qdev
Convert to qdev.
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
pci hotadd, acpi_piix4: remove global variables
remove global variables, gpe and pci0_status by moving theminto PIIX4PMState.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
rtc: make rtc_xxx accept/return ISADevice instead of RTCState.
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADeviceinstead of RTCState.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pc: split out piix specific part from pc.c into pc_piix.c
Finally, we can safely split out the piix specific part from pc.cinto pc_piix.c.