Age | Commit message (Collapse) | Author | Files | Lines |
|
As suggested by Michael Tsirkin: Move the check for GSI routing from
kvm_msi_message_add to the MSI/MSI-X initalization. If it fails (and KVM
is in in-kernel irqchip mode), do not advertise MSI at all.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Checking the the update chances the message content is a common task for
both MSI types.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Testing support and allocating a GSI for an MSI message is required both
for MSI and MSI-X. At this chance, drop the aging version warning.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Remove MSI-X from function names - the interface is valid for MSI as
well - and use KVMMsiMessage as parameter.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Align handling of guest debug exits to upstream by moving it completely
to the arch section. This patch accounts for changed return codes in the
exit handling code.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
This aligns qemu-kvm with upstream commit ab443475c9. Namely, we were
missing a call to an equivalent of kvm_arch_process_async_events from
the main loop. This adds a stripped down version of upstream's
process_async_events until we switch over.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
This aligns qemu-kvm with upstream commit a7ada1510c.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
* commit 'dc7a09cfe47679d89289101cc9eb387c45e48fe7':
Expose thread_id in info cpus
kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit
Conflicts:
cpu-defs.h
exec.c
monitor.c
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
This avoids that early cpu_synchronize_state calls try to retrieve an
uninitialized state from the kernel, which even causes a deadlock.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Sync with upstream behaviour.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
* commit '8cf71710f068f9c50ce420b1dd4ef71c2f9b2a8d':
Refactor debug and vmstop request interface
Improve vm_stop reason declarations
Fix a few coding style violations in cpus.c
Refactor cpu_has_work/any_cpu_has_work in cpus.c
Refactor kvm&tcg function names in cpus.c
Conflicts:
sysemu.h
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit 'b30e93e9ec01c87d53fb0c777e4b0fa258e85ca8':
kvm: Remove static return code of kvm_handle_io
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Following 2bc93fed76c89f7adaa0e5bb3, close all block drivers on quit.
Fixes qcow2 data loss after quit due to qcowcache being volatile.
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
* commit 'cad1e2827b616487e3574300f2eaeea13a355197':
kvm: Drop smp_cpus argument from init functions
kvm: x86: Fix !CONFIG_KVM_PARA build
kvm: x86: Reset paravirtual MSRs
Conflicts:
kvm-all.c
kvm.h
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit 'd2f2b8a740c82319f9eea51ebed50815fbc3da3e':
kvm: test for ioeventfd support on old kernels
virtio: move vmstate change tracking to core
virtio-pci: Rename bugs field to flags
qxl: tag as not hotpluggable
vga: tag as not hotplugable.
piix: tag as not hotpluggable.
pci: allow devices being tagged as not hotpluggable.
rtl8139: Use subsection to restrict migration after hotplug
qdev: Track runtime machine modifications
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Use kvm_vcpu_ioctl directly instead.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
* commit 'c0532a76b407af4b276dc5a62d8178db59857ea6':
MCE: Relay UCR MCE to guest
Conflicts:
kvm-stub.c
target-i386/kvm.c
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit 'e890261f671a0573efbc024972d8769423fc82fc':
Export qemu_ram_addr_from_host
Conflicts:
cpu-common.h
exec.c
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit 'e7701825e17d74913b0f1585d523cedaf1d6632a':
kvm: x86: add mce support
iothread: use signalfd
signalfd compatibility
Conflicts:
target-i386/kvm.c
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
kvm_irq_routing_entry cannot be used when CONFIG_KVM is disabled; add a new
interface to the kvm support code that uses scalars instead.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
The kvm_context parameter serves no useful purpose since it's a global (and
all callers reference that global); on the other hand it prevents the build
when kvm is not configured in since the kvm_context symbol is not defined.
Remove the parameter and replace it by the global kvm_context in callees.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
On real machine, if MCG_SER_P in MSR_MCG_CAP is not set, SRAO/SRAR MCE
should not be raised by hardware. This patch makes QEMU-KVM to follow
the same rule.
Reported-and-Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
The compilation failed using GCC-4.4.1 on mismatched types
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
In QEMU-KVM, physical address != RAM address. While MCE simulation
needs physical address instead of RAM address. So
kvm_physical_memory_addr_from_ram() is implemented to do the
conversion, and it is invoked before being filled in the IA32_MCi_ADDR
MSR.
Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
This reverts commit cb375ad1a62ba9de0207d144d0ad8ca1bee09d33.
Breaks FC8 32/64 install.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Block SIGUSR2, which makes the signal be handled through qemu-kvm.c's
signalfd.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Upstream code is equivalent.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Adjust to comply with CODING_STYLE, at least where braces are concerned.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
To prevent reentering vcpu after IO completion it is not enough
to set env->stopped since it is checked only in main loop but control
will not get there until next non-IO exit since kvm_run() will reenter
vcpu to complete IO instruction. Solve this by sending self-signal to
request exit after IO instruction completion.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
This patch address bug report in https://bugs.launchpad.net/qemu/+bug/530077.
Failed vmentries were handled with handle_unhandled() which prints a rather
unfriendly message to the user. This patch separates handling vmentry failures
from unknown exit reasons and prints a friendly message to the user.
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
* commit 'a875170167f75e63a11f68adc0a15b4e82a6c186':
Revert "Monitor: Return before exiting with 'quit'"
Revert "monitor: Convert do_pci_device_hot_remove() to QObject"
Conflicts:
sysemu.h
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Drop qemu-kvm's implementation in favour of qemu's, they are
functionally equivalent.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
And make kvm_unregister_memory_area static.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Kernels < 2.6.24 hardcoded slot 0 for the location of VMX rmode TSS
pages. Remove support for it.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Aliases were added to workaround kvm's inability to destroy
memory regions. This was fixed in 2.6.29, and advertised via
KVM_CAP_DESTROY_MEMORY_REGION_WORKS.
Also, alias support will be removed from the kernel in July 2010.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Interrupts that are injected during a vcpu event save/writeback cycle
are lost.
Fix by writebacking the state before injecting interrupts.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
This unbreaks the monitor quit command for qemu-kvm.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
* commit '7c80eef899ff0feb1ab6730d4dd3bc3aee046093':
kvm: handle internal error
target-i386: print EFER in cpu_dump_state
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
In common cases, guest SRAO MCE will cause corresponding poisoned page
be un-mapped in host and SIGBUS be sent to QEMU-KVM, then QEMU-KVM
will relay the MCE to guest OS.
But it is possible that the poisoned page is accessed in guest after
un-mapped in host and before MCE is relayed to guest OS. So that, the
SRAR SIGBUS is sent to QEMU-KVM before the SRAO SIGBUS, and if
QEMU-KVM relays them to guest OS one by one, guest system may reset,
because the SRAO MCE may be triggered while the SRAR MCE is being
processed. In fact, the SRAO MCE can be ignored in this situation, so
that the guest system is given opportunity to survive.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Otherwise qemu-kvm iothread never sleeps on select().
Reported-by: "David S. Ahern" <daahern@cisco.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
* commit 'd745bef890f9fa57298ae099365da8e8aa575cbd': (35 commits)
Move KVM and Xen global flags to vl.c
Move cpu_exec_init_all() declaration to qemu-common.h
Allow various header files to be included from non-CPU code
Adjust debug handling
tcg/mips: fix branch offset during retranslation
exec: remove dead code
linux-user/ppc: use the Linux register layout
qemu-io: fix aio help texts
tcg/arm: Replace qemu_ld32u (left over from previous commit)
Fix driftfix option
Fix BSD and win32 builds
Refactor numa mode setting
pflash_cfi02: fix incorrect TARGET_FMT_lx/d use
Compile vmware_vga only once
tcg-mips: add guest base support
tcg/mips: implement the not_i32 op the same way as gcc
tcg-mips: implement nor
be more specific in -mem-path error messages
Add a missing #include for FreeBSD hosts
error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]
...
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
Hook into the reset handlers instead of using custom code in
qemu_kvm_system_reset.
Also move kvm_arch_init_vcpu to kvm_create_vcpu.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
There is no need to update the dirty log from inside ram_save_block,
since this happens through cpu_physical_sync_dirty_bitmap.
In stage 3, where the VM is stopped, cpu_physical_sync_dirty_bitmap
guarantees dirty log is synchronized before migration finishes.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|