kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Some warnings occur in hyperv.c.
@ 2020-03-12 10:20 Haiwei Li
  2020-03-12 10:47 ` Vitaly Kuznetsov
  0 siblings, 1 reply; 4+ messages in thread
From: Haiwei Li @ 2020-03-12 10:20 UTC (permalink / raw)
  To: x86, kvm; +Cc: Vitaly Kuznetsov, wanpengli

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-18  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 10:20 Some warnings occur in hyperv.c Haiwei Li
2020-03-12 10:47 ` Vitaly Kuznetsov
2020-03-18  0:59   ` Haiwei Li
2020-03-18  9:54     ` Vitaly Kuznetsov

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).