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/2-virtio.md
+13-39Lines changed: 13 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Device attach: virtio"
2
+
title: "Explore secure device attach with VirtIO"
3
3
weight: 3
4
4
5
5
### FIXED, DO NOT MODIFY
@@ -8,31 +8,20 @@ layout: learningpathall
8
8
9
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.
10
10
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
14
-
device attach.
11
+
A Realm must eventually use physical devices to interact with the external world. The easiest way to achieve this is by using VirtIO, which provides a fast, high-level emulation layer. This is considered the first level of device attach, where access is mediated by the hypervisor using paravirtualized interfaces.
15
12
16
-
More advanced device attach features can be
17
-
performed leveraging hardware security features like PCIe-TDISP (**T**EE
18
-
**D**evice **I**nterface **S**ecurity **P**rotocol) and PCIe-IDE (**I**ntegrity
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.
13
+
More advanced device attach features can be enabled by hardware security features like PCIe-TDISP (**T**EE **D**evice **I**nterface **S**ecurity **P**rotocol) and PCIe-IDE (**I**ntegrity
14
+
and **D**ata **E**ncryption), where the host OS assigns a physical device to a Realm. The Realm can then make security measurements on the physical device and include those in its attestation base.
21
15
22
16
## VirtIO
23
17
24
18
Learn how VirtIO provides an efficient, paravirtualized I/O interface between Realms and host devices.
25
19
26
-
### What is VirtIO?
20
+
### What is VirtIO?
27
21
28
-
VirtIO is an abstraction layer for virtual devices in virtualized environments.
29
-
It provides standardized and efficient interfaces between guest virtual machines
30
-
(VMs) and host devices, making it easier to develop paravirtualized drivers.
22
+
VirtIO is an abstraction layer for virtual devices in virtualized environments. It provides standardized and efficient interfaces between guest virtual machines (VMs) and host devices, making it easier to develop paravirtualized drivers.
31
23
32
-
Paravirtualized means that the guest OS is aware it’s running in a virtualized
33
-
environment and can use optimized drivers (VirtIO) to communicate with virtual
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.
24
+
Paravirtualized means that the guest OS is aware it’s running in a virtualized environment and can use optimized drivers (VirtIO) to communicate with virtual hardware. Emulating physical hardware devices (like NICs or disks) for VMs is slow and inefficient. VirtIO allows VMs to bypass full device emulation and use streamlined drivers.
36
25
37
26
VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers include:
38
27
-`virtio-net`: Paravirtualized networking
@@ -41,7 +30,6 @@ VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers inclu
41
30
-`virtio-balloon`: Dynamic memory management
42
31
-`virtio-rng`: Random number source
43
32
-`virtio-console`: Simple console interface
44
-
- ...
45
33
46
34
### How VirtIO works in VMs
47
35
@@ -76,8 +64,7 @@ This ensures that data transfer is possible even when the original memory isn’
76
64
77
65
## CCA Realms, VirtIO and bounce buffers
78
66
79
-
The defining feature of a Realm is that its memory (called *Realm memory*) is
80
-
cryptographically isolated from both the Normal and Secure Worlds.
67
+
The defining feature of a Realm is that its memory (called *Realm memory*) is cryptographically isolated from both the Normal and Secure Worlds.
81
68
82
69
This means that:
83
70
- Realm memory is encrypted with unique keys
@@ -86,13 +73,7 @@ This means that:
86
73
- Even Direct Memory Access (DMA) from peripherals or untrusted drivers cannot
87
74
access Realm data
88
75
89
-
This design ensures confidentiality but introduces a problem: How can Realms
90
-
interact with untrusted components, such as:
91
-
- Network stacks in the host OS,
92
-
- Storage subsystems,
93
-
- I/O devices managed by untrusted drivers?
94
-
95
-
To exchange data securely with untrusted components (for example, network stacks, storage subsystems), Realms use bounce buffers as intermediaries.
76
+
This design ensures confidentiality but presents a challenge: how can a Realm securely interact with untrusted components, such as network stacks in the host OS, storage subsystems, or I/O devices managed by untrusted drivers? To exchange data securely with untrusted components (for example, network stacks, storage subsystems), Realms use *bounce buffers* as intermediaries.
96
77
97
78
### How bounce buffers are used with RME
98
79
@@ -103,7 +84,7 @@ To exchange data securely with untrusted components (for example, network stacks
103
84
- The host retrieves the data from the bounce buffer.
104
85
105
86
2. Importing Data:
106
-
- The host places data (e.g., input from a file or device) into a bounce buffer.
87
+
- The host places data (for example, input from a file or device) into a bounce buffer.
107
88
- The Realm is notified and validates the source.
108
89
- The Realm copies the data from the bounce buffer into its protected memory.
109
90
@@ -112,20 +93,13 @@ This pattern preserves confidentiality and integrity of Realm data, since:
112
93
- It can validate and sanitize any data received via bounce buffers.
113
94
- No sensitive data is exposed without explicit copying.
114
95
115
-
### Confidentiality preserved with bounce buffers, really?
96
+
### Is confidentiality preserved with bounce buffers?
116
97
117
-
In the previous section, it was mentioned that bounce buffers preserve
118
-
confidentiality. Lets dive a little deeper into that. Bounce buffers
119
-
are nothing more than an explicitly shared temporary area between the Realm
120
-
world and the outside world. This does indeed preserve the confidentiality of
121
-
all the rest of the Realm data. On the other hand, for the data being
122
-
transferred, it is leaving the Realm world and will only remain confidential if it
123
-
is encrypted in some way, e.g. for network traffic, TLS should be used.
98
+
In the previous section, it was mentioned that bounce buffers preserve confidentiality. Lets dive a little deeper into that. Bounce buffers are nothing more than an explicitly shared temporary area between the Realm world and the outside world. This does indeed preserve the confidentiality of the rest of the Realm data. On the other hand, for the data being transferred, it is leaving the Realm world and will only remain confidential if it is encrypted in some way, for example, for network traffic, TLS should be used.
124
99
125
100
## Seeing a Realm's bounce buffers at work
126
101
127
-
Let's put this to work and check for ourselves that bounce buffers are used. The
128
-
steps in this section will build on the Key Broker demo that was used in the [CCA
102
+
Let's put this to work and check for ourselves that bounce buffers are used. The steps in this section will build on the Key Broker demo that was used in the [CCA
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/_index.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,10 @@
1
1
---
2
2
title: Explore secure device attach in Arm CCA Realms
3
-
4
3
5
4
minutes_to_complete: 90
6
5
7
6
who_is_this_for: This is an advanced topic for developers who want to understand how Arm CCA Realms interact with I/O devices using VirtIO, bounce buffers, and secure device attach mechanisms.
8
7
9
-
10
8
learning_objectives:
11
9
- Understand the role of VirtIO and Bounce Buffers in CCA Realms
12
10
- Explain what device attach means and how it applies to different types of devices
0 commit comments