← Documents Documentation/virt/kvm/s390/s390-pv-dump.rst GitHub 원문 ↗

Linux 6.18.37 · 가상화 / KVM / PowerPC·s390

s390 Protected Virtualization dumps

PVM 기밀성을 보존하는 vCPU·메모리 dump의 initiation, 수집, finalization 단계입니다.

Source pathDocumentation/virt/kvm/s390/s390-pv-dump.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

s390-pv-dump.rst:1-64

PVM 기밀성을 보존하는 vCPU·메모리 dump의 initiation, 수집, finalization 단계입니다.

ABI 필드, 명령·레지스터 이름, 소스 경로와 줄 좌표를 보존하고 보안 경계와 실행 순서를 구조화했습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ===========================================
4 s390 (IBM Z) Protected Virtualization dumps
5 ===========================================
6
7 Summary
8 -------
9
10 Dumping a VM is an essential tool for debugging problems inside
11 it. This is especially true when a protected VM runs into trouble as
12 there's no way to access its memory and registers from the outside
13 while it's running.
14
15 However when dumping a protected VM we need to maintain its
16 confidentiality until the dump is in the hands of the VM owner who
17 should be the only one capable of analysing it.
18
19 The confidentiality of the VM dump is ensured by the Ultravisor who
20 provides an interface to KVM over which encrypted CPU and memory data
21 can be requested. The encryption is based on the Customer
22 Communication Key which is the key that's used to encrypt VM data in a
23 way that the customer is able to decrypt.
24
25
26 Dump process
27 ------------
28
29 A dump is done in 3 steps:
30
31 **Initiation**
32
33 This step initializes the dump process, generates cryptographic seeds
34 and extracts dump keys with which the VM dump data will be encrypted.
35
36 **Data gathering**
37
38 Currently there are two types of data that can be gathered from a VM:
39 the memory and the vcpu state.
40
41 The vcpu state contains all the important registers, general, floating
42 point, vector, control and tod/timers of a vcpu. The vcpu dump can
43 contain incomplete data if a vcpu is dumped while an instruction is
44 emulated with help of the hypervisor. This is indicated by a flag bit
45 in the dump data. For the same reason it is very important to not only
46 write out the encrypted vcpu state, but also the unencrypted state
47 from the hypervisor.
48
49 The memory state is further divided into the encrypted memory and its
50 metadata comprised of the encryption tweaks and status flags. The
51 encrypted memory can simply be read once it has been exported. The
52 time of the export does not matter as no re-encryption is
53 needed. Memory that has been swapped out and hence was exported can be
54 read from the swap and written to the dump target without need for any
55 special actions.
56
57 The tweaks / status flags for the exported pages need to be requested
58 from the Ultravisor.
59
60 **Finalization**
61
62 The finalization step will provide the data needed to be able to
63 decrypt the vcpu and memory data and end the dump process. When this
64 step completes successfully a new dump initiation can be started.
65

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

기밀성을 유지하는 덤프

1-25

VM dump는 내부 문제 분석에 필수이지만 실행 중 메모리와 레지스터를 외부에서 볼 수 없는 PVM에서는 특히 중요합니다. 동시에 덤프가 VM 소유자에게 전달될 때까지 기밀성을 유지해야 합니다.

Ultravisor는 KVM에 암호화된 CPU와 메모리 데이터를 내보내는 인터페이스를 제공합니다. 암호화에는 고객이 VM 데이터를 복호화할 수 있도록 사용하는 Customer Communication Key가 기반이 됩니다.

.. SPDX-License-Identifier: GPL-2.0

===========================================
s390 (IBM Z) Protected Virtualization dumps
===========================================

Summary
-------

Dumping a VM is an essential tool for debugging problems inside
it. This is especially true when a protected VM runs into trouble as
there's no way to access its memory and registers from the outside
while it's running.

However when dumping a protected VM we need to maintain its
confidentiality until the dump is in the hands of the VM owner who
should be the only one capable of analysing it.

The confidentiality of the VM dump is ensured by the Ultravisor who
provides an interface to KVM over which encrypted CPU and memory data
can be requested. The encryption is based on the Customer
Communication Key which is the key that's used to encrypt VM data in a
way that the customer is able to decrypt.

3단계 덤프 절차

26-64
Protected VM dump
Initiation: cryptographic seed 생성과 dump key 추출Data gathering: vCPU state와 memory 수집Finalization: 복호화에 필요한 데이터 제공과 dump 종료

암호화 자료와 복호화 정보를 분리해 수집합니다.

vCPU 상태에는 general, floating-point, vector, control register와 TOD/timer가 포함됩니다. 하이퍼바이저 도움으로 명령을 에뮬레이션하는 중 덤프하면 불완전할 수 있으며 dump data의 flag가 이를 나타냅니다. 따라서 암호화된 vCPU 상태뿐 아니라 하이퍼바이저의 평문 상태도 함께 기록해야 합니다.

메모리 상태는 암호화 메모리와 encryption tweak·status flag 메타데이터로 나뉩니다. export된 메모리는 재암호화 없이 언제든 읽을 수 있고 swap out된 페이지도 swap에서 그대로 덤프 대상으로 옮길 수 있습니다. export page의 tweak와 status flag는 UV에 별도로 요청합니다.

Finalization이 성공하면 vCPU와 메모리를 복호화하는 데 필요한 데이터를 받고 현재 dump 절차가 끝납니다. 이후 새 initiation을 시작할 수 있습니다.

Dump process
------------

A dump is done in 3 steps:

**Initiation**

This step initializes the dump process, generates cryptographic seeds
and extracts dump keys with which the VM dump data will be encrypted.

**Data gathering**

Currently there are two types of data that can be gathered from a VM:
the memory and the vcpu state.

The vcpu state contains all the important registers, general, floating
point, vector, control and tod/timers of a vcpu. The vcpu dump can
contain incomplete data if a vcpu is dumped while an instruction is
emulated with help of the hypervisor. This is indicated by a flag bit
in the dump data. For the same reason it is very important to not only
write out the encrypted vcpu state, but also the unencrypted state
from the hypervisor.

The memory state is further divided into the encrypted memory and its
metadata comprised of the encryption tweaks and status flags. The
encrypted memory can simply be read once it has been exported. The
time of the export does not matter as no re-encryption is
needed. Memory that has been swapped out and hence was exported can be
read from the swap and written to the dump target without need for any
special actions.

The tweaks / status flags for the exported pages need to be requested
from the Ultravisor.

**Finalization**

The finalization step will provide the data needed to be able to
decrypt the vcpu and memory data and end the dump process. When this
step completes successfully a new dump initiation can be started.