Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2438337lqb; Mon, 27 May 2024 22:33:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+bUL+FJTjc1u5tc2xRYqcPtSZNKYUqt7Zz39S2P8MwphnjV6ZMMBJFmT668HLFPXmj2uh5zBVkPihbJdRkkHJgqk3/Ueh933Wv8Oxcg== X-Google-Smtp-Source: AGHT+IHGsUoi6wPKcpLFd0PWL4QEu9f4F2aADH1s/xzUt2DmJ8vI/cG7t96dKIdLmFrmwkx1X6iQ X-Received: by 2002:a17:902:e194:b0:1f3:4d2:7025 with SMTP id d9443c01a7336-1f4498ec1a7mr78668995ad.49.1716874424182; Mon, 27 May 2024 22:33:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716874424; cv=pass; d=google.com; s=arc-20160816; b=NSZumgz/t5lCloOZfglVUzN+WBUHIJybpUGd5Jy96E7Y+3+BrX81ILMZCHkT2AzS4/ 6xCbwqWnRxJogEDvl7xhAMsYL+Wh4YtuL/uODyHzlsB4nlaBCQDt5m4PLg7mfkgQifGm 7AAK2nP46nWAD5z8LP3tM1uZaULBJ53uyeDuxXHCyq+hD88jnRNG6stSs9DVbpYzYdxm pvA1jAB8HRaYMepGp+mglKaU0KR5jmelM5FX4Mw+nsKIrWdjRVlSOkwi6eam2EeW3U6u spagsr9aOs1tNuu37zqJXuUjvyJyNDp5LQjDP7QJ5fMMC7ljCoabKfSTlf2j0/Rmeckz OfQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=ptjC09kdGjdpXiVrATn7mphaV9X4ACIvPxTCurbJjBs=; fh=hHfRHARqDA4MaXZ+6KwcRuU9MwifSGqvXmWo7H5Jre4=; b=JKdqlygK97RX5JFZj59Ss7NmRJ7cILDwONuuAoaCa6fllftys4/OntR4WC+wg06b/f 5OK10ccHI1TIaVowZlmwMpGJUid/9ZivMjXw13Qolqk5VM9Ywgss0TFuvXv0gnIxBZ38 mp3GEFY7+vrm9JZPNLkDhOzIYdfLnWDenjXyvsgzONknNYGCku5JRaqeZ7VaetkmhAMa kp2V2WRADo6TBeIjyyUfgPviV+gdMjQGOw1iEgAkDIFruZ2Nj0ZXZgU3y5YvzDxvF05X KzUrU7TDix95smJ2/wbAGNvqqkv6HReuzS5D8FcOd2AgsjWxoOCJai3P8opO0g7AfkYW CMWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-191775-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c7c125dsi73302195ad.150.2024.05.27.22.33.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 22:33:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191775-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-191775-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C90E3284414 for ; Tue, 28 May 2024 05:33:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 196FF4D108; Tue, 28 May 2024 05:33:36 +0000 (UTC) Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A8691C68D; Tue, 28 May 2024 05:33:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716874415; cv=none; b=kMI3puR/E6nGalrELkTb5jgqnJk3LB2qt38zjzCK7aMmFPVAuYYcVFJqYXq55lgDBENjKfnlQCxsH4jzmO6wxLq+oO0rLCDYKNV0och66RnXm2HoJatDVpVo5YTI6OLT50SffRCL9aI0yHfoT7J+WBN49FJBksxD7TOA4+Fo/lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716874415; c=relaxed/simple; bh=8LC1IXOriw4pChGUu6KrCD/lFtUczRYV7fhf7+E9wUA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WnCzWYYl2BqymRKA10uJPVURYZxSsQE8NzeIPJrC8RuPUSLoB1KtQE21tHdbb+z+YsF98VqYfrCKUTmRcYgrOkiPYem4MQVVRNObNrOkGe9WDhwKSWkSUixrCNrrmXLvTQ3JML+jOccg16nXtP5FVMsiPQuIaKJLwR4QLLj6xrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-24cbb2b71b4so210453fac.2; Mon, 27 May 2024 22:33:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716874413; x=1717479213; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ptjC09kdGjdpXiVrATn7mphaV9X4ACIvPxTCurbJjBs=; b=WPhj+VFzzSb3vYylLK9OuYMpTJhLLE/TXmvVxbOBD2Vfz4hb6QtTZpxCDqiPJDqJ+9 5c1BzGnqj0ZTMxUPid2n+2lvByehCMD3A2Ffo3zyPRmVfBPE9CE6/hLvd+wFq/xCzWBl oOoKcUDsBEJ07og2aFSY6mNREfJgAfQRsQG9Te2VHHgRFZdoJOzNmQJv8/N2B6VvLmN4 okXyjbaRNkb5O2is6ec6f1oXctKHn7Su9ltDzbgsurb5pnXdlXlrNjWYNrcHxgSlPt0b 1egWhuqzYBuIossSvKJ5e4qRcHzs9A8+bdkLonh89wewDlwyzEj3ZpZPqeH97cUjktwW TrBQ== X-Forwarded-Encrypted: i=1; AJvYcCWZbXdPjqK3BIn87v7hSzF/UvhuIyIVTEJRYsx5g7j48btaFNCtwOv2l65CFfyef3lQJntdhtAQ0ukqHUrUI+Fp9J1pc/tk3zbkvGSsQOQPytDAfVK+IJqn/TeKxDQ82dEcASoICpMWT3gP X-Gm-Message-State: AOJu0YwpZcQMnI5Iunj1uPT8T5VagyropWK9Yzog/7ofbB2PED/hg7cr VD6XFsRkoPfm9LJND3J84cGslRNIn5JvgdUMc1NkYzkFSlTGKVds X-Received: by 2002:a05:6870:4722:b0:24e:4fef:61df with SMTP id 586e51a60fabf-24e4fef737fmr9044548fac.54.1716874413334; Mon, 27 May 2024 22:33:33 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-701908d14c2sm1791616b3a.152.2024.05.27.22.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 22:33:32 -0700 (PDT) Date: Tue, 28 May 2024 05:33:31 +0000 From: Wei Liu To: "Kirill A. Shutemov" Cc: Sean Christopherson , Paolo Bonzini , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Josh Poimboeuf , Peter Zijlstra , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH 05/20] x86/tdx: Convert MSR read handling to use new TDVMCALL_1() Message-ID: References: <20240517141938.4177174-1-kirill.shutemov@linux.intel.com> <20240517141938.4177174-6-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240517141938.4177174-6-kirill.shutemov@linux.intel.com> On Fri, May 17, 2024 at 05:19:23PM +0300, Kirill A. Shutemov wrote: > Use newly introduced TDVMCALL_1() instead of __tdx_hypercall() to handle > MSR read emulation. > > It cuts code bloat substantially: > > Function old new delta > tdx_handle_virt_exception 2052 1947 -105 > > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/coco/tdx/tdx.c | 15 +++++++-------- > arch/x86/hyperv/ivm.c | 10 ++-------- Acked-by: Wei Liu