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
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,18 @@ layout: learningpathall
8
8
9
9
## Overview
10
10
11
-
This section introduces VirtIO in the context of CCA Realms, and explains how it enables secure data exchange between a Realm and the untrusted external world.
11
+
In this section, you will learn how VirtIO works in the context of Arm CCA Realms and how it enables efficient data exchange between a Realm and the untrusted external world.
12
12
13
-
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.
13
+
A Realm must eventually use physical devices to interact with the external world. The simplest way to do this is by using VirtIO, which provides a fast, paravirtualized interface. This is considered the first level of device attach, where access is mediated by the hypervisor using paravirtualized drivers.
14
14
15
-
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
16
-
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.
15
+
More advanced device attach features can be enabled by hardware security features such as PCIe-TDISP (TEE Device Interface Security Protocol) and PCIe-IDE (Integrity
16
+
and Data Encryption). In those cases, the host OS assigns a physical device to a Realm, and the Realm can then measure the device and include those measurements in its attestation base.
17
17
18
-
###What is VirtIO?
18
+
## What is VirtIO?
19
19
20
-
VirtIO provides an efficient, paravirtualized I/O interface between Realms and host devices. It is an abstraction layer for virtual devices in virtualized environments. VirtIO is a standardized, efficient interface for virtual devices in virtualized environments. It lets guest operating systems use paravirtualized drivers to communicate with host-provided devices, avoiding the overhead of fully emulating physical hardware.
20
+
VirtIO is a standardized, paravirtualized interface for virtual devices in virtualized environments. It allows guest operating systems to use optimized drivers to communicate with host-provided devices, avoiding the overhead of fully emulating physical hardware.
21
21
22
-
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.
22
+
Paravirtualized means that the guest OS is aware it’s running in a virtualized environment. It allows guest operating systems to use optimized drivers to communicate with host-provided 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.
23
23
24
24
VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers include:
25
25
@@ -30,23 +30,21 @@ VirtIO is most commonly used with KVM/QEMU virtualization. Example drivers inclu
30
30
-`virtio-rng`: random number source
31
31
-`virtio-console`: simple console interface
32
32
33
-
###How does VirtIO work in VMs?
33
+
## How does VirtIO work in VMs?
34
34
35
-
Here is an overview of how VirtIO works in virtual machines:
36
-
37
-
1. The host hypervisor (for example, QEMU/KVM) exposes VirtIO backend devices
38
-
2. The guest OS loads VirtIO frontend drivers such as `virtio_net`or `virtio_blk` that communicate using the VirtIO protocol
39
-
3. I/O uses shared memory `virtqueues`, which avoids full device emulation
40
-
4. Devices are exposed over the PCI or MMIO bus to the guest
35
+
1. The host hypervisor (for example, QEMU/KVM) exposes VirtIO backend devices.
36
+
2. The guest OS loads VirtIO frontend drivers such as `virtio_net`or `virtio_blk` that communicate using the VirtIO protocol.
37
+
3. I/O uses shared memory `virtqueues`, which avoids full device emulation.
38
+
4. Devices are exposed over the PCI or MMIO bus to the guest.
41
39
42
40
For example, instead of emulating an Intel e1000 NIC, the host exposes a `virtio-net` interface. The guest OS uses the `virtio-net` driver to exchange packets through shared buffers.
43
41
44
-
###Key takeaways
42
+
## Key takeaways
45
43
46
-
- VirtIO provides fast I/O through paravirtualization, not hardware emulation
47
-
- Shared queues reduce overhead and context switching
48
-
- It is the simplest and most common first step for device attach in Realms
44
+
- VirtIO provides fast I/O through paravirtualization, not hardware emulation.
45
+
- Shared queues reduce overhead and context switching.
46
+
- It is the simplest and most common first step for device attach in Realms.
49
47
50
48
## Next steps
51
49
52
-
Learn how bounce buffers make this safe for Realms in [Bounce buffers](./bounce-buffers.md)
50
+
In the next section, you'll learn how bounce buffers make VirtIO safe for Realms.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/3.bounce_buffers.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ Bounce buffers are temporary memory areas used when a device cannot perform DMA
12
12
13
13
Common reasons for this include:
14
14
15
-
1. The original buffer is not physically contiguous
16
-
2. The buffer resides in memory not accessible by the device
17
-
3. The buffer does not meet the device alignment or boundary constraints
15
+
- The original buffer is not physically contiguous
16
+
- The buffer resides in memory not accessible by the device
17
+
- The buffer does not meet the device alignment or boundary constraints
18
18
19
19
## Why use bounce buffers?
20
20
@@ -64,13 +64,9 @@ This pattern preserves confidentiality and integrity of Realm data because:
64
64
65
65
A bounce buffer preserves the confidentiality of other Realm data because only the explicitly shared region is exposed. However, the transferred data is outside Realm protection once it leaves. Use protocol-level encryption such as TLS for network traffic to keep that data confidential in transit.
66
66
67
-
## Seeing a Realm's bounce buffers at work
68
-
69
67
## Next steps
70
68
71
-
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
0 commit comments