Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp9132pxy; Fri, 30 Jul 2021 21:57:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQfgk3FSzDAvESi8WdGfOEcIGJhPXaSl7LqoDKWxVlfKbmUKjlUrgy2uj6cp/v9fL84OwS X-Received: by 2002:a17:907:3e02:: with SMTP id hp2mr6125404ejc.4.1627707474446; Fri, 30 Jul 2021 21:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627707474; cv=none; d=google.com; s=arc-20160816; b=bkRrAVtU5hapZIF97CVK2kyjTLQAtNQgX8kJh0/4KDYbdKncu+5tgmp5cMHZKmMxKD OKA5q5fsaEXuhOpjFXMyOLNhbKDeudYqWMWtNnFc6YQoFBK6Iz4O6BiNOY8pj0fkYnlx UjbyO3lyIV5yZOgq1lRNNrGC40ZSZQEt8wuULnY2u5Y8mpKKmXzd+l/bZp7TCkIxUfBg rer0nD7tyMzm3Dx40MRVBo+KxsAcn7/DOp60aHdihDWqKzAMHIuziuc8eWS01HxxrLNW aiAWU76Jc+4Dv0cK7Sdqh7Y58A3FsGAPsNOepMent8pvrfw2abSBSTiEinYMv4QitSX7 rAbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :cc:to:subject:from:date; bh=irdp4FCOPD6cbfYa68/YuYYRT7qvdy162ZJhTXxU7UU=; b=UqQ/YosYpll8dWuVyEHyzGCdAZsJcaJ8OGsF2DrFIg4WS0ydJw35zJUX5/RVUtj/cr LnI3yp8JhQqoLnXAHs5oibPrsdcopHWVVERZMa+0W02YLpMiDQcLSd5qtzqv1hFGCFEo 6BxtUgiKE1dKVRCYgPixquweA5MItfa8VkL/hy3DrfF/e7wqNh44mvSeM3D8o2end4n6 M1Dg4sJYlzcCBoG0Rg+rLv8/XT4qJWs2Ey8+pZPLrzgNnX1iDaghPY/iS/0ZPGwRVcgW TW1XHppr/JoCTx5Tk4FbpRKWkb7s164g+xi6afv3clL3vmR+1jU0gZtqyucTRPmnQgec SmOQ== 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 o2si3922362eds.325.2021.07.30.21.57.11; Fri, 30 Jul 2021 21:57:54 -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 S231578AbhGaEzs (ORCPT + 99 others); Sat, 31 Jul 2021 00:55:48 -0400 Received: from mta-10-4.privateemail.com ([198.54.122.62]:10185 "EHLO MTA-10-4.privateemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbhGaEzs (ORCPT ); Sat, 31 Jul 2021 00:55:48 -0400 X-Greylist: delayed 84635 seconds by postgrey-1.27 at vger.kernel.org; Sat, 31 Jul 2021 00:55:48 EDT Received: from mta-10.privateemail.com (localhost [127.0.0.1]) by mta-10.privateemail.com (Postfix) with ESMTP id C24E218000A5; Sat, 31 Jul 2021 00:55:41 -0400 (EDT) Received: from [192.168.0.46] (unknown [10.20.151.205]) by mta-10.privateemail.com (Postfix) with ESMTPA id 06E7618000A4; Sat, 31 Jul 2021 00:55:38 -0400 (EDT) Date: Sat, 31 Jul 2021 00:55:32 -0400 From: Hamza Mahfooz Subject: Re: [PATCH] KVM: const-ify all relevant uses of struct kvm_memory_slot To: Peter Xu Cc: linux-kernel@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org Message-Id: In-Reply-To: References: <20210713023338.57108-1-someguy@effective-light.com> X-Mailer: geary/40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 30 2021 at 04:19:21 PM -0400, Peter Xu wrote: > separate patch. At the meantime I also don't understand why memcpy() > here, > which seems to be even slower.. Alright, I've now had a chance to compare the object code generated before my patch is applied, with what is generated after it is applied and the same object code is generated for arch/x86/kvm/mmu/mmu.c in both cases (at least when compiling with clang, however I suspect other optimizing compilers would behave similarly).