From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FEF8C433FE for ; Thu, 9 Sep 2021 16:39:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBF3B6105A for ; Thu, 9 Sep 2021 16:39:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238469AbhIIQkX (ORCPT ); Thu, 9 Sep 2021 12:40:23 -0400 Received: from mga09.intel.com ([134.134.136.24]:47508 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237884AbhIIQkV (ORCPT ); Thu, 9 Sep 2021 12:40:21 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="220872511" X-IronPort-AV: E=Sophos;i="5.85,280,1624345200"; d="scan'208";a="220872511" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 09:39:10 -0700 X-IronPort-AV: E=Sophos;i="5.85,280,1624345200"; d="scan'208";a="539718091" Received: from gchen28-mobl2.ccr.corp.intel.com (HELO localhost) ([10.255.31.74]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 09:39:04 -0700 Date: Fri, 10 Sep 2021 00:39:01 +0800 From: Yu Zhang To: Hou Wenlong Cc: kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Jan Kiszka , Avi Kivity , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v2 1/3] kvm: x86: Introduce hypercall x86 ops for handling hypercall not in cpl0 Message-ID: <20210909163901.2vvozmkuxjcgabs5@linux.intel.com> References: <04a337801ad5aaa54144dc57df8ee2fc32bc9c4e.1631188011.git.houwenlong93@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04a337801ad5aaa54144dc57df8ee2fc32bc9c4e.1631188011.git.houwenlong93@linux.alibaba.com> User-Agent: NeoMutt/20171215 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 09, 2021 at 07:55:23PM +0800, Hou Wenlong wrote: > Per Intel's SDM, use vmcall instruction in non VMX operation for cpl3 > it should trigger a #UD. And in VMX root operation, it should Are you sure? IIRC, vmcall will always cause VM exit as long as CPU is in non-root mode(regardless the CPL). Also, could you please explain why skipping the vmcall would cause exception in the host? Thanks! B.R. Yu