Send self-IPI via shorthand

To avoid any surprises, send an intercepted self-IPI via the shorthand
method instead of a regular message.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Basic DMA remapping support via VT-d

This just sets up the VT-d DMAR units for the Linux cell. We do not yet
configure things for additional cells.

Also, although this feature will have to be mandatory for a real target,
we keep VT-d support optional in order to preserve the ability to run
Jailhouse inside QEMU/KVM.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Add PCI devices to H700 configuration

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Fix compilation error jailhouse.h: No such file or directory

Since jailhouse.h is located in the current module directory,
use the include "jailhouse.h" syntax

Signed-off-by: Prashant Shah <pshah.mumbai@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Improve README

As suggest by josh-at-knoesis in issue #2, clarify the difference to
full-featured hypervisors.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Catch and document the requirement for a x86-64 kernel

We don't support 32-bit x86 Linux kernels now and likely not any time
soon. Catch this early during the build and also document it more
clearly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Allow Linux to access PIT and PC speaker in QEMU systems

Required to trigger a beep. However, port 0x61 has more power, at least
on real hardware. So this is another quick hack.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Preserve all segment registers across hypervisor enabling/disabling

If our userland tool runs in 32-bit mode, we need to be more careful
with segment registers and their hidden state if those are not reloaded
before returning to userspace.

This is a simplistic approach which needs some generalization and
consolidation.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Implement compat IOCTL callback in loader module

Our ABI is 32/64-bit-safe, so we just need to declare that we support
32-bit userland.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Move struct desc_table_reg definition to processor.h

Fits better into this file than the generic types.h.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Introduce and use struct segment

This structure encapsulates both a segment selector and the descriptor
it references. Will help to make segment save/restore more regular.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Generalize and fix read_descriptor

The current code used some improper bitmasks and still assumed to read a
task state segment. This rework allows to use it also for code and data
segments we will face when starting the hypervisor.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Rework segment save/restore across hypervisor enable/disable

Factor out and use vmx_set_guest_segment to load a segment structure
into the VMCS. Use this to transfer the real values of ES..GS on
hypervisor activation. Makes the code more both generic and regular.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Document the required kernel command line extension for QEMU setup

Oops, "minor" detail.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Fix subscription link in README

Addresses issue #2.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Merge branch 'master' into kvm

Conflicts:
	hypervisor/arch/x86/Makefile
	hypervisor/arch/x86/vmx.c