diff mbox series

[v5,05/26] KVM: arm64: Add missing #include of <linux/bitmap.h> to kvm_host.h

Message ID 1550519559-15915-6-git-send-email-Dave.Martin@arm.com
State New
Headers show
Series KVM: arm64: SVE guest support | expand

Commit Message

Dave Martin Feb. 18, 2019, 7:52 p.m. UTC
kvm_host.h uses DECLARE_BITMAP() to declare the features member of
struct vcpu_arch, but the corresponding #include for this is
missing.

This patch adds a suitable #include for <linux/bitmap.h>.  Although
the header builds without it today, this should help to avoid
future surprises.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 arch/arm64/include/asm/kvm_host.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Rutland Feb. 20, 2019, 3:23 p.m. UTC | #1
On Mon, Feb 18, 2019 at 07:52:18PM +0000, Dave Martin wrote:
> kvm_host.h uses DECLARE_BITMAP() to declare the features member of
> struct vcpu_arch, but the corresponding #include for this is
> missing.
> 
> This patch adds a suitable #include for <linux/bitmap.h>.  Although
> the header builds without it today, this should help to avoid
> future surprises.
> 
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  arch/arm64/include/asm/kvm_host.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 7732d0b..84056a4 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -22,6 +22,7 @@
>  #ifndef __ARM64_KVM_HOST_H__
>  #define __ARM64_KVM_HOST_H__
>  
> +#include <linux/bitmap.h>
>  #include <linux/types.h>
>  #include <linux/kvm_types.h>
>  #include <asm/cpufeature.h>

From a quick scan of the file, we're also missing:

#include <linux/jump_label.h>
#include <linux/percpu.h>
#include <linux/thread_info.h>

#include <asm/barrier.h>

... which might be worth adding at the same time.

Thanks,
Mark.
Dave Martin Feb. 26, 2019, 12:06 p.m. UTC | #2
On Wed, Feb 20, 2019 at 03:23:50PM +0000, Mark Rutland wrote:
> On Mon, Feb 18, 2019 at 07:52:18PM +0000, Dave Martin wrote:
> > kvm_host.h uses DECLARE_BITMAP() to declare the features member of
> > struct vcpu_arch, but the corresponding #include for this is
> > missing.
> > 
> > This patch adds a suitable #include for <linux/bitmap.h>.  Although
> > the header builds without it today, this should help to avoid
> > future surprises.
> > 
> > Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> > Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> > ---
> >  arch/arm64/include/asm/kvm_host.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> > index 7732d0b..84056a4 100644
> > --- a/arch/arm64/include/asm/kvm_host.h
> > +++ b/arch/arm64/include/asm/kvm_host.h
> > @@ -22,6 +22,7 @@
> >  #ifndef __ARM64_KVM_HOST_H__
> >  #define __ARM64_KVM_HOST_H__
> >  
> > +#include <linux/bitmap.h>
> >  #include <linux/types.h>
> >  #include <linux/kvm_types.h>
> >  #include <asm/cpufeature.h>
> 
> From a quick scan of the file, we're also missing:
> 
> #include <asm/barrier.h>

[...]

> #include <linux/jump_label.h>
> #include <linux/percpu.h>

Done for those three.


> #include <linux/thread_info.h>

Since commit e6b673b741ea ("KVM: arm64: Optimise FPSIMD handling to
reduce guest/host thrashing", we do have <asm/thread_info.h>.

Since this header is not generic, this seems reasonable.  Is there
something from <linux/thread_info.h> used here that I'm missing?

Cheers
---Dave
Mark Rutland Feb. 26, 2019, 12:31 p.m. UTC | #3
On Tue, Feb 26, 2019 at 12:06:16PM +0000, Dave Martin wrote:
> On Wed, Feb 20, 2019 at 03:23:50PM +0000, Mark Rutland wrote:
> > On Mon, Feb 18, 2019 at 07:52:18PM +0000, Dave Martin wrote:
> > > kvm_host.h uses DECLARE_BITMAP() to declare the features member of
> > > struct vcpu_arch, but the corresponding #include for this is
> > > missing.
> > > 
> > > This patch adds a suitable #include for <linux/bitmap.h>.  Although
> > > the header builds without it today, this should help to avoid
> > > future surprises.
> > > 
> > > Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> > > Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> > > ---
> > >  arch/arm64/include/asm/kvm_host.h | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> > > index 7732d0b..84056a4 100644
> > > --- a/arch/arm64/include/asm/kvm_host.h
> > > +++ b/arch/arm64/include/asm/kvm_host.h
> > > @@ -22,6 +22,7 @@
> > >  #ifndef __ARM64_KVM_HOST_H__
> > >  #define __ARM64_KVM_HOST_H__
> > >  
> > > +#include <linux/bitmap.h>
> > >  #include <linux/types.h>
> > >  #include <linux/kvm_types.h>
> > >  #include <asm/cpufeature.h>
> > 
> > From a quick scan of the file, we're also missing:
> > 
> > #include <asm/barrier.h>
> 
> [...]
> 
> > #include <linux/jump_label.h>
> > #include <linux/percpu.h>
> 
> Done for those three.

Great.

> > #include <linux/thread_info.h>
> 
> Since commit e6b673b741ea ("KVM: arm64: Optimise FPSIMD handling to
> reduce guest/host thrashing", we do have <asm/thread_info.h>.
> 
> Since this header is not generic, this seems reasonable.  Is there
> something from <linux/thread_info.h> used here that I'm missing?

I think I just confused myself; <asm/thread_info.h> seems sufficient.

Thanks,
Mark.
Dave Martin Feb. 26, 2019, 12:33 p.m. UTC | #4
On Tue, Feb 26, 2019 at 12:31:45PM +0000, Mark Rutland wrote:
> On Tue, Feb 26, 2019 at 12:06:16PM +0000, Dave Martin wrote:
> > On Wed, Feb 20, 2019 at 03:23:50PM +0000, Mark Rutland wrote:

[...]

> > > #include <asm/barrier.h>
> > 
> > [...]
> > 
> > > #include <linux/jump_label.h>
> > > #include <linux/percpu.h>
> > 
> > Done for those three.
> 
> Great.
> 
> > > #include <linux/thread_info.h>
> > 
> > Since commit e6b673b741ea ("KVM: arm64: Optimise FPSIMD handling to
> > reduce guest/host thrashing", we do have <asm/thread_info.h>.
> > 
> > Since this header is not generic, this seems reasonable.  Is there
> > something from <linux/thread_info.h> used here that I'm missing?
> 
> I think I just confused myself; <asm/thread_info.h> seems sufficient.

OK, I shan't worry about that one, then.

Cheers
---Dave
Mark Rutland Feb. 26, 2019, 12:40 p.m. UTC | #5
On Tue, Feb 26, 2019 at 12:33:22PM +0000, Dave Martin wrote:
> On Tue, Feb 26, 2019 at 12:31:45PM +0000, Mark Rutland wrote:
> > On Tue, Feb 26, 2019 at 12:06:16PM +0000, Dave Martin wrote:
> > > On Wed, Feb 20, 2019 at 03:23:50PM +0000, Mark Rutland wrote:
> 
> [...]
> 
> > > > #include <asm/barrier.h>
> > > 
> > > [...]
> > > 
> > > > #include <linux/jump_label.h>
> > > > #include <linux/percpu.h>
> > > 
> > > Done for those three.
> > 
> > Great.
> > 
> > > > #include <linux/thread_info.h>
> > > 
> > > Since commit e6b673b741ea ("KVM: arm64: Optimise FPSIMD handling to
> > > reduce guest/host thrashing", we do have <asm/thread_info.h>.
> > > 
> > > Since this header is not generic, this seems reasonable.  Is there
> > > something from <linux/thread_info.h> used here that I'm missing?
> > 
> > I think I just confused myself; <asm/thread_info.h> seems sufficient.
> 
> OK, I shan't worry about that one, then.

Cool.

FWIW, feel free to add:

Acked-by: Mark Rutland <mark.rutland@arm.com>

... to that fixed-up commmit.

Thanks,
Mark.
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 7732d0b..84056a4 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -22,6 +22,7 @@ 
 #ifndef __ARM64_KVM_HOST_H__
 #define __ARM64_KVM_HOST_H__
 
+#include <linux/bitmap.h>
 #include <linux/types.h>
 #include <linux/kvm_types.h>
 #include <asm/cpufeature.h>