Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Nov 2022 18:26:38 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 0f435e647645 - main - vmm: Add _KERNEL guards for io headers shared with userspace.
Message-ID:  <202211181826.2AIIQcZl030279@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0f435e647645afc68076ff5b005f9366c44413eb

commit 0f435e647645afc68076ff5b005f9366c44413eb
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-18 18:01:51 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-11-18 18:25:36 +0000

    vmm: Add _KERNEL guards for io headers shared with userspace.
    
    Reviewed by:    corvink, markj
    Differential Revision:  https://reviews.freebsd.org/D37159
---
 sys/amd64/vmm/io/vhpet.h   | 3 +++
 sys/amd64/vmm/io/vioapic.h | 9 ++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sys/amd64/vmm/io/vhpet.h b/sys/amd64/vmm/io/vhpet.h
index 113683c09b33..f22d0c3b38ac 100644
--- a/sys/amd64/vmm/io/vhpet.h
+++ b/sys/amd64/vmm/io/vhpet.h
@@ -35,6 +35,7 @@
 #define	VHPET_BASE	0xfed00000
 #define	VHPET_SIZE	1024
 
+#ifdef _KERNEL
 struct vm_snapshot_meta;
 
 struct vhpet *vhpet_init(struct vm *vm);
@@ -49,4 +50,6 @@ int	vhpet_snapshot(struct vhpet *vhpet, struct vm_snapshot_meta *meta);
 int	vhpet_restore_time(struct vhpet *vhpet);
 #endif
 
+#endif /* _KERNEL */
+
 #endif	/* _VHPET_H_ */
diff --git a/sys/amd64/vmm/io/vioapic.h b/sys/amd64/vmm/io/vioapic.h
index 19dbffe3ec24..17d2c29b758f 100644
--- a/sys/amd64/vmm/io/vioapic.h
+++ b/sys/amd64/vmm/io/vioapic.h
@@ -32,11 +32,12 @@
 #ifndef _VIOAPIC_H_
 #define	_VIOAPIC_H_
 
-struct vm_snapshot_meta;
-
 #define	VIOAPIC_BASE	0xFEC00000
 #define	VIOAPIC_SIZE	4096
 
+#ifdef _KERNEL
+struct vm_snapshot_meta;
+
 struct vioapic *vioapic_init(struct vm *vm);
 void	vioapic_cleanup(struct vioapic *vioapic);
 
@@ -56,4 +57,6 @@ int	vioapic_snapshot(struct vioapic *vioapic,
 			 struct vm_snapshot_meta *meta);
 #endif
 
-#endif
+#endif /* _KERNEL */
+
+#endif /* _VIOAPIC_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202211181826.2AIIQcZl030279>