summaryrefslogtreecommitdiff
path: root/xen/arch/arm/include/asm/ioreq.h
blob: 50185978d51621ec9978aef89f92226891433a88 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * ioreq.h: Hardware virtual machine assist interface definitions.
 *
 * Copyright (c) 2016 Citrix Systems Inc.
 * Copyright (c) 2019 Arm ltd.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __ASM_ARM_IOREQ_H__
#define __ASM_ARM_IOREQ_H__

#ifdef CONFIG_IOREQ_SERVER
enum io_state handle_ioserv(struct cpu_user_regs *regs, struct vcpu *v);
enum io_state try_fwd_ioserv(struct cpu_user_regs *regs,
                             struct vcpu *v, mmio_info_t *info);
#else
static inline enum io_state handle_ioserv(struct cpu_user_regs *regs,
                                          struct vcpu *v)
{
    return IO_UNHANDLED;
}

static inline enum io_state try_fwd_ioserv(struct cpu_user_regs *regs,
                                           struct vcpu *v, mmio_info_t *info)
{
    return IO_UNHANDLED;
}
#endif

static inline bool handle_pio(uint16_t port, unsigned int size, int dir)
{
    /*
     * TODO: For Arm64, the main user will be PCI. So this should be
     * implemented when we add support for vPCI.
     */
    ASSERT_UNREACHABLE();
    return true;
}

static inline void msix_write_completion(struct vcpu *v)
{
}

/* This correlation must not be altered */
#define IOREQ_STATUS_HANDLED     IO_HANDLED
#define IOREQ_STATUS_UNHANDLED   IO_UNHANDLED
#define IOREQ_STATUS_RETRY       IO_RETRY

#endif /* __ASM_ARM_IOREQ_H__ */

/*
 * Local variables:
 * mode: C
 * c-file-style: "BSD"
 * c-basic-offset: 4
 * tab-width: 4
 * indent-tabs-mode: nil
 * End:
 */