You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/1-introduction.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ A **Realm** is a protected execution environment enabled by RME. It operates in
20
20
21
21
Realms allow lower-privileged software, such as an application or a virtual machine, to protect its content and execution from attacks by higher-privileged software, such as an OS or a hypervisor. Realms provide an environment for confidential computing, without requiring the Realm owner to trust the software components that manage the resources that the Realm uses.
22
22
23
-
To be useful, a Realm has to interact with the rest of the world at some point.
24
-
For example, a network interface is likely to be needed. This Learning Path will
25
-
show you how devices are attached and used by Realms.
23
+
While Realms are isolated by design, they still need to interact with external components to be practical - for example, accessing a network interface or communicating with a peripheral device.
24
+
25
+
This Learning Path explains how devices can be securely attached to and used by Realms without compromising their isolation guarantees.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/2-virtio.md
+33-35Lines changed: 33 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,35 +6,35 @@ weight: 3
6
6
layout: learningpathall
7
7
---
8
8
9
-
This section provides a high level overview of VirtIO and Bounce Buffers, and how they
10
-
relate to CCA Realms.
9
+
This section introduces VirtIO and Bounce Buffers in the context of CCA Realms, and explains how they enable secure data exchange between a Realm and the untrusted external world.
11
10
12
-
A Realm has to use physical devices at some point to interact with the external
13
-
and or physical world. The easiest way to do this is by using VirtIO, which
14
-
provides a fast highlevel emulation layer. This can be viewed as the first level of
11
+
A Realm must use physical devices at some point to interact with the external
12
+
and or physical world. The easiest way to achieve this is by using VirtIO, which
13
+
provides a fast, high-level emulation layer. This can be viewed as the first level of
15
14
device attach.
16
15
17
-
More evolved device attach features can be
16
+
More advanced device attach features can be
18
17
performed leveraging hardware security features like PCIe-TDISP (**T**EE
19
18
**D**evice **I**nterface **S**ecurity **P**rotocol) and PCIe-IDE (**I**ntegrity
20
-
and **D**ata **E**ncryption), where the host OS can assign a physical device to
21
-
a realm, which will be able to make security measurements on the physical device
22
-
and include it in its base and measurements.
19
+
and **D**ata **E**ncryption), where the host OS assigns a physical device to
20
+
a Realm. The Realm can then make security measurements on the physical device and include those in its attestation base.
23
21
24
22
## VirtIO
25
23
24
+
Learn how VirtIO provides an efficient, paravirtualized I/O interface between Realms and host devices.
25
+
26
26
### What is VirtIO ?
27
27
28
28
VirtIO is an abstraction layer for virtual devices in virtualized environments.
29
29
It provides standardized and efficient interfaces between guest virtual machines
30
30
(VMs) and host devices, making it easier to develop paravirtualized drivers.
31
+
31
32
Paravirtualized means that the guest OS is aware it’s running in a virtualized
32
33
environment and can use optimized drivers (VirtIO) to communicate with virtual
33
-
hardware. Emulating hardware devices (like NICs or disks) for VMs is slow and
34
-
inefficient. VirtIO provides a standardized and efficient interface that allows
35
-
VMs to bypass full device emulation and instead use optimized drivers.
34
+
hardware. Emulating physical hardware devices (like NICs or disks) for VMs is slow and
35
+
inefficient. VirtIO allows VMs to bypass full device emulation and use streamlined drivers.
36
36
37
-
VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers are:
37
+
VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers include:
38
38
-`virtio-net`: Paravirtualized networking
39
39
-`virtio-blk`: Block device (disk) access
40
40
-`virtio-fs`: File sharing (host ↔ guest)
@@ -47,59 +47,57 @@ VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers are:
47
47
48
48
Here is an overview of how VirtIO works in Virtual Machines:
49
49
50
-
1. The Host Hypervisor (e.g., QEMU/KVM) exposes VirtIO “backend” devices.
51
-
2. The guest OS loads VirtIO _frontend_ drivers (e.g., `virtio_net`,
50
+
1. The Host Hypervisor (for example, QEMU/KVM) exposes VirtIO backend devices.
51
+
2. The guest OS loads VirtIO _frontend_ drivers (for example, `virtio_net`,
52
52
`virtio_blk`) that communicate using the VirtIO protocol.
53
53
3. Communication happens via shared memory (`virtqueues`) for I/O operations,
54
54
avoiding full device emulation.
55
55
4. Devices are exposed over the PCI or MMIO bus to the guest.
56
56
57
-
For example, instead of emulating an Intel e1000 NIC, the host exposes a
58
-
`virtio-net` interface to the guest OS and the guest OS uses the `virtio-net`
59
-
driver to send/receive packets via shared buffers.
57
+
For example, instead of emulating an Intel e1000 NIC, the host exposes a `virtio-net` interface, and the guest OS uses the `virtio-net` driver to send and receive packets via shared buffers.
60
58
61
59
## Bounce buffers
62
60
63
61
### What are bounce buffers?
64
62
65
-
Bounce buffers are temporary memory buffers used in the Linux kernel to handle situations where direct memory access (DMA) can’t be performed directly on the original data buffer. This often happens because:
66
-
1. The original buffer is not physically contiguous.
67
-
2. The buffer is in high memory or not accessible to the device.
68
-
3. The buffer doesn’t meet alignment or boundary requirements of the device.
63
+
Bounce buffers are temporary memory buffers used when Direct Memory Access (DMA) cannot be performed directly on the original data buffer. This might be because:
69
64
70
-
### Why bounce buffers?
65
+
1. The original buffer is not physically contiguous
66
+
2. The buffer is in high memory or not accessible to the device
67
+
3. The buffer does not meet alignment or boundary constraints required by the device
68
+
69
+
## Why use bounce buffers?
71
70
72
71
Data _bounces_ between:
73
-
- The original buffer (in user/kernel space) and
72
+
- The original buffer (in user or kernel space) and
74
73
- The DMA-capable bounce buffer (used for I/O with the device)
75
74
76
-
This ensures that data transfers can still happen even when the original memory
77
-
is not suitable or accessible for transfers.
75
+
This ensures that data transfer is possible even when the original memory isn’t suitable for DMA.
78
76
79
77
## CCA Realms, VirtIO and bounce buffers
80
78
81
79
The defining feature of a Realm is that its memory (called *Realm memory*) is
82
-
cryptographically isolated from both the Normal and Secure Worlds. This means
83
-
that:
84
-
- Realm memory is encrypted using keys that are unique to each Realm.
85
-
- Non-Realm entities (like the host OS or hypervisor) cannot directly read or
86
-
write Realm memory.
80
+
cryptographically isolated from both the Normal and Secure Worlds.
81
+
82
+
This means that:
83
+
- Realm memory is encrypted with unique keys
84
+
- Non-Realm entities (host OS, hypervisor) cannot directly read or
85
+
write to Realm memory
87
86
- Even Direct Memory Access (DMA) from peripherals or untrusted drivers cannot
88
-
access Realm data.
87
+
access Realm data
89
88
90
89
This design ensures confidentiality but introduces a problem: How can Realms
91
90
interact with untrusted components, such as:
92
91
- Network stacks in the host OS,
93
92
- Storage subsystems,
94
93
- I/O devices managed by untrusted drivers?
95
94
96
-
The solution to safely exchange data between a Realm and the outside World is to
97
-
use bounce buffers as an intermediary.
95
+
To exchange data securely with untrusted components (for example, network stacks, storage subsystems), Realms use bounce buffers as intermediaries.
98
96
99
97
### How bounce buffers are used with RME
100
98
101
99
1. Exporting Data:
102
-
- A Realm application prepares some data (e.g., results of computation).
100
+
- A Realm application prepares some data (for example, the results of computation)
103
101
- It copies this data from protected Realm memory into a bounce buffer.
104
102
- The Realm notifies the untrusted host or hypervisor that the data is ready.
105
103
- The host retrieves the data from the bounce buffer.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/_index.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,7 @@ learning_objectives:
13
13
prerequisites:
14
14
- An AArch64 or x86_64 computer running Linux or macOS. You can use cloud instances, see this list of [Arm cloud service providers](/learning-paths/servers-and-cloud-computing/csp/).
15
15
- Completion of [Get Started with CCA Attestation and Veraison](/learning-paths/servers-and-cloud-computing/cca-veraison) Learning Path.
16
-
- Completion of the [Run an application in a Realm using the Arm Confidential Computing Architecture (CCA)](/learning-paths/servers-and-cloud-computing/cca-container/) Learning Path.
17
-
- Completion of the [Run an end-to-end Attestation Flow](/learning-paths/servers-and-cloud-computing/cca-essentials/) Learning Path.
16
+
- Completion of the [Run an application in a Realm using the Arm Confidential Computing Architecture (CCA)](/learning-paths/servers-and-cloud-computing/cca-container/) Learning Path. - Completion of the [Run an end-to-end Attestation Flow](/learning-paths/servers-and-cloud-computing/cca-essentials/) Learning Path.
0 commit comments