{"id":2225341,"url":"http://patchwork.ozlabs.org/api/patches/2225341/?format=json","web_url":"http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260420212004.3938325-4-seanjc@google.com/","project":{"id":70,"url":"http://patchwork.ozlabs.org/api/projects/70/?format=json","name":"Linux KVM RISC-V","link_name":"kvm-riscv","list_id":"kvm-riscv.lists.infradead.org","list_email":"kvm-riscv@lists.infradead.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"http://lists.infradead.org/pipermail/kvm-riscv/","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260420212004.3938325-4-seanjc@google.com>","list_archive_url":null,"date":"2026-04-20T21:19:48","name":"[v3,03/19] KVM: selftests: Use gpa_t for GPAs in Hyper-V selftests","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4d651ab2ef7a25a577714964e69d84c0a3261b9b","submitter":{"id":81022,"url":"http://patchwork.ozlabs.org/api/people/81022/?format=json","name":"Sean Christopherson","email":"seanjc@google.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260420212004.3938325-4-seanjc@google.com/mbox/","series":[{"id":500685,"url":"http://patchwork.ozlabs.org/api/series/500685/?format=json","web_url":"http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=500685","date":"2026-04-20T21:19:45","name":"KVM: selftests: Use kernel-style integer and g[vp]a_t types","version":3,"mbox":"http://patchwork.ozlabs.org/series/500685/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225341/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225341/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=eLmeNJUG;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=TTTXV5v1;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzz0j4kg3z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 07:20:21 +1000 (AEST)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wEw2V-00000007fcF-2onl;\n\tMon, 20 Apr 2026 21:20:19 +0000","from mail-pf1-x449.google.com ([2607:f8b0:4864:20::449])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wEw2P-00000007fUy-05Jw\n\tfor kvm-riscv@lists.infradead.org;\n\tMon, 20 Apr 2026 21:20:16 +0000","by mail-pf1-x449.google.com with SMTP id\n d2e1a72fcca58-82fa1c94b37so1754716b3a.0\n        for <kvm-riscv@lists.infradead.org>;\n Mon, 20 Apr 2026 14:20:12 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help:\n\tList-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID\n\t:References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=R31AO+bUyBU/FHFsvrOJ8bYoa3+sBYLmg6g+aRjBwm8=; b=eLmeNJUGlXg2VO\n\tcijL2E+72e/5wbUN83hvdM/hdZ8NfvY04H34f0XFWwJ+2GE+kbTayfht44qKBKaLVSezonKz0qw7r\n\tq+PwWSg0VjmQrsoffYD3eotVbPrwEWup7QtuQUqXRnsqCHcX4tpvoOelNnc8vF5/iuQiLkfI4KwrE\n\tF2nVbsq3MoP4ICpOOTdph4KXnmzsub89rZLS5TsZG24PaTBfxNsf/widiVw7W6F1HYP1w8UGcD6q9\n\trQ+UNLzgStM4FtMgcOy5hD7NOhq6TL65FN6Qs3sK1be46xekXVbKoEzRCYr+Y6kAwnqQbvnXWGToK\n\tDk8ckO81/9h50G2ASqZA==;","v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1776720012; x=1777324812;\n darn=lists.infradead.org;\n        h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n         :date:reply-to:from:to:cc:subject:date:message-id:reply-to;\n        bh=sEgidxfCrHeWAn/iqKdfWB4mQGqG7JFMt/kzEyBGoSw=;\n        b=TTTXV5v1+cBoOW5sJoFSM0JZADvFCfac3RjpqSRfPvk9wsaa8NToXmYcvnSHz1N3rp\n         D+uYTAGy0yKvVcwOuNK//TmyoGorV2tH99UDNEZTTkAbWKmoPKJ7ssbWZTmr0jZ0RFb7\n         QA2FzimoXAT8J6gwaCcivKDdb+GGabnvJksM6K4ZQjzZJQM2XSihT6t7BPsIIE7QFrkl\n         iHBmX6m9/ejaz22AGZBbhC/ol44uYd5WDbg256ah5YAOcMphoMX051TFb740erkPtiDd\n         Yd0zWgJPDoIi+ZKaSfBhTD+8lGwJCMuPRJ57vnUUDq32IxtuE7Ome2HkSXpK1iI4CSkZ\n         9PAA=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776720012; x=1777324812;\n        h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n         :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=sEgidxfCrHeWAn/iqKdfWB4mQGqG7JFMt/kzEyBGoSw=;\n        b=SiEdQePcFcvvbAAprMdOABbFxbrPgVWZBttZWAzIgapqrcAyPVGC6FnNHAVJgKlBxj\n         jc8s9Q+iMHFUZYiq4Ekb4G2mxznvVFOa0ERo5++T3AI8SA5iMQoP0s/wxdneGGp2j6Os\n         mrhwxuKSPH6Wo9Ubz+kASRv93t6Tw9GXuUqWnGrpvglG8evfJtMaSE8pgGhdI9NKGAoW\n         qIigZfNhh1IF2d3XDE1mEtv0zZIUrEjE0Rgj5t9LV6p0wlZDw/MGvkBg/2X2oy3Ui4Ov\n         LXw8tqmq1nf6k2XuXLSausurbPRNv3k3gV8j8DJRL1BFEAbpv848b6S8U/455FMq9RxK\n         aTFw==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9sfEYa1JmLIphCuy9l4UhzQ+icmWwJk3N3qE6AJN49FXvHHuEHVQ1Ah54y3AJQueIcpPblZmrZlo4=@lists.infradead.org","X-Gm-Message-State":"AOJu0YxqlOfbZXFcjyRVfs2Qtzne2Lls+PfSIsvcPpmklShmYJhJ7I2F\n\tZH9hqUSD/DoR+KxstzzuBNEsyI1eanuat1BIT0U2Rkj/1ZRxJwTc9o+JcV4bbl9Iz7z0yjRn7Jr\n\tZm4TyHQ==","X-Received":"from pfbli8.prod.google.com\n ([2002:a05:6a00:7188:b0:82f:54e9:c13e])\n (user=seanjc job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a00:27ab:b0:82f:6eca:563e\n with SMTP id d2e1a72fcca58-82f8b573171mr11858630b3a.34.1776720011915; Mon, 20\n Apr 2026 14:20:11 -0700 (PDT)","Date":"Mon, 20 Apr 2026 14:19:48 -0700","In-Reply-To":"<20260420212004.3938325-1-seanjc@google.com>","Mime-Version":"1.0","References":"<20260420212004.3938325-1-seanjc@google.com>","X-Mailer":"git-send-email 2.54.0.rc1.555.g9c883467ad-goog","Message-ID":"<20260420212004.3938325-4-seanjc@google.com>","Subject":"[PATCH v3 03/19] KVM: selftests: Use gpa_t for GPAs in Hyper-V\n selftests","From":"Sean Christopherson <seanjc@google.com>","To":"Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>,\n\tOliver Upton <oupton@kernel.org>, Tianrui Zhao <zhaotianrui@loongson.cn>,\n\tBibo Mao <maobibo@loongson.cn>, Huacai Chen <chenhuacai@kernel.org>,\n\tAnup Patel <anup@brainfault.org>, Paul Walmsley <pjw@kernel.org>,\n\tPalmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>,\n\tChristian Borntraeger <borntraeger@linux.ibm.com>,\n Janosch Frank <frankja@linux.ibm.com>,\n\tClaudio Imbrenda <imbrenda@linux.ibm.com>,\n Sean Christopherson <seanjc@google.com>","Cc":"kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tkvmarm@lists.linux.dev, loongarch@lists.linux.dev,\n\tkvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, David Matlack <dmatlack@google.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20260420_142013_131387_14C8B540 ","X-CRM114-Status":"GOOD (  12.06  )","X-Spam-Score":"-9.5 (---------)","X-Spam-Report":"Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: David Matlack <dmatlack@google.com> Fix various\n Hyper-V\n    selftests to use gpa_t for variables that contain guest physical\n addresses,\n    rather than gva_t. In practice,\n the bugs are benign as both gva_t and gpa_t\n    are u64 typedefs, i.e. gpa_t [...]\n Content analysis details:   (-9.5 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:449 listed in]\n                             [list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -7.5 USER_IN_DEF_DKIM_WL    From: address is in the default DKIM welcome-list\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n -0.0 DKIMWL_WL_MED          DKIMwl.org - Medium trust sender","X-BeenThere":"kvm-riscv@lists.infradead.org","X-Mailman-Version":"2.1.34","Precedence":"list","List-Id":"<kvm-riscv.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/kvm-riscv/>","List-Post":"<mailto:kvm-riscv@lists.infradead.org>","List-Help":"<mailto:kvm-riscv-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe>","Reply-To":"Sean Christopherson <seanjc@google.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"kvm-riscv\" <kvm-riscv-bounces@lists.infradead.org>","Errors-To":"kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"From: David Matlack <dmatlack@google.com>\n\nFix various Hyper-V selftests to use gpa_t for variables that contain\nguest physical addresses, rather than gva_t.  In practice, the bugs are\nbenign as both gva_t and gpa_t are u64 typedefs, i.e. gpa_t and gva_t are\ninterchangeable from a functional perspective, the code is just confusing.\n\nNo functional change intended.\n\nSigned-off-by: David Matlack <dmatlack@google.com>\n[sean: call out that both are u64 typedefs]\nSigned-off-by: Sean Christopherson <seanjc@google.com>\n---\n tools/testing/selftests/kvm/x86/hyperv_evmcs.c    | 2 +-\n tools/testing/selftests/kvm/x86/hyperv_features.c | 2 +-\n tools/testing/selftests/kvm/x86/hyperv_ipi.c      | 6 +++---\n tools/testing/selftests/kvm/x86/hyperv_svm_test.c | 2 +-\n 4 files changed, 6 insertions(+), 6 deletions(-)","diff":"diff --git a/tools/testing/selftests/kvm/x86/hyperv_evmcs.c b/tools/testing/selftests/kvm/x86/hyperv_evmcs.c\nindex c2de5ac799ee..2d1733f9303a 100644\n--- a/tools/testing/selftests/kvm/x86/hyperv_evmcs.c\n+++ b/tools/testing/selftests/kvm/x86/hyperv_evmcs.c\n@@ -76,7 +76,7 @@ void l2_guest_code(void)\n }\n \n void guest_code(struct vmx_pages *vmx_pages, struct hyperv_test_pages *hv_pages,\n-\t\tgva_t hv_hcall_page_gpa)\n+\t\tgpa_t hv_hcall_page_gpa)\n {\n #define L2_GUEST_STACK_SIZE 64\n \tunsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];\ndiff --git a/tools/testing/selftests/kvm/x86/hyperv_features.c b/tools/testing/selftests/kvm/x86/hyperv_features.c\nindex 1059fcc460e3..0360fa5915c0 100644\n--- a/tools/testing/selftests/kvm/x86/hyperv_features.c\n+++ b/tools/testing/selftests/kvm/x86/hyperv_features.c\n@@ -82,7 +82,7 @@ static void guest_msr(struct msr_data *msr)\n \tGUEST_DONE();\n }\n \n-static void guest_hcall(gva_t pgs_gpa, struct hcall_data *hcall)\n+static void guest_hcall(gpa_t pgs_gpa, struct hcall_data *hcall)\n {\n \tu64 res, input, output;\n \tuint8_t vector;\ndiff --git a/tools/testing/selftests/kvm/x86/hyperv_ipi.c b/tools/testing/selftests/kvm/x86/hyperv_ipi.c\nindex 7d648219833c..5369867efac3 100644\n--- a/tools/testing/selftests/kvm/x86/hyperv_ipi.c\n+++ b/tools/testing/selftests/kvm/x86/hyperv_ipi.c\n@@ -45,13 +45,13 @@ struct hv_send_ipi_ex {\n \tstruct hv_vpset vp_set;\n };\n \n-static inline void hv_init(gva_t pgs_gpa)\n+static inline void hv_init(gpa_t pgs_gpa)\n {\n \twrmsr(HV_X64_MSR_GUEST_OS_ID, HYPERV_LINUX_OS_ID);\n \twrmsr(HV_X64_MSR_HYPERCALL, pgs_gpa);\n }\n \n-static void receiver_code(void *hcall_page, gva_t pgs_gpa)\n+static void receiver_code(void *hcall_page, gpa_t pgs_gpa)\n {\n \tu32 vcpu_id;\n \n@@ -85,7 +85,7 @@ static inline void nop_loop(void)\n \t\tasm volatile(\"nop\");\n }\n \n-static void sender_guest_code(void *hcall_page, gva_t pgs_gpa)\n+static void sender_guest_code(void *hcall_page, gpa_t pgs_gpa)\n {\n \tstruct hv_send_ipi *ipi = (struct hv_send_ipi *)hcall_page;\n \tstruct hv_send_ipi_ex *ipi_ex = (struct hv_send_ipi_ex *)hcall_page;\ndiff --git a/tools/testing/selftests/kvm/x86/hyperv_svm_test.c b/tools/testing/selftests/kvm/x86/hyperv_svm_test.c\nindex e0caf5ea14bd..54a1a6dad4d5 100644\n--- a/tools/testing/selftests/kvm/x86/hyperv_svm_test.c\n+++ b/tools/testing/selftests/kvm/x86/hyperv_svm_test.c\n@@ -67,7 +67,7 @@ void l2_guest_code(void)\n \n static void __attribute__((__flatten__)) guest_code(struct svm_test_data *svm,\n \t\t\t\t\t\t    struct hyperv_test_pages *hv_pages,\n-\t\t\t\t\t\t    gva_t pgs_gpa)\n+\t\t\t\t\t\t    gpa_t pgs_gpa)\n {\n \tunsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];\n \tstruct vmcb *vmcb = svm->vmcb;\n","prefixes":["v3","03/19"]}