]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
inmates: pci-demo: Clear STATESTS before triggering the MSI
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 27 Jul 2014 06:41:25 +0000 (08:41 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sun, 3 Aug 2014 17:58:08 +0000 (19:58 +0200)
STATESTS may still have pending events which could prevent a MSI
delivery after controller reset. That reset doesn't clear them, so do
this explicitly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
inmates/demos/x86/pci-demo.c

index 195f1542d98d318d162d997ed9f90920612f2883..8412793ea331d66cac8ea2c591c231b862aafc14 100644 (file)
@@ -74,6 +74,8 @@ void inmate_main(void)
 
        asm volatile("sti");
 
+       mmio_write16(hdbar + HDA_STATESTS, mmio_read16(hdbar + HDA_STATESTS));
+
        mmio_write16(hdbar + HDA_GCTL, 0);
        delay_us(7000);
        mmio_write16(hdbar + HDA_GCTL, 1);