On 6/10/21 1:45 AM, Philippe Mathieu-Daudé wrote:
> Having the HMP/QMP commands defined in monitor.c makes the stubs
> rather complicated when SEV is not built in. To simplify, move the
> SEV functions to sev.c, and remove a layer of stubs.
> 
> Also make it clearer when SEV is not built in, so developers don't
> try to enable it when it is not enablable:
> 
>  - before:
> 
>   (qemu) info sev
>   SEV is not enabled
> 
> - after:
> 
>   (qemu) info sev
>   SEV is not available in this QEMU
> 
> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> ---
>  target/i386/monitor.c         | 96 ----------------------------------
>  target/i386/sev-sysemu-stub.c | 29 +++++++----
>  target/i386/sev.c             | 97 +++++++++++++++++++++++++++++++++++

Hi Philippe,

I agree that the split from monitor.c makes it easier to follow. Instead
of putting the QMP entry points in sev-sysemu-stub. and sev.c, what do
you think of placing them in sev-qmp-stub.c and sev-qmp.c, respectively?

I find that appealing from a code organization/module boundary
perspective.

Connor


Reply via email to