History | View | Annotate | Download (20.3 kB)
e1000: unbreak the guest network migration to 1.3
QEMU 1.3 does not emulate the link auto negotiation, so if migrate to a1.3 machine during link auto negotiation, the guest link will be set to down.Fix this by just disabling auto negotiation for 1.3 and older....
pc: add compatibility machine types for 1.4
Adds both pc-i440fx-1.4 and pc-q35-1.4.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-net: compat multiqueue support
Disable multiqueue support for pre 1.4.
Signed-off-by: Jason Wang <jasowang@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-net: introduce a new macaddr control
In virtio-net guest driver, currently we write MAC address topci config space byte by byte, this means that we have anintermediate step where mac is wrong. This patch introduceda new control command to set MAC address, it's atomic....
pc: Generate APIC IDs according to CPU topology
This keeps compatibility on machine-types pc-1.2 and older, and prints awarning in case the requested configuration won't get the correcttopology.
I couldn't think of a better way to warn about broken topology when in...
pc: Reverse pc_init_pci() compatibility logic
Currently, the pc-1.4 machine init function enables PV EOI and thencalls the pc-1.2 machine init function. The problem with this approachis that now we can't enable any additional compatibility code inside the...
Make default boot order machine specific
This patch makes default boot order machine specific instead ofset globally. The default boot order can be set per machine inQEMUMachine boot_order. This also allows a machine to receive aNULL boot order when -boot isn't used and take an appropriate action...
pc: rename machine types
Starting with release 1.4 we have a fully functional q35 machine type,i.e. "qemu -M q35" JustWorks[tm]. Update machine type names to reflectthat:
The pc-1.3 (+older) names are maintained for compatibility reasons....
acpi: autoload dsdt
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec: move include files to include/exec/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
pci: update all users to look in pci/
update all users so we can remove the makefile hack.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
usb-tablet: Allow connecting to ehci
Our ehci code has is capable of significantly lowering the wakeup ratefor the hcd emulation while the device is idle. It is possible to addsimilar code ot the uhci emulation, but that simply is not there atm,and there is no reason why a (virtual) usb-tablet can not be a USB-2 device....
add pc-1.4
pc, pc_piix: split out pc nic initialization
Factor out pc nic initialization.This simplifies the pc initialization and will reduce the codeduplication of q35 pc initialization.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
pc: Move ioapic_init() from pc_piix.c to pc.c
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>...
pc_piix: Move kvm irq routing functions out of pc_piix.c
Rename: kvm_piix3_gsi_handlei() -> kvm_pc_gsi_handler() kvm_piix3_setup_irq_routing() -> kvm_pc_setup_irq_routing()
This is in preparation for other users, namely q35 at this time.
Signed-off-by: Jason Baron <jbaron@redhat.com>...
pc: Drop redundant test for ROM memory region
Just a few lines above, we already initialize rom_memory accordingly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu: enable PV EOI for qemu 1.3
Enable KVM PV EOI by default. You can still disable it with-kvm_pv_eoi cpu flag. To avoid breaking cross-version migration,enable only for qemu 1.3 (or in the future, newer) machine type.
Add USB option in machine options
When -usb option is used, global varible usb_enabled is set.And all the plaform will create one USB controller accordingto this variable. In fact, global varibles make code hardto read.
So this patch is to remove global variable usb_enabled and...
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
create struct for machine initialization arguments
This should help us to:- More easily add or remove machine initialization arguments without having to change every single machine init function;- More easily make mechanical changes involving the machine init...
vga: add mmio bar to standard vga
This patch adds a mmio bar to the qemu standard vga which allows toaccess the standard vga registers and bochs dispi interface registersvia mmio.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
qxl: set default revision to 4
Set qxl pci revision to 4 (for pc-1.3+) so guests knowspice-server 0.12 features are available.
add pc-1.3 machine type
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
compat: turn off msi/msix on xhci for old machine types
ivshmem: add 64bit option
This patch adds a "use64" property which will make the ivshmem driverregister a 64bit memory bar when set, so you have something to play withwhen testing 64bit pci bits. It also allows to have quite big sharedmemory regions, like this:...
Merge remote-tracking branch 'bonzini/scsi-next' into staging
virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types
QEMU has a policy of keeping a stable guest device ABI. When new guest devicefeatures are introduced they must not change hardware info seen by existingguests. This is important because operating systems or applications may...
virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machines
Hotplug and parameter change are new in 1.2, disable them via compatproperties for pc-1.1 and earlier.
add pc-1.2
vga: raise default vgamem size
Old size: 8 MB (traditional upstream qemu value).New size: 16 MB (traditional qemu-kvm value).
Also adds compat properties so old machine typeskeep the old default values.
Add PIIX4 properties to control PM system states.
This patch adds two things. First it allows QEMU to distinguish betweenregular powerdown and S4 powerdown. Later separate QMP notification willbe added for S4 powerdown. Second it allows S3/S4 states to be disabled...
Allow machines to configure the QEMU_VERSION that's exposed via hardware
QEMU exposes its version to the guest's hardware and in some cases that is wrong(e.g. Windows prints messages about driver updates when you switchthe QEMU version).There is a new field now on the struct QEmuMachine, hw_version, which may...
qdev: Move bus properties to abstract superclasses
In qdev, each bus in practice identified an abstract superclass, butthis was mostly hidden. In QOM, instead, these abstract classes areexplicit so we can move bus properties there.
All bus property walks are removed, and all device property walks...
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.
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.
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>