{"id":2229597,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229597/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260428135053.251200-2-dblanzeanu@linux.microsoft.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260428135053.251200-2-dblanzeanu@linux.microsoft.com>","date":"2026-04-28T13:50:48","name":"[1/6] target/i386/mshv: remove duplicate function for reading vcpu registers","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"35f08fae0083406d955afa334309dba168adbea6","submitter":{"id":93106,"url":"http://patchwork.ozlabs.org/api/1.1/people/93106/?format=json","name":"Doru Blânzeanu","email":"dblanzeanu@linux.microsoft.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260428135053.251200-2-dblanzeanu@linux.microsoft.com/mbox/","series":[{"id":501862,"url":"http://patchwork.ozlabs.org/api/1.1/series/501862/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501862","date":"2026-04-28T13:50:49","name":"target/i386/mshv: use hv_vp_register_page for fast register access","version":1,"mbox":"http://patchwork.ozlabs.org/series/501862/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229597/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229597/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com\n header.a=rsa-sha256 header.s=default header.b=CTuFWs3C;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4hv45wyvz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 00:01:52 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHizX-0003wQ-Ii; Tue, 28 Apr 2026 10:00:47 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <dblanzeanu@linux.microsoft.com>)\n id 1wHiq9-0002St-1u\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 09:51:05 -0400","from linux.microsoft.com ([13.77.154.182])\n by eggs.gnu.org with esmtp (Exim 4.90_1)\n (envelope-from <dblanzeanu@linux.microsoft.com>) id 1wHiq7-0005jm-LG\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 09:51:04 -0400","from laptop.localdomain (unknown [86.121.140.248])\n by linux.microsoft.com (Postfix) with ESMTPSA id C4E6520B716D;\n Tue, 28 Apr 2026 06:51:01 -0700 (PDT)"],"DKIM-Filter":"OpenDKIM Filter v2.11.0 linux.microsoft.com C4E6520B716D","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1777384263;\n bh=iSlTLr4PLNpzYhYqZJq4BJSiCn3mNgEhOyCqyA5A3xI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=CTuFWs3C+ULWsLZQqNiBMcTvY5wxTlGD1mLcdepZ1TK6qvYFymEwAuLBT/9zdDb6J\n f/wa94gY826bQ1N5xDpzd6MoJMJe31gfqNi+FwjdouvQ9YYv6kyDFb9kMv3HvPVSA9\n t0iEsikj4Ek0oZEeSUaZjwCmq8IZCzBleJIVEHIE=","From":"=?utf-8?q?Doru_Bl=C3=A2nzeanu?= <dblanzeanu@linux.microsoft.com>","To":"qemu-devel@nongnu.org","Cc":"Magnus Kulke <magnuskulke@linux.microsoft.com>,\n Wei Liu <wei.liu@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,\n Zhao Liu <zhao1.liu@intel.com>","Subject":"[PATCH 1/6] target/i386/mshv: remove duplicate function for reading\n vcpu registers","Date":"Tue, 28 Apr 2026 16:50:48 +0300","Message-ID":"<20260428135053.251200-2-dblanzeanu@linux.microsoft.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260428135053.251200-1-dblanzeanu@linux.microsoft.com>","References":"<20260428135053.251200-1-dblanzeanu@linux.microsoft.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=13.77.154.182;\n envelope-from=dblanzeanu@linux.microsoft.com; helo=linux.microsoft.com","X-Spam_score_int":"-26","X-Spam_score":"-2.7","X-Spam_bar":"--","X-Spam_report":"(-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-Mailman-Approved-At":"Tue, 28 Apr 2026 10:00:15 -0400","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"Remove function `fetch_guest_state` because it is a duplicate function\nof `mshv_load_regs` function.\n\nSigned-off-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>\n---\n target/i386/mshv/mshv-cpu.c | 21 +--------------------\n 1 file changed, 1 insertion(+), 20 deletions(-)","diff":"diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c\nindex 4ed6e7548f..9defd05db6 100644\n--- a/target/i386/mshv/mshv-cpu.c\n+++ b/target/i386/mshv/mshv-cpu.c\n@@ -1291,25 +1291,6 @@ static int handle_pio_non_str(const CPUState *cpu,\n     return 0;\n }\n \n-static int fetch_guest_state(CPUState *cpu)\n-{\n-    int ret;\n-\n-    ret = mshv_get_standard_regs(cpu);\n-    if (ret < 0) {\n-        error_report(\"Failed to get standard registers\");\n-        return -1;\n-    }\n-\n-    ret = mshv_get_special_regs(cpu);\n-    if (ret < 0) {\n-        error_report(\"Failed to get special registers\");\n-        return -1;\n-    }\n-\n-    return 0;\n-}\n-\n static int read_memory(const CPUState *cpu, uint64_t initial_gva,\n                        uint64_t initial_gpa, uint64_t gva, uint8_t *data,\n                        size_t len)\n@@ -1429,7 +1410,7 @@ static int handle_pio_str(CPUState *cpu, hv_x64_io_port_intercept_message *info)\n     X86CPU *x86_cpu = X86_CPU(cpu);\n     CPUX86State *env = &x86_cpu->env;\n \n-    ret = fetch_guest_state(cpu);\n+    ret = mshv_load_regs(cpu);\n     if (ret < 0) {\n         error_report(\"Failed to fetch guest state\");\n         return -1;\n","prefixes":["1/6"]}