From nobody Sat Jul 5 00:05:43 2025 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652379847; cv=none; d=zohomail.com; s=zohoarc; b=DnOROLuvYwpKNmeFlWfezwU1A6es9ZeuXfl/0AYY6MXu5YGyF1PynWDcgeUK6GlVjbs21FBEYQM2F95b0UwkE9EyMMuzSFEjH9MvFyShnbjEkGoCE/+taVFG77avDYEnkdjOw/vQFV6jwwNRRVFzR29seWgc6B6u+LnRU9ah6iQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652379847; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oXN0OHQHHsRbWMq5ZyAqo7Wdm4LtAIbTrGoNAoov4rc=; b=i/tNmPG4RNtH9fL16Mr+fOaPnzYPdjyhPfm4XNzmbC8ZsGEXnwr1I3o75JVuHnmrdsh5vLN7piEzAUoYJFj3JStEz1TX7Up1OrOCLsusk78kmNIbNSqglsm8+gyIvljjXmoewypUtdpM/tgdc9V33fD13HPv8TSv2N6HlfBSWXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1652379847798892.0896082258557; Thu, 12 May 2022 11:24:07 -0700 (PDT) Received: from localhost ([::1]:50618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npDTq-0007aV-Cg for importer2@patchew.org; Thu, 12 May 2022 14:24:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npCZm-0005Hs-Nv for qemu-devel@nongnu.org; Thu, 12 May 2022 13:26:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:55460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npCZl-0005IM-7R for qemu-devel@nongnu.org; Thu, 12 May 2022 13:26:10 -0400 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-78-tZzRwIF2MIueisrvkEVUsQ-1; Thu, 12 May 2022 13:26:07 -0400 Received: by mail-ed1-f70.google.com with SMTP id t25-20020a508d59000000b00425d86c2987so3463780edt.21 for ; Thu, 12 May 2022 10:26:07 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n19-20020a05640206d300b0042617ba63absm2787433edy.53.2022.05.12.10.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 10:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652376368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oXN0OHQHHsRbWMq5ZyAqo7Wdm4LtAIbTrGoNAoov4rc=; b=L2KAfH1uINqUHHOCHv3BEaJamITF7weleSEdap3JqYgu4+vM1djJBwP6wU+i+cA6BjtsRN prhA7hUUqSnnyEs5ggpPAdFS464W6mUAlMkdVnSliVRJEn6I+XRKccJl2QR9d3VVKIXW4d ZKSBPqce9VgiBh5UnfjocviD6/6qMVA= X-MC-Unique: tZzRwIF2MIueisrvkEVUsQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oXN0OHQHHsRbWMq5ZyAqo7Wdm4LtAIbTrGoNAoov4rc=; b=SLQtp/HCZUePcb77hVKp2C0zSccmV1b4Xj4OJILgV8E3pStsZeM+lEnMJWrNSgGMjg M/8FnY/uSOyHcn7BN0BL/auHe35lf+MUe0dN3LbMkgKiDxpjhx7QSqruukN6JSxuLFo7 wlEyPmFmDfRj6ZlkRhBN20PCc/ygX+De8AjafG5KZ4rDNePXmozVKleEugcXyWOeAV9c SwxglYBDN3BwlAUUQlcyvO6wL4vg/ngQaENwhu27yb2RHuNV55JGjVJBgEndiF7TmYj0 Ij0Qx3QQVMY2LQ2opikbwIcmmeiJyhZm4fNmv79FpHyejT7vvDOuy7bN+UtjzQqPZBA1 O7eg== X-Gm-Message-State: AOAM5311KFLCLnOH39aIWraYDnguUl+H1nINnMfYdFUn28Zor9v72zpr DFIP9fM7HZWIO+rA+wwauGdIW96KVhcNwk9FXpwwzAY7Z3SWP/OUula5FUN8Of2RdV2DGcKPJFs XwBy1FRJz+xjpU+k7LQDg83q+Q6+VikhSpYwCXlu8VQAQIQGbAWaYXeO5U/PqaH+EJ0Q= X-Received: by 2002:a17:907:8a17:b0:6f4:4b56:f550 with SMTP id sc23-20020a1709078a1700b006f44b56f550mr879451ejc.720.1652376365770; Thu, 12 May 2022 10:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWh5s+ui0q29t2uQwp5XhkJLe8FHbNicsVBZaXFaenaK/ztISCPMl6XcYcTlviSuN5G4Wbqg== X-Received: by 2002:a17:907:8a17:b0:6f4:4b56:f550 with SMTP id sc23-20020a1709078a1700b006f44b56f550mr879432ejc.720.1652376365500; Thu, 12 May 2022 10:26:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 27/27] vmxcap: add tertiary execution controls Date: Thu, 12 May 2022 19:25:05 +0200 Message-Id: <20220512172505.1065394-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220512172505.1065394-1-pbonzini@redhat.com> References: <20220512172505.1065394-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652379849084100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- scripts/kvm/vmxcap | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index f140040104..ce27f5e635 100755 --- a/scripts/kvm/vmxcap +++ b/scripts/kvm/vmxcap @@ -23,6 +23,7 @@ MSR_IA32_VMX_TRUE_PROCBASED_CTLS =3D 0x48E MSR_IA32_VMX_TRUE_EXIT_CTLS =3D 0x48F MSR_IA32_VMX_TRUE_ENTRY_CTLS =3D 0x490 MSR_IA32_VMX_VMFUNC =3D 0x491 +MSR_IA32_VMX_PROCBASED_CTLS3 =3D 0x492 =20 class msr(object): def __init__(self): @@ -71,6 +72,13 @@ class Control(object): s =3D 'yes' print(' %-40s %s' % (self.bits[bit], s)) =20 +# All 64 bits in the tertiary controls MSR are allowed-1 +class Allowed1Control(Control): + def read2(self, nr): + m =3D msr() + val =3D m.read(nr, 0) + return (0, val) + class Misc(object): def __init__(self, name, bits, msr): self.name =3D name @@ -135,6 +143,7 @@ controls =3D [ 12: 'RDTSC exiting', 15: 'CR3-load exiting', 16: 'CR3-store exiting', + 17: 'Activate tertiary controls', 19: 'CR8-load exiting', 20: 'CR8-store exiting', 21: 'Use TPR shadow', @@ -186,6 +195,14 @@ controls =3D [ cap_msr =3D MSR_IA32_VMX_PROCBASED_CTLS2, ), =20 + Allowed1Control( + name =3D 'tertiary processor-based controls', + bits =3D { + 4: 'Enable IPI virtualization' + }, + cap_msr =3D MSR_IA32_VMX_PROCBASED_CTLS3, + ), + Control( name =3D 'VM-Exit controls', bits =3D { --=20 2.36.0