Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp71796pxy; Sat, 31 Jul 2021 00:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHSUakOYyAbUPaS7pl/Oc5PHImq3PU9LROqxWgNruTumh2ZdDHgz+vCcs4FePa7FAD/w45 X-Received: by 2002:a17:906:16cb:: with SMTP id t11mr6306342ejd.16.1627715971684; Sat, 31 Jul 2021 00:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627715971; cv=none; d=google.com; s=arc-20160816; b=CZwj1JcPbyMMLh+KsL+EsLwOcZM8dVJ0/R6woRx23vJG2xftfXMacusCqt8qz7Ggpq IbIXMdzil55RqzqJ7bKjSv5ZOsAn3KT2HATVei8A/6yG2g32dj7HH9EGHdDQaVz8YMvC LiXND3NPy/JqI/nxTHcZTnqvS0Cr8qQtUea23IEa3hOhmZPDoE5ke1ICMPDIb1PoqsjU sLbNh63+wyqiTV1Dz8okZ/b1YuaJrt4LtpMQZskbVQ5kkoOlHMtmOwdxJcbUjq5468pS AhPMGO2g5ksdlwDSrSXPTOZqIIE0aZCBzrw9QCNBO2SmmyyJrDsjgtxP8Or1Uu8s0ZZK sRAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=kyM9js2aRHyfGQiZvaRI/san3KM6xq/gaboX810m66s=; b=vbjF2G70/yi3zRAHQ6qiskT2dS0gyyQ/gWOtP9VxWJHGJrodWkAtXHuYQY9DGW7GlH PNjYVpLsYWPvHgjGwX2LLtuFF0WES52zTGwZ40nYwSUn2w2wrdrZkaTzuEh7chnLnP1J fsbKEi6XZ8VmSrLRIilm5NtPGQchtX3jkawsYafEFRw8gY/SgRb1h/Yyx6DleKJgexFc jKo/NxQBKzHd/YjTcp7lvUp22IOFJkipV0xYQyjvD4Cuc5Rfh8svOv1wVN0fV9hcR9Vn JJHRwc1otffTD9VTscD8DcQoaTpAi0lnrL3VKTTzUk2AyDDUjWdA14IxA2ranyr8HM7p wfLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lAxg8F6V; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Hynwo4vV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si1514158edc.507.2021.07.31.00.19.07; Sat, 31 Jul 2021 00:19:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lAxg8F6V; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Hynwo4vV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230107AbhGaHRr (ORCPT + 99 others); Sat, 31 Jul 2021 03:17:47 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:45546 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbhGaHRr (ORCPT ); Sat, 31 Jul 2021 03:17:47 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DCE38221E7; Sat, 31 Jul 2021 07:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627715859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kyM9js2aRHyfGQiZvaRI/san3KM6xq/gaboX810m66s=; b=lAxg8F6VD+4AnPsG/mMhP3TjLl40VG23Kmwg7lgnscQBVXujxipnB1sRvy5Fwphgzm4MTl QqLgOnsZRhK9HeWuIQ56QyuwQZemhPbKhqTsuyhMYUqkwt8qCMn0O9ZG91clmhv3fuJxJ0 LJjlecCWVAS8I36UubMgskseBux/bCA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627715859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kyM9js2aRHyfGQiZvaRI/san3KM6xq/gaboX810m66s=; b=Hynwo4vVVOPM1dP9PH0k9MPz4dgRUYk0yb4mOQgcejQs4gUNDFuPN/RU9Xx9dWthWdCdVJ dBCyAXx0G9H401CA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 0EF0D1368F; Sat, 31 Jul 2021 07:17:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id jptYARP5BGF3OQAAGKfGzw (envelope-from ); Sat, 31 Jul 2021 07:17:39 +0000 Date: Sat, 31 Jul 2021 09:17:37 +0200 From: Joerg Roedel To: Sean Christopherson Cc: Joerg Roedel , x86@kernel.org, Eric Biederman , kexec@lists.infradead.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Martin Radev , Arvind Sankar , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 11/12] x86/sev: Handle CLFLUSH MMIO events Message-ID: References: <20210721142015.1401-1-joro@8bytes.org> <20210721142015.1401-12-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, On Fri, Jul 30, 2021 at 10:42:30PM +0000, Sean Christopherson wrote: > On Wed, Jul 21, 2021, Joerg Roedel wrote: > This wording can be misread as "the hypervisor is responsible for _all_ cache > management". Maybe just: > > /* > * Ignore CLFLUSHes - the hyperivsor is responsible for cache > * management of emulated MMIO. > */ Right, will update the comment, thanks. > Side topic, out of curisoity, what's mapping/accessing emulated MMIO as non-UC? The CLFLUSHes happen when the kexec'ed kernel maps the VGA framebuffer as unencrypted. Initially it is mapped encrypted and before re-mapping the kernel flushes the range from the caches. I have not investigated why this doesn't happen on the first boot, though. Regards, Joerg