~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/kvm/i8254.h

Version: ~ [ linux-5.2-rc4 ] ~ [ linux-5.1.9 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.50 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.125 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.181 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.181 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.68 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __I8254_H
  2 #define __I8254_H
  3 
  4 #include <linux/kthread.h>
  5 
  6 #include "iodev.h"
  7 
  8 struct kvm_kpit_channel_state {
  9         u32 count; /* can be 65536 */
 10         u16 latched_count;
 11         u8 count_latched;
 12         u8 status_latched;
 13         u8 status;
 14         u8 read_state;
 15         u8 write_state;
 16         u8 write_latch;
 17         u8 rw_mode;
 18         u8 mode;
 19         u8 bcd; /* not supported */
 20         u8 gate; /* timer start */
 21         ktime_t count_load_time;
 22 };
 23 
 24 struct kvm_kpit_state {
 25         struct kvm_kpit_channel_state channels[3];
 26         u32 flags;
 27         bool is_periodic;
 28         s64 period;                             /* unit: ns */
 29         struct hrtimer timer;
 30         atomic_t pending;                       /* accumulated triggered timers */
 31         bool reinject;
 32         struct kvm *kvm;
 33         u32    speaker_data_on;
 34         struct mutex lock;
 35         struct kvm_pit *pit;
 36         spinlock_t inject_lock;
 37         unsigned long irq_ack;
 38         struct kvm_irq_ack_notifier irq_ack_notifier;
 39 };
 40 
 41 struct kvm_pit {
 42         struct kvm_io_device dev;
 43         struct kvm_io_device speaker_dev;
 44         struct kvm *kvm;
 45         struct kvm_kpit_state pit_state;
 46         int irq_source_id;
 47         struct kvm_irq_mask_notifier mask_notifier;
 48         struct kthread_worker worker;
 49         struct task_struct *worker_task;
 50         struct kthread_work expired;
 51 };
 52 
 53 #define KVM_PIT_BASE_ADDRESS        0x40
 54 #define KVM_SPEAKER_BASE_ADDRESS    0x61
 55 #define KVM_PIT_MEM_LENGTH          4
 56 #define KVM_PIT_FREQ                1193181
 57 #define KVM_MAX_PIT_INTR_INTERVAL   HZ / 100
 58 #define KVM_PIT_CHANNEL_MASK        0x3
 59 
 60 void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start);
 61 struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags);
 62 void kvm_free_pit(struct kvm *kvm);
 63 void kvm_pit_reset(struct kvm_pit *pit);
 64 
 65 #endif
 66 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp