diff options
author | Bharat Bhushan <r65777@freescale.com> | 2012-08-08 16:38:19 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-05 17:38:47 -0400 |
commit | f61c94bb99ca4253ac5dd57750e1af209a4beb7a (patch) | |
tree | 348d15c584a683cd805ed71ed5c8a81848d24e70 /include/linux | |
parent | 7c973a2ebb8fb9c8ee2ae9647f9ad7b0ad58a3e6 (diff) |
KVM: PPC: booke: Add watchdog emulation
This patch adds the watchdog emulation in KVM. The watchdog
emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_BOOKE_WATCHDOG) ioctl.
The kernel timer are used for watchdog emulation and emulates
h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU
if TCR.WRC is non ZERO. QEMU can reset/shutdown etc depending upon how
it is configured.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
[bharat.bhushan@freescale.com: reworked patch]
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
[agraf: adjust to new request framework]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kvm.h | 2 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 4cb3761bebae..1649d4b57e1f 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -167,6 +167,7 @@ struct kvm_pit_config { | |||
167 | #define KVM_EXIT_OSI 18 | 167 | #define KVM_EXIT_OSI 18 |
168 | #define KVM_EXIT_PAPR_HCALL 19 | 168 | #define KVM_EXIT_PAPR_HCALL 19 |
169 | #define KVM_EXIT_S390_UCONTROL 20 | 169 | #define KVM_EXIT_S390_UCONTROL 20 |
170 | #define KVM_EXIT_WATCHDOG 21 | ||
170 | 171 | ||
171 | /* For KVM_EXIT_INTERNAL_ERROR */ | 172 | /* For KVM_EXIT_INTERNAL_ERROR */ |
172 | #define KVM_INTERNAL_ERROR_EMULATION 1 | 173 | #define KVM_INTERNAL_ERROR_EMULATION 1 |
@@ -628,6 +629,7 @@ struct kvm_ppc_smmu_info { | |||
628 | #define KVM_CAP_READONLY_MEM 81 | 629 | #define KVM_CAP_READONLY_MEM 81 |
629 | #endif | 630 | #endif |
630 | #define KVM_CAP_IRQFD_RESAMPLE 82 | 631 | #define KVM_CAP_IRQFD_RESAMPLE 82 |
632 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 | ||
631 | 633 | ||
632 | #ifdef KVM_CAP_IRQ_ROUTING | 634 | #ifdef KVM_CAP_IRQ_ROUTING |
633 | 635 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 2850656e2e96..0ca3663206f8 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -118,6 +118,7 @@ static inline bool is_error_page(struct page *page) | |||
118 | #define KVM_REQ_IMMEDIATE_EXIT 15 | 118 | #define KVM_REQ_IMMEDIATE_EXIT 15 |
119 | #define KVM_REQ_PMU 16 | 119 | #define KVM_REQ_PMU 16 |
120 | #define KVM_REQ_PMI 17 | 120 | #define KVM_REQ_PMI 17 |
121 | #define KVM_REQ_WATCHDOG 18 | ||
121 | 122 | ||
122 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 123 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
123 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 | 124 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 |