Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4528410rdb; Tue, 12 Dec 2023 02:00:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEflJ11vWxBnjHXBfTpIE5BbLbJmnDEei2pp+EfPDrEajSpBFDyM+/Dmqk1odpxLOqA4+A X-Received: by 2002:a05:6808:2390:b0:3b9:e80b:708e with SMTP id bp16-20020a056808239000b003b9e80b708emr7626589oib.82.1702375248827; Tue, 12 Dec 2023 02:00:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702375248; cv=pass; d=google.com; s=arc-20160816; b=JVSTzVYE/WdAruNnf1hXJEPxeJpVbL8CBH9gyq3mt0g4+h6h3FlTYZVUumlyEuLU2k MfdrRTtY9ceiv0m9XN2XF1wO12eE6sHLwqGGLjVQmbM4EEmLvwSryCdMQNfZ9WqkWTIz NiIKyrQVYYiGDh4tQN4pCb2Drl6tNCHp6nEGdLCclTLklAinQSE65OAn/SPopWRS3jK9 Ce1qvV0eQUVjKbU1weqRE+2Cabs0pYjLRnbGe62tQsUhO2fex6GyrF03sQywxVeojzRb Whnc6PDGxBxl146qARnqUOTSjHPWlgNhdNB/sDB71b9nu2SflVW321d74Wkmfcc9t7kV hgQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=QpQXwji0BqzNCO8LTyDjolxJwTZZIdsvVHQzVVEB9A4=; fh=ItBGoxYUPv8uwue3QGEywrOzK2Kq0dF/JPx09raDBP4=; b=DwuSM1XxbqhATp+6BOkAx8eO5Wpp4ohM9DOrRxYGz9hX6noLEWRvswzNVbIpl1NIbB HK34XNE6HV7t9rIfQlc3C2cGb8qQ7KrhTGmf01FtQ9weuHnavaqcWA1v7V4tC5qfhLyj jRl3HrkourPXs0cVHK4YOtEigFKBeaf+vpeAerTq+yEeIK0zH5QeT78R7bVHkxNSWExw q5GhdnvMrfdrzpvLvXEbVf4Up0x6AvLhGQdtvfxkTe6P+82YPOpBGOv+165SI15oWzcc HkBU7fwDGcMmJbEzqGYZaTjMMNQNxulT0qunRcF5ewh5/Jxp4XRh69icXpLQWh9/iTwT O6Qg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cyberus-technology.de header.s=selector2 header.b=OhcR7nR7; arc=pass (i=1 spf=pass spfdomain=cyberus-technology.de dkim=pass dkdomain=cyberus-technology.de dmarc=pass fromdomain=cyberus-technology.de); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cyberus-technology.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c14-20020a634e0e000000b005bd04873387si7194003pgb.105.2023.12.12.02.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@cyberus-technology.de header.s=selector2 header.b=OhcR7nR7; arc=pass (i=1 spf=pass spfdomain=cyberus-technology.de dkim=pass dkdomain=cyberus-technology.de dmarc=pass fromdomain=cyberus-technology.de); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cyberus-technology.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EDC0A80774B3; Tue, 12 Dec 2023 02:00:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346143AbjLLKAE (ORCPT + 99 others); Tue, 12 Dec 2023 05:00:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbjLLKAB (ORCPT ); Tue, 12 Dec 2023 05:00:01 -0500 Received: from DEU01-FR2-obe.outbound.protection.outlook.com (mail-fr2deu01on2051.outbound.protection.outlook.com [40.107.135.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 872E5E4; Tue, 12 Dec 2023 02:00:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TEfBuEC2hEBs+1CxLORxunCUgdv4UI/zZORIQq2LAyoJF5sPhwc/Yp2+L6kogMsc7BU4rZnbblXLXLeyDqLMF+JK6AIdLaVnpIyGBkXdz02rarm48eC+xmNoO2PpPLjUTCbMNRlvZ3nSbatKoYLiA/oe2QZkk0LNKIWK0LYaTiIOIFBTrqtfj+/idng/1/FY2AIJuVXCnBoSZ93YeC6o/3uYyVGLwDCKSAgWN7aHYZgWltdVFv5hthwymyrc0Hr4hfsadKpMyoE0q2CfQ8fyGZq2+KeEvT8tS45dmJKNDfLiJodf2wypJhp4r1zipc/VEfwS/Wk58ZDScIjl3qPKZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QpQXwji0BqzNCO8LTyDjolxJwTZZIdsvVHQzVVEB9A4=; b=bY6hOQldK+y6Xs/q6sCr9s8ckp1UlDneMW3ijT2HxWIWVpz8lS+3Vt9bBw7NfrS/qqSygev4K7UVRjtSgcfip/fw3szz4mUhybzkgpIdD5dZ9xemgvFmlBUxpiFeRcxNfpk3cvbEvFektgDSOB1HRuJF3jtTjjdFNG7e0ltByoA2/jYrp0aWz0AERY0TXkp/paI7wQ2fxNESBhvogOV0t6g/NRhCm5F5ZB7793SH43fYaCZVViHAIobpiVhEjt7LTW6M+vM/cu39ksp4N3+wNWKe2uMDU2ps+OT9hRNg1IvenaWa0sy6+qxe95nDi0oN3pwv9lu4Te9Pq89RAcXt9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cyberus-technology.de; dmarc=pass action=none header.from=cyberus-technology.de; dkim=pass header.d=cyberus-technology.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cyberus-technology.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QpQXwji0BqzNCO8LTyDjolxJwTZZIdsvVHQzVVEB9A4=; b=OhcR7nR7xVxmB4eM73U/XilDjLAcKfFP8wpCSLbN8UXr/QjYP3RAAPn88JcV41Kwmhwp5rPOr9ymDRrdBxSnuTIVlhfuWxddSldgHJ+5/1K+2mRHK09zIDTkvhRV1UyLbSD0RnVa4H2Dfcvu7JlJdep2GwrMxR6+Ffzb/fQ9/9W08FP+hJuq5nTQBgQffcRht5KbSI0h60vJlyepATyxJZZsj6gQmkJ4+F0NVxdOnvqfsaBzsXCnyQnh7CYEnBknNyfqpqXIu1CZc5QRWb27c64y8Hy7kmx9OXTUEAB3SKu0FQKc1L7sFt+6Uoa3S6Rs3NQXnUHmgnvVsfdhTcQUOQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cyberus-technology.de; Received: from FR3P281MB1567.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:7a::10) by FR0P281MB1754.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:86::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Tue, 12 Dec 2023 10:00:03 +0000 Received: from FR3P281MB1567.DEUP281.PROD.OUTLOOK.COM ([fe80::312f:5918:e76a:3b79]) by FR3P281MB1567.DEUP281.PROD.OUTLOOK.COM ([fe80::312f:5918:e76a:3b79%6]) with mapi id 15.20.7068.033; Tue, 12 Dec 2023 10:00:02 +0000 From: Julian Stecklina To: kvm@vger.kernel.org Cc: Thomas Prescher , Julian Stecklina , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: [PATCH] KVM: x86/emulator: emulate movbe with operand-size prefix Date: Tue, 12 Dec 2023 10:59:37 +0100 Message-ID: <20231212095938.26731-1-julian.stecklina@cyberus-technology.de> X-Mailer: git-send-email 2.42.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BE1P281CA0352.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7d::8) To FR3P281MB1567.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:7a::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: FR3P281MB1567:EE_|FR0P281MB1754:EE_ X-MS-Office365-Filtering-Correlation-Id: fcfb2943-21f2-4369-45c5-08dbfaf91c15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5NDcdwH6bZlzoomCzzPE/OSPlfgd3pJvmFiSyAW9UoQNulwxR6bLYKDfExBQ3CXBbyfUqYA+ITy1PTxU0vf0TjIL5yuHGUdZgpKnUlW+V/c5pwnz07xJxSDTvLBSUSUEf3K55eWKddSL8AswKKS1322X7EltWybNpXFHphNFE0G9dr1w/hd/g/FxAczdC67OK+ITD4NLalTTc13dCIi4u2cq2JlcMIKQBXYYVxCLQ6job5ktCwjCn+TCnhBUUT2zNnVqkiY1jWERCDX30eIaFpdLhyxnV0EoE1v+gp5Jh7D+ijfL/emg7MS1qwMlYt5xyOUNst6m24EoNNKYMxYCyt5rZe/KmDpvoQRlDhvkbS3MNnO/PgmECi57c5lkaZxschm7cE1MOdVcsj2wb00p3MgbZADtcGXCoGCihGCPKDpowqr/KqaR89Fs5kgkdCetmB/8KRQDYIc5q93UzPX3zdtnExI8VXIyF2vgP8vwPJTk9qfwPyMGKGZlvtzbVDFCyIN9PvRK1frigsfRIDNcQGAL7VXXfm5EjLEZhvpf7wwhpyuRiEMrQh4wBG+LqPZWxOVT4ju8UcOTTceYKuQxzglQsjT2JJMyXvxOwR/dPwk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:FR3P281MB1567.DEUP281.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(136003)(366004)(376002)(346002)(39830400003)(396003)(230922051799003)(186009)(451199024)(64100799003)(1800799012)(83380400001)(52116002)(6512007)(6506007)(2616005)(1076003)(38100700002)(44832011)(8936002)(5660300002)(4326008)(8676002)(41300700001)(7416002)(2906002)(6486002)(478600001)(6666004)(316002)(66476007)(6916009)(54906003)(66946007)(36756003)(86362001)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?h5OyoDre7f9HIreByZbZw6j1JDC5BzpBXkdA6GDrZycgvghravkYTKU/mGKC?= =?us-ascii?Q?9dQTMFlSik065woUtsWErx4+u3CTGxUDgocqtFzNnyjHTsz+3Fd/DPmCnZ9o?= =?us-ascii?Q?lhF51B+q8+YOKtBbLVGDLWE7I6puNeXtG0Xll/5naCWNsldA/Qj2Lc9Wu7he?= =?us-ascii?Q?BypLc+eTTYY/Q/IvJ90ZjLMovaiCSpnsIrk8UYZFLnikmtPwbKA0j8XjlTh3?= =?us-ascii?Q?2svQLyT3OI82XBsIqoH/WkZhEQIW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ascii?Q?TcHHU7QsHniU0cBMUgxmJqD6fVTbak7jsMKHVAgIRRz8+OKPkMk/MsZ0oAV3?= =?us-ascii?Q?7mDH0JhbbA0YEBHkxguVtQgwRb+R/00Z/b49/brWXqKH0hEzjl7HRHnpWLAq?= =?us-ascii?Q?aWlCWsfw5FpjZpUvWwwSsejg6yyWqxU1AEAFPITam3qJTKvSH5sriEURLERv?= =?us-ascii?Q?6qhrA2EtQxHWvbSxcjdihiKQ2LYlnqAsU6Z1TQELa76zb87jW/blETXMJEBs?= =?us-ascii?Q?GF+5SUF7S4Nc2PCbPEjFNP5jQajkhWODie2OJTyjdqeOxN6cMjZkaMFa8atC?= =?us-ascii?Q?BUGWlYxzyaD8EtC2fze0SzpCIL/jPelep92hSN36MP4h8eWukN3xDOlTKpuG?= =?us-ascii?Q?ffEaUCbG8E6RojCvtSN9TDZD6xXK5dO+OhZHTxmbDE5SmeaUnrdvQS5LcsfF?= =?us-ascii?Q?gKTDXcOSb98ASAUjgkemWUCQeFA7fsLyRVIYrgdszg/g0xAxBNm83RCwT/K8?= =?us-ascii?Q?8Wcfym2GIzsbj+gu22UZoC6s+sgBmj7Z9CBLgJ5AOJKKyn/ExecRq4tW6b3V?= =?us-ascii?Q?A2nqzc0AN8I0dijUWoPMHt2bHyqGcA5ftfQfBXknEXyGbUHt?= X-OriginatorOrg: cyberus-technology.de X-MS-Exchange-CrossTenant-Network-Message-Id: fcfb2943-21f2-4369-45c5-08dbfaf91c15 X-MS-Exchange-CrossTenant-AuthSource: FR3P281MB1567.DEUP281.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 10:00:02.9170 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f4e0f4e0-9d68-4bd6-a95b-0cba36dbac2e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0p8YRguIZMAI69uniNRCUdiJmKX23DOKZ7oERcRGt7obp7kpMe0xzPp6FjseB5g7q9PiwIHGIeTYr96yDXSua7yDLWZycLbCMLhNAZQCXJWLFHKytCwloqlHlTKPkH6w X-MS-Exchange-Transport-CrossTenantHeadersStamped: FR0P281MB1754 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:00:23 -0800 (PST) From: Thomas Prescher The MOVBE instruction can come with an operand-size prefix (66h). In this, case the x86 emulation code returns EMULATION_FAILED. It turns out that em_movbe can already handle this case and all that is missing is an entry in respective opcode tables to populate gprefix->pfx_66. Signed-off-by: Thomas Prescher Signed-off-by: Julian Stecklina --- arch/x86/kvm/emulate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 2673cd5c46cb..08013e158b2d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -4502,11 +4502,11 @@ static const struct instr_dual instr_dual_0f_38_f1 = { }; static const struct gprefix three_byte_0f_38_f0 = { - ID(0, &instr_dual_0f_38_f0), N, N, N + ID(0, &instr_dual_0f_38_f0), ID(0, &instr_dual_0f_38_f0), N, N }; static const struct gprefix three_byte_0f_38_f1 = { - ID(0, &instr_dual_0f_38_f1), N, N, N + ID(0, &instr_dual_0f_38_f1), ID(0, &instr_dual_0f_38_f1), N, N }; /* -- 2.42.0