diff options
author | Li Zhong <zhong@linux.vnet.ibm.com> | 2016-11-11 12:57:35 +0800 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-01-27 10:27:02 +1100 |
commit | 17d48610ae0fa218aa386b16a538c792991a3652 (patch) | |
tree | 344f26e281c3111d92f1a43c20cce00fd8739eb7 /arch/powerpc/include/uapi | |
parent | bf5a71d53835110d46d33eb5335713ffdbff9ab6 (diff) | |
download | linux-17d48610ae0fa218aa386b16a538c792991a3652.tar.gz linux-17d48610ae0fa218aa386b16a538c792991a3652.tar.bz2 linux-17d48610ae0fa218aa386b16a538c792991a3652.zip |
KVM: PPC: Book 3S: XICS: Implement ICS P/Q states
This patch implements P(Presented)/Q(Queued) states for ICS irqs.
When the interrupt is presented, set P. Present if P was not set.
If P is already set, don't present again, set Q.
When the interrupt is EOI'ed, move Q into P (and clear Q). If it is
set, re-present.
The asserted flag used by LSI is also incorporated into the P bit.
When the irq state is saved, P/Q bits are also saved, they need some
qemu modifications to be recognized and passed around to be restored.
KVM_XICS_PENDING bit set and saved should also indicate
KVM_XICS_PRESENTED bit set and saved. But it is possible some old
code doesn't have/recognize the P bit, so when we restore, we set P
for PENDING bit, too.
The idea and much of the code come from Ben.
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/include/uapi')
-rw-r--r-- | arch/powerpc/include/uapi/asm/kvm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h index 3603b6f51b11..e3db3a50127b 100644 --- a/arch/powerpc/include/uapi/asm/kvm.h +++ b/arch/powerpc/include/uapi/asm/kvm.h @@ -613,5 +613,7 @@ struct kvm_get_htab_header { #define KVM_XICS_LEVEL_SENSITIVE (1ULL << 40) #define KVM_XICS_MASKED (1ULL << 41) #define KVM_XICS_PENDING (1ULL << 42) +#define KVM_XICS_PRESENTED (1ULL << 43) +#define KVM_XICS_QUEUED (1ULL << 44) #endif /* __LINUX_KVM_POWERPC_H */ |