Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 1 | /* |
| 2 | * QEMU SEV system 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" |
Philippe Mathieu-Daudé | aa39501 | 2021-10-07 18:17:14 +0200 | [diff] [blame] | 15 | #include "monitor/monitor.h" |
Philippe Mathieu-Daudé | cd35beb | 2021-10-07 18:17:15 +0200 | [diff] [blame] | 16 | #include "monitor/hmp-target.h" |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 17 | #include "qapi/qapi-commands-misc-target.h" |
| 18 | #include "qapi/error.h" |
Philippe Mathieu-Daudé | 93777de | 2021-10-07 18:17:07 +0200 | [diff] [blame] | 19 | #include "sev.h" |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 20 | |
Philippe Mathieu-Daudé | aa39501 | 2021-10-07 18:17:14 +0200 | [diff] [blame] | 21 | SevInfo *qmp_query_sev(Error **errp) |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 22 | { |
Philippe Mathieu-Daudé | aa39501 | 2021-10-07 18:17:14 +0200 | [diff] [blame] | 23 | error_setg(errp, "SEV is not available in this QEMU"); |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 24 | return NULL; |
| 25 | } |
| 26 | |
Philippe Mathieu-Daudé | 0875a70 | 2021-10-07 18:17:13 +0200 | [diff] [blame] | 27 | SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 28 | { |
Philippe Mathieu-Daudé | 0875a70 | 2021-10-07 18:17:13 +0200 | [diff] [blame] | 29 | error_setg(errp, "SEV is not available in this QEMU"); |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 30 | return NULL; |
| 31 | } |
| 32 | |
Philippe Mathieu-Daudé | 8371df2 | 2021-10-07 18:17:12 +0200 | [diff] [blame] | 33 | SevCapability *qmp_query_sev_capabilities(Error **errp) |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 34 | { |
| 35 | error_setg(errp, "SEV is not available in this QEMU"); |
| 36 | return NULL; |
| 37 | } |
| 38 | |
Philippe Mathieu-Daudé | 11a6ed0 | 2021-10-07 18:17:11 +0200 | [diff] [blame] | 39 | void qmp_sev_inject_launch_secret(const char *packet_header, const char *secret, |
| 40 | bool has_gpa, uint64_t gpa, Error **errp) |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 41 | { |
Philippe Mathieu-Daudé | 11a6ed0 | 2021-10-07 18:17:11 +0200 | [diff] [blame] | 42 | error_setg(errp, "SEV is not available in this QEMU"); |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 43 | } |
| 44 | |
Brijesh Singh | 77d1abd | 2024-05-30 06:16:36 -0500 | [diff] [blame] | 45 | int sev_encrypt_flash(hwaddr gpa, uint8_t *ptr, uint64_t len, Error **errp) |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 46 | { |
| 47 | g_assert_not_reached(); |
| 48 | } |
| 49 | |
| 50 | void sev_es_set_reset_vector(CPUState *cpu) |
| 51 | { |
| 52 | } |
| 53 | |
| 54 | int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size) |
| 55 | { |
| 56 | g_assert_not_reached(); |
| 57 | } |
| 58 | |
Philippe Mathieu-Daudé | 3208de1 | 2021-10-07 18:17:10 +0200 | [diff] [blame] | 59 | SevAttestationReport *qmp_query_sev_attestation_report(const char *mnonce, |
| 60 | Error **errp) |
Philippe Mathieu-Daudé | e24b333 | 2021-10-07 18:17:06 +0200 | [diff] [blame] | 61 | { |
| 62 | error_setg(errp, "SEV is not available in this QEMU"); |
| 63 | return NULL; |
| 64 | } |
Philippe Mathieu-Daudé | aa39501 | 2021-10-07 18:17:14 +0200 | [diff] [blame] | 65 | |
| 66 | void hmp_info_sev(Monitor *mon, const QDict *qdict) |
| 67 | { |
| 68 | monitor_printf(mon, "SEV is not available in this QEMU\n"); |
| 69 | } |
Brijesh Singh | f3c30c5 | 2024-05-30 06:16:30 -0500 | [diff] [blame] | 70 | |
| 71 | void pc_system_parse_sev_metadata(uint8_t *flash_ptr, size_t flash_size) |
| 72 | { |
| 73 | } |