From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 18 Jul 2018 14:58:40 -0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ffnuZ-0008O3-KR for speck@linutronix.de; Wed, 18 Jul 2018 16:58:39 +0200 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 68B48AD75 for ; Wed, 18 Jul 2018 14:58:34 +0000 (UTC) From: Nicolai Stange Subject: [MODERATED] [QUESTION] about vmx_l1d_flush_pages Date: Wed, 18 Jul 2018 16:58:33 +0200 Message-ID: <87sh4gtwti.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: speck@linutronix.de List-ID: Hi, I've got two questions related to the initialization of vmx_l1d_flush_pages from v15 commit a47dd5f06714 ("x86/KVM/VMX: Add L1D flush algorithm"). [Apologies for not replying properly -- I don't have the original mail]. 1.) The [empty_zp] "r" (vmx_l1d_flush_pages) asm constraint in vmx_l1d_flush() seems to suggest that these pages are zeroed out. But AFAICS they're actually left uninitialized. Am I wrong or is this intended? 2.) With nested KVM, the vmx_l1d_flush_pages could be subject to KSM on the host. This means that the 16 vmx_l1d_flush_pages could get mapped to fewer host physical pages and that would break the L1d flush? If so, an obvious fix would be to initialize all 16 pages with a different pattern each. Thanks, Nicolai -- SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)