vm exit handler for xsetbv
[akaros.git] / kern / arch / x86 / frontend.h
1 /*
2  * Copyright (c) 2010 The Regents of the University of California
3  * See LICENSE for details.
4  */
5
6 #pragma once
7
8 #define APPSERVER_MAX_PAYLOAD_SIZE 1024
9
10 #define APPSERVER_CMD_LOAD  0
11 #define APPSERVER_CMD_STORE 1
12 #define APPSERVER_CMD_ACK   2
13
14 int handle_appserver_packet(const char *buf, size_t len);
15
16 typedef struct
17 {
18         uint8_t dst_mac[6];
19         uint8_t src_mac[6];
20         uint16_t ethertype;
21         uint8_t cmd;
22         uint8_t seqno;
23         uint32_t payload_size;
24         uint32_t addr;
25 } appserver_packet_header_t;
26
27 typedef struct
28 {
29         appserver_packet_header_t header;
30         uint8_t payload[APPSERVER_MAX_PAYLOAD_SIZE];
31 } appserver_packet_t;