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=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 4A21BC433E6 for ; Fri, 19 Feb 2021 16:04:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE15264EB8 for ; Fri, 19 Feb 2021 16:04:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE15264EB8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nuviainc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lD8GI-0002Y1-Pr for qemu-devel@archiver.kernel.org; Fri, 19 Feb 2021 11:04:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lD85U-0000Mb-9M for qemu-devel@nongnu.org; Fri, 19 Feb 2021 10:53:00 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:37983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lD85Q-0005sz-L9 for qemu-devel@nongnu.org; Fri, 19 Feb 2021 10:52:59 -0500 Received: by mail-wr1-x42d.google.com with SMTP id b3so9189815wrj.5 for ; Fri, 19 Feb 2021 07:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=WhPUHSs4T9cXX97zhzREpOXd4KMBJQv/1Ai9SXBR/QA=; b=bRWIM05mSfw2r8r3Plqwee0BmlXL6QnwXDyT+vYt8o4VKmGgLGJaSIRF+AP4Hziibr QPJTBeynsLtcOI+/IZ91a3RFBrPnC1WlyzDWvPx+psXudkn7oh6clx4DKYGO6CBGJA9c siP6l5pC2TFJFmEcB+oCZQPZpmMGbg1t2fNNNFgSVe4J/+mMNNhQHJOGgDXuzsfr07wk FpKdyUmhUAJVmC2CrIItaE4pQsknituVZ+2ixWxLB07XGQ3RoY+UdV0bwpuLQm+sDVuD vMoCdTotWu7WF7te3A0lEMdB8bYmm+0+5lea8bstHxl30dghAyu6h2e0V2Sv2hOzLX+K iTXQ== 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:content-transfer-encoding :in-reply-to:user-agent; bh=WhPUHSs4T9cXX97zhzREpOXd4KMBJQv/1Ai9SXBR/QA=; b=dJCzBqPOI1AwxyweYNkf+GaFVl/MKOrl8n1xlG/AkSdQU8rFv3hbf3L2AWjZtjR/Lf 5tijPi8S8XfFKxzOthsv3IS/nuk3Yvln1bGXX3G+XUuFHH5MFse9XjWg7cMghzZjVv+7 vQWXV2kVe6fvzsaWJ3EFN68xlQ4YPaDmipz6obIu2bgQt5mxpK/l054RPGQy56xbVXW+ v0K6X92bcOu1KdkUKiv2LNQrNP/HLLc8DPikc8VIL919xXtJExT8ns042/F5Xa4qwvUB eoqauFtjPXJ/7+i/oHVw3vywV1rV+x2gUk2hStjiYCpL14UB1kTWCVXwCxzEn789VgvM yT3A== X-Gm-Message-State: AOAM530Y5BE8NOMQEEs3XjZH/tuWhaPhJeRN33/qfJ5rRx6NP3ufytfk T6tYtz90+sTC1dVKg/Sla+Y3Bg== X-Google-Smtp-Source: ABdhPJwnWhNhoDaxHqROe4roZNOGcCHVsI4jwjNi+CQIRRgeH8Nl1IWOlIH26JAAV86IirRJ71O3SQ== X-Received: by 2002:a5d:4b84:: with SMTP id b4mr9943957wrt.50.1613749974441; Fri, 19 Feb 2021 07:52:54 -0800 (PST) Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id l17sm2265039wmq.46.2021.02.19.07.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 07:52:53 -0800 (PST) Date: Fri, 19 Feb 2021 15:52:51 +0000 From: Leif Lindholm To: Peter Maydell Subject: Re: [PATCH 2/7] hw/boards: Introduce 'kvm_supported' field to MachineClass Message-ID: <20210219155251.GI1664@vanye> References: <20210219114428.1936109-1-philmd@redhat.com> <20210219114428.1936109-3-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=leif@nuviainc.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , kvm-devel , David Hildenbrand , Mark Cave-Ayland , Aleksandar Rikalo , "Edgar E. Iglesias" , Huacai Chen , Halil Pasic , Christian Borntraeger , =?iso-8859-1?Q?Herv=E9?= Poussineau , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Thomas Huth , Eduardo Habkost , Alistair Francis , Richard Henderson , Greg Kurz , QEMU Developers , qemu-s390x , qemu-arm , David Gibson , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Radoslaw Biernacki , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , qemu-ppc , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Fri, Feb 19, 2021 at 12:08:05 +0000, Peter Maydell wrote: > On Fri, 19 Feb 2021 at 11:58, Daniel P. Berrangé wrote: > > Is the behaviour reported really related to KVM specifically, as opposed > > to all hardware based virt backends ? > > > > eg is it actually a case of some machine types being "tcg_only" ? > > Interesting question. At least for Arm the major items are: > * does the accelerator support emulation of EL3/TrustZone? > (KVM doesn't; this is the proximate cause of the assertion > failure if you try to enable KVM for the raspi boards.) > * does the board type require a particular CPU type which > KVM doesn't/can't support? > Non-KVM accelerators could at least in theory have different answers > to those questions, though in practice I think they do not. > > I think my take is that we probably should mark the boards > as 'tcg-only' vs 'not-tcg-only', because in practice that's > the interesting distinction. Specifically, our security policy > https://qemu.readthedocs.io/en/latest/system/security.html > draws a boundary between "virtualization use case" and > "emulated", so it's really helpful to be able to say clearly > "this board model does not support virtualization, and therefore > any bugs in it or its devices are simply outside the realm of > being security issues" when doing analysis of the codebase or > when writing or reviewing new code. Yes. This applies to sbsa-ref, for example. We explicitly want to start in EL3, so no KVM for us. / Leif > If we ever have support for some new accelerator type where there's > a board type distinction between KVM and that new accelerator and > it makes sense to try to say "this board is supported by the new > thing even though it won't work with KVM", the folks interested in > adding that new accelerator will have the motivation to look > into exactly which boards they want to enable support for and > can add a funky_accelerator_supported flag or whatever at that time. > > Summary: we should name this machine class field > "virtualization_supported" and check it in all the virtualization > accelerators (kvm, hvf, whpx, xen). > > thanks > -- PMM