Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch enables coalesced MMIO for x86 architecture.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch introduces in libkvm the common part of coalesced MMIO interface.
It checks the coalesced MMIO availability with ioctl(KVM_CHECK_EXTENSION).
If KVM_CAP_COALESCED_MMIO is available, it processes the MMIO ring buffer
at the return of ioctl(KVM_RUN).
It defines kvm_register_coalesced_mmio() to register a coalesced MMIO zone, and
kvm_unregister_coalesced_mmio() to unregister it.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Add kvm_reset_mpstate inline function and only call it when
KVM_CAP_MP_STATE is defined.
qemu/qemu-kvm-x86.c:677: error: unknown field `mp_state' specified in initializer
qemu/qemu-kvm-x86.c:677: error: `KVM_MP_STATE_UNINITIALIZED' undeclared (first use in this function)
...
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
As guest memory can be discontiguous, kvm->physical_memory is meaningless.
Luckily it is no longer used, so we can remove it.
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Userland-located memory is not unconditionally available via
kvm->physical_memory + guest_address. To let kvm_show_code also dump
useful information when, e.g., some problem in ROM (BIOS...) occurs,
this patch tries to obtain the memory content via the mmio_read
callback. If the callback fails, the code byte is marked as invalid.
This patch also removes the check for protected mode and dumps the code
in any case - I didn't find the reason for this restriction.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Minor cleanup I came across while reverting printf instrumentations.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Otherwise, it picks up a random kernel directory and misbuilds.
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This is a relic of the big userspace refactoring, but today libkvm does
should not include settings from the test suite. This patch resolves this
and removes the overwriting of setting from the main config.mak with test
suite settings.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Valgrind caught this:
==11754== Conditional jump or move depends on uninitialised value(s)
==11754== at 0x50C9BC: kvm_create_pit (libkvm-x86.c:153)
==11754== by 0x50CA7F: kvm_arch_create (libkvm-x86.c:178)
==11754== by 0x50AB31: kvm_create (libkvm.c:383)
==11754== by 0x4EE691: kvm_qemu_create_context (qemu-kvm.c:616)
==11754== by 0x412031: main (vl.c:9653)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
These do not have a PIT.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Move IO processing from vcpu0 to a dedicated thread.
This removes load on vcpu0 by allowing better cache locality and also
improves latency.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
qemu/qemu-kvm.c: In function `kvm_qemu_create_context':
qemu/qemu-kvm.c:549: warning: implicit declaration of function `kvm_disable_pit_creation'
Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This fixes compilation issues for PowerPC and other non x86 archs that do not
have in kernel pit. The pit code is added into the kvm_context in kvm-common.h
and the error causing the issue is coming from a definition in qemu. This seems
to be the proper fix as there is also a common function:
kvm_irqchip_in_kernel
for in kernel irq that handles this the same way.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch actually allows KVM to be used with more than 4 VCPUs. The change
in qemu-kvm.c was pretty difficult to find because it was using an open coded
array size of 4. I changed that array to be 256 since that's the real maximum
on x86 and the additional storage space is a pretty trivial cost.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
There was a mix up between memory-slots and alias-slots.
There was a high probability that two independent aliases will
override one another.
Fixed by keeping the alias slots separate from the memory slots, and
by removing phys_addr from parameter list.
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
this breaks 32-bit host userspace on 64-bit host kernels.
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch adds vcpu as an argmunent for powerpc specific callbacks:
powerpc_dcr_read
powerpc_dcr_write
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This adds some registers useful for guest debugging to the powerpc code for
kvm_show_regs in libkvm.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch adds the callback assignment and handlers for powerpc_dcr_read
and ppc_dcr_write which are called from libkvm.
This is the part of the patch that changes already submitted code.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Function kvm_create_kernel_phys_mem was missing from powerpc
causing a undefined definition when linking to libkvm when compiled
for powerpc.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Acked-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This reverts commit 86d1a737fc444373f94d465fbc7d0aa5f712c068, which causes
build failures.
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Create an "asm" symlink from libkvm into the kernel source directory.
This allows one to use kernel trees built with the O= option.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Obsoleted by ca3d8e095246e848a5ecd7600ff84106335b19e4.
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch fixes up kvm-powerpc.h. Adds proper preamble and use
kvm_page_size as opposed to defining the pages size.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
While the kernel code has not yet made it upstream, after seeing the skeleton
patches making it in over the holiday, I decided to send this since
it's for the most part stable with what we are hacking away with in kernel.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch corrects 03f1b5e137e7e4c8dd51dbaea6779be853f4fde0, that
modified the logic behind kvm_arch_run because of a mangled endif
which accidentally included the default entry for the switch.
kvm_arch_run as defined in 4f19bdea03330641fd48514ea84d1ed1bf431507
was affected by returning 0 by default instead of 1 and reporting
the following warning at compile time :
libkvm-x86.c:201:9: warning: extra tokens at end of #endif directive
Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
this adds support for enabling and disabling the tpr access reporting facility,
as well as a callback that is triggered whenever the tpr is accessed.
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch is to add initial skelton code for powerpc.
No big implimentations as kernel code is still being worked out.
But it can be a good template for other architectures. Once kernel
code makes it upstream (and is for the most part finalized) then
implimentaions will follow.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Merging the read[bwlq]/write[bwlq] callback callback pointers to
mmio_read/write functions simplifies the callback interface.
On the qemu side it now uses the cpu_physical_memory_rw function.
Additionally this patch merges the RedHat 7.1 mmio workaround that
was spread to two code locations.
qemu/ and user/ also updated.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
The following patch eliminates the uninitialized mem pointer, using
instead the corresponding entry from the slots array to fix :
libkvm.c:580: warning: 'mem' is used uninitialized in this function
Also changes the formatting type for phys_addr to long to prevent :
libkvm.c:581: warning: format '%llx' expects type 'long long unsigned int'
, but argument 5 has type 'long unsigned int'
Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
For any slot the slot's allowed addresses are from start to (start+size-1).
The address start+size is outside of the slot's address range.
This fixes migration for 32 bit hosts. One of the
slots (the bios) is mapped at the top of the address space and its start+size
is 0. For that slot get_slot() failed.
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Same as with dirty-page-bitmap.
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Since c79baa60813812e8d0e34d998d609e848c093000 qemu does not know
about slots, it uses addresses. Getting the dirty-page-bitmap needs to
adapt to that change.
The user (qemu) requests (from libkvm) dirty page log for all
pages within a specific address range (specifically [0,phys_ram_size-1]).
libkvm iterates through all slots in the address range, calling
a qemu-kvm callback to update qemu's bytemap for each slot within
the requested range.
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Replaced mem_regions[] usage with newer slots[].
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
In order to be able to turn dirty page logging on/off.
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Add two kernel memory allocation interfaces, although
it is not required for ia64. Just leave it as blank for compile pass.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Placing the declaration of kvm_set&get_cr8 declaration under the
constraints of x86.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Move kvm_{set,get}_shadow_pages to arch-x86 for libkvm
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch adds kvm-ia64.h, and use getpagesize to get host page size,
since ia64 can use multiple type of page size in kernel.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
(found by me and Uri Lublin)
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
This patch adds ifdefs around x86 specific functions to
pervent compilers warnings for other archs.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|