History log of /kvmtool/include/kvm/kvm-cpu.h (Results 1 – 17 of 17)
Revision Date Author Comments
# e300a5ee 03-Apr-2016 Michael Ellerman <mpe@ellerman.id.au>

Add basic infrastructure to run tasks on vCPUs

This patch adds kvm_cpu__run_on_all_cpus() to run a task on each vCPU.
This infrastructure uses signals to signal the vCPU to allow a task
to be added

Add basic infrastructure to run tasks on vCPUs

This patch adds kvm_cpu__run_on_all_cpus() to run a task on each vCPU.
This infrastructure uses signals to signal the vCPU to allow a task
to be added to each vCPU's task. The vCPU executes any pending tasks
in the cpu run loop

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Will Deacon <will.deacon@arm.com>

show more ...


# 2aa76b26 05-Nov-2015 Will Deacon <will.deacon@arm.com>

kvmtool: fix VM exit race attempting to pthread_kill an exited thread

lkvm currently suffers from a Segmentation Fault when exiting, which can
also lead to the console not being cleaned up correctly

kvmtool: fix VM exit race attempting to pthread_kill an exited thread

lkvm currently suffers from a Segmentation Fault when exiting, which can
also lead to the console not being cleaned up correctly after a VM exits.

The issue is that (the misnamed) kvm_cpu__reboot function sends a
SIGKVMEXIT to each vcpu thread, which causes those vcpu threads to exit
once their main loops (kvm_cpu__start) detect that cpu->is_running is
now false. The lack of synchronisation in this exit path means that a
concurrent pause event (due to the br_write_lock in ioport__unregister)
ends up sending SIGKVMPAUSE to an exited thread, resulting in a SEGV.

This patch fixes the issue by moving kvm_cpu__reboot into kvm.c
(renaming it in the process) where it can hold the pause_lock mutex
across the reboot operation. This in turn makes it safe for the pause
code to check the is_running field of each CPU before attempting to
send a SIGKVMPAUSE signal.

Signed-off-by: Will Deacon <will.deacon@arm.com>

show more ...


# 19d98215 08-May-2014 Marc Zyngier <marc.zyngier@arm.com>

kvmtool: sample CPU endianness on virtio-mmio device reset

Save the CPU endianness when the device is reset. It is widely
assumed that the guest won't change its endianness after, or at
least not wi

kvmtool: sample CPU endianness on virtio-mmio device reset

Save the CPU endianness when the device is reset. It is widely
assumed that the guest won't change its endianness after, or at
least not without reseting the device first.

A default implementation of the endianness sampling just returns
the default "host endianness" value so that unsuspecting architectures
are not affected.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# df4239fb 05-Sep-2012 Sasha Levin <levinsasha928@gmail.com>

kvm tools: move kvm_cpus into struct kvm

There's no reason the array of guest specific vcpus is global. Move it into
struct kvm.

Also split up arch specific vcpu init from the generic code and call

kvm tools: move kvm_cpus into struct kvm

There's no reason the array of guest specific vcpus is global. Move it into
struct kvm.

Also split up arch specific vcpu init from the generic code and call it from
the kvm_cpu initializer.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 4b1c6f6e 11-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add NMI ability to 'kvm debug'

This allows triggering NMI on guests using 'kvm debug -m [cpu]'.

Please note that the default behaviour of 'kvm debug' dumping guest's cpu
state has been m

kvm tools: Add NMI ability to 'kvm debug'

This allows triggering NMI on guests using 'kvm debug -m [cpu]'.

Please note that the default behaviour of 'kvm debug' dumping guest's cpu
state has been modified to require a '-d'/--dump.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 341ee0d4 09-Dec-2011 Matt Evans <matt@ozlabs.org>

kvm tools: Add arch-specific KVM_RUN exit handling via kvm_cpu__handle_exit()

This patch creates a new function in x86/kvm-cpu.c, kvm_cpu__handle_exit(), in
which arch-specific exit reasons can be h

kvm tools: Add arch-specific KVM_RUN exit handling via kvm_cpu__handle_exit()

This patch creates a new function in x86/kvm-cpu.c, kvm_cpu__handle_exit(), in
which arch-specific exit reasons can be handled outside of the common runloop.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# af7b0868 06-Dec-2011 Matt Evans <matt@ozlabs.org>

kvm tools: Split x86 arch-specific bits into x86/

Create a new arch-specific subdirectory to contain architecture-specific code
and includes.

The Makefile now adds various arch-specific objects bas

kvm tools: Split x86 arch-specific bits into x86/

Create a new arch-specific subdirectory to contain architecture-specific code
and includes.

The Makefile now adds various arch-specific objects based on detected
architecture. That aside, this patch should only contain code moves. These
include:

- x86-specific kvm_cpu setup, kernel loading, memory setup etc. now in
x86/kvm{-cpu}.c
- BIOS now lives in x86/bios/
- ioport setup
- KVM extensions are asserted in arch-specific kvm.c now, so each architecture
can manage its own dependencies.
- Various architecture-specific #defines are moved into $(ARCH)/include/kvm{-cpu}.h
such as struct kvm_cpu, KVM_NR_CPUS, KVM_32BIT_GAP_SIZE.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# b7d2f013 21-Oct-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Allow piping debug output to file descriptor

This patch makes debug output go to a 'debug_fd' instead of stdout.

Doing so allows us to send the output to a different console when
require

kvm tools: Allow piping debug output to file descriptor

This patch makes debug output go to a 'debug_fd' instead of stdout.

Doing so allows us to send the output to a different console when
required.

This patch also changes the behaviour of 'kvm debug' to show the debug
output in the console that executed the debug command instead of in the
console of the guest.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 714e5b7f 17-Jun-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Implement keyboard reset method

Implement the keyboard reset method which allows guest kernel
to reboot the guest using the keyboard controller.

This will allow guest kernel to reboot th

kvm tools: Implement keyboard reset method

Implement the keyboard reset method which allows guest kernel
to reboot the guest using the keyboard controller.

This will allow guest kernel to reboot the guest when it needs to,
for example - kernel panic (when passing "panic=1" as kernel parameter).

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 73f7e5b3 03-Jun-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add MMIO coalescing support

Coalescing MMIO allows us to avoid an exit every time we have a
MMIO write, instead - MMIO writes are coalesced in a ring which
can be flushed once an exit for

kvm tools: Add MMIO coalescing support

Coalescing MMIO allows us to avoid an exit every time we have a
MMIO write, instead - MMIO writes are coalesced in a ring which
can be flushed once an exit for a different reason is needed.
A MMIO exit is also trigged once the ring is full.

Coalesce all MMIO regions registered in the MMIO mapper.
Add a coalescing handler under kvm_cpu.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 4298ddad 30-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add APIs to allow pausing guests

Allow pausing and unpausing guests running on the host.
Pausing a guest means that none of the VCPU threads are running
KVM_RUN until they are unpaused.

kvm tools: Add APIs to allow pausing guests

Allow pausing and unpausing guests running on the host.
Pausing a guest means that none of the VCPU threads are running
KVM_RUN until they are unpaused.

The following API functions are added:
void kvm__pause(void);
void kvm__continue(void);
void kvm__notify_paused(void);

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 656be1b8 26-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Exit VCPU thread only when SIGKVMEXIT is received

Currently the VCPU loop would exit when the thread received any signal.

Change behaviour to exit only when SIGKVMEXIT is received. This

kvm tools: Exit VCPU thread only when SIGKVMEXIT is received

Currently the VCPU loop would exit when the thread received any signal.

Change behaviour to exit only when SIGKVMEXIT is received. This change
prevents from the guest to terminate when unrelated signals are processed
by the thread (for example, when attaching a debugger).

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 43835ac9 11-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Rename 'self' variables

Give proper names to vars named 'self'.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 3fdf659d 05-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Abolishment of uint*_t types

Clean uint*_t type from the code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 5ee154d1 09-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Use per-VCPU threads for execution

This patch makes the core hypervisor to use per-VCPU threads for execution.
NOTE: We only start one thread right now because we're unable to let the gue

kvm tools: Use per-VCPU threads for execution

This patch makes the core hypervisor to use per-VCPU threads for execution.
NOTE: We only start one thread right now because we're unable to let the guest
kernel know about more cores at the moment.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Tested-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 65bab644 09-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Extract kvm_cpu__start() function

In preparation for threaded execution, separate kvm_cpu__start() function so it
can be reused for multiple threads.

Cc: Asias He <asias.hejun@gmail.com>

kvm tools: Extract kvm_cpu__start() function

In preparation for threaded execution, separate kvm_cpu__start() function so it
can be reused for multiple threads.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 5c3d55fa 09-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Introduce KVM VCPU data structure

In preparation for threaded execution model, this patch introduces a KVM VCPU
data structure 'struct kvm_cpu'.

Cc: Asias He <asias.hejun@gmail.com>
Cc:

kvm tools: Introduce KVM VCPU data structure

In preparation for threaded execution model, this patch introduces a KVM VCPU
data structure 'struct kvm_cpu'.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...