Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2048537rwb; Fri, 19 Aug 2022 14:17:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR7GIwv8g13qAx9kqjvgh/qI3xk0RN3ew6PH9Qf4KXH2BjTJTZ0dQ9kGzrhBB7ayIsT5Emy3 X-Received: by 2002:a05:6402:11cd:b0:43d:7862:7c25 with SMTP id j13-20020a05640211cd00b0043d78627c25mr7710560edw.96.1660943864318; Fri, 19 Aug 2022 14:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660943864; cv=none; d=google.com; s=arc-20160816; b=RJgG+v6q1cOX1UZ5jmQqDY8q2ij5OH597GJpaMfVbJhCuBpLWYM0SDTR6XfKXYz1MD JkvPmx0G+b5jVrYv1LBWvf34c/ON1g/a9aJnmhbJ0vuOqYILEOJxjAgE6tkNrJXWKu5T qix0Lxh2xH5Sk+dAjGpe/j2mrhUvUL0FnzfsEYsbzX+nYAisqJRPjOWnHHPNIaK1ucY8 GkANNBeURgMnGFQpoi6QMekkjKbWqSeHRzLpZLY/uIhvAh6p+wxmuixnoflz/u2kxkGI aGfXWA5qFShzH2/qimmOInbfDnQTDa7JgLOQ1flUH8+W7KrA80jSGx4hf4I37WRCtIwS A71A== 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=UbjdgasMWdhxwQlviQSCvgTrM7YMkVlQiQeuIEbCI20=; b=XzZlHVGqy/CLRXeAHVTX1PtMeQCyX1MephpJQtgUZUlD1cGxbT/kD4M+CkKFwfhdlJ YLcVilPqKj6TQAjP2WYo+61aopMM1fhWyY+1LjpNbCjE73byer7xLzY/kf5waxM2Drn8 62b17HsdNJM40aX/3+C3vJDby2NlQyqEi05QLiRNlsxcW+UqxUrtNgP+FOweVYotJSuf vXd/n7w1Q6hbwv80DlZCeZrHG89ubwOhhKS9112vYSL3w2mNPp1ObsDyEgL7JK0r4TGb eruZ1DHT+ntgjYRLiDSRCz3eEw0kTa5hlNsIDyEUmYHtwpSGatNSgQZvaY0IhrlolZx3 4XJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=F5jfp85i; 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 n19-20020a1709061d1300b0073121897f6esi2904749ejh.222.2022.08.19.14.17.14; Fri, 19 Aug 2022 14:17:44 -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=F5jfp85i; 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 S1351954AbiHSUwT (ORCPT + 99 others); Fri, 19 Aug 2022 16:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352096AbiHSUvz (ORCPT ); Fri, 19 Aug 2022 16:51:55 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8ACD10E961 for ; Fri, 19 Aug 2022 13:51:09 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id x23so5068823pll.7 for ; Fri, 19 Aug 2022 13:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=UbjdgasMWdhxwQlviQSCvgTrM7YMkVlQiQeuIEbCI20=; b=F5jfp85iJvdeHkq3B0caSImoaFK/cXUJleEHGYjDONaJzOZYoILas7eS0W4lwLtBfe pZcyIT8JUi0yodjaXKAh298KkYMF6jhuDdPAm66NpOd++zndjQq7fNUT7Qi4Rpp26CqQ e0pgcxUaCUEEER5i5r3/K1hC7yb/wamOA0xWe+iafFJxwvWVwLl7xtikGjOHptaq2nzd rIbGZCUXoYuTj41kJ07aMFAGjXnPQpELn1HxOzkIoxQcrtcIIO095VdiODAHP/fYKHzg WvMSZ/qA4wYSR0D/ZXZ2ky8ljA8RMNDHc1lwnFQpBHm6fG+D+yCirzW2uiT7GWDBQbak 80VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=UbjdgasMWdhxwQlviQSCvgTrM7YMkVlQiQeuIEbCI20=; b=rT0Hr8ZIPKVTYF3iAOhJC/f79GcKSpc3PrDVoqcUM3CMG4SRmmmnbKmdc6PpZXkEMc CnISjk2PSyY1rgAtlWOnowFH1T5Hv3E4MkmSSoH6pxl+GUetK8Fmk7Cf6JdxJqcm+8uZ g6uDIk1YK7FgIsGl8ZXm7+Xsy3hD7i5dZb7M95vATLrpUCGn389JcFO1hy0O1KgwsRz+ IwjogCVSYyD9dVMUCzJoE1t+Q0SqtwamzdNOeMdt54xDtAdol1hT3Kp2kif9HKzu+HCf J+2UwnaNR7y2bK0o3BbsToMq5mWtQT7YGQUirKZPez1lfdO0s0RhzGn2983YMPtj//W5 8YtQ== X-Gm-Message-State: ACgBeo2ebmOpUgvlcsEuq6taV035w5LXSslae1CCenxsVM37Z01J0zdH 8/k719ZCH8ahi/mwxGjsNKV6U8KlcDRS5Q== X-Received: by 2002:a17:90a:f88:b0:1fa:da0f:5e6 with SMTP id 8-20020a17090a0f8800b001fada0f05e6mr6885579pjz.102.1660942268166; Fri, 19 Aug 2022 13:51:08 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id e13-20020a631e0d000000b0041d5001f0ecsm3187717pge.43.2022.08.19.13.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 13:51:07 -0700 (PDT) Date: Fri, 19 Aug 2022 20:51:03 +0000 From: Sean Christopherson To: Andrew Jones Cc: Peter Gonda , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, marcorr@google.com, michael.roth@amd.com, thomas.lendacky@amd.com, joro@8bytes.org, mizhang@google.com, pbonzini@redhat.com, vannapurve@google.com Subject: Re: [V3 10/11] KVM: selftests: Add ucall pool based implementation Message-ID: References: <20220810152033.946942-1-pgonda@google.com> <20220810152033.946942-11-pgonda@google.com> <20220816161350.b7x5brnyz5pyi7te@kamzik> <20220818190514.ny77xpfwiruah6m5@kamzik> <20220819051725.6lgggz2ktbd35pqj@kamzik> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,FSL_HELO_FAKE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=no 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 On Fri, Aug 19, 2022, Sean Christopherson wrote: > Or can we just say that it's always immediate after memslot0? That would allow > us to delete the searching code in ARM's ucall_arch_init(). I have this coded up, will test on x86 and arm64 and send out a series (essentially all of the non-SEV bits in this series). Prescribing an MMIO address from __vm_create() has a some nice side effects. 1) KVM treats writes to read-only memslots as MMIO, so a future cleanup would be to have __vm_create() create a memslot for the MMIO range to prevent silently clobbering the address. I'll leave this for later because selftests currently assumes they can use all memslots except memslot0. 2) It will simplify wwitching x86 and RISC-V to a common MMIO implementation, if we ever want to do that. I.e. have common code for everything except s390.