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 X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04598C433E6 for ; Fri, 28 Aug 2020 16:36:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C709E20872 for ; Fri, 28 Aug 2020 16:36:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TJTkgP4M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C709E20872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBhMG-0000au-Vd; Fri, 28 Aug 2020 16:36:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBhMF-0000ap-0H for xen-devel@lists.xenproject.org; Fri, 28 Aug 2020 16:36:07 +0000 X-Inumbo-ID: fda1f3a6-98b9-45fc-8bc4-f99e1a0a701c Received: from mail-wr1-x42c.google.com (unknown [2a00:1450:4864:20::42c]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fda1f3a6-98b9-45fc-8bc4-f99e1a0a701c; Fri, 28 Aug 2020 16:36:05 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id f7so1885524wrw.1 for ; Fri, 28 Aug 2020 09:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=EKuh2zra/ZvDXnfzaaaVoNAee+3kPdgRj0+Y7FNnwvE=; b=TJTkgP4MMC3umiEFCnZXfg2REKB5FODvIJ9P8hvqtcxaJHLfUNc+y7Z4Yy0h3WNVrl VkqNq9Ar2OI+5+JjOBRSzO6J5YpmaAObBalU+Oqs3y5TqdEE5Ec+oll/+1rq6XYvAwnx YZbH/HacKHJ3jkBdHAigBR4Oc/cLOar/bRDEV1lNM/YveeEvNEyl9gOoKWsxr8eBw73D K6LXEM45j9g+fI7HUfvNZyCTShJXlnyxrRAiig77WAoE6xW5Kh9OxaI+EKdv6GNRo3M8 M+SjvgkVYHR+bBWAzO3HXcG9HaklTag0bLj0eLDoto4b/EMkd+c4PSKXu5iN+cdofOwg VESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-transfer-encoding :thread-index:content-language; bh=EKuh2zra/ZvDXnfzaaaVoNAee+3kPdgRj0+Y7FNnwvE=; b=qmcYZsx1GbruXkEuhPo12MvpmWD1NFX1wIlm/Jr7K5uAo7nt8SWPcCogLInDNH90R/ gd/YpFBcCTIBIm39nStoBeOpx8MfD1XAXBchDsB13rSSD/ZRM/reLvtvHKIAGa0OLTBe S/1Eim9V1mkkMjVouj+pq07/o6XBXTQFxv/DpDJIe1NHyNCdhpDm5SJItcBoVVLqtji8 SUWCCzw+eD8hMUS+vLRWFOBwypZ2Afkwux69rUrahE2N3xKQoM7GKoiDrLWzW/sfE60O AvKZiM2MSUuAyG/VQ+290NsBaSRBCC9ND4yMvhUXdIREYegC8hDZ+jMYssWkasQ2kaC8 xjnA== X-Gm-Message-State: AOAM532L1PixunZ+y4pF3FcQgTDR4LIOJDlRrUCHlMTBfE2yOC1aizZr m63HCf46+BaU5wHZJuttVE8= X-Google-Smtp-Source: ABdhPJxgPwQ/v99AMUnn993i4Q9w3fBWQchWaw/h3zfE+UT0SFhxflPLqoJwwTmgxGt31ob4P3/vpA== X-Received: by 2002:adf:e68f:: with SMTP id r15mr2258131wrm.196.1598632564607; Fri, 28 Aug 2020 09:36:04 -0700 (PDT) Received: from CBGR90WXYV0 ([2a00:23c5:5785:9a01:750e:72f5:bca:b4e5]) by smtp.gmail.com with ESMTPSA id g15sm1888001wrx.66.2020.08.28.09.36.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2020 09:36:04 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" To: "'Jan Beulich'" Cc: , "'Ian Jackson'" , "'Wei Liu'" , "'Andrew Cooper'" , "'George Dunlap'" , "'Julien Grall'" , "'Stefano Stabellini'" , =?utf-8?Q?'Roger_Pau_Monn=C3=A9'?= References: <20200818103032.3050-1-paul@xen.org> <20200818103032.3050-9-paul@xen.org> <153634db-bd1a-62d8-f53f-2c4019ffda4c@suse.com> <006401d67d2b$991e3dd0$cb5ab970$@xen.org> In-Reply-To: Subject: RE: [EXTERNAL] [PATCH v7 8/9] x86/time: add a domain context record for tsc_info... Date: Fri, 28 Aug 2020 17:36:03 +0100 Message-ID: <001201d67d59$5249add0$f6dd0970$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQI3t7iXj66qvRdG8GCx2a1a4xz7XAJdPdyxAnABMAgCOOdCDwGgjGILqEYMsAA= Content-Language: en-gb X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: paul@xen.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" > -----Original Message----- > From: Jan Beulich > Sent: 28 August 2020 16:53 > To: paul@xen.org > Cc: xen-devel@lists.xenproject.org; 'Ian Jackson' = ; 'Wei Liu' ; > 'Andrew Cooper' ; 'George Dunlap' = ; 'Julien > Grall' ; 'Stefano Stabellini' = ; 'Roger Pau Monn=C3=A9' > > Subject: Re: [EXTERNAL] [PATCH v7 8/9] x86/time: add a domain context = record for tsc_info... >=20 > On 28.08.2020 13:08, Paul Durrant wrote: > >> -----Original Message----- > >> From: Jan Beulich > >> Sent: 26 August 2020 15:03 > >> To: Paul Durrant > >> Cc: xen-devel@lists.xenproject.org; Durrant, Paul = ; Ian Jackson > >> ; Wei Liu ; Andrew Cooper = ; > George > >> Dunlap ; Julien Grall ; = Stefano Stabellini > >> ; Roger Pau Monn=C3=A9 = > >> Subject: RE: [EXTERNAL] [PATCH v7 8/9] x86/time: add a domain = context record for tsc_info... > >> > >> CAUTION: This email originated from outside of the organization. Do = not click links or open > >> attachments unless you can confirm the sender and know the content = is safe. > >> > >> > >> > >> On 18.08.2020 12:30, Paul Durrant wrote: > >>> --- a/xen/include/public/save.h > >>> +++ b/xen/include/public/save.h > >>> @@ -93,7 +93,18 @@ struct domain_shared_info_context { > >>> > >>> DECLARE_DOMAIN_SAVE_TYPE(SHARED_INFO, 2, struct = domain_shared_info_context); > >>> > >>> -#define DOMAIN_SAVE_CODE_MAX 2 > >>> +#if defined(__i386__) || defined(__x86_64__) > >>> +struct domain_tsc_info_context { > >>> + uint32_t mode; > >>> + uint32_t incarnation; > >>> + uint64_t elapsed_nsec; > >>> + uint32_t khz; > >>> +}; > >> > >> sizeof() for this struct varies between 32-bit and 64-bit - is > >> this not a problem? (alignof() varies too, but there I think > >> it's indeed not a problem, albeit it could still be taken care > >> of by using uint64_aligned_t, alongside the addition of an > >> explicit padding field). > > > > I don't think it should matter because domain context records have > > implicit padding to align up to the next 64-bit boundary, >=20 > Could you remind me where this is written down and enforced? >=20 With the series fully applied, see xen/include/public/save.h line 62-68 = for the comment and then see domain_save_end() in xen/common/save.c for = where the padding is applied. Paul > > so as long as fields within the struct don't move (which I think > > is true in this case) then we should be ok. >=20 > Right. >=20 > Jan