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=-10.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL 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 2AB3EC4320A for ; Wed, 4 Aug 2021 23:31:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BFF560462 for ; Wed, 4 Aug 2021 23:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235658AbhHDXbf (ORCPT ); Wed, 4 Aug 2021 19:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235571AbhHDXbe (ORCPT ); Wed, 4 Aug 2021 19:31:34 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABC5FC0613D5 for ; Wed, 4 Aug 2021 16:31:20 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id o44-20020a17090a0a2fb0290176ca3e5a2fso5915466pjo.1 for ; Wed, 04 Aug 2021 16:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Zd+uox/EZ4rv4qm3Tkl9ksk48grG3CU/Mqm/t6eMNV4=; b=iA1EQu0Ghv3f7PId5bp+Rvi6PVKtnJbWbyEiz8T7P3j0Xpt4ahJBNYbtSzVpyVDTxG +SI8zAXY1HZR/by1oqDjUyb/mfdt7P7+tdn04mUml7O4deCPB0ea3j9B/EmMoBRCLKtt NB+LdF73NIjLPhRQiqlOE6GpJXLBUX7FCG5afve3IS4xuWlHb3fJAEfaNTYoDGMr7dO1 vZ2voSgbpHU7gh8vWqjmyc3YJ235f3o611ku6DoVeVTRZzC16jLUjlXIHkUBPGG58c1e 4F8zpYzudPOX3k9vdHzBwz23fKCXCrdBvd7OoaUStQeZ0Z+Lo169jF9bXKi8nUIv94Yo xEDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Zd+uox/EZ4rv4qm3Tkl9ksk48grG3CU/Mqm/t6eMNV4=; b=U2EsJPWguYRB/KE0A2gp5wndqkPoCLIV8foC2NHkoHuo/U/uB1A1+2O0PXu8zsRS4E Vx1oGZANRkafM/MioMhP6mcI2Fd7oSYNCdT0+vqIjcEps4m8QIH7w1NaTUy5AurSh1IJ 3+IEFgRxFrka/eGmaW8wem35bWMGt4otXZHiJKjKXWgPF/ZK1z2esXbA5KYdCXTcMrP3 IVqz8Jdi33Yv/ffJTatM21JDwXb7oW4ExzQUXhQmacMuSXMkXoRY6tb5vjNpYQ9e6CP9 /EUNrlXZ1LQzWdcrzzrVZGkogWuGG+HgXi70W6n95c/lyG/vUz83YvPASE2r74+31AFJ aYyA== X-Gm-Message-State: AOAM532hcydO01STl2tScUaxemMsFk0+eCgRWx2UK4Qsn5rO2OoUBoai fSyolEABJjwlPTRCCMEkyCeySg== X-Google-Smtp-Source: ABdhPJxssIOCNPZAbfOxrf/IMA12h60LqOvcCTi+PK0UppFpa1s1eenr1lxdNpE5vVyd5Co6NOsJsA== X-Received: by 2002:a17:902:b407:b029:12c:aadd:90d7 with SMTP id x7-20020a170902b407b029012caadd90d7mr1349877plr.79.1628119879991; Wed, 04 Aug 2021 16:31:19 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id f15sm3585612pjt.3.2021.08.04.16.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 16:31:19 -0700 (PDT) Date: Wed, 4 Aug 2021 23:31:15 +0000 From: Sean Christopherson To: Erdem Aktas Cc: Maxim Levitsky , Xiaoyao Li , linux-kselftest@vger.kernel.org, Peter Gonda , Marc Orr , Sagi Shahar , Paolo Bonzini , Shuah Khan , Andrew Jones , Ben Gardon , Peter Xu , David Matlack , Emanuele Giuseppe Esposito , Christian Borntraeger , Ricardo Koller , Eric Auger , Yanan Wang , Aaron Lewis , Jim Mattson , Oliver Upton , Vitaly Kuznetsov , Peter Shier , Axel Rasmussen , Zhenzhong Duan , "Maciej S. Szmigiero" , Like Xu , open list , "open list:KERNEL VIRTUAL MACHINE (KVM)" Subject: Re: [RFC PATCH 1/4] KVM: selftests: Add support for creating non-default type VMs Message-ID: References: <20210726183816.1343022-1-erdemaktas@google.com> <20210726183816.1343022-2-erdemaktas@google.com> <42a812a9-7f17-2a26-d289-1f921408a469@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04, 2021, Erdem Aktas wrote: > Thank you all for all that great feedback! I will include them in my v2. > > On Wed, Aug 4, 2021 at 7:46 AM Maxim Levitsky wrote: > > > > > > > Can we pass KVM_X86_LEGACY_VM (whatever name when it's upstreamed) > > > > > instead of 0? > > > > > I was originally thinking of doing this but Sean has suggested that we > should use 0 to make it arch-agnostic for creating default VMs. > +Sean Christopherson : What do you think? I hate passing '0', but KVM_X86_LEGACY_VM is worse because it's nonsensical for other architectures. > > > > KVM_X86_NORMAL_VM is a very good name IMHO as well. But that implies protected guests are abnormal! And KVM_X86_STANDARD_VM would imply protected guests are sub-standard! I'm only half-joking, e.g. if we get to the point where the majority of guests being run are protected guests, then !protected guests are no longer the "standard". Looking at other architectures, I think the least awful option is a generic KVM_VM_TYPE_AUTO, or maybe KVM_VM_TYPE_DEFAULT. That aligns with how '0' is used by PPC, MIPS, and arm64[*], and would work for x86 as well without implying what's normal/standard. [*] arm64 uses the type to specify the IPA width (I'm not even sure what that is), but thankfully interprets '0' as a default.