From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prasun Ratn Subject: Re: qemu/ftrace question Date: Thu, 22 Jun 2017 05:58:52 +0530 Message-ID: References: <20170621111921.GG16183@stefanha-x1.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mail-lf0-f41.google.com ([209.85.215.41]:34409 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689AbdFVA3O (ORCPT ); Wed, 21 Jun 2017 20:29:14 -0400 Received: by mail-lf0-f41.google.com with SMTP id l13so616475lfl.1 for ; Wed, 21 Jun 2017 17:29:14 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: > > I see writes to fd 2 and 8:- > Oops, I was using the log backend - 2 is stderr of course. With the ftrace backend build, I see this. It looks like qemu must be run as root [pid 15759] open("/sys/kernel/debug/tracing/tracing_on", O_WRONLY) = -1 EACCES (Permission denied) [pid 15759] open("/dev/null", O_WRONLY) = 10 [pid 15759] stat("/var/lib/libvirt/images/generic.qcow2", {st_mode=S_IFREG|0644, st_size=21478375424, ...}) = 0 [pid 15759] write(10, "bdrv_open_common bs 0x7f77a19cfa"..., 116) = 116 [pid 15759] open("/dev/urandom", O_RDONLY) = 15 [pid 15759] read(15, "=S\202\372\17\17 \317\n\201G{\353\300\310\307", 16) = 16 [pid 15759] close(15) = 0 [pid 15759] futex(0x7f779f31d4a8, FUTEX_WAKE, 2147483647) = 0 [pid 15759] open("/var/lib/libvirt/images/generic.qcow2", O_RDWR|O_CLOEXEC) = 15 [pid 15759] fstat(15, {st_mode=S_IFREG|0644, st_size=21478375424, ...}) = 0 [pid 15759] lseek(15, 0, SEEK_END) = 21478375424 [pid 15759] fstat(15, {st_mode=S_IFREG|0644, st_size=21478375424, ...}) = 0 [pid 15759] write(10, "bdrv_open_common bs 0x7f77a19c94"..., 117) = 117 With simple trace backend [pid 27775] open("trace-27775", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied) I assume, these methods work best when launching qemu directly, as compared to using libvirt. -Prasun