Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1799040pxb; Wed, 20 Oct 2021 12:00:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjEhhd8WiSxpbgHUy3zU6akKihK1/6S8+6mrCB0PrbEyLE8N4PlDbb4FoRtQ2S5mi8HD+D X-Received: by 2002:a17:903:22c9:b0:13e:ed56:70e2 with SMTP id y9-20020a17090322c900b0013eed5670e2mr720574plg.19.1634756407263; Wed, 20 Oct 2021 12:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634756407; cv=none; d=google.com; s=arc-20160816; b=bQfIRWCX3GMHT0uwjv+VStZ/ck5PPGIGQuci1t20IImV+YltbGj8cah3SRRmGW3ofr uIQalopeNLmdBYIAxcvCXFRI1WE2InpDfvXJD4ehXthsrlfmxtCUm+eAvzP304syY17Z e6+21VydhebvmGYeG7XR806BV1x5V4kAl0fYCRMqR5Iuh52TNyoddIUUMISC+zIUmY2y Yt8mM92TrHJCtwOI4SiE3Top08iyeWJW5PZSoz4uZnqvr/sLs8FywPliGgSipWI4lTBm Kkt9EPxA90WrDJgaFDduSGzqHB9WNIpr31MxOXTzKkyRmU9MRUBqiQlmyrndUfJtNuKG tgfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=wqGGflUss5EP6c8saruqa1OwtSH2jZZ5O8DAeAwPBUY=; b=MjMuIaIm5RJUxkUnrnaQyaOiFCIMXfFlJqxkDTRabZlzdnGQisP13QRhRkdWOeBS14 yyog0/DXB6aBDzhxEIqyNdRTSBd3kJ3mIFQM3l8Ccq0ydjpCj7B+kgSVGhnLXiB8OEsh aHF14vQF7/LwI015A+dmzii+zgIvEte8pqaenVNaaPzBMDRsOiRfuRCUn24HzbMHqt5m l07BSkhsU7HYbaKp4ddTr5mSibL8bmEDgwf0zjw05Y9wZY9fDOXGGNOnh6Cf5exeGUW4 +OnooDW5QNB3qF3a/hVtJT5PSRjeW8IsyEsTV8kXa1UgPuj4HbiibfZXsfY4AiP7UlAh CUNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si3734910pgv.541.2021.10.20.11.59.53; Wed, 20 Oct 2021 12:00:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231338AbhJTTBM (ORCPT + 99 others); Wed, 20 Oct 2021 15:01:12 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:41490 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbhJTTBL (ORCPT ); Wed, 20 Oct 2021 15:01:11 -0400 Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mdGnX-0002lB-LZ; Wed, 20 Oct 2021 20:58:47 +0200 Subject: Re: [PATCH v5 07/13] KVM: Just resync arch fields when slots_arch_lock gets reacquired To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Igor Mammedov , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <311810ebd1111bed50d931d424297384171afc36.1632171479.git.maciej.szmigiero@oracle.com> From: "Maciej S. Szmigiero" Message-ID: <7e68e883-7431-72a3-82ef-306472de5ac4@maciej.szmigiero.name> Date: Wed, 20 Oct 2021 20:58:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.10.2021 20:57, Sean Christopherson wrote: > On Wed, Oct 20, 2021, Maciej S. Szmigiero wrote: >> On 20.10.2021 01:55, Sean Christopherson wrote: >>> On Mon, Sep 20, 2021, Maciej S. Szmigiero wrote: >>> This should probably be a memcpy(), I don't know what all shenanigans the compiler >>> can throw at us if it gets to copy a struct by value. >> >> Normally, copy-assignment of a struct is a safe operation (this is purely >> an internal kernel struct, so there are no worries about padding leakage >> to the userspace), but can replace this with a memcpy(). > > I was more worried about the compiler using SIMD instructions. I assume the kernel > build process has lots of guards in place to prevent such shenanigans, but on the > other hand I _know_ mempcy() is safe :-) > So we will play safe and use mempcy() then :) Thanks, Maciej