From patchwork Mon Jul 22 12:07:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1963232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=v8VAVPSY; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=iQSLcJwK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WSJtr1MJGz1ybY for ; Mon, 22 Jul 2024 22:07:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CY+3QnLYqwwzwAiIO63h5NgZVa7yO+UoyDzXb7gd9Nk=; b=v8VAVPSYRGGjk1 Ee/QvkhqnSPbZJvFJx+SO1MWoIpg2fq6MC73NF++leKMP+MsZ648Gg5d7aYxm2IUHKZgs3hfMT/3f DBeGo6eq/tO0sf+tjXONjTJIIs6X3W+roP1qDW6zkkpAenjjUbDLVlGJVsoeiJzO/KByhcddgHWFs WwNPKQkvorlqPhVJJKXDFbccwMLkYCbpHjFBaxrkjW2/4fu846KKgeQc/Lhy9V9uCuKyspEDaBxWh 8GQtIu6HrVmUfC+bP03zSIMjTiIu+C4FUtSY4TojLOAk5XdjI1GmZJPlft39qXPgirKkgU8VT2IDY JHhP9XFBW1SAH+jwrWVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVrpC-00000009U2j-32eO; Mon, 22 Jul 2024 12:07:30 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVrp9-00000009U1G-39VS for kvm-riscv@lists.infradead.org; Mon, 22 Jul 2024 12:07:29 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-70362cb061aso2329708a34.1 for ; Mon, 22 Jul 2024 05:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1721650046; x=1722254846; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Pc3oH83451CeWS4VKLJb3/MW3Irx8Ealej33KWVBpwI=; b=iQSLcJwKp2lOmSPDUN45u3wOGgakp0ABC6ppJ7SkZUp8UAU2+tX5Eha/Eo4cROUNcA C+9A2Dt1/RLf3wvxuh6Uah42zNSawJGyEvyAhVpKLAYSzttf91SG+J+AszSkfT0IjPhX FgoZbD0wNkmZikfTGCrFUmOgfyUq9dcWVsXioqaRYyrNYphYsdqU4f8N0QF1B/YYFb2Q fJCLEvQeLYwf+wOFe5HsXwfVIL7D7jYBOMtuhI9p8NoJxnbWqhl2XXYlnswYAS7htK5H 9Eopp9Ka5JNuuO8Jgg6zcqFmEMC2OmVBZznEW8FG6x03j8JrhgsoqAEm2DCTvGtg0MkI 5XZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721650046; x=1722254846; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pc3oH83451CeWS4VKLJb3/MW3Irx8Ealej33KWVBpwI=; b=jCgAcUesqF48XXgQZBCrsko/XtiiqznfMulfoT62jrcAaWQB8fKyDSwHx/1hdu5eSd uHdeXTciPCYTGymX0BLFOtEkagH+qJnfbSSEBgODX1U6A68H5b8Vn6SEpOkwk40319gD jUxXL4C+aq+ckcvDgByl9YvsMo3h19lUb+rtNVjTupDhtloodA25hH0NJxQc9aKKpzeR kJh2wZP0NKs2KwQoh/sqqofJuUHH4KfMITYiwHwlgjXTKarQTc4b6hj19bHm8MhIbVfu b/GmXU9wVlzl+vO7lJh64eGsjTpDMyrY/cJ8Z37b4jzqKlck+EUJNN4vqJDdTrtdEKh6 GMfw== X-Forwarded-Encrypted: i=1; AJvYcCVRQv6JY4UZ/xSvQDJZO13jKAuIoOBb9uSgrxGgwGsR8Fjfby1f6NRVNt5GMpjhzf78RGt/SyKtE74cb9B0ZmNAKNChknbWGEsEmVeaLg== X-Gm-Message-State: AOJu0Yxi9lt+Ns80SmE3tP6xC4IApG23JiBQAXGYRDnn7uUdp5CigFyC pAmv+KZpDagTzkFLW4YBLJliTCEbeEAuGujc2RVKxyF4BEivoqIMDAs+Q/8e87w= X-Google-Smtp-Source: AGHT+IHkhQNZRas9Qwlpy57ngx+hVcVi1WrrqCMeumUU2P111hbOVtEutJ+buu4AVP32D/0iwHRqEg== X-Received: by 2002:a05:6870:3906:b0:260:f50e:923c with SMTP id 586e51a60fabf-2638dfb0105mr5842105fac.10.1721650046044; Mon, 22 Jul 2024 05:07:26 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2610ca48ca7sm1637855fac.42.2024.07.22.05.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 05:07:25 -0700 (PDT) From: Anup Patel To: Will Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Paolo Bonzini , Atish Patra , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Anup Patel Subject: [PATCH 1/2] Sync-up headers with Linux-6.10 kernel Date: Mon, 22 Jul 2024 17:37:09 +0530 Message-Id: <20240722120710.417705-2-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240722120710.417705-1-apatel@ventanamicro.com> References: <20240722120710.417705-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240722_050727_817317_C56CE449 X-CRM114-Status: GOOD ( 13.77 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: We sync-up Linux headers to get latest KVM RISC-V headers having Sscofpmf support. Signed-off-by: Anup Patel Anup Patel --- include/linux/kvm.h | 4 +- include/linux/virtio_net.h | 143 +++++++++++++++++++++++++++++++++++++ riscv/include/asm/kvm.h | 1 + x86/i [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:332 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We sync-up Linux headers to get latest KVM RISC-V headers having Sscofpmf support. Signed-off-by: Anup Patel Anup Patel --- include/linux/kvm.h | 4 +- include/linux/virtio_net.h | 143 +++++++++++++++++++++++++++++++++++++ riscv/include/asm/kvm.h | 1 + x86/include/asm/kvm.h | 22 +++++- 4 files changed, 166 insertions(+), 4 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 2190adb..d03842a 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -1221,9 +1221,9 @@ struct kvm_vfio_spapr_tce { /* Available with KVM_CAP_SPAPR_RESIZE_HPT */ #define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt) #define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt) -/* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_HASH_MMU_V3 */ +/* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */ #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg) -/* Available with KVM_CAP_PPC_RADIX_MMU */ +/* Available with KVM_CAP_PPC_MMU_RADIX */ #define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ #define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index cc65ef0..ac91747 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h @@ -56,6 +56,7 @@ #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow * Steering */ #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ +#define VIRTIO_NET_F_DEVICE_STATS 50 /* Device can provide device-level statistics. */ #define VIRTIO_NET_F_VQ_NOTF_COAL 52 /* Device supports virtqueue notification coalescing */ #define VIRTIO_NET_F_NOTF_COAL 53 /* Device supports notifications coalescing */ #define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */ @@ -406,4 +407,146 @@ struct virtio_net_ctrl_coal_vq { struct virtio_net_ctrl_coal coal; }; +/* + * Device Statistics + */ +#define VIRTIO_NET_CTRL_STATS 8 +#define VIRTIO_NET_CTRL_STATS_QUERY 0 +#define VIRTIO_NET_CTRL_STATS_GET 1 + +struct virtio_net_stats_capabilities { + +#define VIRTIO_NET_STATS_TYPE_CVQ (1ULL << 32) + +#define VIRTIO_NET_STATS_TYPE_RX_BASIC (1ULL << 0) +#define VIRTIO_NET_STATS_TYPE_RX_CSUM (1ULL << 1) +#define VIRTIO_NET_STATS_TYPE_RX_GSO (1ULL << 2) +#define VIRTIO_NET_STATS_TYPE_RX_SPEED (1ULL << 3) + +#define VIRTIO_NET_STATS_TYPE_TX_BASIC (1ULL << 16) +#define VIRTIO_NET_STATS_TYPE_TX_CSUM (1ULL << 17) +#define VIRTIO_NET_STATS_TYPE_TX_GSO (1ULL << 18) +#define VIRTIO_NET_STATS_TYPE_TX_SPEED (1ULL << 19) + + __le64 supported_stats_types[1]; +}; + +struct virtio_net_ctrl_queue_stats { + struct { + __le16 vq_index; + __le16 reserved[3]; + __le64 types_bitmap[1]; + } stats[1]; +}; + +struct virtio_net_stats_reply_hdr { +#define VIRTIO_NET_STATS_TYPE_REPLY_CVQ 32 + +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_BASIC 0 +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_CSUM 1 +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_GSO 2 +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_SPEED 3 + +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_BASIC 16 +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_CSUM 17 +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_GSO 18 +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_SPEED 19 + __u8 type; + __u8 reserved; + __le16 vq_index; + __le16 reserved1; + __le16 size; +}; + +struct virtio_net_stats_cvq { + struct virtio_net_stats_reply_hdr hdr; + + __le64 command_num; + __le64 ok_num; +}; + +struct virtio_net_stats_rx_basic { + struct virtio_net_stats_reply_hdr hdr; + + __le64 rx_notifications; + + __le64 rx_packets; + __le64 rx_bytes; + + __le64 rx_interrupts; + + __le64 rx_drops; + __le64 rx_drop_overruns; +}; + +struct virtio_net_stats_tx_basic { + struct virtio_net_stats_reply_hdr hdr; + + __le64 tx_notifications; + + __le64 tx_packets; + __le64 tx_bytes; + + __le64 tx_interrupts; + + __le64 tx_drops; + __le64 tx_drop_malformed; +}; + +struct virtio_net_stats_rx_csum { + struct virtio_net_stats_reply_hdr hdr; + + __le64 rx_csum_valid; + __le64 rx_needs_csum; + __le64 rx_csum_none; + __le64 rx_csum_bad; +}; + +struct virtio_net_stats_tx_csum { + struct virtio_net_stats_reply_hdr hdr; + + __le64 tx_csum_none; + __le64 tx_needs_csum; +}; + +struct virtio_net_stats_rx_gso { + struct virtio_net_stats_reply_hdr hdr; + + __le64 rx_gso_packets; + __le64 rx_gso_bytes; + __le64 rx_gso_packets_coalesced; + __le64 rx_gso_bytes_coalesced; +}; + +struct virtio_net_stats_tx_gso { + struct virtio_net_stats_reply_hdr hdr; + + __le64 tx_gso_packets; + __le64 tx_gso_bytes; + __le64 tx_gso_segments; + __le64 tx_gso_segments_bytes; + __le64 tx_gso_packets_noseg; + __le64 tx_gso_bytes_noseg; +}; + +struct virtio_net_stats_rx_speed { + struct virtio_net_stats_reply_hdr hdr; + + /* rx_{packets,bytes}_allowance_exceeded are too long. So rename to + * short name. + */ + __le64 rx_ratelimit_packets; + __le64 rx_ratelimit_bytes; +}; + +struct virtio_net_stats_tx_speed { + struct virtio_net_stats_reply_hdr hdr; + + /* tx_{packets,bytes}_allowance_exceeded are too long. So rename to + * short name. + */ + __le64 tx_ratelimit_packets; + __le64 tx_ratelimit_bytes; +}; + #endif /* _UAPI_LINUX_VIRTIO_NET_H */ diff --git a/riscv/include/asm/kvm.h b/riscv/include/asm/kvm.h index b1c503c..e878e7c 100644 --- a/riscv/include/asm/kvm.h +++ b/riscv/include/asm/kvm.h @@ -167,6 +167,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZFA, KVM_RISCV_ISA_EXT_ZTSO, KVM_RISCV_ISA_EXT_ZACAS, + KVM_RISCV_ISA_EXT_SSCOFPMF, KVM_RISCV_ISA_EXT_MAX, }; diff --git a/x86/include/asm/kvm.h b/x86/include/asm/kvm.h index ef11aa4..9fae1b7 100644 --- a/x86/include/asm/kvm.h +++ b/x86/include/asm/kvm.h @@ -457,8 +457,13 @@ struct kvm_sync_regs { #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001 -/* attributes for system fd (group 0) */ -#define KVM_X86_XCOMP_GUEST_SUPP 0 +/* vendor-independent attributes for system fd (group 0) */ +#define KVM_X86_GRP_SYSTEM 0 +# define KVM_X86_XCOMP_GUEST_SUPP 0 + +/* vendor-specific groups and attributes for system fd */ +#define KVM_X86_GRP_SEV 1 +# define KVM_X86_SEV_VMSA_FEATURES 0 struct kvm_vmx_nested_state_data { __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; @@ -689,6 +694,9 @@ enum sev_cmd_id { /* Guest Migration Extension */ KVM_SEV_SEND_CANCEL, + /* Second time is the charm; improved versions of the above ioctls. */ + KVM_SEV_INIT2, + KVM_SEV_NR_MAX, }; @@ -700,6 +708,14 @@ struct kvm_sev_cmd { __u32 sev_fd; }; +struct kvm_sev_init { + __u64 vmsa_features; + __u32 flags; + __u16 ghcb_version; + __u16 pad1; + __u32 pad2[8]; +}; + struct kvm_sev_launch_start { __u32 handle; __u32 policy; @@ -856,5 +872,7 @@ struct kvm_hyperv_eventfd { #define KVM_X86_DEFAULT_VM 0 #define KVM_X86_SW_PROTECTED_VM 1 +#define KVM_X86_SEV_VM 2 +#define KVM_X86_SEV_ES_VM 3 #endif /* _ASM_X86_KVM_H */ From patchwork Mon Jul 22 12:07:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1963234 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=JzY6AkPR; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=TsbcudME; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WSJtw4lR7z1ybY for ; Mon, 22 Jul 2024 22:07:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hB1O69sfqBFHDD6dzuGEdB8Ag/A6UGpGgrZ2cl+sZMo=; b=JzY6AkPRfY6gX8 +sQrsM9DWFZe2UUuDWDNaYsTxDbSqXD+qnIbk0w+mKNGGJQ43jhixholKDv7qMcaR1RLxZ9k16rX4 JtPJ1PdPntfw5anZ7IbZe3TIhtQrBaoFG/nMMHlid0mCPbNB5v4l3z0KMkXOZr5aRgg0pX42K1QkO GTnyg2nYUTVy9Bqe5P9R8Q8J0c88udU13BtWNmvvjF3UJ1dky03qg2YsSL+6bZdaovv8NScczSvr5 5ShuJRLGauAeC2GDM5maMJpQAM4ruFZVX4N1TTlzuhxY8cmR3fHdSp2eCbFZQiiJDwy05LFIQj1zG u1Ig3Rr6Cy+2cKyCfv8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVrpH-00000009U5S-1v0i; Mon, 22 Jul 2024 12:07:35 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVrpE-00000009U3a-490t for kvm-riscv@lists.infradead.org; Mon, 22 Jul 2024 12:07:34 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5d5846f7985so197688eaf.0 for ; Mon, 22 Jul 2024 05:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1721650051; x=1722254851; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oINtVjqt1HSId9RPGFIf1FQmhq9XpHG+7bXI6iFdSBA=; b=TsbcudME1qPNeEe+d8sNKoNQ7zzBfhVo2E8eD9XKGlYBMpVVt6qZA9CCj4kiK4sjgt MGqBUc914xc/glEBcYsxQjVteM0Al3kuNGthXyT3kvrWc4f8rC458Uf3bOz54Cfp5r6V qzW3ZEUAsLbkvOlNBUjA/9XT2ya3c1BLhb3/GS333xYsWQQzKW2XMKlMfowZl67tDciu zcX9KFLaI4OjmXwo+7N1eFAddttJzWAPqAe81Ycp2AxOjjdcuu7YCtxrzUT22mW0JBGd VLtSFHOq7Zw38NfckfqxoCg0sLvzFptlBbhFY/w7BQy/DD4Q7obQfDy2N5ayycV94mYF ouSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721650051; x=1722254851; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oINtVjqt1HSId9RPGFIf1FQmhq9XpHG+7bXI6iFdSBA=; b=o/Gp3hWjS1Js9kdxuGUZDBt91KixM1vJwdr3xUfG/Mi7SLMgED/DmFXp6afzsfN8lg zaB9JF2k9A9rW6BDGMoarHKTNfvFev06J2nc8A/0d47G2Z4I4YDWqy4qQde1GvfIKQlj gbhJh4Wb9Gs7WzZbQp6rQCtabQqYtuAk1XOjRbEJwkQQy2KzuiyJyew6OI3O9waEMNdJ jT91B9Ft5rMie1SOb1al+EXEFhn1/DgYz76BzmA5w1mjL8dG5L9mYGgR0nlEuRUQEwnU FiRx8SOBJrxMwjbOSzzgXvIRN8n8t39iYddiVCpKDFAL7Kd7vipI8J9uzbw8RnXJ7kgU 8O3w== X-Forwarded-Encrypted: i=1; AJvYcCWJGjUjd6Ak8kBbixxsUrS2psfXdxc2j26HcZBVUc9HPVOsLqpUWqQZb2hkwL0vkcFEzd5UAEOx71KmI2tYsxqHb2/mIiTcHPGTbEBznQ== X-Gm-Message-State: AOJu0Yx9hNc/ztzAM/vYi/cbQ3riefVn1pUyy/KQuFDE9oomOy4Z0UAN yEK5BDvrxvRXwy8o3/f9hF707EQp8deAnaTm+Xfe9JhORMO3q1hN0ADVidMJ+WU= X-Google-Smtp-Source: AGHT+IHImhwhvolmmy2sBZPMZpyM6vGlKj86Ic5s52AyVDUesOqmbnZKOKiGH1rTCTchEcUwJ7q4LA== X-Received: by 2002:a05:6870:65a9:b0:25d:fdc4:8587 with SMTP id 586e51a60fabf-263ab5d2b8emr4937622fac.37.1721650051034; Mon, 22 Jul 2024 05:07:31 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2610ca48ca7sm1637855fac.42.2024.07.22.05.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 05:07:30 -0700 (PDT) From: Anup Patel To: Will Deacon , julien.thierry.kdev@gmail.com, maz@kernel.org Cc: Paolo Bonzini , Atish Patra , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Atish Patra , Anup Patel Subject: [PATCH 2/2] riscv: Add Sscofpmf extensiona support Date: Mon, 22 Jul 2024 17:37:10 +0530 Message-Id: <20240722120710.417705-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240722120710.417705-1-apatel@ventanamicro.com> References: <20240722120710.417705-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240722_050733_069343_1276114B X-CRM114-Status: GOOD ( 10.40 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Atish Patra When the Sscofpmf extension is available expose it to the guest via device tree so that guest can use it. Signed-off-by: Atish Patra Signed-off-by: Anup Patel --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:c36 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Atish Patra When the Sscofpmf extension is available expose it to the guest via device tree so that guest can use it. Signed-off-by: Atish Patra Signed-off-by: Anup Patel --- riscv/fdt.c | 1 + riscv/include/kvm/kvm-config-arch.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/riscv/fdt.c b/riscv/fdt.c index cf367b9..e331f80 100644 --- a/riscv/fdt.c +++ b/riscv/fdt.c @@ -18,6 +18,7 @@ struct isa_ext_info isa_info_arr[] = { /* sorted alphabetically */ {"smstateen", KVM_RISCV_ISA_EXT_SMSTATEEN}, {"ssaia", KVM_RISCV_ISA_EXT_SSAIA}, + {"sscofpmf", KVM_RISCV_ISA_EXT_SSCOFPMF}, {"sstc", KVM_RISCV_ISA_EXT_SSTC}, {"svinval", KVM_RISCV_ISA_EXT_SVINVAL}, {"svnapot", KVM_RISCV_ISA_EXT_SVNAPOT}, diff --git a/riscv/include/kvm/kvm-config-arch.h b/riscv/include/kvm/kvm-config-arch.h index 17f0ceb..3fbc4f7 100644 --- a/riscv/include/kvm/kvm-config-arch.h +++ b/riscv/include/kvm/kvm-config-arch.h @@ -31,6 +31,9 @@ struct kvm_config_arch { OPT_BOOLEAN('\0', "disable-ssaia", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSAIA], \ "Disable Ssaia Extension"), \ + OPT_BOOLEAN('\0', "disable-sscofpmf", \ + &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSCOFPMF], \ + "Disable Sscofpmf Extension"), \ OPT_BOOLEAN('\0', "disable-sstc", \ &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSTC], \ "Disable Sstc Extension"), \