On 2018-01-16 21:53, Gustavo Lima Chaves wrote:
> * Jan Kiszka <[email protected]> [2018-01-12 13:15:23 +0100]:
> 
>> On 2018-01-12 01:24, Gustavo Lima Chaves wrote:
>>> Before this patch, that routine was being called needlessly a lot of
>>> times on each new partition setup. We just need it once, though, and we
>>> choose to do so at pci_remove_physical_device() (ivshmem has its own
>>> call as well).
>>>
>>> Signed-off-by: Gustavo Lima Chaves <[email protected]>
>>> ---
>>>  hypervisor/control.c               |  1 -
>>>  hypervisor/include/jailhouse/pci.h |  1 -
>>>  hypervisor/pci.c                   | 11 -----------
>>>  3 files changed, 13 deletions(-)
>>>
>>> diff --git a/hypervisor/control.c b/hypervisor/control.c
>>> index 52ef8733..c49532bc 100644
>>> --- a/hypervisor/control.c
>>> +++ b/hypervisor/control.c
>>> @@ -571,7 +571,6 @@ static int cell_start(struct per_cpu *cpu_data, 
>>> unsigned long id)
>>>     cell->comm_page.comm_region.cell_state = JAILHOUSE_CELL_RUNNING;
>>>     cell->comm_page.comm_region.msg_to_cell = JAILHOUSE_MSG_NONE;
>>>  
>>> -   pci_cell_reset(cell);
>>
>> This would mean we no longer reset devices on cell reset - that's not
>> correct.
> 
> What if we move this call inside the if (cell->loadable) {} block, then?
> 

Then a pure cell start command would reset the cell but not the PCI
devices - inconsistent at least.

To do this cleanly, you would have to track the need to perform a reset,
depending on when the last reset was and if the device could have been
used since then. But let's postpone that optimization for now until the
actual reset has settled.

Jan

>>
>> Jan
>> -- 
>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>> Corporate Competence Center Embedded Linux
>>
>> -- 
>> 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.
> 


-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
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.

Reply via email to