From patchwork Thu Mar 10 09:02:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenyi Qiang X-Patchwork-Id: 12776040 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E47DC433F5 for ; Thu, 10 Mar 2022 09:03:08 +0000 (UTC) Received: from localhost ([::1]:54720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSEhP-0002Zy-HU for qemu-devel@archiver.kernel.org; Thu, 10 Mar 2022 04:03:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSEdh-0000rG-VF for qemu-devel@nongnu.org; Thu, 10 Mar 2022 03:59:18 -0500 Received: from mga09.intel.com ([134.134.136.24]:26958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSEdf-00007F-9N for qemu-devel@nongnu.org; Thu, 10 Mar 2022 03:59:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646902755; x=1678438755; h=from:to:cc:subject:date:message-id; bh=cEQvWn6cKH//ZmRKF+kqgy60d5rxkvhGVp21E2JHYXc=; b=A2IOOyRzNkLjxtRvXvIFOuchCFGXuGiUONvWRAxUzDfB+S0dG3Hu3Dbi 3Y91NwjCcGsZsHZZlAE+5w3rksUq6yKeo2iGS2dvCcKPvloP3qSc/rWU4 91DA8gnMe5coUCHyZMtwOM7Z96vakJMN3J95ZtQvVgbC4faAjI73FQ1jQ shNWchlHqn+KBTYhsX9slVzdjeYbKBcrEjNDTXqd1BNsAu9SO9pze4VPB H4ewPRJGMUBhM/Y7bY8u1eGgUwMWLzajrALsmAzNDKQxfiUwIS99rdRX0 WrLZ7JW4G214JDylg6qf3FbbBAiso6xM/qNdEFr+d788c3K/drYukp2o9 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="254932783" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="254932783" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 00:59:08 -0800 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="644367169" Received: from chenyi-pc.sh.intel.com ([10.239.159.73]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 00:59:06 -0800 From: Chenyi Qiang To: Paolo Bonzini , Richard Henderson , Eduardo Habkost , Marcelo Tosatti , Xiaoyao Li Subject: [PATCH 0/2] Enable notify VM exit Date: Thu, 10 Mar 2022 17:02:03 +0800 Message-Id: <20220310090205.10645-1-chenyi.qiang@intel.com> X-Mailer: git-send-email 2.17.1 Received-SPF: pass client-ip=134.134.136.24; envelope-from=chenyi.qiang@intel.com; helo=mga09.intel.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chenyi Qiang , kvm@vger.kernel.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The corresponding KVM patch series is available at https://lore.kernel.org/lkml/20220310084001.10235-1-chenyi.qiang@intel.com/ Chenyi Qiang (2): linux-headers: Sync the linux headers i386: Add notify VM exit support hw/i386/x86.c | 24 +++++++++++++++ include/hw/i386/x86.h | 3 ++ linux-headers/asm-x86/kvm.h | 4 +++ linux-headers/linux/kvm.h | 29 +++++++++++++++---- target/i386/kvm/kvm.c | 58 ++++++++++++++++++++++++------------- 5 files changed, 93 insertions(+), 25 deletions(-)