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,...
pci-assign: use monitor_handle_fd_param
There is no need to open-code the choice between a file descriptornumber or a named one. Just use monitor_handle_fd_param, whichalso takes care of printing the error message.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
kvm: i386: Add classic PCI device assignment
This adds PCI device assignment for i386 targets using the classic KVMinterfaces. This version is 100% identical to what is being maintainedin qemu-kvm for several years and is supported by libvirt as well. It is...
kvm: i8254: Cache kernel clock offset in KVMPITState
To prepare the final fix for clock calibration issues with the in-kernelPIT, we want to cache the offset between vmclock and the clock used bythe in-kernel PIT. So far, we only need to update it when the VM state...
kvm: i8254: Finish time conversion fix
0cdd3d1444 fixed reading back the counter load time from the kernelwhile assuming the kernel would always update its load time on writingthe state. That is only true for channel 1, and so pit_get_channel_inforeturned wrong output pin states for high counter values....
kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
Rename the function kvm_irqchip_set_irq() to kvm_set_irq(),since it can be used for sending (asynchronous) interrupts whetherthere is a full irqchip model in the kernel or not. (We don'tinclude 'async' in the function name since asynchronous is the...
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>
kvm: i8254: Fix conversion of in-kernel to userspace state
Due to a offset between the clock used to generate the in-kernelcount_load_time (CLOCK_MONOTONIC) and the clock used for processing thisin userspace (vm_clock), reading back the output of PIT channel 2 via...
kvm/apic: correct short memset
kvm_put_apic_state's attempt to clear kapic before setting itsbits cleared sizeof(void) bytes (no more than 8) rather than theintended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity.
Signed-off-by: Jim Meyering <meyering@redhat.com>...
kvm: x86: Wire up MSI support for in-kernel irqchip
Catch writes to the MSI MMIO region in the KVM APIC and forward them tothe kernel. Provide the kernel support GSI routing, this allows toenable MSI support also for in-kernel irqchip mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
kvmclock: guest stop notification
Often when a guest is stopped from the qemu console, it will report spurioussoft lockup warnings on resume. There are kernel patches being discussed thatwill give the host the ability to tell the guest that it is being stopped and...
i386 hw/: Don't use CPUState
Scripted conversion: for file in hw/apic.h hw/kvm/apic.c hw/kvmvapic.c hw/pc.c hw/vmport.c hw/xen_machine_pv.c; do sed -i "s/CPUState/CPUX86State/g" $file done
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Anthony Liguori <aliguori@us.ibm.com>
kvmclock: Always register type
Currently, the "kvmclock" type is only registered when kvm_enabled().
This breaks when moving type registration to before command lineparsing (so that QOM types can be used for CPU and machine).
Since the QOM classes are lazy-initialized anyway and kvmclock_create()...
kvm: x86: Add user space part for in-kernel i8254
This provides the required user space stubs to enable the in-kerneli8254 emulation of KVM.
The in-kernel model supports lost tick compensation according to the"delay" policy. This is enabled by default and can be switched off via a...
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
kvmvapic: Introduce TPR access optimization for Windows guests
This enables acceleration for MMIO-based TPR registers accesses of32-bit Windows guest systems. It is mostly useful with KVM enabled,either on older Intel CPUs (without flexpriority feature, can also be...
i8259: Do not clear level-triggered lines in IRR on init
When an input line is handled as level-triggered, it will immediatelyraise an IRQ on the output of a PIC again that goes through an initreset. So only clear the edge-triggered inputs from IRR in that...
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
KVM: Fix breakages of QOM conversion
KVM APIC and PIC require instance sizes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and convertingsubclasses independently is extremely hard.
kvm: x86: Add user space part for in-kernel APIC
This introduces the alternative APIC device which makes use of KVM'sin-kernel device model. External NMI injection via LINT1 is emulated bychecking the current state of the in-kernel APIC, only injecting a NMI...
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.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>