Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1075568imi; Fri, 22 Jul 2022 16:51:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uoSBNHvZUjnxKyPmBFI2PJ3SEEhHB8YbXgh6L7CCt9nmNOu/XAJUtGu6F0n+O21zEsM90E X-Received: by 2002:a17:90b:394c:b0:1f1:fd26:19e6 with SMTP id oe12-20020a17090b394c00b001f1fd2619e6mr19797015pjb.98.1658533866445; Fri, 22 Jul 2022 16:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658533866; cv=none; d=google.com; s=arc-20160816; b=F+HBjO5wUu5avHFvk1/cLcTqgrJedgLFSeGhO46Q04Nsw2BVbMvOtjxr/LLMn/XNuQ GMiqD2ycuJwDTmx+tpRqVCTtAp/FL543ZPtDNWWGXahkB9kP5xtAZNGfw7SdEbE3jlil VyBXaoRyhq+XPiIK8qv79Y8I3Ww43OEankvBXpdi3dV7CIWfvbIWhlUbtY72vffQ9J8F ifnR6skY4I2F9VDYHCNTlGeQsHyKC1ITjjlSFN+ZYNDlGLSutMZ4PDGtrRVC1pbwYaew 95G7yIgCg9Ooplp8fk5IlHGbsyGguM+/JlYd0LaF0ooc1llV6Ffi9i6BLsiKecmdxFTH si2w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cAsBcLqW/j10OPe10nECHhYviVbD1h1TXA0nTgOdmqs=; b=OedIDh09DVBLAPs6s9ow1DIlJhRnCNFHdFSRboUt7W7g7HzNRozrW4KzQxXdioGtzp BGg+l7QAIUXMqR3TYScYBj1vMcwO2JdCSHUch8CX1vpHiUKymGfCAawNn52rgdFsf5IO F6NLFa+fWlYgmzOD5DXDEK9se0mOP/fzS7Vqh+G4CvvsNzI5gHVeNvvVhA4Q5bZkz/Mu 0kc59wtsDkvSkVt6qkRhY5KYQpur5PMCIoYCwiFi9EQqaEXtOde/dhyOWhrKWKlQlemR CMrEObLodjB08XaQv/kvzJAlYkRmi1aak09AVUZYOXTy7AaWtLgIEJ1527BfKhiPBLOv 2UyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=C61i6+fG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a193-20020a6390ca000000b0040d41a5247csi6927635pge.284.2022.07.22.16.50.50; Fri, 22 Jul 2022 16:51:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=C61i6+fG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236430AbiGVXls (ORCPT + 99 others); Fri, 22 Jul 2022 19:41:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236333AbiGVXlr (ORCPT ); Fri, 22 Jul 2022 19:41:47 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D8E39EC40 for ; Fri, 22 Jul 2022 16:41:46 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id t2-20020a17090a4e4200b001f21572f3a4so5453687pjl.0 for ; Fri, 22 Jul 2022 16:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=cAsBcLqW/j10OPe10nECHhYviVbD1h1TXA0nTgOdmqs=; b=C61i6+fG5SVbtUyJgdugCrOYXfNPORT+bMCi3jhy3CJPRst5DCeQAgv3YS6YDHyrbx CM6Vdi8x3GdL9SdtB5jEt8pcevCTHNC8LCwFzLAdp3iFXxPAB5OBDgGtHOmMvLqnRUYk f04ZpJCCojLFyTi+ODrur/jN0m3+2uhQnu4DGt6dnx5Raos1faX5JoSvvgDA60KK/Snz 3BcL+rH1alPvmtKtKMRh9e6NxT+jU59lt/PpXqjYi8eqpcCJS7Km3MxW2so3s9ZuGzSy 9BuAjA6s4y9JAdSZibrgmaLVfsBW44BKvbusfizAC2Qiz18vqvBbPzDtl23viSnurAkr SSgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=cAsBcLqW/j10OPe10nECHhYviVbD1h1TXA0nTgOdmqs=; b=mApqg1YOIOUSpzudQEggVHfF++s4Dm+nfcNpiprLtFfMJrVaOeFxDJTbbKb8zTTy9M kgAga0M8sGYvkqlqReIVp4yfj7RHneQvOwS2MtYX5QwvXaLYHV+nKm5AqwyfzoC7UAck WIZ8fjpeLPlFz2TU2vPhCe1JFF+MBlU4oQH325Ti3ZqWKLI+ny4z7VRf3V128KymdIl/ 6vSPV5je3jCTA/OEXrDDVm3e8UVoGSlRPQ7BIkHl6pG6fSoFqCjV2EGj7bmAK/BgXf+V ChbqK6HUTRPOgQU68OWFS7zim4rgvpvleTVKXRVQeQ+mprtseH0ULkzKp22ImzLA3kHm A+Zw== X-Gm-Message-State: AJIora/GRNOkDXgpiswSyore0GSaZa7pVTZYQSHgHZTwltREyAGtiHGV Ajp0txEE2F1GycKCjhkGi+yPkg== X-Received: by 2002:a17:903:32c2:b0:16c:3c8d:3807 with SMTP id i2-20020a17090332c200b0016c3c8d3807mr2151575plr.173.1658533305818; Fri, 22 Jul 2022 16:41:45 -0700 (PDT) Received: from google.com (123.65.230.35.bc.googleusercontent.com. [35.230.65.123]) by smtp.gmail.com with ESMTPSA id b2-20020a170903228200b0015ee60ef65bsm4368264plh.260.2022.07.22.16.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 16:41:45 -0700 (PDT) Date: Fri, 22 Jul 2022 23:41:41 +0000 From: Sean Christopherson To: Andrei Vagin Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Wanpeng Li , Vitaly Kuznetsov , Jianfeng Tan , Adin Scannell , Konstantin Bogomolov , Etienne Perot , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH 0/5] KVM/x86: add a new hypercall to execute host system Message-ID: References: <20220722230241.1944655-1-avagin@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220722230241.1944655-1-avagin@google.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 +x86 maintainers, patch 1 most definitely needs acceptance from folks beyond KVM. On Fri, Jul 22, 2022, Andrei Vagin wrote: > Another option is the KVM platform. In this case, the Sentry (gVisor > kernel) can run in a guest ring0 and create/manage multiple address > spaces. Its performance is much better than the ptrace one, but it is > still not great compared with the native performance. This change > optimizes the most critical part, which is the syscall overhead. What exactly is the source of the syscall overhead, and what alternatives have been explored? Making arbitrary syscalls from within KVM is mildly terrifying. > The idea of using vmcall to execute system calls isn’t new. Two large users > of gVisor (Google and AntFinacial) have out-of-tree code to implement such > hypercalls. > > In the Google kernel, we have a kvm-like subsystem designed especially > for gVisor. This change is the first step of integrating it into the KVM > code base and making it available to all Linux users. Can you please lay out the complete set of changes that you will be proposing? Doesn't have to be gory details, but at a minimum there needs to be a high level description that very clearly defines the scope of what changes you want to make and what the end result will look like. It's practically impossible to review this series without first understanding the bigger picture, e.g. if KVM_HC_HOST_SYSCALL is ultimately useless without the other bits you plan to upstream, then merging it without a high level of confidence that the other bits are acceptable is a bad idea since it commits KVM to supporting unused ABI.