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

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

Version: ~ [ linux-5.5-rc6 ] ~ [ linux-5.4.11 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.95 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.164 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.209 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.209 ] ~ [ 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.81 ] ~ [ 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.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         struct kvm_timer pit_timer;
 28         bool is_periodic;
 29         u32    speaker_data_on;
 30         struct mutex lock;
 31         struct kvm_pit *pit;
 32         spinlock_t inject_lock;
 33         unsigned long irq_ack;
 34         struct kvm_irq_ack_notifier irq_ack_notifier;
 35 };
 36 
 37 struct kvm_pit {
 38         struct kvm_io_device dev;
 39         struct kvm_io_device speaker_dev;
 40         struct kvm *kvm;
 41         struct kvm_kpit_state pit_state;
 42         int irq_source_id;
 43         struct kvm_irq_mask_notifier mask_notifier;
 44         struct kthread_worker worker;
 45         struct task_struct *worker_task;
 46         struct kthread_work expired;
 47 };
 48 
 49 #define KVM_PIT_BASE_ADDRESS        0x40
 50 #define KVM_SPEAKER_BASE_ADDRESS    0x61
 51 #define KVM_PIT_MEM_LENGTH          4
 52 #define KVM_PIT_FREQ                1193181
 53 #define KVM_MAX_PIT_INTR_INTERVAL   HZ / 100
 54 #define KVM_PIT_CHANNEL_MASK        0x3
 55 
 56 void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start);
 57 struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags);
 58 void kvm_free_pit(struct kvm *kvm);
 59 void kvm_pit_reset(struct kvm_pit *pit);
 60 
 61 #endif
 62 

~ [ 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