linux/arch/x86/kvm/i8254.c

/*
 * 8253/8254 interval timer emulation
 *
 * Copyright (c) 2003-2004 Fabrice Bellard
 * Copyright (c) 2006 Intel Corporation
 * Copyright (c) 2007 Keir Fraser, XenSource Inc
 * Copyright (c) 2008 Intel Corporation
 * Copyright 2009 Red Hat, Inc. and/or its affiliates.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Authors:
 *   Sheng Yang <[email protected]>
 *   Based on QEMU and Xen.
 */

#define pr_fmt(fmt)

#include <linux/kvm_host.h>
#include <linux/slab.h>

#include "ioapic.h"
#include "irq.h"
#include "i8254.h"
#include "x86.h"

#ifndef CONFIG_X86_64
#define mod_64
#else
#define mod_64(x, y)
#endif

#define RW_STATE_LSB
#define RW_STATE_MSB
#define RW_STATE_WORD0
#define RW_STATE_WORD1

static void pit_set_gate(struct kvm_pit *pit, int channel, u32 val)
{}

static int pit_get_gate(struct kvm_pit *pit, int channel)
{}

static s64 __kpit_elapsed(struct kvm_pit *pit)
{}

static s64 kpit_elapsed(struct kvm_pit *pit, struct kvm_kpit_channel_state *c,
			int channel)
{}

static int pit_get_count(struct kvm_pit *pit, int channel)
{}

static int pit_get_out(struct kvm_pit *pit, int channel)
{}

static void pit_latch_count(struct kvm_pit *pit, int channel)
{}

static void pit_latch_status(struct kvm_pit *pit, int channel)
{}

static inline struct kvm_pit *pit_state_to_pit(struct kvm_kpit_state *ps)
{}

static void kvm_pit_ack_irq(struct kvm_irq_ack_notifier *kian)
{}

void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu)
{}

static void destroy_pit_timer(struct kvm_pit *pit)
{}

static void pit_do_work(struct kthread_work *work)
{}

static enum hrtimer_restart pit_timer_fn(struct hrtimer *data)
{}

static inline void kvm_pit_reset_reinject(struct kvm_pit *pit)
{}

void kvm_pit_set_reinject(struct kvm_pit *pit, bool reinject)
{}

static void create_pit_timer(struct kvm_pit *pit, u32 val, int is_period)
{}

static void pit_load_count(struct kvm_pit *pit, int channel, u32 val)
{}

void kvm_pit_load_count(struct kvm_pit *pit, int channel, u32 val,
		int hpet_legacy_start)
{}

static inline struct kvm_pit *dev_to_pit(struct kvm_io_device *dev)
{}

static inline struct kvm_pit *speaker_to_pit(struct kvm_io_device *dev)
{}

static inline int pit_in_range(gpa_t addr)
{}

static int pit_ioport_write(struct kvm_vcpu *vcpu,
				struct kvm_io_device *this,
			    gpa_t addr, int len, const void *data)
{}

static int pit_ioport_read(struct kvm_vcpu *vcpu,
			   struct kvm_io_device *this,
			   gpa_t addr, int len, void *data)
{}

static int speaker_ioport_write(struct kvm_vcpu *vcpu,
				struct kvm_io_device *this,
				gpa_t addr, int len, const void *data)
{}

static int speaker_ioport_read(struct kvm_vcpu *vcpu,
				   struct kvm_io_device *this,
				   gpa_t addr, int len, void *data)
{}

static void kvm_pit_reset(struct kvm_pit *pit)
{}

static void pit_mask_notifer(struct kvm_irq_mask_notifier *kimn, bool mask)
{}

static const struct kvm_io_device_ops pit_dev_ops =;

static const struct kvm_io_device_ops speaker_dev_ops =;

struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
{}

void kvm_free_pit(struct kvm *kvm)
{}