From patchwork Tue Jun 17 16:33:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 897386 Delivered-To: patch@linaro.org Received: by 2002:adf:9b99:0:b0:3a4:ee3f:8f15 with SMTP id d25csp2246606wrc; Tue, 17 Jun 2025 09:37:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWI6G+lQd2XHapz2IRjsmJxzLAQPGJqOA+cFhQrW2G2PaxMICfESJuITdhzNH9i49LZZmtHZw==@linaro.org X-Google-Smtp-Source: AGHT+IF3HnVQk0EMmKO9/qFowlvsQLATqPYM+695dykBWiZ0H0kOp9UQ+VXQ5SV/skI2p95VQSS9 X-Received: by 2002:a05:620a:a014:b0:7d3:dd54:2a28 with SMTP id af79cd13be357-7d3dd542c6amr508156685a.40.1750178232780; Tue, 17 Jun 2025 09:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750178232; cv=none; d=google.com; s=arc-20240605; b=kpiVyshhtm68iKaCLkRpIH51SkcEfgI9osYqMC+BXz4BFrnDrgcnFSoZyCTt49SXra KsR9nCJxqXwA0TNEmqgU7E/+F79L5GW0Q+T8xexodpUT8KSRdqXBEtC3CpVtZ/9IV2sg j1qyhy370FsSQCwNOaizhxEbO0o6r75w6k0BYh12sVuwNGj0gjFIVEY9h6r86WIYePcU CbdDPai4heJ3+qYWTACi2b2CwQolRc3yC4s/KR2nx0B4OfMvb9BwhlHtBudgS6CF0EFR 1/eAlifqgm1yGouEXfupFT2ZYDAkKsy+IOZSKrttFj3r2k/RaEcPh1iYUsIK4X1EWlGl Dhiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QKHVjbEZEAlGzEnK1mT5V15dOYDZALJJ9P4ZN2AdSHE=; fh=CysBbgsazybhgHwNDtjR43A6u/TnfAIXG8xcQOkv9c0=; b=dYMX3ZnfPbPQDgTU+jJXfUWb3Iqk1eRsene6MM50r6XD1uFzc3Iu6HKMAoJxWeQKtI qKSKEiwtyGBIdu90Sd2g5qsSWvO4mi8POXXAgZKT8DoayUrDLqiqRNZnUUYsgtY/ZByu d8CARjB1xS4t+asL6izDvyntTGwEvF8j7ldO/yuGSpNO5v2RU+p1p2HaMOn/wZcTRzan i3Bvgh9kPzN6D9wW+QeyIDdHXsWOFHfPyJiYRB4/5WgETeT/Wbc6+ugYUe6Rimli6Rvu F+47jFveBp7l4ceSGJarbtNza+34+md1xZSwlk2uFIDwFDZj/l8jx4g7UwI2xBpXJnZd X/sg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vjOqLM4v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d3b8eca184si1227263785a.293.2025.06.17.09.37.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jun 2025 09:37:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vjOqLM4v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uRZHE-0001Lr-Fq; Tue, 17 Jun 2025 12:35:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uRZG5-0000lQ-M7 for qemu-devel@nongnu.org; Tue, 17 Jun 2025 12:34:08 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uRZG0-0000d6-K5 for qemu-devel@nongnu.org; Tue, 17 Jun 2025 12:33:59 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4531e146a24so36920995e9.0 for ; Tue, 17 Jun 2025 09:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750178035; x=1750782835; darn=nongnu.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=QKHVjbEZEAlGzEnK1mT5V15dOYDZALJJ9P4ZN2AdSHE=; b=vjOqLM4vNS0Lacmf4nB+l3uVgl5UZ/wJqJ+G8Xfu1u4pyrRFX45dzwXX74K9BFEfUk kem2uO0mjam3j9xFFvUG7gtfEDLMEGgMomL5O/VdXY98RxbpQ3J7JHR7mqlRe5xLKAdv cfxUZXDVPw1eVhMXIM7cADXw1hdBfN9GGvWi5ISs8XV95klaEe3zv3THqNT7dt5JQE80 jR6iQa9NFK63Ir5bTWHEbC6Zf711861irRHIw3pcKFglvnw9hej12rHFiXvd/zQoeZEW OXGbomsa+OnbK9ljMHctDsF5HqyfioQSR0eXg5sUSSu4z0lC+ZJfPl3zuBSl9vbshkYo hjgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750178035; x=1750782835; 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=QKHVjbEZEAlGzEnK1mT5V15dOYDZALJJ9P4ZN2AdSHE=; b=MaQGq3R7Rj+QQ1D6YH9kwCzNWy+luU+8Zv0wNCwd36p5V3qiSt/cfcuhT86SpA/II5 Q2JqJXrP0jeSfH1wzjsxUKaki05ukIcNzb6zP4/dR+AtLY+G+H8Fuxq0Wwww3hLEbaOJ y3/0JFcZwB7DANueVq+PtEuymG64T/nysOg2RGJrtwOQJgC1b7vnfwWiCPHeVWanoqrb oHcRqEeHKUl4rSr0dM8L8X7iV8jlR0AhfkkwktVP5xvVQX6A2u+styYUAT8At+bWIBSf gDRa/fEBMvRD6lVBNhAvoF0j7d0R8IS2cVEi+RchuN5lNbNL7QOiNAZ4+LY4awp7TPYG JwwA== X-Gm-Message-State: AOJu0YzrbTXIuBI98DobomV+dl2rmWJ6L2zJnF2AsnS7s5LM6ltpadoF OUw9Qe1dsYK47ojhPqdB84/1RsVnXHCjb3fmIRTsN+8r7F/xWfGpkxEjXERgADKInkM= X-Gm-Gg: ASbGncsrnxdkZIrFHfd3Hui69QpGRy5WgZr1H3Q+tgRawqy3ty0EwkoNrHyq0siLu/t UciDrS/ayf0940oARIu9UkQK2xZzkysbZUXQh3elRuWg7nxGej3PcsyOtcIZxlzJalxMX2vErUL 17YVMpfvVxLO81Yx2mCiwKCmGAGjoa+iP6XrgypE4fsJLVD4lDRqaLrZf9hqzJZyyx4CY9tsV+m hiV4Jp5I5m3H0U3Akahb+1ARJi2J+uoe68iXRX+geVcGWai/zDmMdR1qan3fmK3+3CSO4zmdXUX T7tu6DXUM296Bz1K3RVJo70Gro9WWaOugO9Bwzintuvr6xX627G1HWZRtd1orYo= X-Received: by 2002:a05:600c:1d06:b0:43c:e7ae:4bcf with SMTP id 5b1f17b1804b1-4533c9bf9e2mr148215485e9.0.1750178034971; Tue, 17 Jun 2025 09:33:54 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a7e980sm14106592f8f.41.2025.06.17.09.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 09:33:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2E6FE5F878; Tue, 17 Jun 2025 17:33:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cornelia Huck , qemu-arm@nongnu.org, Mark Burton , "Michael S. Tsirkin" , Alexander Graf , kvm@vger.kernel.org, Peter Maydell , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Subject: [RFC PATCH 03/11] linux-headers: Update to Linux 6.15.1 with trap-mem-harder (WIP) Date: Tue, 17 Jun 2025 17:33:43 +0100 Message-ID: <20250617163351.2640572-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250617163351.2640572-1-alex.bennee@linaro.org> References: <20250617163351.2640572-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Import headers for trap-me-harder, based on 6.15.1. Signed-off-by: Alex Bennée --- include/standard-headers/linux/virtio_pci.h | 1 + linux-headers/linux/kvm.h | 8 ++++++++ linux-headers/linux/vhost.h | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/standard-headers/linux/virtio_pci.h b/include/standard-headers/linux/virtio_pci.h index 91fec6f502..09e964e6ee 100644 --- a/include/standard-headers/linux/virtio_pci.h +++ b/include/standard-headers/linux/virtio_pci.h @@ -246,6 +246,7 @@ struct virtio_pci_cfg_cap { #define VIRTIO_ADMIN_CMD_LIST_USE 0x1 /* Admin command group type. */ +#define VIRTIO_ADMIN_GROUP_TYPE_SELF 0x0 #define VIRTIO_ADMIN_GROUP_TYPE_SRIOV 0x1 /* Transitional device admin command. */ diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 99cc82a275..bb51fb179b 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -178,6 +178,7 @@ struct kvm_xen_exit { #define KVM_EXIT_NOTIFY 37 #define KVM_EXIT_LOONGARCH_IOCSR 38 #define KVM_EXIT_MEMORY_FAULT 39 +#define KVM_EXIT_ARM_TRAP_HARDER 40 /* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */ @@ -439,6 +440,12 @@ struct kvm_run { __u64 gpa; __u64 size; } memory_fault; + /* KVM_EXIT_ARM_TRAP_HARDER */ + struct { + __u64 esr; + __u64 elr; + __u64 far; + } arm_trap_harder; /* Fix the size of the union. */ char padding[256]; }; @@ -645,6 +652,7 @@ struct kvm_enable_cap { #define KVM_VM_TYPE_ARM_IPA_SIZE_MASK 0xffULL #define KVM_VM_TYPE_ARM_IPA_SIZE(x) \ ((x) & KVM_VM_TYPE_ARM_IPA_SIZE_MASK) +#define KVM_VM_TYPE_ARM_TRAP_ALL 0x10000ULL /* * ioctls for /dev/kvm fds: */ diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index b95dd84eef..d4b3e2ae13 100644 --- a/linux-headers/linux/vhost.h +++ b/linux-headers/linux/vhost.h @@ -28,10 +28,10 @@ /* Set current process as the (exclusive) owner of this file descriptor. This * must be called before any other vhost command. Further calls to - * VHOST_OWNER_SET fail until VHOST_OWNER_RESET is called. */ + * VHOST_SET_OWNER fail until VHOST_RESET_OWNER is called. */ #define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01) /* Give up ownership, and reset the device to default values. - * Allows subsequent call to VHOST_OWNER_SET to succeed. */ + * Allows subsequent call to VHOST_SET_OWNER to succeed. */ #define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02) /* Set up/modify memory layout */