Skip to content

Commit 9f46022

Browse files
Updates
1 parent e8a2420 commit 9f46022

2 files changed

Lines changed: 13 additions & 41 deletions

File tree

content/learning-paths/servers-and-cloud-computing/cca-device-attach/2-virtio.md

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Device attach: virtio"
2+
title: "Explore secure device attach with VirtIO"
33
weight: 3
44

55
### FIXED, DO NOT MODIFY
@@ -8,31 +8,20 @@ layout: learningpathall
88

99
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.
1010

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.
1512

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.
2115

2216
## VirtIO
2317

2418
Learn how VirtIO provides an efficient, paravirtualized I/O interface between Realms and host devices.
2519

26-
### What is VirtIO ?
20+
### What is VirtIO?
2721

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.
3123

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.
3625

3726
VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers include:
3827
- `virtio-net`: Paravirtualized networking
@@ -41,7 +30,6 @@ VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers inclu
4130
- `virtio-balloon`: Dynamic memory management
4231
- `virtio-rng`: Random number source
4332
- `virtio-console`: Simple console interface
44-
- ...
4533

4634
### How VirtIO works in VMs
4735

@@ -76,8 +64,7 @@ This ensures that data transfer is possible even when the original memory isn’
7664

7765
## CCA Realms, VirtIO and bounce buffers
7866

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.
8168

8269
This means that:
8370
- Realm memory is encrypted with unique keys
@@ -86,13 +73,7 @@ This means that:
8673
- Even Direct Memory Access (DMA) from peripherals or untrusted drivers cannot
8774
access Realm data
8875

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.
9677

9778
### How bounce buffers are used with RME
9879

@@ -103,7 +84,7 @@ To exchange data securely with untrusted components (for example, network stacks
10384
- The host retrieves the data from the bounce buffer.
10485

10586
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.
10788
- The Realm is notified and validates the source.
10889
- The Realm copies the data from the bounce buffer into its protected memory.
10990

@@ -112,20 +93,13 @@ This pattern preserves confidentiality and integrity of Realm data, since:
11293
- It can validate and sanitize any data received via bounce buffers.
11394
- No sensitive data is exposed without explicit copying.
11495

115-
### Confidentiality preserved with bounce buffers, really?
96+
### Is confidentiality preserved with bounce buffers?
11697

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.
12499

125100
## Seeing a Realm's bounce buffers at work
126101

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
129103
Essentials learning path](/learning-paths/servers-and-cloud-computing/cca-essentials/example/),
130104
demonstrating an end-to-end attestation.
131105

content/learning-paths/servers-and-cloud-computing/cca-device-attach/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
title: Explore secure device attach in Arm CCA Realms
3-
43

54
minutes_to_complete: 90
65

76
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.
87

9-
108
learning_objectives:
119
- Understand the role of VirtIO and Bounce Buffers in CCA Realms
1210
- Explain what device attach means and how it applies to different types of devices

0 commit comments

Comments
 (0)