From patchwork Wed Jun 2 16:07:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1486788 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FwDV30XlVz9sSs; Thu, 3 Jun 2021 02:08:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1loTQ4-0004bO-MJ; Wed, 02 Jun 2021 16:08:36 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1loTQ2-0004b5-A5 for kernel-team@lists.ubuntu.com; Wed, 02 Jun 2021 16:08:34 +0000 Received: from mail-ej1-f69.google.com ([209.85.218.69]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1loTQ2-00034p-3D for kernel-team@lists.ubuntu.com; Wed, 02 Jun 2021 16:08:34 +0000 Received: by mail-ej1-f69.google.com with SMTP id b8-20020a170906d108b02903fa10388224so859101ejz.18 for ; Wed, 02 Jun 2021 09:08:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0IMVcjgLSSMqjEMhUn/hdvxSOVyM4pxmXE1+KONAWks=; b=GNxRwAQd1n7QVhrzt2n+n2vltjnURCngiPg1/ihs+N6XTJAltv3Ryria20yITMw4lx 3ElLIDOd5rASNIi51w8BpWY4cXIWZIO5apIlvp/FvXCW/s7KM+QRr65Tacuhjn3Hm2qB aYD+vuFC5K3XGkEQq+9HuMC93NvY+YdJlDp1WZYOh12GipoOV5BHgmMwA56c1SaQf7qF CUg4EAjXpj4FsYe9oC1g/qCnSiQfekr7rObyAKtP2C19JTg/MxtVgh+NslTP+O2dHVKZ 9UIHrn44jYwF7ndL3O4TuUOtf8tgZwn2BVyDyopVV8YXjxT/dCyi2gyffWkUbjtJ5WnE /3nw== X-Gm-Message-State: AOAM532mIwMhmV/+EO67AGdTXs0RNpuduP6XN+t+4e2byDR7QP8QZRG3 bUdBj3Vrud0xabtRH+bsp/wQFJLEpRCK1Q2zBpPx9m+g0yW5QPZoNXptl/L13F/DPLOaJdS6L1q kzLTexXofW9uKKOjgaUHDHFcG+jo2/xKIwv6t7kMpXg== X-Received: by 2002:a17:906:f8d0:: with SMTP id lh16mr26407446ejb.331.1622650113603; Wed, 02 Jun 2021 09:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDTdKlx2HDpi+eTliXn4HLnCsEBqC//cDW+KQdgH49rc5Uwws0qdb/mcFO/r0lf9KTHiXpNA== X-Received: by 2002:a17:906:f8d0:: with SMTP id lh16mr26407425ejb.331.1622650113433; Wed, 02 Jun 2021 09:08:33 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-185-9.adslplus.ch. [188.155.185.9]) by smtp.gmail.com with ESMTPSA id gx28sm219766ejc.107.2021.06.02.09.08.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 09:08:32 -0700 (PDT) From: Krzysztof Kozlowski To: kernel-team@lists.ubuntu.com Subject: [SRU][H][PATCH 1/1] UBUNTU: [Debian] install kvm_stat systemd service Date: Wed, 2 Jun 2021 18:07:59 +0200 Message-Id: <20210602160759.85769-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210602160759.85769-1-krzysztof.kozlowski@canonical.com> References: <20210602160759.85769-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Install the kvm_stat systemd service in linux-host-tools package, disabled by default. The service logs KVM kernel module trace events to /var/log/kvm_stat.csv. This tool is useful for observing guest behavior from the host perspective. Often conclusions about performance or buggy behavior can be drawn from the output. BugLink: https://bugs.launchpad.net/bugs/1921870 Signed-off-by: Krzysztof Kozlowski --- debian/rules.d/3-binary-indep.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index 511a5eb39211..6a44129678b2 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -88,6 +88,7 @@ install-tools: toolsbashcomp = $(CURDIR)/debian/$(toolspkg)/usr/share/bash-compl install-tools: hosttoolspkg = $(hosttools_pkg_name) install-tools: hosttoolsbin = $(CURDIR)/debian/$(hosttoolspkg)/usr/bin install-tools: hosttoolsman = $(CURDIR)/debian/$(hosttoolspkg)/usr/share/man +install-tools: hosttoolssystemd = $(CURDIR)/debian/$(hosttoolspkg)/lib/systemd/system install-tools: cloudpkg = $(cloud_common_pkg_name) install-tools: cloudbin = $(CURDIR)/debian/$(cloudpkg)/usr/bin install-tools: cloudsbin = $(CURDIR)/debian/$(cloudpkg)/usr/sbin @@ -159,8 +160,11 @@ endif ifeq ($(do_tools_host),true) install -d $(hosttoolsbin) install -d $(hosttoolsman)/man1 + install -d $(hosttoolssystemd) install -m 755 $(CURDIR)/tools/kvm/kvm_stat/kvm_stat $(hosttoolsbin)/ + install -m 644 $(CURDIR)/tools/kvm/kvm_stat/kvm_stat.service \ + $(hosttoolssystemd)/ cd $(builddir)/tools/tools/kvm/kvm_stat && make man install -m644 $(builddir)/tools/tools/kvm/kvm_stat/*.1 \ @@ -188,6 +192,7 @@ binary-headers: prepare-indep install-headers dh_builddeb -p$(indep_hdrpkg) binary-indep: cloudpkg = $(cloud_common_pkg_name) +binary-indep: hosttoolspkg = $(hosttools_pkg_name) binary-indep: install-indep @echo Debug: $@ dh_installchangelogs -i @@ -213,6 +218,11 @@ endif # and dh_systemd_start are called: dh_installinit -p$(cloudpkg) --no-start --no-enable --name intel-sgx-load-module endif +endif +ifeq ($(do_tools_host),true) + # Keep kvm_stat.service disabled by default (after dh_systemd_enable + # and dh_systemd_start: + dh_installinit -p$(hosttoolspkg) --no-enable --no-start --name kvm_stat endif dh_installdeb -i $(lockme) dh_gencontrol -i