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 <[email protected]> > --- > 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.
