Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp255443pxb; Thu, 21 Jan 2021 06:27:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzBQlFOyewpKXJtTJpVAagyMQ5RnbetF3B2Ci2p245dr2LTVf6g6eS25CksXt5p5T5VZ3Z X-Received: by 2002:aa7:c754:: with SMTP id c20mr11279326eds.240.1611239256136; Thu, 21 Jan 2021 06:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611239256; cv=none; d=google.com; s=arc-20160816; b=oDsgBZEaANnFBx/vNsTw2yWRBpxfJSwZRpFhzhZkEa9EmSWoa1Fgbhio1aor+zsRMY BhyCqUi/P9o+pPTamxrZqc3iJQShqxEiY9Jv7p+wi5+oQLksYi/YyJYTFFD/Sxb8E3xY A0QFPiAPc+RIiKsyy8S+9VWvnQazKMDVJCJrSFN6OceXTF6z33DoC/K23oAoZKz2+Lwa +i07F3w39d4bwDfm6Vrw2JIwczRcO56WMopbVHfIG/5rh8sQ12AOL23nqxceAoHR09xm zJ8qsscK/OEgYW4uMNgn1bAfQcrXjJig2+BEFcIu7ioMzb2nLHXs90eUtTvFOPlvRFQV xKPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=GKetp3qvNfokfYo8zlseFMKLOIJriD8afQXzk6JdR84=; b=UREFZfT7mptlbts4sd9Vib3/AoJKTJQEXuLDz+t7MHcDi9afCEwmwq1uZ9sJk4vtAv ToFikbqaBsIeHtwRnG/dKUu35se5i7AHeYLVNnhr889DOsSmWhVTZ3s3MMRDRg+yTizh S+d58P+MMp7SbY6pEPLfqCtygxVvcZ1uhp+pJ2jl5PF6HBj2bKFto7yEFMGZjTPfEBGQ gc9FcGoqWaPT8I1QJPLiuch1XeMOb2q0HIcdjsMwPL+/8x9qOUXtj1VzfsTQpRhIs5UP cIKXiLFZwZxUeizrwOT43QEwwVshTfhiJIB6Fo8hkWDV7xSLB5/XNNJnPKLv+R25WRJR iYSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cmF75aKB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si2194643edy.585.2021.01.21.06.27.10; Thu, 21 Jan 2021 06:27:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cmF75aKB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731138AbhAUOZi (ORCPT + 99 others); Thu, 21 Jan 2021 09:25:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:37356 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730059AbhAUOYr (ORCPT ); Thu, 21 Jan 2021 09:24:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611238999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GKetp3qvNfokfYo8zlseFMKLOIJriD8afQXzk6JdR84=; b=cmF75aKBDQnB5CuRrrnKIGM9usTTKEN9Z491AcpBGeafpj3QZBv09QQrvnFNY8Enmmy/zk vw8CJSv+O0q64VRRoxgLAJvsBuim99vJDPicY1rYNQ4LFATHi7ylTZ2vj0bUwYu8gBRAlw +qap/eW+kXrSTULQNYK4xpKvlZ0AteU= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-468-vVC6pGQbNMCclP8KFwEj8A-1; Thu, 21 Jan 2021 09:23:17 -0500 X-MC-Unique: vVC6pGQbNMCclP8KFwEj8A-1 Received: by mail-ed1-f70.google.com with SMTP id m16so1210570edd.21 for ; Thu, 21 Jan 2021 06:23:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GKetp3qvNfokfYo8zlseFMKLOIJriD8afQXzk6JdR84=; b=J9jJZ5PI1estthcyv+jjf7zQl1O9HD+Wgs05jveakhdZ7uWzNd4+3YvfN3JB/0DkHD Memue3zrsm3dpJaBFBJHVmaymJgxF7Tip0D7hYLJ8A+5c6FfpUDH2KuupBNufXIyvmVl uufjCJhz5DogpKy9OHCdAFPb3ODYG+QSaWmxJZG8AU2kyynlJ5M2EZG0MSY+MzZ5IAeF bjBjnZ1Ih5dS43XXi1rQzEe6/jUzfc65u5F8XTrWZsdVG+GCVrgl1moBq9I8Jai72wpm c+sZMvB9zBJaj5suTf9+aE3maqMTMw0QCpBTo0i5s5RK01uAqWEMwCwwpuSLPbGBPw0T unUA== X-Gm-Message-State: AOAM533diaDpBIaCpiBq2WP59Sg6NNjzOtK6OvHAhCTo/TSr+mLhDuRC 6mIE/be1HU5HcnWm2gtVrV2aRko4UX9hp8mt0FLGSEJ8XBvQmVjQNiq5wDjwChMlmxTtBbludGX vJ/+lcirdkf0o5srl5JimqDu2 X-Received: by 2002:a17:906:14ce:: with SMTP id y14mr9159514ejc.366.1611238996057; Thu, 21 Jan 2021 06:23:16 -0800 (PST) X-Received: by 2002:a17:906:14ce:: with SMTP id y14mr9159503ejc.366.1611238995865; Thu, 21 Jan 2021 06:23:15 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id w4sm2874569eds.40.2021.01.21.06.23.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Jan 2021 06:23:15 -0800 (PST) Subject: Re: [PATCH v2 1/4] KVM: x86: Factor out x86 instruction emulation with decoding To: Maxim Levitsky , Wei Huang , kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, vkuznets@redhat.com, seanjc@google.com, joro@8bytes.org, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, jmattson@google.com, wanpengli@tencent.com, bsd@redhat.com, dgilbert@redhat.com, luto@amacapital.net References: <20210121065508.1169585-1-wei.huang2@amd.com> <20210121065508.1169585-2-wei.huang2@amd.com> <82a82abaab276fd75f0cb47f1a32d5a44fa3bec5.camel@redhat.com> From: Paolo Bonzini Message-ID: <3044193d-1610-fd67-e4ec-12a87fed62f2@redhat.com> Date: Thu, 21 Jan 2021 15:23:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <82a82abaab276fd75f0cb47f1a32d5a44fa3bec5.camel@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/01/21 15:04, Maxim Levitsky wrote: >> +int x86_emulate_decoded_instruction(struct kvm_vcpu *vcpu, int emulation_type, >> + void *insn, int insn_len) > Isn't the name of this function wrong? This function decodes the instruction. > So I would expect something like x86_decode_instruction. > Yes, that or x86_decode_emulated_instruction. Paolo