]>
Commit | Line | Data |
---|---|---|
d8575c6c BS |
1 | /* |
2 | * QEMU SEV stub | |
3 | * | |
4 | * Copyright Advanced Micro Devices 2018 | |
5 | * | |
6 | * Authors: | |
7 | * Brijesh Singh <brijesh.singh@amd.com> | |
8 | * | |
9 | * This work is licensed under the terms of the GNU GPL, version 2 or later. | |
10 | * See the COPYING file in the top-level directory. | |
11 | * | |
12 | */ | |
13 | ||
14 | #include "qemu/osdep.h" | |
d8575c6c BS |
15 | #include "sev_i386.h" |
16 | ||
17 | SevInfo *sev_get_info(void) | |
18 | { | |
19 | return NULL; | |
20 | } | |
21 | ||
22 | bool sev_enabled(void) | |
23 | { | |
24 | return false; | |
25 | } | |
26 | ||
27 | uint64_t sev_get_me_mask(void) | |
28 | { | |
29 | return ~0; | |
30 | } | |
31 | ||
32 | uint32_t sev_get_cbit_position(void) | |
33 | { | |
34 | return 0; | |
35 | } | |
36 | ||
37 | uint32_t sev_get_reduced_phys_bits(void) | |
38 | { | |
39 | return 0; | |
40 | } | |
c6c89c97 BS |
41 | |
42 | char *sev_get_launch_measurement(void) | |
43 | { | |
44 | return NULL; | |
45 | } | |
9f750794 | 46 | |
e4f62785 | 47 | SevCapability *sev_get_capabilities(Error **errp) |
9f750794 | 48 | { |
e4f62785 | 49 | error_setg(errp, "SEV is not available in this QEMU"); |
9f750794 BS |
50 | return NULL; |
51 | } | |
6b98e96f | 52 | |
c7f7e697 TFF |
53 | int sev_inject_launch_secret(const char *hdr, const char *secret, |
54 | uint64_t gpa, Error **errp) | |
55 | { | |
56 | return 1; | |
57 | } | |
aacdb844 DG |
58 | |
59 | int sev_encrypt_flash(uint8_t *ptr, uint64_t len, Error **errp) | |
60 | { | |
61 | return 0; | |
62 | } | |
6b98e96f TL |
63 | |
64 | bool sev_es_enabled(void) | |
65 | { | |
66 | return false; | |
67 | } | |
b2f73a07 PB |
68 | |
69 | void sev_es_set_reset_vector(CPUState *cpu) | |
70 | { | |
71 | } | |
72 | ||
73 | int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size) | |
74 | { | |
75 | abort(); | |
76 | } | |
3ea1a802 BS |
77 | |
78 | SevAttestationReport * | |
79 | sev_get_attestation_report(const char *mnonce, Error **errp) | |
80 | { | |
81 | error_setg(errp, "SEV is not available in this QEMU"); | |
82 | return NULL; | |
83 | } | |
cff03145 DM |
84 | |
85 | bool sev_add_kernel_loader_hashes(SevKernelLoaderContext *ctx, Error **errp) | |
86 | { | |
87 | g_assert_not_reached(); | |
88 | } |