Received: by 2002:a05:7412:8d08:b0:f9:2d0a:d759 with SMTP id bj8csp99137rdb; Sun, 17 Dec 2023 04:12:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGXJkKIrQKMaRYaqyGDHQgsbXefxnJMI5l7izt09Xu/wRxoxglHcgX6qa1K3QmzwJH6lS5 X-Received: by 2002:a05:600c:54d1:b0:40c:263c:636d with SMTP id iw17-20020a05600c54d100b0040c263c636dmr8394261wmb.124.1702815142896; Sun, 17 Dec 2023 04:12:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702815142; cv=none; d=google.com; s=arc-20160816; b=N/XzMlj3JPsiwwx8hAltpxcCYTiKfe5MSDYZKe/kNSqCkXSktVi+yu19KdZvFC9PUy amtVbIv127kjEEXsc2NBjMgjdp5Sh0CSmCAkZFRCd9OAOcXprNOaDCaOt6NRlPVUp9r5 PfXjY3s6quhjWT3D1MxVybnWfhnZcrx/AOzn4kwQiKRfqm+GOgXo8aHoeOCDX0b33IUE /Z/OArU5YHKXHPtz1Pp8qAvzRK21ejZi7haEIpYQUyHYBF1C535oxGWAZaO1FiFGvpKp JhuDx7DnJ6pOlz8+sQwqU09eH60f9jK9G7awDihRzs/sHJAKjiy1RbVG83AawcaHhZpk 3X4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mLfN4NEWJqNi5nAYfcVnzvmiFagMhLexPTmW8qdptp8=; fh=EeEwC1CrH0lscEKidcnbKRkOjCQ0zmKS+weK3I0yyn4=; b=xNgXG+yp2sYDICi92KQV3yjGXlP3TO6ib/AJndHuoxu1oHEHsgGbRNgBuIfSgpVFjX sxBl8O9NTJY+FhvVhsRYah/TvhYScKbtJUCOjD0lSLWrrDsswJMur8axdGcZ5SXz6/KP w7j080ycpVxrK5qAReKHW/Wz6MRXrcwWcP9xcdgjcHMd2FFC9PoPL+e0rc/DaWUHV1lz SszkL8jE2yZesTWTNK+TfeJZg2yyP1hYi6uR7HR49l/WleF6VfISLHqnsrTFjlglFEvl qfwNHjVXpberKZx5V0s9UNoyER3V0mwep9MEymZo0TPY20WTPyNYmRjb1bnFyW40kRCE Ew3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=eP3BeQVb; spf=pass (google.com: domain of linux-kernel+bounces-2567-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2567-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ha11-20020a170906a88b00b00a234085558asi646228ejb.1.2023.12.17.04.12.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 04:12:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2567-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=eP3BeQVb; spf=pass (google.com: domain of linux-kernel+bounces-2567-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2567-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7384F1F22093 for ; Sun, 17 Dec 2023 12:12:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E9B432C88; Sun, 17 Dec 2023 12:12:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="eP3BeQVb" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B61937145; Sun, 17 Dec 2023 12:11:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 8957940E00C9; Sun, 17 Dec 2023 12:11:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zwAyTYBxkQRn; Sun, 17 Dec 2023 12:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1702815114; bh=mLfN4NEWJqNi5nAYfcVnzvmiFagMhLexPTmW8qdptp8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eP3BeQVbeImjnosYYfbsIxST9GnyJcB9uZT7l9+TvQnq4GC1jAQs2N0FvQal4mu+X nqrfWVmQCo+JsQ9EkESLIJtc9d41cIcB6ZwH5FTkT/LA41+mxqyhrJzknd3hGqQGKR 2oB8Ifk3NdNLnmBwl69Ua0/Lfp4Q7re6jJok9EfPzzHjX0IKhzQQzt0p7N9lHIAeZR gkCucFenksLGliII2bxYcHpqczZV5nMHcGSuxCtEJoJQy7NfBWq8oOwtIpi88CYh2q e/rMAKDKjPeuvhIWT91WOl3bEzjuTT303pBIneYoy4H7u2TdqskLJymgbZ9xHMe6kz KTpGXnMpMvBUTxXJZqPDbcGo1Smkf0Sw2gMSvRCnv5z//FW+HGdVbwmIQ92P7R3zQr p0pfbV3cTve95dimTUAwBNuPBfjXEF/dBXEX4rUw4qKvUL0BRq7Jz3mj+iWBnfrix+ SBrHn5xN3cUxmNt2nf04+V4tWKIvARFuQ1/SawP6AgRhmp1P6p+VpOStq4apFig/1r Ul69vE06EIvnTf+R6p7BfOXtPvHAR9BOIXC7928Se3EUYwIsZOsSyqOcyOsvqh16fH E3jJKxKafuDOg7hOdlgW2sAWUvJBtVFz3pdRHbXY1UvfIegls3RdcLIBZKjAN1HD13 Sj99rwFRbn31C7U/KvrHAZ0c= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 8E58540E00CD; Sun, 17 Dec 2023 12:11:43 +0000 (UTC) Date: Sun, 17 Dec 2023 13:11:36 +0100 From: Borislav Petkov To: Julian Stecklina Cc: kvm@vger.kernel.org, Thomas Prescher , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: x86/emulator: emulate movbe with operand-size prefix Message-ID: <20231217121136.GAZX7leKpfy+tSO0Tz@fat_crate.local> References: <20231212095938.26731-1-julian.stecklina@cyberus-technology.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231212095938.26731-1-julian.stecklina@cyberus-technology.de> On Tue, Dec 12, 2023 at 10:59:37AM +0100, Julian Stecklina wrote: > 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 > }; > > /* > -- Acked-by: Borislav Petkov (AMD) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette