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 ; 23 Jul 2018 10:36:38 -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 1fhYCi-0005Nu-7b for speck@linutronix.de; Mon, 23 Jul 2018 12:36:36 +0200 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D4104AD7E for ; Mon, 23 Jul 2018 10:36:29 +0000 (UTC) Message-Id: From: Nicolai Stange Date: Mon, 23 Jul 2018 11:54:55 +0200 Subject: [MODERATED] [RFC PATCH 0/6] kvm: handle host mode irqs 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de List-ID: Hi all, there had been some discussion on whether or not IRQs that happened between vmexit and the next vmenter should trigger L1d flushes, c.f. [1] and [2]. This series implements what Paolo suggested at [2]: > handle at least the common case of softirqs by adding some kind of > "# of times softirqs were run" percpu variable. I chose to track irqs instead of softirqs only. [1/6] - [3/6] are preparatory [4/6] implements the "# of time irqs were run" percpu variable [5/6] makes vmx issue L1d flushes if that count has changed [6/6] is a followup cleanup to that Each patch has been compile-tested on i686 and x86_64. However, only the latter received some runtime testing. Thanks, Nicolai [1] dc14f2c1-f69c-e690-dad2-8b4f1b772ee3@suse.de [2] 3270ad99-2008-ccea-8e0a-d3fbf7fc4e50@redhat.com Nicolai Stange (6): x86/KVM/VMX: don't set ->l1tf_flush_l1d to true from vmx_l1d_flush() x86/KVM/VMX: replace 'vmx_l1d_flush_always' with 'vmx_l1d_flush_cond' x86/KVM/VMX: move the ->l1tf_flush_l1d test to vmx_l1d_flush() x86: implement kernel mode irq tracking x86/KVM/VMX: flush L1d upon interrupt after VMEXIT x86/KVM/VMX: don't set ->l1tf_flush_l1d from vmx_handle_external_intr() arch/x86/Kconfig | 3 +++ arch/x86/entry/entry_32.S | 12 ++++++++++ arch/x86/entry/entry_64.S | 12 ++++++++++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/asm/processor.h | 4 ++++ arch/x86/kernel/cpu/common.c | 5 ++++ arch/x86/kvm/Kconfig | 1 + arch/x86/kvm/vmx.c | 51 +++++++++++++++++++++++++++------------- 8 files changed, 73 insertions(+), 16 deletions(-) -- 2.13.7