From nobody Fri Dec 27 13:26:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1729776165; cv=none; d=zohomail.com; s=zohoarc; b=ALTene70UVYQS/gGlsMX+HgOZv4LHWxQ9/W0j+0w0vbBz92MaF/VCmx9P/YuwlulT/JP1fPiBsMCwYAIYPHAu7Xvg+gjSOUbtnnn5wVDkiqIAhsBjMu9vmf2G7ZdAT5pCTkhkz7fMHU2+Q2WedwSoX+IvpHGlIb99Wx7BJgeRDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729776165; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xI3YWCuDWA5ZJYhHfqCN+eAld5aMRSkjdw5nOvKgkSM=; b=B8bn4XgYZqhKagm1pEsbQrryA4dQb0eZHMXJ5N3cEhZ77pO0Cx++fqDigDYgAf4QvMzqjDAL05VIr9fZgAsmbdFdxTEayy9nE/U02i7curkWKmnLdNhB8Bp2XmvqLj8aT8wQEyJl7F986CvATKn5eDNgdMjNfwZnOd27O368cGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1729776165723300.6275934290985; Thu, 24 Oct 2024 06:22:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.825235.1239415 (Exim 4.92) (envelope-from ) id 1t3xn5-0004KO-T4; Thu, 24 Oct 2024 13:22:15 +0000 Received: by outflank-mailman (output) from mailman id 825235.1239415; Thu, 24 Oct 2024 13:22:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3xn5-0004KH-QL; Thu, 24 Oct 2024 13:22:15 +0000 Received: by outflank-mailman (input) for mailman id 825235; Thu, 24 Oct 2024 13:22:14 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3xn4-0004K5-9X for xen-devel@lists.xenproject.org; Thu, 24 Oct 2024 13:22:14 +0000 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [2a00:1450:4864:20::12c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fad52a42-920a-11ef-a0bf-8be0dac302b0; Thu, 24 Oct 2024 15:22:12 +0200 (CEST) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-539eb97f26aso905363e87.2 for ; Thu, 24 Oct 2024 06:22:12 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912ee592sm618574766b.79.2024.10.24.06.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 06:22:10 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fad52a42-920a-11ef-a0bf-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1729776131; x=1730380931; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xI3YWCuDWA5ZJYhHfqCN+eAld5aMRSkjdw5nOvKgkSM=; b=CSsiSgPx6hp3rFeqxVWW3bepQruJrVa2TIhNJo+GMDh98eovRg9dFs63O/yh2Cgv+m DZgiBxXyZdO1E+0cLujA+jUl+1G98bFdNTsYzjPOEF1gKEtQwppCDwTCQetJEBIuDrOa hh8EslyCpsSC2nI1wHyb1mSSu26aiwKnIWBj0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729776131; x=1730380931; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xI3YWCuDWA5ZJYhHfqCN+eAld5aMRSkjdw5nOvKgkSM=; b=upr1ylu1NHsSyVakFoaYzfk+0Ywzs0J0ce3IIuKlfkh3BYI0pJU4kl443yZYUitBJe jJOcx3WOMwomju4rvoIYnTt4j0O+OEHcaHbh5Op1i6VdlkkDxxc1+VchzFF9PcIOhP0e npF7vKssOk6t5snM6Zu1+Y2sRuyuraR0hM5CvRmyE7FOT/MSX+lUbx1X184YfXMS92fr ZWu4qjqG0duFZxb6IctsEOr/XsusPWoLQVPvgRAopwUBl6KZUQ3Y9sVG/fvihnWpjhzc UutgmqpAMBvSgvQz2XyOt+906KTCcpBH7wawd9LRWqbLt0P4If4SCpEm3/jyfGP+WShY 7dKg== X-Gm-Message-State: AOJu0Yw2Lj8nAXa0XB+2s+K3pkFokZdrqGAu12h/m/pQmbZmMHN7OVHK QJxlN7bDmMAHz8Fd+fMWJlKN8+WS02+de4+8mNXHlG1CkeBzdppLMJALKyvUtgL1gXA4MnyCMwG q X-Google-Smtp-Source: AGHT+IGMqcL+fx6Snhrn5yxbpjO1LwkkVZDl2+dmTre9UqLBmLZFLFZuDvVKXxiaFY5tSmBazckizw== X-Received: by 2002:a05:6512:b02:b0:539:e3d8:fa33 with SMTP id 2adb3069b0e04-53b1a38d08cmr3893206e87.54.1729776131251; Thu, 24 Oct 2024 06:22:11 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 1/5] x86/ucode: Rename hypercall-context functions Date: Thu, 24 Oct 2024 14:22:01 +0100 Message-Id: <20241024132205.987042-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241024132205.987042-1-andrew.cooper3@citrix.com> References: <20241024132205.987042-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1729776166371116600 microcode_update{,_helper}() are overly generic names in a file that has multiple update routines and helper functions contexts. Rename microcode_update() to ucode_update_hcall() so it explicitly identifi= es itself as hypercall context, and rename microcode_update_helper() to ucode_update_hcall_cont() to make it clear it is in continuation context. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jason Andryuk --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/cpu/microcode/core.c | 10 +++++----- xen/arch/x86/include/asm/microcode.h | 4 ++-- xen/arch/x86/platform_hypercall.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode= /core.c index 1d58cb0f3bc1..21077b449c38 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -586,7 +586,7 @@ struct ucode_buf { char buffer[]; }; =20 -static long cf_check microcode_update_helper(void *data) +static long cf_check ucode_update_hcall_cont(void *data) { int ret; struct ucode_buf *buffer =3D data; @@ -722,8 +722,8 @@ static long cf_check microcode_update_helper(void *data) return ret; } =20 -int microcode_update(XEN_GUEST_HANDLE(const_void) buf, - unsigned long len, unsigned int flags) +int ucode_update_hcall(XEN_GUEST_HANDLE(const_void) buf, + unsigned long len, unsigned int flags) { int ret; struct ucode_buf *buffer; @@ -748,11 +748,11 @@ int microcode_update(XEN_GUEST_HANDLE(const_void) buf, buffer->flags =3D flags; =20 /* - * Always queue microcode_update_helper() on CPU0. Most of the logic + * Always queue ucode_update_hcall_cont() on CPU0. Most of the logic * won't care, but the update of the Raw CPU policy wants to (re)run on * the BSP. */ - return continue_hypercall_on_cpu(0, microcode_update_helper, buffer); + return continue_hypercall_on_cpu(0, ucode_update_hcall_cont, buffer); } =20 static int __init cf_check microcode_init(void) diff --git a/xen/arch/x86/include/asm/microcode.h b/xen/arch/x86/include/as= m/microcode.h index a278773f8b5d..dd20cdb9ebb6 100644 --- a/xen/arch/x86/include/asm/microcode.h +++ b/xen/arch/x86/include/asm/microcode.h @@ -22,8 +22,8 @@ struct cpu_signature { DECLARE_PER_CPU(struct cpu_signature, cpu_sig); =20 void microcode_set_module(unsigned int idx); -int microcode_update(XEN_GUEST_HANDLE(const_void) buf, - unsigned long len, unsigned int flags); +int ucode_update_hcall(XEN_GUEST_HANDLE(const_void) buf, + unsigned long len, unsigned int flags); int microcode_update_one(void); =20 struct boot_info; diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hype= rcall.c index 67f851237def..90abd3197fc9 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -313,7 +313,7 @@ ret_t do_platform_op( =20 guest_from_compat_handle(data, op->u.microcode.data); =20 - ret =3D microcode_update(data, op->u.microcode.length, 0); + ret =3D ucode_update_hcall(data, op->u.microcode.length, 0); break; } =20 @@ -323,8 +323,8 @@ ret_t do_platform_op( =20 guest_from_compat_handle(data, op->u.microcode2.data); =20 - ret =3D microcode_update(data, op->u.microcode2.length, - op->u.microcode2.flags); + ret =3D ucode_update_hcall(data, op->u.microcode2.length, + op->u.microcode2.flags); break; } =20 --=20 2.39.5