From patchwork Thu Jul 28 08:25:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Wenlong X-Patchwork-Id: 12931056 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 245DEC04A68 for ; Thu, 28 Jul 2022 08:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235174AbiG1IZR (ORCPT ); Thu, 28 Jul 2022 04:25:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233810AbiG1IZQ (ORCPT ); Thu, 28 Jul 2022 04:25:16 -0400 Received: from out0-143.mail.aliyun.com (out0-143.mail.aliyun.com [140.205.0.143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 834246596 for ; Thu, 28 Jul 2022 01:25:09 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047205;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=1;SR=0;TI=SMTPD_---.OfjlJUR_1658996705; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.OfjlJUR_1658996705) by smtp.aliyun-inc.com; Thu, 28 Jul 2022 16:25:06 +0800 From: "Hou Wenlong" To: kvm@vger.kernel.org Subject: [PATCH 0/2] Add missing trace points in emulator path Date: Thu, 28 Jul 2022 16:25:03 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Some existed trace points are missing in emulator path, e.g., RDMSR/WRMSR emulation and CR read/write emulation. However, if add those trace points in emulator common interfaces in arch/x86/kvm/x86.c, other instruction emulation may use those interfaces too and cause too much trace records. But add those trace points in em_* functions in arch/x86/kvm/emulate.c seems to be ugly. Luckily, RDMSR/WRMSR emulation uses a sepreate interface, so add trace points for RDMSR/WRMSR in emulator path is acceptable like normal path. Hou Wenlong (2): KVM: x86: Return emulator error if RDMSR/WRMSR emulation failed KVM: x86: Add missing trace points for RDMSR/WRMSR in emulator path arch/x86/kvm/x86.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) --- 2.31.1