target/i386: sev: Partial cleanup to sev_state global
commit8673dee354271a4f30f68059bfbbbea3d21e1a73
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 4 Jun 2020 06:42:15 +0000 (4 16:42 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Jun 2020 15:20:13 +0000 (12 11:20 -0400)
tree3eaadebc9c9846ad45b26cbbd2d89a63400455f7
parent75a877e3b14a8575fd6bc99d193f7fcc03eee94b
target/i386: sev: Partial cleanup to sev_state global

The SEV code uses a pretty ugly global to access its internal state.  Now
that SEVState is embedded in SevGuestState, we can avoid accessing it via
the global in some cases.  In the remaining cases use a new global
referencing the containing SevGuestState which will simplify some future
transformations.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200604064219.436242-6-david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/sev.c