Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1931298imm; Thu, 20 Sep 2018 05:18:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZhxtrqv8q52wKnSnED9ImST1+NQi28MuRpP6MlF7Q9Y/4PXemHZwglkiY7ROFC8wDZAD6g X-Received: by 2002:a63:2acc:: with SMTP id q195-v6mr33826145pgq.291.1537445938800; Thu, 20 Sep 2018 05:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537445938; cv=none; d=google.com; s=arc-20160816; b=E2vkp/Qk14byMUWQp/MYOvfhPnJFqE+FCfrpNNuJYhhCcuFkMCE69EvIwr1u35fhZx 72ZPiMk4tIXV2Xby1zyUCu9+Z34O9j0XMMKWELbuWTQaBc1MoTK06Fd/ytTgYHlmOmJQ BB3FaXmHkSOmHJU3Trz1YBnYb6vcYUZ3y0L3SSwlh9/dNshVix9DxtTn1ZiFmjSClJPl sNiG7rFoY5pbPW94FAhmlWVSMg032QDM6NAuTerTK0E1x8s0QJ35U3YfXYbVlTfcc6HP uDu9hKXBsy00aRbKQJKd30UvLaO95VvDEMsOg30zlkbzdEL9cIYUOAOKee4L2+QqEIM6 UcQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wNTPBaMcowimbcQp+VAC27jTBobwu/66OzwD/n4qdA0=; b=nLIxWXAqZtgj7i8D8R6JtSo14sEsNuaGhBNMj6BnSGAeaU8mhtCpjhX73XPsQyTRhD 4JVs+XzuP36ytWeELzf4IbbjgFZB/u3Wd+fvYgDyNmxqs88+d5voWchOZrk7jE8TzIo4 DhulY3v/SJFmMxjkmpVHgmrKtoafDiymBmVN78xqD75IHwJA/EJUdleMpIVniDHK9GSo P5pdexszcRlJ12Kx2KCHQnjPOU9pg1MAbVKffPHVFeyNUAG+PyhmR3seTt3ZTW3MjxJz Fmi8wGgd/djTVT8ZMKjtXwPiv1BrB5kwANY5Lb+bByEuhFEi2XBirN1MBnnRQp1As/w8 30IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="nyw8iQA/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f94-v6si16666971plb.10.2018.09.20.05.18.41; Thu, 20 Sep 2018 05:18:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="nyw8iQA/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732747AbeITSAx (ORCPT + 99 others); Thu, 20 Sep 2018 14:00:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58230 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730984AbeITSAx (ORCPT ); Thu, 20 Sep 2018 14:00:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wNTPBaMcowimbcQp+VAC27jTBobwu/66OzwD/n4qdA0=; b=nyw8iQA/6X4tSlSmz6TQG5wwK K7BQ0l+UJkRzvhZrOEBoUl/NOPVudLCIszRy3xu5vbHE3h+ywOvC+t9THic2PoPSup+J2ioSSzz2p FKs0ZKfb0qz++R4B8iFFQz57XrnGY+t1n8EqsqfI1jTeDHq2b+ws8H3Lu52vujNE50ciU/usoGBJn irDwr9kYVbljKP0iBI50nzim+udWqz53wOfP4YC/UprfH9IA4XZ7vbIoSejQZBix1TcC71Z2k8D1L p09N26qZrECuU3rMzvxhtlO7y1p9i7FZnlXDn+zJQi4dnCM4r59+wxOF4n/GFGQ28mvVd49eTybDt noVDRJ1Eg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2xtm-0003Bs-Jz; Thu, 20 Sep 2018 12:17:34 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 004A42015F390; Thu, 20 Sep 2018 14:17:32 +0200 (CEST) Date: Thu, 20 Sep 2018 14:17:32 +0200 From: Peter Zijlstra To: Wei Wang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, ak@linux.intel.com, kan.liang@intel.com, mingo@redhat.com, rkrcmar@redhat.com, like.xu@intel.com, jannh@google.com, arei.gonglei@huawei.com Subject: Re: [PATCH v3 4/5] KVM/x86/vPMU: Add APIs to support host save/restore the guest lbr stack Message-ID: <20180920121732.GR24124@hirez.programming.kicks-ass.net> References: <1537437959-8751-1-git-send-email-wei.w.wang@intel.com> <1537437959-8751-5-git-send-email-wei.w.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1537437959-8751-5-git-send-email-wei.w.wang@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 20, 2018 at 06:05:58PM +0800, Wei Wang wrote: > diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h > index 1562863..a91fdef 100644 > --- a/arch/x86/events/perf_event.h > +++ b/arch/x86/events/perf_event.h > @@ -223,6 +223,7 @@ struct cpu_hw_events { > */ > u64 intel_ctrl_guest_mask; > u64 intel_ctrl_host_mask; > + bool guest_lbr; > struct perf_guest_switch_msr guest_switch_msrs[X86_PMC_IDX_MAX]; > > /* Please, no bools in aggregate types. Either use a bitfield or u8, there's more LBR related bools, convert and group the lot to avoid holes.