Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp32683pxt; Wed, 4 Aug 2021 14:57:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZD+t78+V/+bpWhraj4mxWZRSfEzSOKswQarhxshv4Ekl/TQf2tkAaK0vcHLWALBJSntX9 X-Received: by 2002:a17:906:4b56:: with SMTP id j22mr1233577ejv.551.1628114260798; Wed, 04 Aug 2021 14:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628114260; cv=none; d=google.com; s=arc-20160816; b=H3HSztrwBRORTgxNlqARV03TcZmVv0AF7LW0a3KdKlqWUckvVgMuiPyS6x95sei0Ga q1oq/5JNAstIFmxF83oIFrluFOTR3y9ZiohQB9RkJDbpqdBtekYUEe416b44IFpo6Yfo saoH6pOBaTst67I/lNH+AU+KDOdVLzvdcYCBX/OkLM0TdXnGBud0H8lh3dY63sKuNmVd 4yR7B+uFDyGHna8YBD9KT11qFr64aWTlZ1Ght8AOkoeNYum/fIIP/T8CumJYaf/5Zeg+ B+VHM9e5r/0Dz+vAaWAg4boozdPTYZeELq6yPfqWpLKWC6zHZR2O/MRnNZW1+6O2Cmn+ 1vpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ay2VkZp1QSgjgUuaKlnv5Qoem62OrDMpCDFTC9mEKKs=; b=lLBd3gI2EPiILPcdpX0A5rjWOyUzVt9VNPKx6rjpAe3yy/GlTaAaKExeZVyYM0gW7Z Sg1HnJZMOUdpygmKjqbbGGfIgMDvMu2foVsgssimooCWbyxFiFCO8kGs8zHHYg/RZBaP KPyGkm6OdI1cy6MI/M3gcpyBHpswoaMNGW1P2HTLcVJG+fnBPx/Em//wDbMd3fiSEPIi UdoltKTfysT0+QfIiQHvVKR5/4tF15gQkz681DBuLsoTcL0HQ7/UNPkYSWeOTRKFgcRo MTLSL1Nxt8C8EfrdlxygWEP5UrxJagmucJserVgEOhM4e/GP2EGNnCCHagUNpwP6u4/8 a64g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=h7uefQRX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz9si2170653ejb.406.2021.08.04.14.57.16; Wed, 04 Aug 2021 14:57:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=h7uefQRX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240880AbhHDUaX (ORCPT + 99 others); Wed, 4 Aug 2021 16:30:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240871AbhHDUaU (ORCPT ); Wed, 4 Aug 2021 16:30:20 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFA7C06179A for ; Wed, 4 Aug 2021 13:30:06 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id u2so4318070plg.10 for ; Wed, 04 Aug 2021 13:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ay2VkZp1QSgjgUuaKlnv5Qoem62OrDMpCDFTC9mEKKs=; b=h7uefQRXljacHpvf0siGwYGLJf0aZg9wL7lcZZD8SAP8NjZ/OatK0tjPjxlwXe7IMK 7xlwDJ96zOb5RrRMABauPXT1M/okb7U1zyItTZ4Qvh9n+DzioYOhUbOveIWEqhahz1oF WzK7+e+VBfH+31jV+jd76JPm2uM3+y24jwTti6Hs+LAhbLSlPQd7EbC3/aCstk6R19Xw q1IMZV8pNKwyIHlKt/fr0tSbGMYktdvBSycYWVNIAENTj39hF5VkmONe29adwj35Zezd NG070KRGEFXwBno8lVsOlGDUqHcxynthQu6Y/1kZxqPcG2jQwGHUu5XEr8J79OHlbOqt Px1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ay2VkZp1QSgjgUuaKlnv5Qoem62OrDMpCDFTC9mEKKs=; b=aBHMX7XgFDddmqiCXWuxyls+EvacU91kgkrl3UzMb87ESTr8D8YL4bCHFUB8z9gxQK OfZaJaet0RPftmPEFYjnzzERTw1iSsW+U3rKJ6lGjKOzaczHgMTcetQJl7X/E6zG+YBv dpIAICJOTU/QSd2pWhWOjLu+tqBXKnWKtPSeLxnPCxiaSylhxX2gMmNqG8fRsG2N0K/T 9w1eMLDtrolPm4kSXXQJjTqHyG9gKqoC03JJCw0KfRucnWHMxPzjeTDERcfJJYAZ3GK0 ZtLtVB1/lfvfJQG9q9SDQlEmQQhEu33ZV5gAnRe2dOJAv59+3bb/cAPjqAgEf7lds92G D4Pw== X-Gm-Message-State: AOAM531GIRC+WgSuldZbz8bhIdFLt3QbczUjqtlK8IOHpy+UYS64/R7F U4uFoo/d2C7x7iDGpeAFX8bApAWM78Hh7EE2Xn3sjQ== X-Received: by 2002:a17:90a:1208:: with SMTP id f8mr11602671pja.73.1628109005619; Wed, 04 Aug 2021 13:30:05 -0700 (PDT) MIME-Version: 1.0 References: <20210726183816.1343022-1-erdemaktas@google.com> <20210726183816.1343022-2-erdemaktas@google.com> <42a812a9-7f17-2a26-d289-1f921408a469@intel.com> In-Reply-To: From: Erdem Aktas Date: Wed, 4 Aug 2021 13:29:54 -0700 Message-ID: Subject: Re: [RFC PATCH 1/4] KVM: selftests: Add support for creating non-default type VMs To: Maxim Levitsky Cc: Xiaoyao Li , linux-kselftest@vger.kernel.org, Sean Christopherson , 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)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > KVM_X86_NORMAL_VM is a very good name IMHO as well. > Thanks! Sounds good to me. > For example: > > struct vm_options { > enum vm_guest_mode mode; > uint64_t phy_pages; > int perm; > int type; > }; > > struct kvm_vm *vm_create(const struct vm_options *options) > { > ... > } > I liked this idea, I will see if I can include it in my v2. Thank you so much again. -Erdem