Hi Amit/All,
We came across this scenario and would be helpful if you can provide
some pointers
Linux running as Dom0 on Xen hypervisor with HVC_DCC = y and HVC_XEN = y
on Arm64 platform.
This causes a crash when Dom0 tries to access "DBGDTRTX_EL0" register,
it traps to Xen.
Xen does not emulate this register so it crashes.
|Logs - https://paste.debian.net/1298983/|
|
|
|My aim is to avoid the crash and let Xen boot Dom0 even though there
might not be a debug console available.|
|So, I am trying to add emulation for |"DBGDTRTX_EL0" register in Xen.
As a quick trial (may be not the perfect solution), I am trying to
emulate this register as "read as zero/write ignore" (similar to KVM).
However, I could not see logs to the Xen console (ie HVC0).
So my question is
1. Is it possible in Linux to probe more than one HVC console so that
Linux can put the same logs in HVC_DCC and HVC_XEN drivers ?
So that the user can always see the logs in the default Xen console (ie
hvc0) even if the debug console is not present.
Another possible alternative I am exploring is to enable trapping for
read of MDCCSR_EL0 in Xen, so that Xen returns with MDCCSR_EL0.TXfull
set to 1.
static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count)
{
int i;
for (i = 0; i < count; i++) {
while (__dcc_getstatus() & DCC_STATUS_TX)
cpu_relax(); <<<<<<<<<<----------- So this will be invoked.
__dcc_putchar(buf[i]);
}
return count;
}
Any pointers are highly appreciated.
Kind regards,
Ayan