From patchwork Mon Feb 5 10:45:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13545210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4152FC48291 for ; Mon, 5 Feb 2024 10:45:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.675771.1051222 (Exim 4.92) (envelope-from ) id 1rWwTk-0006Uq-K9; Mon, 05 Feb 2024 10:45:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 675771.1051222; Mon, 05 Feb 2024 10:45:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwTk-0006Uj-HY; Mon, 05 Feb 2024 10:45:32 +0000 Received: by outflank-mailman (input) for mailman id 675771; Mon, 05 Feb 2024 10:45:31 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwTj-0006Ud-Kt for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 10:45:31 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ae75e977-c413-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 11:45:30 +0100 (CET) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5606f2107ebso1045610a12.1 for ; Mon, 05 Feb 2024 02:45:30 -0800 (PST) Received: from localhost.localdomain ([185.25.64.249]) by smtp.gmail.com with ESMTPSA id st10-20020a170907c08a00b00a36f7891799sm4137629ejc.193.2024.02.05.02.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:45:29 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ae75e977-c413-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1707129930; x=1707734730; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KFRLF/eDxgbHDTI7/GHRl3I+hTFf/BFZxPyQ0bGdHe8=; b=QaQkvvKu40zmNYr3wK07W236H9j17Li3ElDA9v76rktEmIfdMXlUKJHJlgNadnmJ8u FTjjyAM9gHv7KhHVwS5NFKoGyvIXmGkeUhc+jhmW9qisaGdVjlrL3hiOnnKijuirEVcZ 6ryjyOGfA3lCx4ZieD75YzJwUkTMyPvE6+Qjo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707129930; x=1707734730; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KFRLF/eDxgbHDTI7/GHRl3I+hTFf/BFZxPyQ0bGdHe8=; b=TVDLDPHSUQa/ErGebz7YX64U+QTiF0oYbhSIjX9nxzbSvkyX+wabeUXGSqqFuKkgUS 2YxoV9SRytOOD5qbQ/+IQhfioJtnvqFHQyZryXdS4XS8RUceS9GrmNmm8ulCI0gKS83V Qwfdt0LwpC6IoTStlfVTRTzMsv367ktU5ILv1ZO5nP1b3ogxCjsdRnJVrj4CHqhebJfW neyPmLUFyC/GAcCOqf0lwY5H3UmK+4Xi2UjQ5YcOrx3A/XfCYsQya4fZd7BrGvt3omuS hOVMGeZVrVR6iTjpy3FLw4vlTuzkQGydF1oxEgf+yhKsOjuz7BpUDMGaxzn/x7jPUY93 85OQ== X-Gm-Message-State: AOJu0Yw5H4UA0n8qhbvvcV8Ua0Rwq2daItmLRZ1McApX29OE/XHvh9f0 oFLxpa0gD6QS4O4F0zasI7VXuYwqF4lgteZkJsRzp//Eev5lK9rj+MQfmvXudNRUehcH2HguKu8 fc4ev7g== X-Google-Smtp-Source: AGHT+IHnzcS/aHFsA8Lz6lv0ncTPBBlXB9hZV/8pptAbo5+iwwJyGv0h9ZJFqEAj3VnHRjBASzhXeA== X-Received: by 2002:a17:906:5647:b0:a34:9d98:ac1f with SMTP id v7-20020a170906564700b00a349d98ac1fmr6926315ejr.24.1707129930225; Mon, 05 Feb 2024 02:45:30 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWHQYT6OFTXRTQpovzE1OQK79KJxFz9IJZd+StjlMDMHgTfvS7pKpWFLc8ExpKIcf73WbY26B3pu3NcIvD7ZK95+WrpUOH4YQCzTkl6YrJveqzV2Vt8x+SVGWJcxHCnNbKdMSabqhqQBvemBqedibcwz6GSHmRGj/eREFEvnkWPCCBTvnO6u6Nem95vwSVLyjrcO/F0TDn/AXYn4tGZ40F4ECUVaaLJX63tHsU8wkIwCizL/M5vzNfvYwJC8pWofCCIbiqw6yHKbZ8O9oH6pGmLIOk= From: Frediano Ziglio To: Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , George Dunlap , Dario Faggioli , "Daniel P . Smith" Cc: xen-devel@lists.xenproject.org, Frediano Ziglio Subject: [PATCH 1/5] Constify some parameters Date: Mon, 5 Feb 2024 10:45:04 +0000 Message-Id: <20240205104504.14830-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Make clean they are not changed in the functions. Signed-off-by: Frediano Ziglio Reviewed-by: Jan Beulich --- xen/arch/x86/pv/callback.c | 4 ++-- xen/common/sched/compat.c | 2 +- xen/common/sched/core.c | 2 +- xen/xsm/flask/flask_op.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/pv/callback.c b/xen/arch/x86/pv/callback.c index 17829304fe..caec4fb16f 100644 --- a/xen/arch/x86/pv/callback.c +++ b/xen/arch/x86/pv/callback.c @@ -48,7 +48,7 @@ static void unregister_guest_nmi_callback(void) memset(t, 0, sizeof(*t)); } -static long register_guest_callback(struct callback_register *reg) +static long register_guest_callback(const struct callback_register *reg) { long ret = 0; struct vcpu *curr = current; @@ -102,7 +102,7 @@ static long register_guest_callback(struct callback_register *reg) return ret; } -static long unregister_guest_callback(struct callback_unregister *unreg) +static long unregister_guest_callback(const struct callback_unregister *unreg) { long ret; diff --git a/xen/common/sched/compat.c b/xen/common/sched/compat.c index dd97593630..a02204ec9a 100644 --- a/xen/common/sched/compat.c +++ b/xen/common/sched/compat.c @@ -26,7 +26,7 @@ CHECK_sched_shutdown; CHECK_sched_remote_shutdown; #undef xen_sched_remote_shutdown -static int compat_poll(struct compat_sched_poll *compat) +static int compat_poll(const struct compat_sched_poll *compat) { struct sched_poll native; diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index d177c675c8..c5db373972 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -1431,7 +1431,7 @@ static void vcpu_block_enable_events(void) vcpu_block(); } -static long do_poll(struct sched_poll *sched_poll) +static long do_poll(const struct sched_poll *sched_poll) { struct vcpu *v = current; struct domain *d = v->domain; diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c index b866e8d05f..ea7dd10dc8 100644 --- a/xen/xsm/flask/flask_op.c +++ b/xen/xsm/flask/flask_op.c @@ -469,7 +469,7 @@ static int flask_security_load(struct xen_flask_load *load) return ret; } -static int flask_devicetree_label(struct xen_flask_devicetree_label *arg) +static int flask_devicetree_label(const struct xen_flask_devicetree_label *arg) { int rv; char *buf; @@ -492,7 +492,7 @@ static int flask_devicetree_label(struct xen_flask_devicetree_label *arg) #ifndef COMPAT -static int flask_ocontext_del(struct xen_flask_ocontext *arg) +static int flask_ocontext_del(const struct xen_flask_ocontext *arg) { int rv; @@ -506,7 +506,7 @@ static int flask_ocontext_del(struct xen_flask_ocontext *arg) return security_ocontext_del(arg->ocon, arg->low, arg->high); } -static int flask_ocontext_add(struct xen_flask_ocontext *arg) +static int flask_ocontext_add(const struct xen_flask_ocontext *arg) { int rv; @@ -550,7 +550,7 @@ static int flask_get_peer_sid(struct xen_flask_peersid *arg) return rv; } -static int flask_relabel_domain(struct xen_flask_relabel *arg) +static int flask_relabel_domain(const struct xen_flask_relabel *arg) { int rc; struct domain *d; From patchwork Mon Feb 5 10:46:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13545211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BFC7C48291 for ; Mon, 5 Feb 2024 10:47:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.675775.1051233 (Exim 4.92) (envelope-from ) id 1rWwV6-00074Z-2v; Mon, 05 Feb 2024 10:46:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 675775.1051233; Mon, 05 Feb 2024 10:46:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwV6-00074Q-0C; Mon, 05 Feb 2024 10:46:56 +0000 Received: by outflank-mailman (input) for mailman id 675775; Mon, 05 Feb 2024 10:46:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwV4-00074G-BA for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 10:46:54 +0000 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [2a00:1450:4864:20::534]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id dfca4a3a-c413-11ee-8a45-1f161083a0e0; Mon, 05 Feb 2024 11:46:53 +0100 (CET) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-56001d49cc5so2785901a12.2 for ; Mon, 05 Feb 2024 02:46:53 -0800 (PST) Received: from localhost.localdomain ([185.25.64.249]) by smtp.gmail.com with ESMTPSA id ty24-20020a170907c71800b00a372a739731sm3409598ejc.45.2024.02.05.02.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:46:52 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: dfca4a3a-c413-11ee-8a45-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1707130013; x=1707734813; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SzenSDt43d9dKKfeFM0SDMDstPJFaTNqj96pw7JED8k=; b=W/p+LcO90q9l0VU7eVvx2W0lx0DImxZAmXC5LLtLOWpTmI1jZYbP6s32gsZMtFYj0Z Le/cEnYozgQJMjCDgUba0DKrFmoCRaQuavg5sXrfc2YQndCReuipWYqOIP5h8yZs3QIh zU3V0iDYNlmktFWKyfb7h61+Iw5EL5dgGfFD8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707130013; x=1707734813; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SzenSDt43d9dKKfeFM0SDMDstPJFaTNqj96pw7JED8k=; b=FuFiBcwuT+6TSv5R6inl13J9h4MFTGn4dKQlC0blsrq4nQ/U69ksvB+PS5OZ2RtQZH rsV00hQPQGe0DDYHA1C4rK8skQLyQUSBhp21lyZP8EucO5AkUmqKs9H544TgcNGQH/du OSo8N0dfeBvJtTWvnzMWz9V/uXCSiHbU520HyRRW8L6S5SHsE3oOOY23hXg42O7PzlUr Uo6q9CjHwmqCraBYCr/nRrbYnreyGWhIsORiBI3nHnZGJp9xsOM65nOI0ElfhkqREDOy sSZH1DWuwO2mtG2sk1lysBiyhNYEiXV5ZeqQYx014iyFKMiA2GfHfgRRUfkMHj6NyjdZ 5Asw== X-Gm-Message-State: AOJu0YysJSrIQP40BgqWEwhuRbJX6bWpjyH94KHsdM3uEQzEbGkACfVu +yS13vZcQzLSFkvTzdTJu858feCHHkVa4NjytzA5aPNjbDr47OYy5gm2wklKScE= X-Google-Smtp-Source: AGHT+IGpt7ONVCe4L9IOR0v5GCjP3NS8ipucmpxnpP8IN6nrT22e82WK+MJKeNOvIaSiGD1ieUkC8Q== X-Received: by 2002:a17:907:77d0:b0:a37:152e:2e61 with SMTP id kz16-20020a17090777d000b00a37152e2e61mr6562814ejc.71.1707130012924; Mon, 05 Feb 2024 02:46:52 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUq9xZccYn5t6aR5xhQOBUOB6URWktyY2MLQj+RFNhncs7AC8XGpc5ZJ8q8b9AxJqq5FOjIoJruXSeyy9HFIHwAyLA2/Wb0UZeYhZBFOVtidxKUAlRXBX9Xh9zkx2V4/ekj5veA5U3wuNvo/MYAOJD55/LB0Ul0cvMY4aVOg4Lsheg8QKMR6kjRtw8oe5/wMFhwcQ41l1yzTAfqgdNsLbQQ9U1AQgJuAAK4aw== From: Frediano Ziglio To: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Cc: xen-devel@lists.xenproject.org, Frediano Ziglio Subject: [PATCH 2/5] Remove useless assignment Date: Mon, 5 Feb 2024 10:46:37 +0000 Message-Id: <20240205104637.14868-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 The variable is assigned later, that value is never used. Signed-off-by: Frediano Ziglio Reviewed-by: Stefano Stabellini --- xen/common/event_channel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index a7a004a084..15aec5dcbb 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -324,8 +324,6 @@ int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc, evtchn_port_t port) goto out; } - rc = 0; - chn = evtchn_from_port(d, port); rc = xsm_evtchn_unbound(XSM_TARGET, d, chn, alloc->remote_dom); From patchwork Mon Feb 5 10:47:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13545212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 631F1C4828D for ; Mon, 5 Feb 2024 10:48:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.675778.1051244 (Exim 4.92) (envelope-from ) id 1rWwW8-0007n2-Dk; Mon, 05 Feb 2024 10:48:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 675778.1051244; Mon, 05 Feb 2024 10:48:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwW8-0007mv-8v; Mon, 05 Feb 2024 10:48:00 +0000 Received: by outflank-mailman (input) for mailman id 675778; Mon, 05 Feb 2024 10:47:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwW6-0007md-Qe for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 10:47:58 +0000 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [2a00:1450:4864:20::12c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0523a1f2-c414-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 11:47:56 +0100 (CET) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-511538be947so476423e87.3 for ; Mon, 05 Feb 2024 02:47:56 -0800 (PST) Received: from localhost.localdomain ([185.25.64.249]) by smtp.gmail.com with ESMTPSA id vg7-20020a170907d30700b00a354a5d2c39sm4188301ejc.31.2024.02.05.02.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:47:55 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0523a1f2-c414-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1707130075; x=1707734875; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/qYpJWJ6YrcOns7diE+XyCUeN2tM6yt9XGqkK0qPIH4=; b=l0P1LythzGj619cydLWyxJigwYnXpbhFvA3dDp/D8uzu/Ar0Bw6FKUt7COc88aV6Lm telLIbj/cYo1Q8z6hmGZLoM0RKLyTRDxIiVAZsnp9cbTcahuomMvDCTvaFtgnAOtAugp V3TXNgas21klU3CAkir3+MifqT2c7bfN6kUtE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707130075; x=1707734875; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/qYpJWJ6YrcOns7diE+XyCUeN2tM6yt9XGqkK0qPIH4=; b=HYNTSNo1Ba0Dam0OChJHzrL/tXyAIyn1hR8yXraXfS+JiWOuzADn3QdyKovfZruFSn O+PwqJrCrNjN9DuDcELMXdiugZ/p8HVqzkvPkLhskGgIvbAxBkVATDQcLqsn2SLzx/TW 5YnGJoXab0VaGIO8GIx8GoRj0DBuR+dWmK5y3Zkon46CxwCI0Qy3xMdOYeHK1pmNPBED Y9wG+BXbnZ2JZYicsMcNSTDQEs4JrCfEFTDwcnRVfXtMNkSubnWU7nxD3yrxsfR9HvkG eVfZ0YpdpRagDp8o+vQy/hFxOKtt+qK9nl4b1nDHjyRWk3l5iDMkbQVuOWNlhkk29n8V ObyQ== X-Gm-Message-State: AOJu0YxBG5x2nkB13Sio5W17+3Mi8aUlmZLnVOPWTFOeJy3cLmmzFkTJ dSsy141IOF/hMvjrie/1TOmqDyreLL+rzOnUd1FEU09zCRiGpkeHwqexpQEjRNA= X-Google-Smtp-Source: AGHT+IFjkCT9bPQ+NJkTyB8Yw50hamladXzXCjyeZSV28bhMrO5ypS+sRo/VpPqf781XBVZi81ypYw== X-Received: by 2002:a05:6512:21ce:b0:511:add:cfe9 with SMTP id d14-20020a05651221ce00b005110addcfe9mr6991715lft.26.1707130075494; Mon, 05 Feb 2024 02:47:55 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWPMEAR/GZxphCk5ZD6P8CiDrKyXeA8r/3M9Ldir3dqtahAJXXBP/QdSnf4VW9aiwxDkBcL08qVdLA2bMuAlvZXSz2z1G0FD18ntWniP+zWVS9emXF1OoK6PrM+rYsY4dtmVBqwifzOotQKh1DqDVqcoXWjSsf7bFVmWmcgyas5I8Xuq11Qe0yEF7EqF9Ka18IYpuAxauGiQKrkLyw7kxbm From: Frediano Ziglio To: Jan Beulich , Andrew Cooper , George Dunlap , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Cc: xen-devel@lists.xenproject.org, Frediano Ziglio Subject: [PATCH 3/5] Use more specific constant Date: Mon, 5 Feb 2024 10:47:40 +0000 Message-Id: <20240205104740.14905-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 __HYPERVISOR_arch_1 and __HYPERVISOR_paging_domctl_cont for x86 have the same value but this function is handling "paging_domctl_cont" hypercall so using the latter mnemonic in the code is more clear. Signed-off-by: Frediano Ziglio Reviewed-by: Jan Beulich --- xen/arch/x86/mm/paging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index 541c2ea9b2..2961ca734d 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -783,7 +783,7 @@ long do_paging_domctl_cont( rcu_unlock_domain(d); if ( ret == -ERESTART ) - ret = hypercall_create_continuation(__HYPERVISOR_arch_1, + ret = hypercall_create_continuation(__HYPERVISOR_paging_domctl_cont, "h", u_domctl); else if ( __copy_field_to_guest(u_domctl, &op, u.shadow_op) ) ret = -EFAULT; From patchwork Mon Feb 5 10:48:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13545213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0A9CC4828D for ; Mon, 5 Feb 2024 10:49:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.675781.1051252 (Exim 4.92) (envelope-from ) id 1rWwX5-0000Hv-Lv; Mon, 05 Feb 2024 10:48:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 675781.1051252; Mon, 05 Feb 2024 10:48:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwX5-0000Ho-J2; Mon, 05 Feb 2024 10:48:59 +0000 Received: by outflank-mailman (input) for mailman id 675781; Mon, 05 Feb 2024 10:48:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwX4-0007md-7l for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 10:48:58 +0000 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [2a00:1450:4864:20::62b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 28a759ff-c414-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 11:48:55 +0100 (CET) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a30e445602cso1093350066b.0 for ; Mon, 05 Feb 2024 02:48:55 -0800 (PST) Received: from localhost.localdomain ([185.25.64.249]) by smtp.gmail.com with ESMTPSA id f23-20020a1709067f9700b00a37b0d09d9esm1201965ejr.119.2024.02.05.02.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:48:54 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 28a759ff-c414-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1707130135; x=1707734935; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wyOiV3AtGDkj74WIW4cpDGcIhzL87xknPQ5xMGnZjFU=; b=BkI7HZb+4tjFY6J2grE41eVeBiL1g9SX21GRd5BaK9d8L878fr/VBpXRD1twtggbzT Swo0WVXAvpyjvM+h6OV9dIjhXdRaMeeM6AhcMjXShZzsf9JIj3exCZgIK2cdzcJN6+QP R6PnyAQiNr7ikqJwKipIkPkoYlRazHSLcIUv8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707130135; x=1707734935; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wyOiV3AtGDkj74WIW4cpDGcIhzL87xknPQ5xMGnZjFU=; b=DVJXX/K8vnotIvpB63Fpld/MsmAmas/tne5GUYR1Zc/Xt9pDzwy/L5nqlXUI+EHSUM Jv6CuW1DOl+1CZIpGxDOOHUQnp8m3G+gqztp2zWT7Od7QZSpCAoJAOI1nhtEV87IjL/P /wWjBC3/NlGx0jbl/WzGPH0vsabMMmF7OArFpL6TsssE5vI+5atFR6zYbCRuAcggmk0e k/iiPHMZGY3duK6I3BQFnqDi5yqaAN4uVZ1NKNDyABYVm+eLZ2gycWn5rRKnAiolg2uC kDoZ/GpQzTbpWxPWTrlHvEh4Igt4iB0j0yuvn5T/C/kSolYL/GE22Yv4wz6vUqg9/U/Z 2stA== X-Gm-Message-State: AOJu0YzS+dNurY7E0D/nPsqkj4ZyGQFgs8eZ5joe8uXQsiQhD4OFwkOI 8s9kB+6P7OtxYgzhHU1Jab+aoDEqbaVyc4NtHaewRazkE8DGE7HxIsAuG8VuVac= X-Google-Smtp-Source: AGHT+IHPLlbZu4hWveArh5WSuBHr1gOP3+SDiU520//wgpfaMV+kcP36tWgTHecNQ37wF0+k7GpUXw== X-Received: by 2002:a17:907:7893:b0:a37:8574:357a with SMTP id ku19-20020a170907789300b00a378574357amr3791718ejc.4.1707130135261; Mon, 05 Feb 2024 02:48:55 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUVRlAMaIT1cI3q/pqat/a+scZbTiTUAU99J6Qy9e6AOqD0zjH5Jn+KZT8lmMdND00XdJqlLV+MqCccIDR+OhI/Hq+E/5JwNM4oCuKPdVlKI145C0NNblESX4jDyqErin+lxCXnEd3DZBiywKF1Z7KDi3CiQqfnLbGety0jw09DvbNdFoj8MQ== From: Frediano Ziglio To: Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Cc: xen-devel@lists.xenproject.org, Frediano Ziglio Subject: [PATCH 4/5] Reduce assembly code size of exception entry points Date: Mon, 5 Feb 2024 10:48:40 +0000 Message-Id: <20240205104840.14942-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 We just pushed a 8-bytes zero and exception constants are small so we can just write a single byte saving 3 bytes for instruction. With ENDBR64 this reduces the size of the entry point from 32 to 16 bytes (due to alignment). Signed-off-by: Frediano Ziglio --- xen/arch/x86/x86_64/entry.S | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index ecdd6e5b47..b6a157d96a 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -898,28 +898,28 @@ END(handle_exception) FUNC(entry_DE) ENDBR64 pushq $0 - movl $X86_EXC_DE, 4(%rsp) + movb $X86_EXC_DE, 4(%rsp) jmp handle_exception END(entry_DE) FUNC(entry_MF) ENDBR64 pushq $0 - movl $X86_EXC_MF, 4(%rsp) + movb $X86_EXC_MF, 4(%rsp) jmp handle_exception END(entry_MF) FUNC(entry_XM) ENDBR64 pushq $0 - movl $X86_EXC_XM, 4(%rsp) + movb $X86_EXC_XM, 4(%rsp) jmp handle_exception END(entry_XM) FUNC(entry_NM) ENDBR64 pushq $0 - movl $X86_EXC_NM, 4(%rsp) + movb $X86_EXC_NM, 4(%rsp) jmp handle_exception END(entry_NM) @@ -933,28 +933,28 @@ END(entry_DB) FUNC(entry_BP) ENDBR64 pushq $0 - movl $X86_EXC_BP, 4(%rsp) + movb $X86_EXC_BP, 4(%rsp) jmp handle_exception END(entry_BP) FUNC(entry_OF) ENDBR64 pushq $0 - movl $X86_EXC_OF, 4(%rsp) + movb $X86_EXC_OF, 4(%rsp) jmp handle_exception END(entry_OF) FUNC(entry_BR) ENDBR64 pushq $0 - movl $X86_EXC_BR, 4(%rsp) + movb $X86_EXC_BR, 4(%rsp) jmp handle_exception END(entry_BR) FUNC(entry_UD) ENDBR64 pushq $0 - movl $X86_EXC_UD, 4(%rsp) + movb $X86_EXC_UD, 4(%rsp) jmp handle_exception END(entry_UD) From patchwork Mon Feb 5 10:49:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13545214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6EEF1C4828D for ; Mon, 5 Feb 2024 10:49:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.675783.1051262 (Exim 4.92) (envelope-from ) id 1rWwXi-0000qw-Tw; Mon, 05 Feb 2024 10:49:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 675783.1051262; Mon, 05 Feb 2024 10:49:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwXi-0000qp-RK; Mon, 05 Feb 2024 10:49:38 +0000 Received: by outflank-mailman (input) for mailman id 675783; Mon, 05 Feb 2024 10:49:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rWwXh-0000qL-Fv for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 10:49:37 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3fe642b0-c414-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 11:49:34 +0100 (CET) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a26ed1e05c7so591060266b.2 for ; Mon, 05 Feb 2024 02:49:34 -0800 (PST) Received: from localhost.localdomain ([185.25.64.249]) by smtp.gmail.com with ESMTPSA id gw14-20020a170906f14e00b00a35200615d7sm4185891ejb.1.2024.02.05.02.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:49:33 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3fe642b0-c414-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1707130174; x=1707734974; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mBomYnkbGBCYxlJkVuCw9TZfVRMHdHHWQ2aYnOe5VSg=; b=ZduG/EtDOdSskHflS5AKn3Gsdi5nr9ak+nM1EZnRN5gQ1XWKoanTHXbKky5PPv6GWI Y/HHrgncFKxowRdXwku3TDxCV3MlyNuprcLD4m4WEH5BLmI4y6peWiXUhOyralhSgH5+ NM2ehKTCa7qP1keSXw0MR1cHhvNz7TS58V5w8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707130174; x=1707734974; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mBomYnkbGBCYxlJkVuCw9TZfVRMHdHHWQ2aYnOe5VSg=; b=rl9NITtgicDjw0dkiSZiKG+UdyA36VtpqKkNdlHLnMQOksFiIebcOj24+uZ0QwCwCw oDiWlCsT2EJWhQHjY25j9EoHPHOLhBHGyRqhQ+zsBFGDU0XNw54jPyyBW+pZ7pv4H+Y6 IWAWmTk2NYk2ZsLBM4wl3vjS9CXsWuGxcEnX7ZB6y99LfFdkXLPugF472SH9ME6TP9Lt RWRHm3fHVFzk2scMWO43OXfcXNNiR+dgj9z5ki131rw1rHiU1c51SIewLyxUAfvsq06+ YHOzIVDFbLyboSVhYDXJ24w/9Tx/GeCd5/ikTH7DEgLErPXlVJxz7SXEA5dNuuS2ne4w zUwg== X-Gm-Message-State: AOJu0YzzU0nT9gVoThxzlNlgO7+5kgPLQIfTtfGaJ0Xl0T4tdNhQ52nB +rFn3e7T+if6uKhM8kUL73ci13kRecjkZgXHD2HwxYkqCrusPExlrwcUCR+r5+0= X-Google-Smtp-Source: AGHT+IFNsmFy2DMoBL9yJr/PSVQr8mahMXw42/lGkbmjRScCrA4JYifVpRvOfnB40FPJmbY7xHmwxQ== X-Received: by 2002:a17:906:19b:b0:a36:fd11:984 with SMTP id 27-20020a170906019b00b00a36fd110984mr7367475ejb.5.1707130174197; Mon, 05 Feb 2024 02:49:34 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU+iuSb1rAJAXFuQGCIAm+fXUH1AlN8Iv0eaJtxcnaxhEdZBBLhd+y/NOcNxuUEefeRWFW9iDeQVWDFV/EAlB2c6x4RSGx1ItvJ+XdE1vpjFQhAe9k20MfR9D03mDipcc9CkV8FYMNgcvIx82Pozv3S7Rr8GBzOlXmh3mdThzD5g7K3vJnW0w== From: Frediano Ziglio To: Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Cc: xen-devel@lists.xenproject.org, Frediano Ziglio Subject: [PATCH 5/5] Reduce assembly instruction size Date: Mon, 5 Feb 2024 10:49:19 +0000 Message-Id: <20240205104919.14983-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Use 32 bit versions in all cases, not only for registers till 8th. This reduces the encoding from (example with r14): 49 c7 c6 ff 7f 00 00 mov $0x7fff,%r14 to 41 be ff 7f 00 00 mov $0x7fff,%r14d Signed-off-by: Frediano Ziglio Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/asm_defns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/asm_defns.h b/xen/arch/x86/include/asm/asm_defns.h index 51bf1cf1e6..a9a6c21c76 100644 --- a/xen/arch/x86/include/asm/asm_defns.h +++ b/xen/arch/x86/include/asm/asm_defns.h @@ -136,7 +136,7 @@ register unsigned long current_stack_pointer asm("rsp"); #define STACK_CPUINFO_FIELD(field) (1 - CPUINFO_sizeof + CPUINFO_##field) #define GET_STACK_END(reg) \ .if .Lr##reg >= 8; \ - movq $STACK_SIZE-1, %r##reg; \ + movl $STACK_SIZE-1, %r##reg##d; \ .else; \ movl $STACK_SIZE-1, %e##reg; \ .endif; \