[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 23/33] sgx-epc: Add the reset interface for sgx-epc virt d
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v4 23/33] sgx-epc: Add the reset interface for sgx-epc virt device |
Date: |
Tue, 14 Sep 2021 08:53:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/19/21 1:21 PM, Yang Zhong wrote:
> If the VM is reset, we need make sure sgx virt epc in clean status.
> Once the VM is reset, and sgx epc virt device will be reseted by
> reset callback registered by qemu_register_reset(). Since this epc
> virt device depend on backend, this reset will call backend reset
> interface to re-mmap epc to guest.
>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
> hw/i386/sgx-epc.c | 94 ++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 81 insertions(+), 13 deletions(-)
>
> diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c
> index 924dea22f0..9880d832d5 100644
> --- a/hw/i386/sgx-epc.c
> +++ b/hw/i386/sgx-epc.c
> @@ -18,6 +18,9 @@
> #include "qapi/visitor.h"
> #include "target/i386/cpu.h"
> #include "exec/address-spaces.h"
> +#include "sysemu/reset.h"
> +
> +uint32_t epc_num;
Missing 'static' qualifier.