From patchwork Mon Feb 19 08:29:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 774081 Delivered-To: patch@linaro.org Received: by 2002:a5d:4943:0:b0:33b:4db1:f5b3 with SMTP id r3csp1053701wrs; Mon, 19 Feb 2024 00:35:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWJTBOVSudL+z0VppB1rF7/2QgRNVmWM3YVQodWiKfECO/u+1HtJvNXUDF9BgpwKWEsJVZRWs7esdLZAm3QiTmw X-Google-Smtp-Source: AGHT+IH5L+/9x1n2hEJMf+us9i5FZykErJXoHNwXeGC985DMVg0FNwBNuteG9zl4VcxJ2AlGY1fo X-Received: by 2002:ad4:5f0e:0:b0:68f:634d:443b with SMTP id fo14-20020ad45f0e000000b0068f634d443bmr5412144qvb.2.1708331750304; Mon, 19 Feb 2024 00:35:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708331750; cv=none; d=google.com; s=arc-20160816; b=dGPSw+PkEdg7AeTG5gqgH5RySIvBJUIelz88uUbGLScNiS7bifUhscEV8HJf/iUY5K CwtKq4jmiL4fda7pbeVuEkhYlxfwxxWPQlXBIdKMtdHnYTUC0iQlS92Y0AQnBAkiHWIq yl4uRADf/J2I2KAoK0EKhWvZuWycJykaFxCTw+GMGhhWUz2dEdWFtYaS4d84CR5rgEka o7NPBEkLMxFp7xNGrmCd6Er6jEQJu2obDVqJgkznpYQmFHEMRXylLK49LWAyQch8rsmk ABEtsTugdQH+0+5XSwMpd8Ik517YB+Fa61yJQJ3IwObfHfLG2VqL6ihMoTdd8aK+8QhO h6LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7/DLuXky9FQDqFdM2qoHQOMo5LuNUVQuzkj5LQTCSNQ=; fh=WMhwx7Xbc6jpNDx4MgbUQnA+Z5NPykuC1wXqKakvevc=; b=jyW1bm6HY6fK+oWP8dIm2iqUaQJckseEw17DDFRSNk0i9YHIq+Y8blru0XPpTSBdmd QUo6J6N1Yl0jtqSTRtZZCwIyzDYOQ107GD/9ZkYfM79YhRX9ZDyT1myc2ei4rL2+jvoC F8GlezB7m+ptQ9OVXebwuo7yeDUmGRszGh8Q9xJtUgAcu0ffdCIJ2O8j3IPm3lf6hFp2 QUo7CuH3MXXWUxolb6Y7QxisDHPv2eY3Y4z93ogIhltUoDcHFHpxYXoNoxEnXX3uzFru c6ouIHWrPFtkVfXXf/YB9Stci4yzQqdLqL9AR5gevEGSdqQ8MZEQYIp6SI8MAIOpvwyT dxjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iTlPi7s1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q15-20020ad4574f000000b0068f52cb8bd4si4267267qvx.363.2024.02.19.00.35.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Feb 2024 00:35:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iTlPi7s1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbz3i-0001XZ-1x; Mon, 19 Feb 2024 03:31:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbz3Q-00010g-U6; Mon, 19 Feb 2024 03:31:13 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rbz3P-0002In-5C; Mon, 19 Feb 2024 03:31:12 -0500 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1da0cd9c0e5so37032125ad.0; Mon, 19 Feb 2024 00:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708331469; x=1708936269; darn=nongnu.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=7/DLuXky9FQDqFdM2qoHQOMo5LuNUVQuzkj5LQTCSNQ=; b=iTlPi7s1ITsC6Z66zXFt4P9d5xuDeNOUGja5p6/YbKzCZNIFJRZJKjmVaPuFo6KTq8 98pfGSnnuLeFdCPfhPc811XyBChN5cjQJf7TT3OVgQAcvCHPuDDLKN93hAmOcPpaCW+f Lh/x9frdrpFXTHKBDYu9jfrEd1bWTDXKJJAbiT6ZsJ9KO/dxTo1qIOfjNbmx8CrdWh27 WJStEsb5NHF88MxoVRUZVQdUjSEaPOv9zR44egeqJTx5q2eO2NFQWGknE9ChrbYpOEG2 FuNAdY36/E6g05js1OLOsslfL7FfUyKxxxVBFyfAbL49SH25pEwTAvaMcYL9MWrKF+Vn mdEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708331469; x=1708936269; 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=7/DLuXky9FQDqFdM2qoHQOMo5LuNUVQuzkj5LQTCSNQ=; b=kMqmMVoJLUuQtW5CYYxFAQoM4kwRBkItccFJgAX+/SzEEhZX/NJ9jFKVbIBOjVhl34 hbyyClvoR/qxT0t5y1HCoYM+NX5nRMokbxzjbNhVDad793SzEWGeFhewFrjGczdb3wYO ObIaaj2hSFjDQhTcaJ/Ei6BGFY0WP1uBHbKHRlpNAQifoxN3ySRzeTyc5ozg/fA6dBDx i37dwYzI9yUN7hUC9vpQxtHGv3cvnQJW4sJaAyj0xZJj6RRFXEsTuDaAwYF3L68rqDE2 cjWnaJuE8BwB9hpZ5eM4+naTyE8V6FBeFemLXay/38/sK/jgVg0pQ1f5iulKUiJjn/xb 1WMQ== X-Forwarded-Encrypted: i=1; AJvYcCWkvrFm8RyzGrIjxBoJZA+cb2Nk9QCF5fdyxYkrE+28ZAi70okFsMdugSePgfIQ2d78LD+KKJ9j/fW77WhBC4GBpLwE X-Gm-Message-State: AOJu0YwOiquOPit+hl8VyPJSckPj7c7kewcP+WoMQyMoALe0UWAUUfus mSatZMW5+AqdhmShTGYIFGpzf852tXeOzPb1j94q75lN8ztRfu5gvfMi3v9f X-Received: by 2002:a17:902:d512:b0:1db:cf64:7331 with SMTP id b18-20020a170902d51200b001dbcf647331mr6469868plg.13.1708331469270; Mon, 19 Feb 2024 00:31:09 -0800 (PST) Received: from wheely.local0.net ([1.146.38.93]) by smtp.gmail.com with ESMTPSA id mo7-20020a1709030a8700b001db5ecd115bsm3838348plb.276.2024.02.19.00.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 00:31:08 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/49] hw/ppc/spapr_hcall: Rename {softmmu -> vhyp_mmu}_resize_hpt_pr Date: Mon, 19 Feb 2024 18:29:04 +1000 Message-ID: <20240219082938.238302-16-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240219082938.238302-1-npiggin@gmail.com> References: <20240219082938.238302-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=npiggin@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since 'softmmu' is quite a loaded term in QEMU, rename the vhyp MMU facilities to use the vhyp_mmu_ prefix rather than softmmu_. vhyp_mmu_ is chosen because the code that manipulates the hash table via guest software hypercalls is QEMU's implementation of the PAPR hypervisor interface, called vhyp. Reviewed-by: Nicholas Piggin Signed-off-by: Philippe Mathieu-Daudé [npiggin: Pick a different name, explain it in changelog.] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Nicholas Piggin --- hw/ppc/spapr_hcall.c | 4 ++-- hw/ppc/spapr_softmmu.c | 4 ++-- include/hw/ppc/spapr.h | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 0d7d523e6d..75c2d12978 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -124,7 +124,7 @@ static target_ulong h_resize_hpt_prepare(PowerPCCPU *cpu, if (kvm_enabled()) { return H_HARDWARE; } else if (tcg_enabled()) { - return softmmu_resize_hpt_prepare(cpu, spapr, shift); + return vhyp_mmu_resize_hpt_prepare(cpu, spapr, shift); } else { g_assert_not_reached(); } @@ -194,7 +194,7 @@ static target_ulong h_resize_hpt_commit(PowerPCCPU *cpu, if (kvm_enabled()) { return H_HARDWARE; } else if (tcg_enabled()) { - return softmmu_resize_hpt_commit(cpu, spapr, flags, shift); + return vhyp_mmu_resize_hpt_commit(cpu, spapr, flags, shift); } else { g_assert_not_reached(); } diff --git a/hw/ppc/spapr_softmmu.c b/hw/ppc/spapr_softmmu.c index 2fade94029..b3dd8b3a59 100644 --- a/hw/ppc/spapr_softmmu.c +++ b/hw/ppc/spapr_softmmu.c @@ -378,7 +378,7 @@ static void cancel_hpt_prepare(SpaprMachineState *spapr) free_pending_hpt(pending); } -target_ulong softmmu_resize_hpt_prepare(PowerPCCPU *cpu, +target_ulong vhyp_mmu_resize_hpt_prepare(PowerPCCPU *cpu, SpaprMachineState *spapr, target_ulong shift) { @@ -562,7 +562,7 @@ static int rehash_hpt(PowerPCCPU *cpu, return H_SUCCESS; } -target_ulong softmmu_resize_hpt_commit(PowerPCCPU *cpu, +target_ulong vhyp_mmu_resize_hpt_commit(PowerPCCPU *cpu, SpaprMachineState *spapr, target_ulong flags, target_ulong shift) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index e91791a1a9..5b5ba9ef77 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -634,10 +634,13 @@ void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn); target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode, target_ulong *args); -target_ulong softmmu_resize_hpt_prepare(PowerPCCPU *cpu, SpaprMachineState *spapr, +target_ulong vhyp_mmu_resize_hpt_prepare(PowerPCCPU *cpu, + SpaprMachineState *spapr, target_ulong shift); -target_ulong softmmu_resize_hpt_commit(PowerPCCPU *cpu, SpaprMachineState *spapr, - target_ulong flags, target_ulong shift); +target_ulong vhyp_mmu_resize_hpt_commit(PowerPCCPU *cpu, + SpaprMachineState *spapr, + target_ulong flags, + target_ulong shift); bool is_ram_address(SpaprMachineState *spapr, hwaddr addr); void push_sregs_to_kvm_pr(SpaprMachineState *spapr);