Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.

Commit 0a7b2f3

Browse files
committed
netbsd: Adjust coding style of include path
Adjust the format of include path for NetBSD platform. * Add header search paths to the project file and remove the redundant relative paths * Sort the order of included headers Signed-off-by: Wenchao Wang <wenchao.wang@intel.com>
1 parent cc7c939 commit 0a7b2f3

12 files changed

+23
-23
lines changed

include/netbsd/hax_types_netbsd.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include <sys/param.h>
3636
#include <sys/types.h>
3737

38+
#include "hax_list.h"
39+
3840
// Signed Types
3941
typedef int8_t int8;
4042
typedef int16_t int16;
@@ -59,7 +61,6 @@ typedef uint64_t mword;
5961
#endif
6062
typedef mword HAX_VADDR_T;
6163

62-
#include "../hax_list.h"
6364
struct hax_page {
6465
void *kva;
6566
struct vm_page *page;

platforms/netbsd/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ S?= /usr/src/sys
22

33
KMOD= haxm
44

5+
CFLAGS+= -Wno-error=address-of-packed-member
6+
CPPFLAGS+= -I../../include -I../../core/include
7+
58
# toplevel
69
SRCS+= components.c
710
SRCS+= hax_entry.c

platforms/netbsd/components.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
#include <sys/device.h>
3535
#include <sys/kmem.h>
3636

37-
#include "../../core/include/hax_core_interface.h"
38-
#include "../../core/include/config.h"
37+
#include "config.h"
38+
#include "interface.h"
3939

4040
extern struct cfdriver hax_vm_cd;
4141
extern struct cfdriver hax_vcpu_cd;

platforms/netbsd/hax_entry.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@
3535
#include <sys/module.h>
3636
#include <sys/cpu.h>
3737

38-
#include "../../core/include/config.h"
39-
#include "../../core/include/hax_core_interface.h"
40-
#include "../../include/hax.h"
41-
#include "../../include/hax_interface.h"
38+
#include "config.h"
39+
#include "interface.h"
4240

4341
#define HAX_DEVICE_NAME "HAX"
4442
#define HAX_VM_DEVICE_NAME "hax_vm"

platforms/netbsd/hax_entry_hax.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@
3838
#include <machine/specialreg.h>
3939
#include <machine/cpufunc.h>
4040

41-
#include "../../include/hax.h"
42-
#include "../../include/hax_interface.h"
43-
#include "../../include/hax_release_ver.h"
44-
#include "../../core/include/hax_core_interface.h"
45-
#include "../../core/include/config.h"
41+
#include "hax_release_ver.h"
42+
43+
#include "config.h"
44+
#include "interface.h"
4645

4746
dev_type_open(hax_open);
4847
dev_type_close(hax_close);

platforms/netbsd/hax_entry_vcpu.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <sys/lwp.h>
3636
#include <sys/proc.h>
3737

38-
#include "../../core/include/hax_core_interface.h"
38+
#include "interface.h"
3939

4040
extern struct cfdriver hax_vcpu_cd;
4141

platforms/netbsd/hax_entry_vm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <sys/lwp.h>
3636
#include <sys/proc.h>
3737

38-
#include "../../core/include/hax_core_interface.h"
38+
#include "interface.h"
3939

4040
extern struct cfdriver hax_vm_cd;
4141

platforms/netbsd/hax_event.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
#include "../../include/hax.h"
31+
#include "hax.h"
3232

3333
int hax_notify_host_event(enum hax_notify_event event, uint32_t *param,
3434
uint32_t size)

platforms/netbsd/hax_host_mem.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
#include <uvm/uvm.h>
3737
#include <machine/pmap.h>
3838

39-
#include "../../include/hax_host_mem.h"
40-
#include "../../core/include/paging.h"
39+
#include "hax_host_mem.h"
40+
41+
#include "paging.h"
4142

4243
int hax_pin_user_pages(uint64_t start_uva, uint64_t size, hax_memdesc_user *memdesc)
4344
{

platforms/netbsd/hax_mem_alloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <sys/kmem.h>
3434
#include <uvm/uvm.h>
3535

36-
#include "../../include/hax.h"
36+
#include "hax.h"
3737

3838
void * hax_vmalloc(uint32_t size, uint32_t flags)
3939
{

platforms/netbsd/hax_mm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <sys/kmem.h>
3434
#include <uvm/uvm.h>
3535

36-
#include "../../include/hax.h"
36+
#include "hax.h"
3737

3838
struct hax_vcpu_mem_hinfo_t {
3939
struct uvm_object *uao;

platforms/netbsd/hax_wrapper.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@
3939
#include <machine/cpu.h>
4040
#include <machine/cpufunc.h>
4141

42-
43-
#include "../../include/hax.h"
44-
#include "../../core/include/hax_core_interface.h"
45-
#include "../../core/include/ia32.h"
42+
#include "ia32.h"
43+
#include "interface.h"
4644

4745
static const char* kLogPrefix[] = {
4846
"haxm: ",

0 commit comments

Comments
 (0)