]> rtime.felk.cvut.cz Git - jailhouse.git/blob - FAQ.md
jailhouse: inmates: bench: Add -R option -- repeats count.
[jailhouse.git] / FAQ.md
1 FREQUENTLY ASKED QUESTIONS
2 ==========================
3
4 General
5 -------
6
7 Q: Linux already has KVM. Why do I need another hypervisor?
8
9 A: Short answer: in most cases, you don't. There are many hypervisors available
10 in Linux: KVM, Xen, Oracle VM VirtualBox, to name a few. Most of them are
11 full-featured versatile solutions you can use in almost any case, including
12 real-time virtualization. However, specialized solution can optimize its size
13 and complexity more aggressively, thus can do better when it comes to real-time
14 and validation of its correct isolation.
15
16 Jailhouse is such a specialized hypervisor. It is all about static partitioning,
17 and it doesn't provide many features you'd expect from a virtual machine. There
18 is no overcommitting of resources, VM scheduling, or device emulation.
19
20 Instead, Jailhouse focuses on two main things: being small and simple, and
21 allowing guests (called "inmates") to execute with nearly-zero latencies. It is
22 not to substitute KVM on your desktop or server, it is to run real-time code,
23 including bare-metal applications and RTOSes. Jailhouse also aims to provide a
24 platform for mixing critical applications in functional safety scenarios.
25 It can also fulfill secure isolation requirements, although this was not the
26 focus so far.
27
28 Q: Jailhouse is Asymmetric Multiprocessing (AMP). This means it will be slow due
29 to CPU cache thrashing.
30
31 A: These concerns do have grounds. However, what is "slow" is determined by
32 Service Level Agreement (SLA), and we hope the effect will be negligible in the
33 majority of cases. Jailhouse faces the same problem here as cloud services do,
34 and they are expected to be quite successful despite it. Future processors may
35 introduce QoS mechanisms for cache control, which will be helpful as well. One
36 example for such a feature is Intel's Cache Allocation Technology (CAT) which is
37 announced for new Xeon processors. Of course, running code under Jailhouse is
38 slightly slower than on a dedicated uniprocessor machine, but virtualization
39 always comes at price.
40
41 Debugging
42 ---------
43
44 Q: When I enable Jailhouse or run an inmate, my machine hangs. How do I know
45 what's going on? Can I use dmesg, ftrace or similar tool?
46
47 A: No. Jailhouse runs at the level lower than the Linux kernel, and if something
48 goes wrong, there are no guarantees that Linux can continue executing. Instead,
49 Jailhouse provides its own logging mechanism. In nested QEMU setup (see
50 README.md), log messages are simply sent to the virtual terminal; on real
51 hardware, you'll need a serial cable. Connect it to the COM port on your
52 motherboard. Many modern motherboards come with no COM ports, but they usually
53 have a header you can attach the socket to. Servers often have serial console
54 available through IPMI.
55
56 If everything else fails, consider buying a PCI serial adapter. Now, attach
57 a Linux machine to the other side of serial connection and use terminal emulator
58 like minicom to grab the log messages.
59
60 Please note Jailhouse developers may ask you for these logs, shall you come for
61 help to jailhouse-dev mailing list, because they are extremely useful to analyze
62 machine hangs. So please have the logs at hand, if possible.