Skip to content

Commit 15e8130

Browse files
yonghuahdeb-intel
authored andcommitted
doc: hld-security hypervisor enhancement section update
Update some content for hypervisor enhancement section to keep it consistent with the design. Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
1 parent 2727263 commit 15e8130

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

doc/developer-guides/hld/hld-security.rst

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,12 @@ hypercall invocation in the hypervisor design:
530530
World\_switch Hypercall is used by the TIPC (Trusty IPC) driver to
531531
switch guest VM context between secure world and non-secure world.
532532
Further details will be discussed in the :ref:`secure_trusty` section.
533+
#. For those hypercalls that may result in data inconsistent intra hypervisor
534+
when they are executed concurrently, such as ``hcall_create_vm()``
535+
``hcll_destroy_vm()`` etc. spinlock is used to ensure these hypercalls
536+
are processed in hypervisor in a serializing way.
533537

534-
In addition to these two rules, there are other regular checks in the
538+
In addition to above rules, there are other regular checks in the
535539
hypercall implementation to prevent hypercalls from being misused. For
536540
example, all the parameters must be sanitized, unexpected hypervisor
537541
memory overwrite must be avoided, any hypervisor memory content/secrets
@@ -542,15 +546,12 @@ I/O Emulation Handler
542546
~~~~~~~~~~~~~~~~~~~~~
543547

544548
I/O port monitoring is also widely used by the ACRN hypervisor to
545-
emulate legacy I/O access behaviors. If the hypervisor cannot handle the
546-
I/O vmexit appropriately, a malicious driver in the guest VM could
547-
manipulate the I/O access to compromise the hypervisor and its guest
548-
VM(s).
549+
emulate legacy I/O access behaviors.
549550

550551
Typically, the I/O instructions could be IN, INS/INSB/INSW/INSD, OUT,
551552
OUTS/OUTSB/OUTSW/OUTSD with arbitrary port (although not all the I/O
552553
ports are monitored by hypervisor). As with other interface (e.g.
553-
hypercalls), the hypervisor must perform security checks for all the I/O
554+
hypercalls), the hypervisor performs security checks for all the I/O
554555
access parameters to make sure the emulation behaviors are correct.
555556

556557
EPT Violation Handler
@@ -571,7 +572,7 @@ There are some other VMEXIT handlers in the hypervisor which might take
571572
untrusted parameters and registers from guest VM, for example, MSR write
572573
VMEXIT, APIC VMEXIT.
573574

574-
Again, care must be taken by hypervisor to avoid security issue when
575+
Sanity checks are performed by hypervisor to avoid security issue when
575576
handling those special VMEXIT.
576577

577578
Guest Instruction Emulation
@@ -618,18 +619,8 @@ scrubbed by either DM or hypervisor, then the new launched UOS could
618619
access the previous UOS's secrets by scanning the memory regions
619620
allocated for the new UOS.
620621

621-
In a secure hypervisor and DM design, there are two solutions to solve
622-
this issue; the first one is preferred because it results in a smaller
623-
attack window:
624-
625-
#. The memory content must be scrubbed immediately after the UOS is
626-
shutdown or crashed.
627-
#. The memory content must be scrubbed immediately before allocating a
628-
memory area to launch a new UOS.
629-
630-
For project ACRN, the memory scrubbing operations could be done by the
631-
hypervisor, DM, or vBIOS (vSBL). This is function design decision, which
632-
is not in the scope of this document.
622+
In ACRN, the memory content is scrubbed in Device Model after the guest
623+
VM is shutdown.
633624

634625
UOS Reboot
635626
~~~~~~~~~~
@@ -655,8 +646,8 @@ the section on :ref:`platform_root_of_trust`.
655646

656647
Normally, this warm reboot (crashdump) feature is a debug feature, and
657648
must be disabled in a production release. User who wants to use this
658-
feature must possess the private signing key to re-sign the image (e.g.
659-
the virtual SBL image) after enabling the configuration.
649+
feature must possess the private signing key to re-sign the image after
650+
enabling the configuration.
660651

661652
.. _uos_suspend_resume:
662653

@@ -673,8 +664,8 @@ SOS, the memory content of secure world of UOS must not be visible to
673664
SOS. This is designed for security with defense in depth.
674665

675666
During the entire process of UOS sleep/suspend, the memory protection
676-
for secure-world must be preserved too.The physical memory region of
677-
secure world must be removed from EPT paging tables of any guest VM,
667+
for secure-world is preserved too.The physical memory region of
668+
secure world is removed from EPT paging tables of any guest VM,
678669
even including the SOS VM.
679670

680671
Third-party libraries

0 commit comments

Comments
 (0)