i386/tdx: register TDVF as private memory

Allocate the dedicated memory to hold bios image instead of re-using
mmapped guest memory because the initial memory conversion to private
memory wipes out the bios image by madvise(REMOVE).

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Co-developed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
This commit is contained in:
Chao Peng
2022-06-18 10:50:42 +08:00
committed by Nikolay Borisov
parent 2d3cb9cbe5
commit b9ec2099cb
5 changed files with 34 additions and 2 deletions

View File

@@ -2841,7 +2841,7 @@ static void kvm_eat_signals(CPUState *cpu)
} while (sigismember(&chkset, SIG_IPI));
}
static int kvm_encrypt_reg_region(hwaddr start, hwaddr size, bool reg_region)
int kvm_encrypt_reg_region(hwaddr start, hwaddr size, bool reg_region)
{
int r;
struct kvm_memory_attributes attr;