Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1306255ybl; Wed, 28 Aug 2019 12:38:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuJdQGgwfy/Y08cxqRfq6MV6PbQeS7dDofPiCGq8N58+fpTzIdm14Onp4AHZBSWTD45s3+ X-Received: by 2002:a17:902:20cc:: with SMTP id v12mr5550014plg.188.1567021097594; Wed, 28 Aug 2019 12:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567021097; cv=none; d=google.com; s=arc-20160816; b=QeC89N6C1/EfgGWxE8JyhdtPL8eNeVlBl+WDQyfm/ipNo9w+Fe9Hjyl6HGApiZg+sr YzkcVj3fIVPNJ060SlfiWqZ68FJHkr5hLWwUS8ReH2folF6XDdsE5YLbpB0Wx9R+3xBO hBP47/zMVi/IDy24AgZw76p50fNLooqWg23DbTN9jXb9UUJGat9SpECbNfL9ZH15WEvK MGNcFBGh8gdNXipgDqBBsqwgBk8ST9ZDU+LWyNCjOG3ZQiZvW+PC3YdES8ko24cFQlRy hTERjIZAncEdCEWMmXwLJKkeFEjx/gR8KhiMjmHywy+tKYn+4GBfjVY6qlVw3y5ktRRy VLJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=/ieIgDg1e+Xm67zWPlwQnf9WuQYrrH8QP9NJLlLyXq0=; b=YRN3LLwaH5v+2gYeDGSKnpY9X9gXPdadThL0+OpJvEKPk4Gg0H59mMbV77HBk5pEkQ QWiEE939z46pmPtiZDNqQgCyHlOn57SmcGbyEnKa5JpOkBtzeeptPmOFn7w9+zxpe7vf qyyWOvvrp1VhVlyPlwQRJxL0MpQcperQQJWasStWG3ikMgELUrO830tgCkaYJizRqknl WXnn8wUSNCO5AvIh9elv8XHoTpaGRgbZCFxotop04dreNeNjU0xGH8PAaExUP8Z/owH6 1BjbP2redQEGsTYghjAZ2FnRuI9cvtOvw12O0//ziwl1N32xCVH5uZfXEa8FXmZC0MQA o+jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=rjORbW3o; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si151100pjy.39.2019.08.28.12.38.00; Wed, 28 Aug 2019 12:38:17 -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=pass header.i=@amazon.de header.s=amazon201209 header.b=rjORbW3o; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbfH1Tg4 (ORCPT + 99 others); Wed, 28 Aug 2019 15:36:56 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:14643 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726844AbfH1Tgz (ORCPT ); Wed, 28 Aug 2019 15:36:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1567021015; x=1598557015; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=/ieIgDg1e+Xm67zWPlwQnf9WuQYrrH8QP9NJLlLyXq0=; b=rjORbW3ojaP5kcZdTla74pAA1uCpzUQTXogtc4l0dTS01piCX4DdfRXT CwspEAGlF+vILmdxsdME1kxNqmcP4VOMrmYIwHtf5wU+mJt+pKhX5M49F 0BezJPQ2tnYArGkPbzrCjmReERnWMWWBhUn+U9KlS2XukTXpgHtq7OtQW U=; X-IronPort-AV: E=Sophos;i="5.64,442,1559520000"; d="scan'208";a="698505670" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2b-81e76b79.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 28 Aug 2019 19:36:07 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2b-81e76b79.us-west-2.amazon.com (Postfix) with ESMTPS id BFA01A2399; Wed, 28 Aug 2019 19:36:06 +0000 (UTC) Received: from EX13D01EUB001.ant.amazon.com (10.43.166.194) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 28 Aug 2019 19:36:06 +0000 Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13D01EUB001.ant.amazon.com (10.43.166.194) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 28 Aug 2019 19:36:05 +0000 Received: from EX13D20UWC001.ant.amazon.com ([10.43.162.244]) by EX13D20UWC001.ant.amazon.com ([10.43.162.244]) with mapi id 15.00.1367.000; Wed, 28 Aug 2019 19:36:03 +0000 From: "Graf (AWS), Alexander" To: "Suthikulpanit, Suravee" CC: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "joro@8bytes.org" , "Schoenherr, Jan H." , "Raslan, KarimAllah" , "Lukaszewicz, Rimas" , "Grimm, Jon" Subject: Re: [PATCH v2 04/15] kvm: x86: Add per-VM APICv state debugfs Thread-Topic: [PATCH v2 04/15] kvm: x86: Add per-VM APICv state debugfs Thread-Index: AQHVU4YAxicok8C98kOOsiSZW3JVFacCQeaAgAujmoCAANQngIACP0YAgAAPr4U= Date: Wed, 28 Aug 2019 19:36:03 +0000 Message-ID: <9A47CE02-18B0-40C3-962A-D317A32F2073@amazon.de> References: <1565886293-115836-1-git-send-email-suravee.suthikulpanit@amd.com> <1565886293-115836-5-git-send-email-suravee.suthikulpanit@amd.com> <049c0f98-bd89-ee3c-7869-92972f2d7c31@amd.com> ,<1bfccb79-5ace-0dba-a201-e069f77f740a@amd.com> In-Reply-To: <1bfccb79-5ace-0dba-a201-e069f77f740a@amd.com> Accept-Language: en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 28.08.2019 um 20:41 schrieb Suthikulpanit, Suravee : > = > Alex, > = >> On 8/27/19 3:20 AM, Alexander Graf wrote: >> = >> = >>> On 26.08.19 21:41, Suthikulpanit, Suravee wrote: >>> Alex, >>> = >>>> On 8/19/2019 4:57 AM, Alexander Graf wrote: >>>> = >>>> = >>>>> On 15.08.19 18:25, Suthikulpanit, Suravee wrote: >>>>> Currently, there is no way to tell whether APICv is active >>>>> on a particular VM. This often cause confusion since APICv >>>>> can be deactivated at runtime. >>>>> = >>>>> Introduce a debugfs entry to report APICv state of a VM. >>>>> This creates a read-only file: >>>>> = >>>>> /sys/kernel/debug/kvm/70860-14/apicv-state >>>>> = >>>>> Signed-off-by: Suravee Suthikulpanit >>>> = >>>> Shouldn't this first and foremost be a VM ioctl so that user space = >>>> can inquire its own state? >>>> = >>>> = >>>> Alex >>> = >>> I introduce this mainly for debugging similar to how KVM is currently = >>> provides >>> some per-VCPU information: >>> = >>> /sys/kernel/debug/kvm/15957-14/vcpu0/ >>> lapic_timer_advance_ns >>> tsc-offset >>> tsc-scaling-ratio >>> tsc-scaling-ratio-frac-bits >>> = >>> I'm not sure if this needs to be VM ioctl at this point. If this = >>> information is >>> useful for user-space tool to inquire via ioctl, we can also provide it. >> = >> I'm mostly thinking of something like "info apic" in QEMU which to me = >> seems like the natural place for APIC information exposure to a user. > = > I could not find QEMU "info apic". I assume you meant "info lapic", = > which provides information specific to each local APIC (i.e. per-vcpu). Or maybe even "info kvm" :). I think you get the point. > = >> The problem with debugfs is that it's not accessible to the user that = >> created the VM, but only root, right? > = > Hm, you are right. I'll also look into also adding ioctl interface then. Thanks! Alex Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879