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

Commit

Permalink
netbsd: Adjust coding style of include path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wcwang committed Jan 7, 2022
1 parent 2afe7f5 commit 33a0980
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
3 changes: 2 additions & 1 deletion include/netbsd/hax_types_netbsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <sys/param.h>
#include <sys/types.h>

#include "hax_list.h"

// Signed Types
typedef int8_t int8;
typedef int16_t int16;
Expand All @@ -59,7 +61,6 @@ typedef uint64_t mword;
#endif
typedef mword HAX_VADDR_T;

#include "../hax_list.h"
struct hax_page {
void *kva;
struct vm_page *page;
Expand Down
3 changes: 3 additions & 0 deletions platforms/netbsd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ S?= /usr/src/sys

KMOD= haxm

CFLAGS+= -Wno-error=address-of-packed-member
CPPFLAGS+= -I../../include -I../../core/include

# toplevel
SRCS+= components.c
SRCS+= hax_entry.c
Expand Down
4 changes: 2 additions & 2 deletions platforms/netbsd/components.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <sys/device.h>
#include <sys/kmem.h>

#include "../../core/include/hax_core_interface.h"
#include "../../core/include/config.h"
#include "config.h"
#include "interface.h"

extern struct cfdriver hax_vm_cd;
extern struct cfdriver hax_vcpu_cd;
Expand Down
6 changes: 2 additions & 4 deletions platforms/netbsd/hax_entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
#include <sys/module.h>
#include <sys/cpu.h>

#include "../../core/include/config.h"
#include "../../core/include/hax_core_interface.h"
#include "../../include/hax.h"
#include "../../include/hax_interface.h"
#include "config.h"
#include "interface.h"

#define HAX_DEVICE_NAME "HAX"
#define HAX_VM_DEVICE_NAME "hax_vm"
Expand Down
9 changes: 4 additions & 5 deletions platforms/netbsd/hax_entry_hax.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@
#include <machine/specialreg.h>
#include <machine/cpufunc.h>

#include "../../include/hax.h"
#include "../../include/hax_interface.h"
#include "../../include/hax_release_ver.h"
#include "../../core/include/hax_core_interface.h"
#include "../../core/include/config.h"
#include "hax_release_ver.h"

#include "config.h"
#include "interface.h"

dev_type_open(hax_open);
dev_type_close(hax_close);
Expand Down
2 changes: 1 addition & 1 deletion platforms/netbsd/hax_entry_vcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <sys/lwp.h>
#include <sys/proc.h>

#include "../../core/include/hax_core_interface.h"
#include "interface.h"

extern struct cfdriver hax_vcpu_cd;

Expand Down
2 changes: 1 addition & 1 deletion platforms/netbsd/hax_entry_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <sys/lwp.h>
#include <sys/proc.h>

#include "../../core/include/hax_core_interface.h"
#include "interface.h"

extern struct cfdriver hax_vm_cd;

Expand Down
2 changes: 1 addition & 1 deletion platforms/netbsd/hax_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "../../include/hax.h"
#include "hax.h"

int hax_notify_host_event(enum hax_notify_event event, uint32_t *param,
uint32_t size)
Expand Down
5 changes: 3 additions & 2 deletions platforms/netbsd/hax_host_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
#include <uvm/uvm.h>
#include <machine/pmap.h>

#include "../../include/hax_host_mem.h"
#include "../../core/include/paging.h"
#include "hax_host_mem.h"

#include "paging.h"

int hax_pin_user_pages(uint64_t start_uva, uint64_t size, hax_memdesc_user *memdesc)
{
Expand Down
2 changes: 1 addition & 1 deletion platforms/netbsd/hax_mem_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <sys/kmem.h>
#include <uvm/uvm.h>

#include "../../include/hax.h"
#include "hax.h"

void * hax_vmalloc(uint32_t size, uint32_t flags)
{
Expand Down
2 changes: 1 addition & 1 deletion platforms/netbsd/hax_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <sys/kmem.h>
#include <uvm/uvm.h>

#include "../../include/hax.h"
#include "hax.h"

struct hax_vcpu_mem_hinfo_t {
struct uvm_object *uao;
Expand Down
6 changes: 2 additions & 4 deletions platforms/netbsd/hax_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#include <machine/cpu.h>
#include <machine/cpufunc.h>


#include "../../include/hax.h"
#include "../../core/include/hax_core_interface.h"
#include "../../core/include/ia32.h"
#include "ia32.h"
#include "interface.h"

static const char* kLogPrefix[] = {
"haxm: ",
Expand Down

0 comments on commit 33a0980

Please sign in to comment.