From nobody Sun Nov 24 14:22:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730817257; cv=none; d=zohomail.com; s=zohoarc; b=fKo2wQlZ9pO4pZ0HnfCB+2lH0sdX2meFll1p1Xwrqjuz094lUM9AGqelWF5y3YgBPKPY+swjyIlo8IJkuCpW+JXTZ7neH8H2dsH4ECbN5bxowQfo8OButzYpe7fzP711h5tKIcZOdFnsMiOGVoMkv1aQHDERdDKfEjoyxwBemdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730817257; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yyqgbdCyqz7WQBq4sAipK7yHeendz1D8ul3qjvP/+g8=; b=J7ks1yVumfMDZmzHsT0MPN+A7DJHWaCxZ5qvYH+bAnBOixLh5/nwYSk4CRebjtSo6qlPPDg1BhJizE29bmHEa35lB3nFs7iLIXHxkxhYdgI7lvcWAp4kOgKm6I/Fb4q6pFLw+o1L24on8ZcBRMheEjLqTdHVgJi7TCjTPlQvjoI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730817257514271.1272402369249; Tue, 5 Nov 2024 06:34:17 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.830260.1245235 (Exim 4.92) (envelope-from ) id 1t8Kd3-0003Hp-Bz; Tue, 05 Nov 2024 14:33:57 +0000 Received: by outflank-mailman (output) from mailman id 830260.1245235; Tue, 05 Nov 2024 14:33:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8Kd3-0003HX-7B; Tue, 05 Nov 2024 14:33:57 +0000 Received: by outflank-mailman (input) for mailman id 830260; Tue, 05 Nov 2024 14:33:55 +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 1t8Kd1-0002K5-Ig for xen-devel@lists.xenproject.org; Tue, 05 Nov 2024 14:33:55 +0000 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [2a00:1450:4864:20::530]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id faffc597-9b82-11ef-a0c5-8be0dac302b0; Tue, 05 Nov 2024 15:33:53 +0100 (CET) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5c94861ee25so2968683a12.0 for ; Tue, 05 Nov 2024 06:33:53 -0800 (PST) Received: from localhost.localdomain ([217.156.233.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cee6a99ff2sm1395047a12.4.2024.11.05.06.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 06:33:50 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: faffc597-9b82-11ef-a0c5-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MzAiLCJoZWxvIjoibWFpbC1lZDEteDUzMC5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImZhZmZjNTk3LTliODItMTFlZi1hMGM1LThiZTBkYWMzMDJiMCIsInRzIjoxNzMwODE3MjMzLjI0NjU3MSwic2VuZGVyIjoiYWxlamFuZHJvLnZhbGxlam9AY2xvdWQuY29tIiwicmVjaXBpZW50IjoieGVuLWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730817232; x=1731422032; 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=yyqgbdCyqz7WQBq4sAipK7yHeendz1D8ul3qjvP/+g8=; b=HAITGYMUSd1lNIcdGPsrzp1k+itdrcqUkACAJWneEGU2TFJZBU/CMnfTOiJ/cJrrij JTSRqURZUSRTzNfRmXFlsYf8gecxKBze1d8KTMtIpm8X37lReZbBp3r5xHYgcHl1GCHu xFT8R1nxgrwS94imrr8uV/6Vynih48E8iSh0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730817232; x=1731422032; 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=yyqgbdCyqz7WQBq4sAipK7yHeendz1D8ul3qjvP/+g8=; b=eUMdeZcUnqDNUHV/nLZd3jLloNFxCh6OGY5LYiv6lp8MSBOR0gYydVcVtLMLiUScQM NUI0fUr0J9SJd+cnrLzeeQbcWt9LKw4HL86tglxTq8vL6v67vBiYDFgKGmtKoFaTythc pM6t4Te//0WqvkWtWPQtLFocSk2Ayu0h69Tt2XvB45X2VVbzfpNDAL6gSRQvKG3lJAEW iCieZr21ikDaLuB2fbBNA4SWj4KVeSjLCBzq5pm2xrgkOHiT/Dj3DwU/LeGj83A+kZxY YAQw4DNPqqx6RgVd3kwEhjzSps4wYvnmHQ22n8O7X85HDhswsNJRr1TRZqCcIrcuxMvW eHXg== X-Gm-Message-State: AOJu0YxZWv8zIUp/CrVWZa9S+pPd5nB0mJBMlsqwDWlP5AkL38H6n43C mUSfEAw1Q0BOwzn/9cq9WKToljU3r94Cq/JEUAr93gahGrA4iajLspprgGruWLCuwz1IenhlGNs P X-Google-Smtp-Source: AGHT+IF1jV35urzB96D/9HqoIOs+dpJXaGQ8XIKeUjyC6ubT8ayqoooLczkbqx7hS4HjBq+ce64o4w== X-Received: by 2002:a05:6402:5c9:b0:5ca:efe:10de with SMTP id 4fb4d7f45d1cf-5ceb9382a40mr18273172a12.30.1730817230969; Tue, 05 Nov 2024 06:33:50 -0800 (PST) From: Alejandro Vallejo To: xen-devel@lists.xenproject.org Cc: Alejandro Vallejo , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v2 03/13] x86/hvm: Map/unmap xsave area in hvm_save_cpu_ctxt() Date: Tue, 5 Nov 2024 14:33:00 +0000 Message-ID: <20241105143310.28301-4-alejandro.vallejo@cloud.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241105143310.28301-1-alejandro.vallejo@cloud.com> References: <20241105143310.28301-1-alejandro.vallejo@cloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730817257978116600 Content-Type: text/plain; charset="utf-8" No functional change. Signed-off-by: Alejandro Vallejo --- v2: * No change --- xen/arch/x86/hvm/hvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 018d44a08b6b..c90654697cb1 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -914,11 +914,11 @@ static int cf_check hvm_save_cpu_ctxt(struct vcpu *v,= hvm_domain_context_t *h) =20 if ( v->fpu_initialised ) { - BUILD_BUG_ON(sizeof(ctxt.fpu_regs) !=3D - sizeof(v->arch.xsave_area->fpu_sse)); - memcpy(ctxt.fpu_regs, &v->arch.xsave_area->fpu_sse, - sizeof(ctxt.fpu_regs)); + const struct xsave_struct *xsave_area =3D VCPU_MAP_XSAVE_AREA(v); =20 + BUILD_BUG_ON(sizeof(ctxt.fpu_regs) !=3D sizeof(xsave_area->fpu_sse= )); + memcpy(ctxt.fpu_regs, &xsave_area->fpu_sse, sizeof(ctxt.fpu_regs)); + VCPU_UNMAP_XSAVE_AREA(v, xsave_area); ctxt.flags =3D XEN_X86_FPU_INITIALISED; } =20 --=20 2.47.0