HV: Add log info when setup hvlog share buf
We have two sbuf for hvlog: one is allocated by hv for "early hvlog" and the other one is allocated by SOS. Once SOS allocate the later one, the hv allocated sbufs would be released after the contents being copied, we call it sbuf switch. And there is a trick here to guarantee that the switch of a certain per_cpu sbuf is being done on exactly the certain physical CPU, that is doing the switch at the first print after SOS allocated and setup its sbuf. Because there are few logmsg within our current code, so will wait a bit long for the next print. For ordinary case, it should be ok. However, for the BTM(Boot Time Measurement) case, we need the content of "early hvlog" for boot time calculation and it is not ok. So, we print those prints to force the sbuf switch. Signed-off-by: Kaige Fu <kaige.fu@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
parent
e0c329e4e9
commit
9af38e16e5
|
@ -186,5 +186,8 @@ int sbuf_share_setup(uint32_t pcpu_id, uint32_t sbuf_id, uint64_t *hva)
|
|||
return -EINVAL;
|
||||
|
||||
per_cpu(sbuf, pcpu_id)[sbuf_id] = hva;
|
||||
pr_info("%s share sbuf for pCPU[%u] with sbuf_id[%u] setup successfully",
|
||||
__func__, pcpu_id, sbuf_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue