Hi Henning, On 04/03/2017 01:59 PM, Henning Schild wrote: > We used to unmap the firmware image right after "jailhouse disable". > Change that and keep the firmware mapped until we exit the module or > restart jailhouse. This way we can look into the firmware that just ran. > > This will be used by later patches. > > Signed-off-by: Henning Schild <[email protected]> > > diff --git a/driver/main.c b/driver/main.c > --- a/driver/main.c > +++ b/driver/main.c > @@ -394,6 +394,9 @@ static int jailhouse_cmd_enable(struct j > #ifdef JAILHOUSE_BORROW_ROOT_PT > remap_addr = JAILHOUSE_BASE; > #endif > + /* Unmap hypervisor_mem from a previous "enable", cant keep > + * it since the config might change */ I had to think for a minute what this means and why we have to do this, but now it's clear :-)
Maybe we could change it a bit to make it more obvious: /* Unmap hypervisor_mem from a previous session. Physical destination * of the HV might have changed, so we can not simply reuse it. */ Thanks Ralf > + jailhouse_firmware_free(); > /* Map physical memory region reserved for Jailhouse. */ > hypervisor_mem = jailhouse_ioremap(hv_mem->phys_start, remap_addr, > hv_mem->size); > @@ -609,8 +612,6 @@ static int jailhouse_cmd_disable(void) > > update_last_console(); > > - jailhouse_firmware_free(); > - > jailhouse_cell_delete_root(); > jailhouse_enabled = false; > module_put(THIS_MODULE); > @@ -833,6 +834,7 @@ static void __exit jailhouse_exit(void) > unregister_reboot_notifier(&jailhouse_shutdown_nb); > misc_deregister(&jailhouse_misc_dev); > jailhouse_sysfs_exit(jailhouse_dev); > + jailhouse_firmware_free(); > jailhouse_pci_unregister(); > root_device_unregister(jailhouse_dev); > } > -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
