kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Haiwei Li <lihaiwei.kernel@gmail.com>
To: x86@kernel.org, kvm@vger.kernel.org
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>, wanpengli@tencent.com
Subject: Some warnings occur in hyperv.c.
Date: Thu, 12 Mar 2020 18:20:16 +0800	[thread overview]
Message-ID: <CAB5KdOaiqS_nXq8_HfMH1PmjThFzmYNBcBrMnC3Utkw6-OPUfQ@mail.gmail.com> (raw)

Hi, When i build kvm, some warnings occur. Just like:

/home/kernel/data/linux/arch/x86/kvm//hyperv.c: In function ‘kvm_hv_flush_tlb’:
/home/kernel/data/linux/arch/x86/kvm//hyperv.c:1436:1: warning: the
frame size of 1064 bytes is larger than 1024 bytes
[-Wframe-larger-than=]
 }
 ^
/home/kernel/data/linux/arch/x86/kvm//hyperv.c: In function ‘kvm_hv_send_ipi’:
/home/kernel/data/linux/arch/x86/kvm//hyperv.c:1529:1: warning: the
frame size of 1112 bytes is larger than 1024 bytes
[-Wframe-larger-than=]
 }
 ^

Then i get the two functions in hyperv.c. Like:

static u64 kvm_hv_send_ipi(struct kvm_vcpu *current_vcpu, u64 ingpa, u64 outgpa,
                           bool ex, bool fast)
{
        struct kvm *kvm = current_vcpu->kvm;
        struct hv_send_ipi_ex send_ipi_ex;
        struct hv_send_ipi send_ipi;
        u64 vp_bitmap[KVM_HV_MAX_SPARSE_VCPU_SET_BITS];
        DECLARE_BITMAP(vcpu_bitmap, KVM_MAX_VCPUS);
        unsigned long *vcpu_mask;
        unsigned long valid_bank_mask;
        u64 sparse_banks[64];
        int sparse_banks_len;
        u32 vector;
        bool all_cpus;

static u64 kvm_hv_flush_tlb(struct kvm_vcpu *current_vcpu, u64 ingpa,
                            u16 rep_cnt, bool ex)
{
        struct kvm *kvm = current_vcpu->kvm;
        struct kvm_vcpu_hv *hv_vcpu = &current_vcpu->arch.hyperv;
        struct hv_tlb_flush_ex flush_ex;
        struct hv_tlb_flush flush;
        u64 vp_bitmap[KVM_HV_MAX_SPARSE_VCPU_SET_BITS];
        DECLARE_BITMAP(vcpu_bitmap, KVM_MAX_VCPUS);
        unsigned long *vcpu_mask;
        u64 valid_bank_mask;
        u64 sparse_banks[64];
        int sparse_banks_len;
        bool all_cpus;

The definition of sparse_banks for X86_64 is 512 B.  So i tried to
refactor it by
defining it for both tlb and ipi. But no preempt disable in the flow.
How can i do?

Thanks.

             reply	other threads:[~2020-03-12 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 10:20 Haiwei Li [this message]
2020-03-12 10:47 ` Some warnings occur in hyperv.c Vitaly Kuznetsov
2020-03-18  0:59   ` Haiwei Li
2020-03-18  9:54     ` Vitaly Kuznetsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB5KdOaiqS_nXq8_HfMH1PmjThFzmYNBcBrMnC3Utkw6-OPUfQ@mail.gmail.com \
    --to=lihaiwei.kernel@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).