Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2219859ybl; Sat, 25 Jan 2020 20:12:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwBT7D8esPCl1SOIL/d3SkmdCkxZVCYFigdHkkwlSYEQAxon5Lmy3YotVF+6cHMy1Bc8QHA X-Received: by 2002:a9d:7653:: with SMTP id o19mr7922963otl.118.1580011929782; Sat, 25 Jan 2020 20:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580011929; cv=none; d=google.com; s=arc-20160816; b=rPO+zCbK2qsO8PtLzWbSLRyMXLmdUaSmuneXXeWyuvsOl6a2cJAaSIllmFTPY0VqJA Is08V6WT5E0AbhZEvmegkN9gsOs9FR79lq9SlEHfPcUQLQF+kCPRo3izaZSEKaPMNr0q fzQ5p0lnvJs1zIHJU9B62YtS5wxK6g6a12PoVYSdd+ydowD5H/i6+nl73FmvSmpRbA4d DhLnbnBqiLrQoUAFt+Qy6L/xi9EMRmt6Gem7nqtIBgkeaf/W/MQl1HTHGPoBFil5ENQM g9gThGBthg5jjt3T37PFysIHt24RKc+R8jjX082YPGsQEEPtqV3jxFrNzwVve3Mwpt7S V2BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:subject:cc:to:date :original:originalfrom:originaldate:in-reply-to :content-transfer-encoding:dkim-signature:dkim-signature; bh=MgNAa/447vzoa3FkIs8Gfzp8Dpl/CHPupsfPjijOvV4=; b=WJzS0CgrpTot3IN3BxmXg+n7DnTm70Ni7Z7cmkzMPPfdJSK9KRvxl/Odc4N1hGjjDZ g+BOM34Xg9gu+f4uFbsMtFqbA2VKZs55vRofm50uV/XwypZuV/68w6i89jNg2CaUB6Dm ia179u0kMF56aF3hQHxkr/vVnjMx6TEB5zepFSjYLG6UaBYVfggT/pX2quJUQO68IpHZ NB2Ugc2eS++XRiRfRh0Vv4cOWUrlvbMKjuvJRGSs1CQjylbH7f1/ZOU7otrrP2UrqIMR Kj/qD8PyrMEC0Q/ZfT+Rw8GqlbaZtPz+sdORrXfSkh7Bj7P+LjISLJSxwEf6i7AGUBMW 6v/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm2 header.b=gNz5sfww; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="p/LY0Th8"; 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 s22si284840otq.100.2020.01.25.20.11.58; Sat, 25 Jan 2020 20:12:09 -0800 (PST) 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=pass header.i=@dxuuu.xyz header.s=fm2 header.b=gNz5sfww; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="p/LY0Th8"; 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 S1729246AbgAZELC (ORCPT + 99 others); Sat, 25 Jan 2020 23:11:02 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:46327 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728842AbgAZELC (ORCPT ); Sat, 25 Jan 2020 23:11:02 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id E73544128; Sat, 25 Jan 2020 23:11:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 25 Jan 2020 23:11:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h= content-transfer-encoding:content-type:in-reply-to:date:to:cc :subject:from:message-id; s=fm2; bh=MgNAa/447vzoa3FkIs8Gfzp8Dpl/ CHPupsfPjijOvV4=; b=gNz5sfww5+UvF7/Rpwy6y/MuJVrI3o8dAv3UMJHTIZlz prsCliZNgLl7elDb84S1NXPc3OcgbgfwcvFGMGQtGcPmvEIsjUTm2VeRdo+njmyq Nb66POnu+mmP0n4eL4aq880/+cGwOOayMHrQ9lVH5FjHQ2bW3JyJ5n7AZxxrW17d 4j3kfJKR6CgZCM/6RgoxUOEhT9IKnJuLHjldb865szfMojiSpue/dGLhjKWwKLjH hSOSqVU6y9QW24wMb+ypde+k/0GMEB6Wa+Bu1vnLhtjJMs/22lL//3Y1Y9uCOo4n a/Xhzm0BZR+P0p26EJp9HAKl2jzHN30Bln1x8dsOzw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=MgNAa/ 447vzoa3FkIs8Gfzp8Dpl/CHPupsfPjijOvV4=; b=p/LY0Th8Oqbo45jPfa2lRf NtEN1vFEG2vXWoLvhAL7pOA21x1nAWlHQ8qUBGpwOMI+QrpEDKP4qaWqgoUSZdQe S/yrmwkLzFRu8O/Og4ishQH+DcmIHpIhM8Wqeb9j6enzy8770Oz2bGVISDxBro7D 0ze+Hr3FXsGJsYCrrd6+pyXDIAYUfqD8WOW3eepVz6a0wDKDuaNRUM4Rktboz1Oy sOxKjYz7vZ9hHGXQhF260rTONO9yrscFk4T2gu51hrHFCBbic4sQbNF6zmaqYX+w GF542cdGlQQbyyNUV6TAUzyYXYbE+D4VpSV66+e/0NsSXqjIrOaC/qoDu/af8H+w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvdekgdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepgfgtjgffvffuhffksehtqhertddttdejnecu hfhrohhmpedfffgrnhhivghlucgiuhdfuceougiguhesugiguhhuuhdrgiihiieqnecuff homhgrihhnpehlkhhmlhdrohhrghenucfkphepjeefrdduiedvrddvvddrudeltdenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugi huuhhurdighiii X-ME-Proxy: Received: from localhost (c-73-162-22-190.hsd1.ca.comcast.net [73.162.22.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 4E02B3067181; Sat, 25 Jan 2020 23:10:59 -0500 (EST) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 In-Reply-To: Originaldate: Sat Jan 25, 2020 at 6:53 PM Originalfrom: "Alexei Starovoitov" Original: =?utf-8?q?On_Sat,_Jan_25,_2020_at_2:32_PM_Daniel_Xu__wrote?= =?utf-8?q?:=0D=0A>_+_______attr.type_=3D_PERF=5FTYPE=5FHARDWARE;=0D=0A>_+?= =?utf-8?q?_______attr.config_=3D_PERF=5FCOUNT=5FHW=5FCPU=5FCYCLES;=0D=0A>?= =?utf-8?q?_+_______attr.freq_=3D_1;=0D=0A>_+_______attr.sample=5Ffreq_=3D?= =?utf-8?q?_4000;=0D=0A>_+_______attr.sample=5Ftype_=3D_PERF=5FSAMPLE=5FBR?= =?utf-8?q?ANCH=5FSTACK;=0D=0A>_+_______attr.branch=5Fsample=5Ftype_=3D_PE?= =?utf-8?q?RF=5FSAMPLE=5FBRANCH=5FUSER_|_PERF=5FSAMPLE=5FBRANCH=5FANY;=0D?= =?utf-8?q?=0A>_+_______pfd_=3D_syscall(=5F=5FNR=5Fperf=5Fevent=5Fopen,_&a?= =?utf-8?q?ttr,_-1,_0,_-1,_PERF=5FFLAG=5FFD=5FCLOEXEC);=0D=0A>_+_______if_?= =?utf-8?q?(CHECK(pfd_<_0,_"perf=5Fevent=5Fopen",_"err_%d\n",_pfd))=0D=0A>?= =?utf-8?q?_+_______________goto_out=5Fdestroy;=0D=0A=0D=0AIt's_failing_fo?= =?utf-8?q?r_me_in_kvm._Is_there_way_to_make_it_work=3F=0D=0ACIs_will_be_v?= =?utf-8?q?m_based_too._If_this_test_requires_physical_host=0D=0Asuch_test?= =?utf-8?q?_will_keep_failing_in_all_such_environments.=0D=0AFolks_will_be?= =?utf-8?q?_annoyed_and_eventually_will_disable_the_test.=0D=0ACan_we_figu?= =?utf-8?q?re_out_how_to_test_in_the_vm_from_the_start=3F=0D=0A?= Date: Sat, 25 Jan 2020 20:10:57 -0800 To: "Alexei Starovoitov" Cc: "bpf" , "Alexei Starovoitov" , "Daniel Borkmann" , "Song Liu" , "Yonghong Song" , "Andrii Nakryiko" , "LKML" , "Kernel Team" , "Peter Zijlstra" , "Ingo Molnar" , "Arnaldo Carvalho de Melo" Subject: Re: [PATCH v5 bpf-next 2/2] selftests/bpf: add bpf_read_branch_records() selftest From: "Daniel Xu" Message-Id: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat Jan 25, 2020 at 6:53 PM, Alexei Starovoitov wrote: > On Sat, Jan 25, 2020 at 2:32 PM Daniel Xu wrote: > > + attr.type =3D PERF_TYPE_HARDWARE; > > + attr.config =3D PERF_COUNT_HW_CPU_CYCLES; > > + attr.freq =3D 1; > > + attr.sample_freq =3D 4000; > > + attr.sample_type =3D PERF_SAMPLE_BRANCH_STACK; > > + attr.branch_sample_type =3D PERF_SAMPLE_BRANCH_USER | PERF_SAMP= LE_BRANCH_ANY; > > + pfd =3D syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FL= AG_FD_CLOEXEC); > > + if (CHECK(pfd < 0, "perf_event_open", "err %d\n", pfd)) > > + goto out_destroy; > >=20 > It's failing for me in kvm. Is there way to make it work? > CIs will be vm based too. If this test requires physical host > such test will keep failing in all such environments. > Folks will be annoyed and eventually will disable the test. > Can we figure out how to test in the vm from the start? It seems there's a patchset that's adding LBR support to guest hosts: https://lkml.org/lkml/2019/8/6/215 . However it seems to be stuck in review limbo. Is there anything we can do to help that set along? As far as hacking it, nothing really comes to mind. Seems that patchset is our best hope.