[{"id":3687796,"web_url":"http://patchwork.ozlabs.org/comment/3687796/","msgid":"<20260507-unstoppable-berserk-trogon-9fcd3f@anirudhrb>","list_archive_url":null,"date":"2026-05-07T13:23:17","subject":"Re: [PATCH v2 5/7] target/i386/mshv: use the register page to get\n registers","submitter":{"id":78917,"url":"http://patchwork.ozlabs.org/api/people/78917/","name":"Anirudh Rayabharam","email":"anirudh@anirudhrb.com"},"content":"On Tue, May 05, 2026 at 09:50:26PM +0300, Doru Blânzeanu wrote:\n> Change the mshv_load_regs to use the register page when it is mmapped\n> and is valid.\n> Otherwise use the existing logic that uses ioctls to fetch registers.\n> \n> When retrieving the special registers, there are some registers that are\n> not present in the register page: TR, LDTR, GDTR, IDTR, CR2, APIC_BASE.\n> As this registers are not likely to be used in an MMIO/PIO operation,\n> and to avoid a hypercall overhead we do not retrieve them.\n> \n> Local testing showed no regression when using this logic. To properly\n> retrieve all the necessary registers for each decoded operation implies\n> having a mechanism that tracks the state of each register, which is\n> beyond the scope of this patch series.\n> \n> Signed-off-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>\n> ---\n>  target/i386/mshv/mshv-cpu.c | 99 +++++++++++++++++++++++++++++++++----\n>  1 file changed, 90 insertions(+), 9 deletions(-)\n\nReviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>","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=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=anirudhrb.com header.i=anirudh@anirudhrb.com\n header.a=rsa-sha256 header.s=zoho header.b=d54dOHPz;\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 4gBCd632sqz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 07 May 2026 23:23:54 +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 1wKyha-0000df-OS; Thu, 07 May 2026 09:23:42 -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 <anirudh@anirudhrb.com>)\n id 1wKyhY-0000dD-Ei\n for qemu-devel@nongnu.org; Thu, 07 May 2026 09:23:40 -0400","from sender4-of-o54.zoho.com ([136.143.188.54])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <anirudh@anirudhrb.com>)\n id 1wKyhW-0006iG-IT\n for qemu-devel@nongnu.org; Thu, 07 May 2026 09:23:40 -0400","by mx.zohomail.com with SMTPS id 177816020308224.93012071349574;\n Thu, 7 May 2026 06:23:23 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; t=1778160204; cv=none;\n d=zohomail.com; s=zohoarc;\n b=Y8J8UEmDLcf63MHnA74uboptyzb9a6XcdqkqHqeZl+DoDO29st7G2KOEtc/pjPtKFRppNJeZC66iZZj3KkDoOPkxGpf/EUB7LTthvB/wLS8Ya4sjcoh7PJ4hFdyKCTQURiCF+xkv9z8/SXa/f05bEHEMeJ4mJ6QjT/Ah+6PyAcA=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;\n s=zohoarc; t=1778160204;\n h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n bh=iHRWS/Ao6202LXF03ojvKtDm2lCGhZR0sfmcUzliCsg=;\n b=Q6KVjvyBq68oc0KRaJ1XyrsDwx7qA6GdE87kmttuPXTfhUwc7kkwqQOJUIAkZGkQAr/+x4Gwzzu48GWdzDNNCon1JYmwJ8gYf+BUhrLrukkXXYUx9ZO3Jmgft+1mKb+xRkiDTlaLlyYR0jNZOeQ6uMHiULT4Kv15TKZedEbo2HU=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n dkim=pass  header.i=anirudhrb.com;\n spf=pass  smtp.mailfrom=anirudh@anirudhrb.com;\n dmarc=pass header.from=<anirudh@anirudhrb.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1778160204;\n s=zoho; d=anirudhrb.com; i=anirudh@anirudhrb.com;\n h=Date:Date:From:From:To:To:Cc:Cc:Subject:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:Message-Id:Reply-To;\n bh=iHRWS/Ao6202LXF03ojvKtDm2lCGhZR0sfmcUzliCsg=;\n b=d54dOHPz83JLErof7l8+6B7QLbtnk9KAgcnWRfdFQqM3I2eywCLwyMAOEhMf+wZt\n ar/y+H9MnqvcKxcvZyYPcMdRvsO/F2Rps1k5D/t4ldMyLAev/qBXLcA+Rf5OE6uauuB\n e0bxgAswyWe9en4CD/yllvEBXgrAaeLha7h1m3lI=","Date":"Thu, 7 May 2026 13:23:17 +0000","From":"Anirudh Rayabharam <anirudh@anirudhrb.com>","To":"Doru =?iso-8859-1?q?Bl=E2nzeanu?= <dblanzeanu@linux.microsoft.com>","Cc":"qemu-devel@nongnu.org, Magnus Kulke <magnuskulke@linux.microsoft.com>,\n Zhao Liu <zhao1.liu@intel.com>, Wei Liu <wei.liu@kernel.org>,\n Paolo Bonzini <pbonzini@redhat.com>","Subject":"Re: [PATCH v2 5/7] target/i386/mshv: use the register page to get\n registers","Message-ID":"<20260507-unstoppable-berserk-trogon-9fcd3f@anirudhrb>","References":"<20260505185028.237207-1-dblanzeanu@linux.microsoft.com>\n <20260505185028.237207-6-dblanzeanu@linux.microsoft.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260505185028.237207-6-dblanzeanu@linux.microsoft.com>","X-ZohoMailClient":"External","Received-SPF":"pass client-ip=136.143.188.54;\n envelope-from=anirudh@anirudhrb.com; helo=sender4-of-o54.zoho.com","X-Spam_score_int":"-16","X-Spam_score":"-1.7","X-Spam_bar":"-","X-Spam_report":"(-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,\n DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=no autolearn_force=no","X-Spam_action":"no action","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"}}]