qemu/target/i386/sev-stub.c
<<
>>
Prefs
   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"
  15#include "sev_i386.h"
  16
  17SevInfo *sev_get_info(void)
  18{
  19    return NULL;
  20}
  21
  22bool sev_enabled(void)
  23{
  24    return false;
  25}
  26
  27uint64_t sev_get_me_mask(void)
  28{
  29    return ~0;
  30}
  31
  32uint32_t sev_get_cbit_position(void)
  33{
  34    return 0;
  35}
  36
  37uint32_t sev_get_reduced_phys_bits(void)
  38{
  39    return 0;
  40}
  41
  42char *sev_get_launch_measurement(void)
  43{
  44    return NULL;
  45}
  46
  47SevCapability *sev_get_capabilities(Error **errp)
  48{
  49    error_setg(errp, "SEV is not available in this QEMU");
  50    return NULL;
  51}
  52
  53int sev_inject_launch_secret(const char *hdr, const char *secret,
  54                             uint64_t gpa, Error **errp)
  55{
  56    return 1;
  57}
  58
  59int sev_encrypt_flash(uint8_t *ptr, uint64_t len, Error **errp)
  60{
  61    return 0;
  62}
  63
  64bool sev_es_enabled(void)
  65{
  66    return false;
  67}
  68
  69void sev_es_set_reset_vector(CPUState *cpu)
  70{
  71}
  72
  73int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size)
  74{
  75    abort();
  76}
  77
  78SevAttestationReport *
  79sev_get_attestation_report(const char *mnonce, Error **errp)
  80{
  81    error_setg(errp, "SEV is not available in this QEMU");
  82    return NULL;
  83}
  84