1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="flush-level1-data-cache-mitigation">
|
---|
4 | <title>Flushing the Level 1 Data Cache</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>
|
---|
8 | This aims at removing potentially sensitive data from the
|
---|
9 | level 1 data cache when running guest code. However, it is
|
---|
10 | made difficult by hyper-threading setups sharing the level 1
|
---|
11 | cache and thereby potentially letting the other thread in a
|
---|
12 | pair refill the cache with data the user does not want the
|
---|
13 | guest to see. In addition, flushing the level 1 data cache is
|
---|
14 | usually not without performance side effects.
|
---|
15 | </p>
|
---|
16 | <p> Up-to-date CPU microcode is a prerequisite for the cache flushing mitigations. Some host
|
---|
17 | OSes may install these automatically, though it has traditionally been a task best performed
|
---|
18 | by the system firmware. So, please check with your system / mainboard manufacturer for the
|
---|
19 | latest firmware update. </p>
|
---|
20 | <p>
|
---|
21 | We recommend disabling hyper threading on the host. This is
|
---|
22 | traditionally done from the firmware setup, but some OSes also
|
---|
23 | offers ways disable HT. In some cases it may be disabled by
|
---|
24 | default, but please verify as the effectiveness of the
|
---|
25 | mitigation depends on it.
|
---|
26 | </p>
|
---|
27 | <p>
|
---|
28 | The default action taken by VirtualBox is to flush the level 1
|
---|
29 | data cache when a thread is scheduled to execute guest code,
|
---|
30 | rather than on each VM entry. This reduces the performance
|
---|
31 | impact, while making the assumption that the host OS will not
|
---|
32 | handle security sensitive data from interrupt handlers and
|
---|
33 | similar without taking precautions.
|
---|
34 | </p>
|
---|
35 | <p> A more aggressive flushing option is provided using the <userinput>VBoxManage
|
---|
36 | modifyvm</userinput>
|
---|
37 | <codeph>--l1d-flush-on-vm-entry</codeph> option. When enabled the level 1 data cache will be
|
---|
38 | flushed on every VM entry. The performance impact is greater than with the default option,
|
---|
39 | though this of course depends on the workload. Workloads producing a lot of VM exits (like
|
---|
40 | networking, VGA access, and similiar) will probably be most impacted. </p>
|
---|
41 | <p>
|
---|
42 | For users not concerned by this security issue, the default
|
---|
43 | mitigation can be disabled using the <userinput>VBoxManage
|
---|
44 | modifyvm <varname>name</varname> --l1d-flush-on-sched off</userinput> command.
|
---|
45 | </p>
|
---|
46 | </body>
|
---|
47 |
|
---|
48 | </topic>
|
---|