On 03.03.2025 19:53, Andrew Cooper wrote: > Xen currently presents APIC_ESR to guests as a simple read/write register. > > This is incorrect. The SDM states: > > The ESR is a write/read register. Before attempt to read from the ESR, > software should first write to it. (The value written does not affect the > values read subsequently; only zero may be written in x2APIC mode.) This > write clears any previously logged errors and updates the ESR with any > errors detected since the last write to the ESR. > > Introduce a new pending_esr field in hvm_hw_lapic. > > Update vlapic_error() to accumulate errors here, and extend vlapic_reg_write() > to discard the written value and transfer pending_esr into APIC_ESR. Reads > are still as before. > > Importantly, this means that guests no longer destroys the ESR value it's > looking for in the LVTERR handler when following the SDM instructions. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com> I guess there's no good Fixes: candidate? Jan