summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_mmio.h
blob: 02b5c48fd4678a2cbc0f0ee75752278d11fbf674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2012 - Virtual Open Systems and Columbia University
 * Author: Christoffer Dall <c.dall@virtualopensystems.com>
 */

#ifndef __ARM64_KVM_MMIO_H__
#define __ARM64_KVM_MMIO_H__

#include <linux/kvm_host.h>
#include <asm/kvm_arm.h>

/*
 * This is annoying. The mmio code requires this, even if we don't
 * need any decoding. To be fixed.
 */
struct kvm_decode {
	unsigned long rt;
	bool sign_extend;
};

void kvm_mmio_write_buf(void *buf, unsigned int len, unsigned long data);
unsigned long kvm_mmio_read_buf(const void *buf, unsigned int len);

int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run);
int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
		 phys_addr_t fault_ipa);

#endif	/* __ARM64_KVM_MMIO_H__ */