]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: correct partial HPET_STATUS write emulation
authorJan Beulich <jbeulich@suse.com>
Thu, 29 Aug 2024 08:02:20 +0000 (10:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Aug 2024 08:02:20 +0000 (10:02 +0200)
commit41d358d2f9607ba37c216effa39b9f1bc58de69d
treec9cdabf64f62d939e15a7a4ff667e62bbcf998df
parenta4cf904bea9c535e1cac66bf0aee7a4275b4e1e2
x86/HVM: correct partial HPET_STATUS write emulation

For partial writes the non-written parts of registers are folded into
the full 64-bit value from what they're presently set to. That's wrong
to do though when the behavior is write-1-to-clear: Writes not
including to low 3 bits would unconditionally clear all ISR bits which
are presently set. Re-calculate the value to use.

Fixes: be07023be115 ("x86/vhpet: add support for level triggered interrupts")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hpet.c