]> git.proxmox.com Git - mirror_qemu.git/commit
target/i386/sev: Move qmp_sev_inject_launch_secret() to sev.c
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 7 Oct 2021 16:17:11 +0000 (18:17 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Oct 2021 08:47:49 +0000 (10:47 +0200)
commit11a6ed0e77e8dd37ccea07575791b70c0410efea
tree818571d151d033701b6763e051078061b55a5d6a
parent3208de1cd23937254a456b95ef16658b68821a13
target/i386/sev: Move qmp_sev_inject_launch_secret() to sev.c

Move qmp_sev_inject_launch_secret() from monitor.c to sev.c
and make sev_inject_launch_secret() static. We don't need the
stub anymore, remove it.

Previously with binaries built without SEV, management layer
was getting an empty response:

  { "execute": "sev-inject-launch-secret",
    "arguments": { "packet-header": "mypkt", "secret": "mypass", "gpa": 4294959104 }
  }
  {
      "return": {
      }
  }

Now the response is explicit, mentioning the feature is disabled:

  { "execute": "sev-inject-launch-secret",
          "arguments": { "packet-header": "mypkt", "secret": "mypass", "gpa": 4294959104 }
  }
  {
      "error": {
          "class": "GenericError",
          "desc": "this feature or command is not currently supported"
      }
  }

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211007161716.453984-19-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/monitor.c
target/i386/sev-sysemu-stub.c
target/i386/sev.c