Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp232841rdf; Thu, 2 Nov 2023 21:10:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFGS+ozoFZkVr7OTt1vRxZoyiAf4rSUj5K54eCdQjcWuK2s6ThOr1NftrLm0Wkg6+rGEji+ X-Received: by 2002:a05:6e02:12e6:b0:359:6116:4d9a with SMTP id l6-20020a056e0212e600b0035961164d9amr2199195iln.7.1698984658404; Thu, 02 Nov 2023 21:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698984658; cv=none; d=google.com; s=arc-20160816; b=rfONOwmJ29pwJECYs/nf8xElWcDSp2KPnl4njQQxlVbkSRrngGaV1d10Y3anLtIkFY nls8X1rkqwEgJaodeMCr5eQ8FtU8B4LSz9EU4Tm0JGx6sYQZ7WUzpP1AgBRN21dBA4FK AA5SJJMMKj2rpQQhLGcV+G1gNI3YqtoursuzchEULjPRvgQEmBVsVEgMsTH8qviMFgKs 0WgAq0eGMScUx5RUvBQaVpj7Cgk5q+21TSOAsxbuz2N6sMWARRcILMpUM5/u+xctzu8H GXN4P+q3Je14V4MEjFJCcD+SMjcKpjcRz3xFV5ibvIwTjz9tPhavjv+y9v/RAGf/3HA4 Lhcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lKYYSyaWEpFndL/ib9nSLR5WjOr8nrZyDKAovBc33po=; fh=bkiT0m2nDSwOiS0tXX/alW1oLaKci0q7aS8wY29DT0Q=; b=MZp2cQLdkxvyXOcOBE7fFh5aTjTA9ojs6u4+eQGin8XRSbdVWigwNQyCZT211ayZkp /M+5sU1VR+UOPwq7vEOaDnawzhNNl26fboKcbxnFuPMfb15+PjvOQHEDof+V6ssncvkV ssWiyCX7s+Yi+tLnzMyt4ifh+E85eJ9Nr7JLHIxMvhfsxl7DTQMlRRj9BpHrYqA0vO/b DPtGYmRd68oHE2F+JQRVUXZI0atzvwgT0bWiwuxcUIR69+H8nV0USbwbOTicbDYzfgjA 7TGxgK4Z1TuSmXl0/WX+qWHzxouqLpOq7QEhFEAzB0bn9uSqMsWoc+Xc+1zvqRxiWVoJ zs9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oA3yIDjl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c130-20020a633588000000b005b9b68add85si796257pga.254.2023.11.02.21.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 21:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oA3yIDjl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 00546830C313; Thu, 2 Nov 2023 21:10:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbjKCEKr (ORCPT + 99 others); Fri, 3 Nov 2023 00:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKCEKq (ORCPT ); Fri, 3 Nov 2023 00:10:46 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4DE1A8; Thu, 2 Nov 2023 21:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698984638; x=1730520638; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=juHXPhfl2UOyfQDlVnje9FjGKXxO1moD004mEr2wKcQ=; b=oA3yIDjlqC57hp6Mk5iqy9d8CSACWtzIyRlXtuJ57/THHaVvlzF4eY/Z JXGQxzvRJDenWw42fg9cfPC6gu7+LuvEq6Y0S541X8Aq/owMXSASnF7Vc h+pW9407ajlI2aEliW3rWG701gbfzBJ7AyZgXfTf8S59bqOLfgvblgX37 KKK+x8nFxDHgVeBA4qQPV+zX8L89qb6Sz0du/XYs7sjqht/6FuLT4p1hu fmDR8xN4S9uqreYiRpo1RUo8tVxuSBWpBUMpkamQcAHR+wjPhc9mNnOZq J+nfdLY/9LIpyx1VdYb4T8P7tf9WLqIenJTSHPwIYGQvHo8E/vYxl/JID A==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="387762853" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="387762853" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 21:10:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="1008694807" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="1008694807" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by fmsmga006.fm.intel.com with ESMTP; 02 Nov 2023 21:10:28 -0700 Date: Fri, 3 Nov 2023 12:09:01 +0800 From: Xu Yilun To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , Christian Brauner , "Matthew Wilcox (Oracle)" , Andrew Morton , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiaoyao Li , Xu Yilun , Chao Peng , Fuad Tabba , Jarkko Sakkinen , Anish Moorthy , David Matlack , Yu Zhang , Isaku Yamahata , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" Subject: Re: [PATCH v13 09/35] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace Message-ID: References: <20231027182217.3615211-1-seanjc@google.com> <20231027182217.3615211-10-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231027182217.3615211-10-seanjc@google.com> X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 21:10:57 -0700 (PDT) On Fri, Oct 27, 2023 at 11:21:51AM -0700, Sean Christopherson wrote: > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -6723,6 +6723,26 @@ array field represents return values. The userspace should update the return > values of SBI call before resuming the VCPU. For more details on RISC-V SBI > spec refer, https://github.com/riscv/riscv-sbi-doc. > > +:: > + > + /* KVM_EXIT_MEMORY_FAULT */ > + struct { > + __u64 flags; > + __u64 gpa; > + __u64 size; > + } memory; ^ Should update to "memory_fault" to align with other places. [...] > @@ -520,6 +521,12 @@ struct kvm_run { > #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0) > __u32 flags; > } notify; > + /* KVM_EXIT_MEMORY_FAULT */ > + struct { > + __u64 flags; > + __u64 gpa; > + __u64 size; > + } memory_fault; > /* Fix the size of the union. */ > char padding[256]; > }; Thanks, Yilun >