|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/riscv: fix sstc init to write vstimecmp instead of stimecmp
On 5/19/26 5:38 PM, Baptiste Le Duc wrote: Commit <25e03273069036f5b46e14bbdf396ac79805d07e> mistakenly wrote to CSR_STIMECMP during sstc initialization instead of CSR_VSTIMECMP. It doesn't too much sense to write this as ... CSR_VSTIMECMP is the VS-level timer comparator: the hardware fires a VS-timer interrupt whenever (time + htimedelta) >= vstimecmp. Writing to CSR_STIMECMP leaves CSR_VSTIMECMP uninitialized, so its reset value may immediately satisfy this condition, generating spurious VS-timer interrupts before any guest has programmed the timer. It could be just "According to the comment above initializing of CSR_STIMECMP CSR_VSTIMECMP should be used instead of CSR_STIMECMP" or something like that as what is mentioned here is mentioned in the comment above csr_write64(CSR_STIMECMP, ULONG_MAX). Fix this by writing the ULONG_MAX value to CSR_VSTIMECMP as intended. With what I mentioned above this could be dropped. ... it should be here:Fixes: 25e0327306903 ("xen/riscv: allow Xen to use SSTC while hiding it from guests"). The change itself looks good to me. Thanks. ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |