Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2348031imu; Thu, 29 Nov 2018 03:38:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/W4FZTZsKmkNFWYHJWED2dwa2fdCpNPMj0FjkPKkSVGOoJ2NR+EBCQvusFvZpjcY97Sz7If X-Received: by 2002:a62:7086:: with SMTP id l128mr1060139pfc.68.1543491539491; Thu, 29 Nov 2018 03:38:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543491539; cv=none; d=google.com; s=arc-20160816; b=yRqDcYqiftdGYjHRU4vf8iwD5n2gp3DTss2wTvC5cF/oWbZmg5yZifMIiIvmEupIwj +Z+kBGQz1p/xKYecUHOvDjV4y6viWwCRgmVItUBoXlpSuXe3nBh1zDwSsJMnFuwdGOP3 BIiqz4v0wN7SZhefgztvr+rAxRQ0usUAWH81/UT0+CFQDHuaR1Ys+PuGtteS+RltkSNf pb0tsuQxasQrAr40ev90PXfugkLPgqhVrQcWbF8dnkMFfn04uIFw8Nhr4yZvnoVhPIq/ 88UolHROyctYHmK2VYkMDudmtBjBmTbEcTRVC7p8TrsHyZQWXVvruSvJh4hYaVLb4ud7 h0Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from; bh=AhxXpe8F3H4cuncp5PVI5Yr27k+Mi+Ehj/nWF3zotCw=; b=RtpDDS1qXc2fsYyVjnmTIRJ5ih8c0YsDXCi0f9o1speKWR2hWU73TnDVpf+uOr41bz lxU53P4n1gvwiPUZoftGv4b4FaBWfrryBf1YQak0/jvlHVg4m6ZnpUGFDHXFQnL3tL/F VHxSHn2wG5iiUPyv1nL/dSg6kmhPhlH5Ehr49q32OnJ2N20uT7CoWK04R8I1x9xO9s8p eB2odPBCSvmgsbtxAMQP90t7WgrG+XEJyH1DBqI5OueNn9gKlYtUHaJyTf9fSLkmq8i6 ObbMcRBU0VJYFIP8NgYCZksLMsFehBW9z44I3OO9VhzEx8Jq6TdioDwmgFgpX+Sb5nm+ 5bPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19si1957950pfa.80.2018.11.29.03.38.44; Thu, 29 Nov 2018 03:38:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726989AbeK2Wl0 (ORCPT + 99 others); Thu, 29 Nov 2018 17:41:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbeK2Wl0 (ORCPT ); Thu, 29 Nov 2018 17:41:26 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CB1D1C0578FA; Thu, 29 Nov 2018 11:36:22 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 742C85DD8A; Thu, 29 Nov 2018 11:36:20 +0000 (UTC) From: Vitaly Kuznetsov To: Nadav Amit , Thomas Gleixner , Paolo Bonzini Cc: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley \(EOSG\)" , "kvm\@vger.kernel.org" , Radim =?utf-8?B?S3LEjW0=?= =?utf-8?B?w6HFmQ==?= , "linux-kernel\@vger.kernel.org" , "x86\@kernel.org" , Roman Kagan Subject: Re: [PATCH v2 1/4] x86/hyper-v: move synic/stimer control structures definitions to hyperv-tlfs.h In-Reply-To: References: <20181126154732.23025-1-vkuznets@redhat.com> <20181126154732.23025-2-vkuznets@redhat.com> <20181126200413.GA7852@rkaganb.sw.ru> <87wooyk6na.fsf@vitty.brq.redhat.com> <20181127184835.GA5147@rkaganip.lan> <8A215F49-BB8F-4E93-AC62-EC33B4734F24@gmail.com> <87a7ltjxnz.fsf@vitty.brq.redhat.com> Date: Thu, 29 Nov 2018 12:36:18 +0100 Message-ID: <87bm68i099.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 29 Nov 2018 11:36:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nadav Amit writes: >> On Nov 28, 2018, at 5:07 AM, Thomas Gleixner wrote: >> >> On Wed, 28 Nov 2018, Vitaly Kuznetsov wrote: >> >>> Nadav Amit writes: >>> >>>> On a different note: how come all of the hyper-v structs are not marked >>>> with the “packed" attribute? >>> >>> "packed" should not be needed with proper padding; I vaguely remember >>> someone (from x86@?) arguing _against_ "packed". >> >> Packed needs to be used, when describing fixed format data structures in >> hardware or other ABIs, so the compiler cannot put alignment holes into >> them. >> >> Using packed for generic data structures might result in suboptimal layouts >> and prevents layout randomization. > > Right, I forgot about the structs randomization. So at least for it, the > attribute should be needed. > Not sure when randomization.s used but Hyper-V drivers will of course be utterly broken with it. > To prevent conflicts, I think that this series should also add the > attribute in a first patch, which would be tagged for stable. As the patchset doesn't add new definitions and as Paolo already queued it I'd go with a follow-up patch adding "packed" to all hyperv-tlfs.h structures. The question is how to avoid conflicts when Linus will be merging this. We can do: - Topic branch in kvm - Send the patch to x86, make topic branch and reabse kvm - Send the patch to kvm - ... ? Paolo/Thomas, what would be your preference? -- Vitaly