From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3AFA0C32772 for ; Tue, 23 Aug 2022 14:50:12 +0000 (UTC) Received: from localhost ([::1]:48292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQVEH-00028u-TU for qemu-devel@archiver.kernel.org; Tue, 23 Aug 2022 10:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQV8p-0007x7-Ce for qemu-devel@nongnu.org; Tue, 23 Aug 2022 10:44:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:24176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQV8l-0002I9-AI for qemu-devel@nongnu.org; Tue, 23 Aug 2022 10:44:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661265866; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MRe0jPg5g71Ku2k6CDoiCaJUXXhBhO61wFjdlKJm7j4=; b=T32oGz2t7PDLxa6NrQzl5BrQkCQgWEk/luFesZ9vgSnhPK9aXNoon/++A8wTJ5BDkyzu1v avLXetl6sZQPr8POeuXLKZwokTjZ4z60A/N7LmF8UOQugsCn2P7cnQXk4TVY4KuXqDjCtc 8nlSAX18CqAVZhHV6BgcYkOAaYN8/Xs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-631-E_koNjaMMk6-jkxqgoWEgg-1; Tue, 23 Aug 2022 10:44:23 -0400 X-MC-Unique: E_koNjaMMk6-jkxqgoWEgg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A1CC5185A7A4; Tue, 23 Aug 2022 14:44:22 +0000 (UTC) Received: from redhat.com (unknown [10.33.37.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AACF4010FA4; Tue, 23 Aug 2022 14:44:21 +0000 (UTC) Date: Tue, 23 Aug 2022 15:44:18 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Michal =?utf-8?B?UHLDrXZvem7DrWs=?= Cc: Chenyi Qiang , Paolo Bonzini , Marcelo Tosatti , Richard Henderson , Eduardo Habkost , Xiaoyao Li , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: Re: [PATCH v5 1/3] Update linux headers to 6.0-rc1 Message-ID: References: <20220817020845.21855-1-chenyi.qiang@intel.com> <20220817020845.21855-2-chenyi.qiang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/2.2.6 (2022-06-05) X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, Aug 22, 2022 at 05:00:03PM +0200, Michal Pr=C3=ADvozn=C3=ADk wrote: > On 8/17/22 04:08, Chenyi Qiang wrote: > > commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 > >=20 > > Signed-off-by: Chenyi Qiang > > --- > > include/standard-headers/asm-x86/bootparam.h | 7 +- > > include/standard-headers/drm/drm_fourcc.h | 73 +++++++- > > include/standard-headers/linux/ethtool.h | 29 +-- > > include/standard-headers/linux/input.h | 12 +- > > include/standard-headers/linux/pci_regs.h | 30 ++- > > include/standard-headers/linux/vhost_types.h | 17 +- > > include/standard-headers/linux/virtio_9p.h | 2 +- > > .../standard-headers/linux/virtio_config.h | 7 +- > > include/standard-headers/linux/virtio_ids.h | 14 +- > > include/standard-headers/linux/virtio_net.h | 34 +++- > > include/standard-headers/linux/virtio_pci.h | 2 + > > linux-headers/asm-arm64/kvm.h | 27 +++ > > linux-headers/asm-generic/unistd.h | 4 +- > > linux-headers/asm-riscv/kvm.h | 22 +++ > > linux-headers/asm-riscv/unistd.h | 3 +- > > linux-headers/asm-s390/kvm.h | 1 + > > linux-headers/asm-x86/kvm.h | 33 ++-- > > linux-headers/asm-x86/mman.h | 14 -- > > linux-headers/linux/kvm.h | 172 +++++++++++++++++- > > linux-headers/linux/userfaultfd.h | 10 +- > > linux-headers/linux/vduse.h | 47 +++++ > > linux-headers/linux/vfio.h | 4 +- > > linux-headers/linux/vfio_zdev.h | 7 + > > linux-headers/linux/vhost.h | 35 +++- > > 24 files changed, 523 insertions(+), 83 deletions(-) > >=20 >=20 >=20 > > diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h > > index bf6e96011d..46de10a809 100644 > > --- a/linux-headers/asm-x86/kvm.h > > +++ b/linux-headers/asm-x86/kvm.h > > @@ -198,13 +198,13 @@ struct kvm_msrs { > > __u32 nmsrs; /* number of msrs in entries */ > > __u32 pad; > > =20 > > - struct kvm_msr_entry entries[0]; > > + struct kvm_msr_entry entries[]; > > }; > > =20 >=20 > I don't think it's this simple. I think this needs to go hand in hand wit= h kvm_arch_get_supported_msr_feature(). >=20 > Also, this breaks clang build: >=20 > clang -m64 -mcx16 -Ilibqemu-x86_64-softmmu.fa.p -I. -I.. -Itarget/i386 -I= =2E./target/i386 -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I= /usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I= /usr/lib64/glib-2.0/include -fcolor-diagnostics -Wall -Winvalid-pch -Werror= -std=3Dgnu11 -O0 -g -isystem /home/zippy/work/qemu/qemu.git/linux-headers = -isystem linux-headers -iquote . -iquote /home/zippy/work/qemu/qemu.git -iq= uote /home/zippy/work/qemu/qemu.git/include -iquote /home/zippy/work/qemu/q= emu.git/tcg/i386 -pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFI= LE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wm= issing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-defi= nition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-q= ualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defin= ed -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative= -value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-typ= e-limit-compare -Wno-psabi -fstack-protector-strong -O0 -ggdb -fPIE -isyste= m../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET=3D"x8= 6_64-softmmu-config-target.h"' '-DCONFIG_DEVICES=3D"x86_64-softmmu-config-d= evices.h"' -MD -MQ libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o -MF = libqemu-x86_64-softmmu.fa.p/target_i386_kvm_kvm.c.o.d -o libqemu-x86_64-sof= tmmu.fa.p/target_i386_kvm_kvm.c.o -c ../target/i386/kvm/kvm.c > ../target/i386/kvm/kvm.c:470:25: error: field 'info' with variable sized = type 'struct kvm_msrs' not at the end of a struct or class is a GNU extensi= on [-Werror,-Wgnu-variable-sized-type-not-at-end] > struct kvm_msrs info; > ^ > ../target/i386/kvm/kvm.c:1701:27: error: field 'cpuid' with variable size= d type 'struct kvm_cpuid2' not at the end of a struct or class is a GNU ext= ension [-Werror,-Wgnu-variable-sized-type-not-at-end] > struct kvm_cpuid2 cpuid; > ^ > ../target/i386/kvm/kvm.c:2868:25: error: field 'info' with variable sized= type 'struct kvm_msrs' not at the end of a struct or class is a GNU extens= ion [-Werror,-Wgnu-variable-sized-type-not-at-end] > struct kvm_msrs info; > ^ > 3 errors generated. We're perfectly OK with using GNU extensions in QEMU (eg the g_auto stuff), so IMHO just set -Wno-gnu-variable-sized-type-not-at-end to turn off this warning that's only relevant to people striving for fully portable C code. With regards, Daniel --=20 |: https://berrange.com -o- https://www.flickr.com/photos/dberrange= :| |: https://libvirt.org -o- https://fstop138.berrange.com= :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange= :|