From patchwork Wed Apr 24 20:42:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_Bene=C5=A1?= X-Patchwork-Id: 13642511 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 05992C4345F for ; Wed, 24 Apr 2024 20:42:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.711652.1111793 (Exim 4.92) (envelope-from ) id 1rzjRb-0004l2-BO; Wed, 24 Apr 2024 20:42:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 711652.1111793; Wed, 24 Apr 2024 20:42:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rzjRb-0004kt-6w; Wed, 24 Apr 2024 20:42:19 +0000 Received: by outflank-mailman (input) for mailman id 711652; Wed, 24 Apr 2024 20:42:17 +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 1rzjRZ-0004VD-OJ for xen-devel@lists.xenproject.org; Wed, 24 Apr 2024 20:42:17 +0000 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [2a00:1450:4864:20::42c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2374edd0-027b-11ef-909a-e314d9c70b13; Wed, 24 Apr 2024 22:42:17 +0200 (CEST) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-343d7ff2350so192285f8f.0 for ; Wed, 24 Apr 2024 13:42:17 -0700 (PDT) Received: from lab.home (dynamic-2a00-1028-83a4-4bca-c0bb-96ff-feed-9d50.ipv6.o2.cz. [2a00:1028:83a4:4bca:c0bb:96ff:feed:9d50]) by smtp.gmail.com with ESMTPSA id cd9-20020a170906b34900b00a5264576138sm8740067ejb.35.2024.04.24.13.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 13:42:16 -0700 (PDT) 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: 2374edd0-027b-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713991336; x=1714596136; darn=lists.xenproject.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=rtmRGO2sNugbwwUMKoj3jAhZKPNDueX11T7dOt/OTR0=; b=ImMDH9ujhm3A6f7PM/OCahBncT2sYc3LNlfNziJqPTpGb88ICHhIkKCdgjmrr6t6fg abP07Wp9Wu9iu6CpuMcXdPF4hRm+tWdb2E7cYVfSUcbD6DPgInGm8BzNfTeEHWb/Oobn Mn+C6xKBSbhrlX/malxSlK0JZ3fbnG+Ig4AqH2WzJmIGcCmzCbGQ+qYgZUW+iB1nL70A A61AbDsR0Ft9KMymkfeef+kqbYsciS3i66tRYT2LksTCQHIEZR4v8R5anmIKVxOIAMRw /M3ccCOzv+FgoSuYofFNL9bzXndkbGCtJbhPUTujnAIf7VijKiP2SoRWIjdBYM5ExxyR qV6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713991336; x=1714596136; 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=rtmRGO2sNugbwwUMKoj3jAhZKPNDueX11T7dOt/OTR0=; b=WdTe5nZ7MyR5uo/UvuMD7ANNviaVD+39lvBjI5PO3MYRf8ajsp7qR7GgCLlBociG7b Botgwk/F01sH8uikdevZutht8ZuAU8nIVBCs8RqWM8RAoX3AkqVDb/PXcvZwZoShVdou 91RoHHQ8WOjEWGsi6eSy8eqV/fssWSs4veXt5VIkX6JzuW/oxFjM/5wlYyU+NDDwngfn OcQl64kHD9IY5RtCT3x2yMi9joZMGPIjb7y9USycg8XTm83NLXDd5jRKFKSHFBU8IkLV GkDMy6QrkTr9N+bq+WPZe4GSpaIjCDe4RD2RR8xrNGkcYUEbSXBsbrpTBHnuw9pPRQOj viEA== X-Gm-Message-State: AOJu0Yy1F1TYSX3b0NHtWSuAi0cpahbvQeZJmdaxKZmAfFpHT1WAgjiP WjbJDLpTylMentonVE0KsEyavXhQsVlbNmExs/wN8/LTI9HnnKMMzW25hPN9 X-Google-Smtp-Source: AGHT+IG8sceugR+jYafGwjUSLrOZpBOsjUm5hfGUZZCkEVCwELdsm33t7ujhWc20qe82/1Y2jbn3Uw== X-Received: by 2002:adf:ee50:0:b0:346:c746:289e with SMTP id w16-20020adfee50000000b00346c746289emr2566925wro.48.1713991336491; Wed, 24 Apr 2024 13:42:16 -0700 (PDT) From: " =?utf-8?q?Petr_Bene=C5=A1?= " X-Google-Original-From: =?utf-8?q?Petr_Bene=C5=A1?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Petr_Bene=C5=A1?= , Jan Beulich , Andrew Cooper , George Dunlap , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , =?utf-8?q?Petr_Ben?= =?utf-8?q?e=C5=A1?= Subject: [PATCH 2/7] x86/hap: Refactor boolean field assignments Date: Wed, 24 Apr 2024 20:42:00 +0000 Message-Id: <8203e5e06e326ad320878439e5342f7f1acc685d.1713990376.git.w1benny@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 From: Petr Beneš No functional change. Signed-off-by: Petr Beneš Acked-by: Jan Beulich --- xen/arch/x86/mm/hap/hap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 9f964c1d87..d2011fde24 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -522,7 +522,7 @@ int hap_enable(struct domain *d, u32 mode) goto out; } - d->arch.altp2m_active = 0; + d->arch.altp2m_active = false; } /* Now let other users see the new mode */ @@ -585,7 +585,7 @@ void hap_teardown(struct domain *d, bool *preempted) for_each_vcpu ( d, v ) altp2m_vcpu_disable_ve(v); - d->arch.altp2m_active = 0; + d->arch.altp2m_active = false; FREE_XENHEAP_PAGE(d->arch.altp2m_eptp); FREE_XENHEAP_PAGE(d->arch.altp2m_visible_eptp);