blob: d5bf886e799ce4cc11e34041d5a6fa32b358bb2d [file] [log] [blame]
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +02001/*
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éaa395012021-10-07 18:17:14 +020015#include "monitor/monitor.h"
Philippe Mathieu-Daudécd35beb2021-10-07 18:17:15 +020016#include "monitor/hmp-target.h"
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020017#include "qapi/qapi-commands-misc-target.h"
18#include "qapi/error.h"
Philippe Mathieu-Daudé93777de2021-10-07 18:17:07 +020019#include "sev.h"
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020020
Philippe Mathieu-Daudéaa395012021-10-07 18:17:14 +020021SevInfo *qmp_query_sev(Error **errp)
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020022{
Philippe Mathieu-Daudéaa395012021-10-07 18:17:14 +020023 error_setg(errp, "SEV is not available in this QEMU");
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020024 return NULL;
25}
26
Philippe Mathieu-Daudé0875a702021-10-07 18:17:13 +020027SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp)
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020028{
Philippe Mathieu-Daudé0875a702021-10-07 18:17:13 +020029 error_setg(errp, "SEV is not available in this QEMU");
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020030 return NULL;
31}
32
Philippe Mathieu-Daudé8371df22021-10-07 18:17:12 +020033SevCapability *qmp_query_sev_capabilities(Error **errp)
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020034{
35 error_setg(errp, "SEV is not available in this QEMU");
36 return NULL;
37}
38
Philippe Mathieu-Daudé11a6ed02021-10-07 18:17:11 +020039void qmp_sev_inject_launch_secret(const char *packet_header, const char *secret,
40 bool has_gpa, uint64_t gpa, Error **errp)
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020041{
Philippe Mathieu-Daudé11a6ed02021-10-07 18:17:11 +020042 error_setg(errp, "SEV is not available in this QEMU");
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020043}
44
Brijesh Singh77d1abd2024-05-30 06:16:36 -050045int sev_encrypt_flash(hwaddr gpa, uint8_t *ptr, uint64_t len, Error **errp)
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020046{
47 g_assert_not_reached();
48}
49
50void sev_es_set_reset_vector(CPUState *cpu)
51{
52}
53
54int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size)
55{
56 g_assert_not_reached();
57}
58
Philippe Mathieu-Daudé3208de12021-10-07 18:17:10 +020059SevAttestationReport *qmp_query_sev_attestation_report(const char *mnonce,
60 Error **errp)
Philippe Mathieu-Daudée24b3332021-10-07 18:17:06 +020061{
62 error_setg(errp, "SEV is not available in this QEMU");
63 return NULL;
64}
Philippe Mathieu-Daudéaa395012021-10-07 18:17:14 +020065
66void hmp_info_sev(Monitor *mon, const QDict *qdict)
67{
68 monitor_printf(mon, "SEV is not available in this QEMU\n");
69}
Brijesh Singhf3c30c52024-05-30 06:16:30 -050070
71void pc_system_parse_sev_metadata(uint8_t *flash_ptr, size_t flash_size)
72{
73}