From patchwork Sun Apr 28 16:52:36 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: 13646074 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 6B1ADC4345F for ; Sun, 28 Apr 2024 16:53:12 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.713703.1114594 (Exim 4.92) (envelope-from ) id 1s17lo-0006T6-Fn; Sun, 28 Apr 2024 16:52:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 713703.1114594; Sun, 28 Apr 2024 16:52: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 1s17lo-0006Sz-BE; Sun, 28 Apr 2024 16:52:56 +0000 Received: by outflank-mailman (input) for mailman id 713703; Sun, 28 Apr 2024 16:52:52 +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 1s17lk-0006D5-Gg for xen-devel@lists.xenproject.org; Sun, 28 Apr 2024 16:52:52 +0000 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [2a00:1450:4864:20::431]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bf97f75c-057f-11ef-b4bb-af5377834399; Sun, 28 Apr 2024 18:52:50 +0200 (CEST) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-346359c8785so3287017f8f.0 for ; Sun, 28 Apr 2024 09:52:50 -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 a12-20020a056000188c00b00347eb354b30sm27850921wri.84.2024.04.28.09.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 09:52:49 -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: bf97f75c-057f-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714323170; x=1714927970; 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=bNif3eZYUBF7BnQ1Yw5FaGeiL/S3aKagQmr0I2wcHsM=; b=EG36Lj0ybMhd5j2PrQOKOul4oCYlJiBeuFc8prqNUaN6LgulW6m0242ESQPBpMolvc KOkk/4Z8NxiVsJceX8VV04kH677uBEG/l0B5YHEH6dQo/4XXUbiIMoytDozv8tUeH6/X t6KlnK4nyVjQvOBih0VLKYVXN/+tHxBPcQKmyFLR20mRdwCSKQaT3rLVdwFxG/t2S/3b gsOMKndfMAlbWTod3KydaGGli9OKgmqZV29AQxk/M7n4B2Kxz946y4vmAZrWWAiMv/vb qr3GHT0l0UtezQtJHoDKYwin9TOlmTL0wrj1nRjbmgYuZbIgG6iiHDKeiTdDj+L3c4hS MddA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714323170; x=1714927970; 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=bNif3eZYUBF7BnQ1Yw5FaGeiL/S3aKagQmr0I2wcHsM=; b=M7MCq/8BflaUUjTraqEx4qBuPDm/23UjUOc0xkUOP7OLxvOzoFHDFBnZfxVfqj7YNt R2lGQwdIBNZ8b6Yfi+8l2toxNaRqVHHcUm31ZDvjJN176P53VP/QZeqq9p8lQ4/hWITA CvJ1C0sfany0jlOnbTCcDqdNkZPncQhvhZN70YdaRrjmtsKZQKyom2ZweyttDrD1brv2 380DhmrzGmVqbUNum3i1E48coMAAJzzBc0CtuBWwlpG3koFsTlpEzljeez1UIIkO2CpP fjibRPuQspzbuu2bGsXrX5UXMZOWWTtMX15cG5PGm/byLfHL8YD34dGo9tUe2bA6iSaS Myyg== X-Gm-Message-State: AOJu0YwejVFim9KPV6P6XSfu9QNAxqgsf5TsCn3rMcGudQntgVq9X+Ow McOhFCIrE9gXbeGfeGWWET/TPSa3ZblvdL15EcWLA+M9COvQiYp071WmiEOq X-Google-Smtp-Source: AGHT+IHwI4f2/3EPYL3CVLZdm8bIPUwaOQTPxm+126HqOchO2GjyaTG96YOLuGT5acIOa0MzHkJm8w== X-Received: by 2002:a5d:64cf:0:b0:34c:a95f:1114 with SMTP id f15-20020a5d64cf000000b0034ca95f1114mr3141383wri.40.1714323169770; Sun, 28 Apr 2024 09:52:49 -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?= Subject: [PATCH v2 1/7] x86/p2m: Add braces for better code clarity Date: Sun, 28 Apr 2024 16:52:36 +0000 Message-Id: <90082c0aa2047edf5764840f1903d1797ca4b902.1714322424.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š --- xen/arch/x86/mm/p2m.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index ce742c12e0..eb7996170d 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -106,6 +106,7 @@ void p2m_change_entry_type_global(struct domain *d, unsigned int i; for ( i = 0; i < MAX_ALTP2M; i++ ) + { if ( d->arch.altp2m_eptp[i] != mfn_x(INVALID_MFN) ) { struct p2m_domain *altp2m = d->arch.altp2m_p2m[i]; @@ -114,6 +115,7 @@ void p2m_change_entry_type_global(struct domain *d, change_entry_type_global(altp2m, ot, nt); p2m_unlock(altp2m); } + } } p2m_unlock(hostp2m); @@ -139,6 +141,7 @@ void p2m_memory_type_changed(struct domain *d) unsigned int i; for ( i = 0; i < MAX_ALTP2M; i++ ) + { if ( d->arch.altp2m_eptp[i] != mfn_x(INVALID_MFN) ) { struct p2m_domain *altp2m = d->arch.altp2m_p2m[i]; @@ -147,6 +150,7 @@ void p2m_memory_type_changed(struct domain *d) _memory_type_changed(altp2m); p2m_unlock(altp2m); } + } } p2m_unlock(hostp2m);