mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: mmu: add pre-assumption for hpa2gpa
They're: (a) only SOS would use hpa2gpa and (b) the GPA and HPA in SOS is identical mapping. Rename hpa2gpa to vm0_hpa2gpa then. Tracked-On: #1124 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -140,7 +140,7 @@ bool sbl_seed_parse(struct vm *vm, char *cmdline, char *out_arg, uint32_t out_le
|
||||
struct image_boot_params *boot_params;
|
||||
uint32_t len;
|
||||
|
||||
if (cmdline == NULL) {
|
||||
if (!is_vm0(vm) || (cmdline == NULL)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -165,10 +165,8 @@ bool sbl_seed_parse(struct vm *vm, char *cmdline, char *out_arg, uint32_t out_le
|
||||
* Convert the addresses to SOS GPA since this structure will
|
||||
* be used in SOS.
|
||||
*/
|
||||
boot_params->p_seed_list =
|
||||
hpa2gpa(vm, boot_params->p_seed_list);
|
||||
boot_params->p_platform_info =
|
||||
hpa2gpa(vm, boot_params->p_platform_info);
|
||||
boot_params->p_seed_list = vm0_hpa2gpa(boot_params->p_seed_list);
|
||||
boot_params->p_platform_info = vm0_hpa2gpa(boot_params->p_platform_info);
|
||||
|
||||
/*
|
||||
* Replace original arguments with spaces since SOS's GPA is not
|
||||
|
Reference in New Issue
Block a user