From patchwork Tue Jun 20 08:32:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 694451 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp187973wrm; Tue, 20 Jun 2023 01:33:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EIV94yx2/Bqp60ZF3715PtnJSwGaw5HEaOoTvOiEPado2n8RQul/UjMbZRpGgnjPByJaw X-Received: by 2002:ac8:5e47:0:b0:3ff:2119:f9b7 with SMTP id i7-20020ac85e47000000b003ff2119f9b7mr6175516qtx.40.1687250004095; Tue, 20 Jun 2023 01:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687250004; cv=none; d=google.com; s=arc-20160816; b=TyoKAosIPdkHa3OzXIO42LfhkZ9YtLd3tKKl7frAvmY0qaXAuBlbBv5eeNneevmpOa udZOQCvMhTbluyvyGDJiHomaWDPuwWhjlhRE4K2XCrjzjNv9hnxU6nW/Z7U+HoaZrGPe eW63F2CQu3hSMTjQQ5xl1MPY0NK0wS0uFE8Y/3lAhnVet3xzgLw2GSy0bJr1UFeBzhMH 7gbh2LggDgmikH87pe+PnRwJkJOWq1Pa6A7CtlNm/0lOAWRU+wqcTHOXOnDLDSVF64Fe l6Bt6y0hUoybEYkw25DkvLvo5m7FvtAC5+xuS1vgsnCoKH7EsUCn4W4+RpfYlDH5IMiJ GPZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2fWrVTkrh+bhxulRnGVYi7XRu+z1AiTWlgw98CXAeJI=; b=myHfBL2eHN1+zqKwzJnUviPgIuqGAo7tlgJ3YNDnnCMWWqWDYbQXmWYc5MDvlDgg9E 7WnYHU6xKI2SMq5Lz60btQbTACZT282KC+wr0lYgGoM/cfOKsrJsAqqA55TKeJwKZHJF 46YmwDS7q2gbxlFr43MV6/2K0EV+M+m6ly3eA2zKHqF5NrHBmesS2UqZSn/Fmdd2jMkG fltXBAUt3CGk5twpJ/KsPTiDxQOEcX1tHAP/G1bJt4lhXEmHgzdKricAE/OgVtUHN2ar wj4R6tS3ZWjutByfo0dmvJed7bYFMmc3NLxynKSEKBl20vxnhvRxikJKus7nuFMEsWTD RHDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SOnhA91B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c18-20020ac87d92000000b003f21c565b9asi580141qtd.681.2023.06.20.01.33.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 01:33:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SOnhA91B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBWn8-0006AZ-C9; Tue, 20 Jun 2023 04:32:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBWn6-0006AD-7D for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:32:44 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBWn4-000849-IO for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:32:43 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-988a5383fd4so369449566b.0 for ; Tue, 20 Jun 2023 01:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687249959; x=1689841959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2fWrVTkrh+bhxulRnGVYi7XRu+z1AiTWlgw98CXAeJI=; b=SOnhA91BKwLw20oxQ7Deu+EZBvp12+SO/nRM9MirPrl1jRsI5NjJUhnurnJNs6BR9q nBq52fa3Nb+Ga+3YlccTxEm5xU4s7GsxUA0eg6bpv5MfcWogS2Flp1XWsYbBfTOJSOmu A6/HzEk5O8wTO2jeJcnHVSj3Gehtn16el8oVkz1YfTNf+mjGT9RofjTbg3IaHCGXVd/T djp6Oa6O69TJO16H1cxgtk1R+2FpNLZ4o8w0o7lVqIV4a52ackRgdbECu7M4FT4LyIEf JPBdUmJRmFcjHtY3Jf6vUx+fBReGCSlNklpaEZ9czKLnPJvspNH6c4rVVdM3uhYcobBA 7+Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249959; x=1689841959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2fWrVTkrh+bhxulRnGVYi7XRu+z1AiTWlgw98CXAeJI=; b=LG9O4CjK9xWMh/O8TwtGkfeiLH27iqTy8JBPWPZQpiweYNsJyanIT3jiQCw8ZAPlRg AhjYiN3oVnAvvnO+CioejbSez/VY6flKdTvPJR4gkadQU1fTCdj0lDNRL+ugexFWA2mv ajV0U9zAO8kHlc6GeCMf+bvwT+Q0cnqKDZ8Hh+wg/PpuAT0eAiVwoAOn8UjqefBK09rV ij67vjoeggM7BxpnggVyRwYtUq1y1gGwHaCD/5Fk7YCd1Roalfm+C4eG+edIlUF7xJHm HpMewGe8t60kM27tMZluSDZjuCvwAv2AKNFBcEpJvJzbJOrD6L53EEdmeEj/AEpfeylW tTFw== X-Gm-Message-State: AC+VfDwXjr0ZHk99AVf8K9/F2KOWbcoNciVDvMXczjmiOP85uAGII9RV z7OuGsE2oQbV7m3zUbGEHdfwUnHmTQRX+Me/RO98bw== X-Received: by 2002:a17:907:6d26:b0:988:2037:c687 with SMTP id sa38-20020a1709076d2600b009882037c687mr6360386ejc.37.1687249959548; Tue, 20 Jun 2023 01:32:39 -0700 (PDT) Received: from m1x-phil.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id l11-20020a170906644b00b00988956f244csm966198ejn.6.2023.06.20.01.32.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Jun 2023 01:32:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Michael S. Tsirkin" , Sergio Lopez , Eduardo Habkost , Paolo Bonzini , kvm@vger.kernel.org, Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] hw/i386: Remove unuseful kvmclock_create() stub Date: Tue, 20 Jun 2023 10:32:27 +0200 Message-Id: <20230620083228.88796-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230620083228.88796-1-philmd@linaro.org> References: <20230620083228.88796-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We shouldn't call kvmclock_create() when KVM is not available or disabled: - check for kvm_enabled() before calling it - assert KVM is enabled once called Since the call is elided when KVM is not available, we can remove the stub (it is never compiled). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- include/hw/kvm/clock.h | 10 ---------- hw/i386/kvm/clock.c | 4 +++- hw/i386/microvm.c | 4 +++- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 4 +++- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/hw/kvm/clock.h b/include/hw/kvm/clock.h index 7994071c4f..3efe0a871c 100644 --- a/include/hw/kvm/clock.h +++ b/include/hw/kvm/clock.h @@ -13,16 +13,6 @@ #ifndef HW_KVM_CLOCK_H #define HW_KVM_CLOCK_H -#ifdef CONFIG_KVM - void kvmclock_create(bool create_always); -#else /* CONFIG_KVM */ - -static inline void kvmclock_create(bool create_always) -{ -} - -#endif /* !CONFIG_KVM */ - #endif diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index df70b4a033..0824c6d313 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -332,8 +332,10 @@ void kvmclock_create(bool create_always) { X86CPU *cpu = X86_CPU(first_cpu); - if (!kvm_enabled() || !kvm_has_adjust_clock()) + assert(kvm_enabled()); + if (!kvm_has_adjust_clock()) { return; + } if (create_always || cpu->env.features[FEAT_KVM] & ((1ULL << KVM_FEATURE_CLOCKSOURCE) | diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 7227a2156c..6b762bc18e 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -180,7 +180,9 @@ static void microvm_devices_init(MicrovmMachineState *mms) x86ms->ioapic2 = ioapic_init_secondary(gsi_state); } - kvmclock_create(true); + if (kvm_enabled()) { + kvmclock_create(true); + } mms->virtio_irq_base = 5; mms->virtio_num_transports = 8; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 44146e6ff5..715c063eec 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -193,7 +193,7 @@ static void pc_init1(MachineState *machine, pc_machine_init_sgx_epc(pcms); x86_cpus_init(x86ms, pcmc->default_cpu_version); - if (pcmc->kvmclock_enabled) { + if (kvm_enabled() && pcmc->kvmclock_enabled) { kvmclock_create(pcmc->kvmclock_create_always); } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a9a59ed42b..a0553f70f7 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -184,7 +184,9 @@ static void pc_q35_init(MachineState *machine) pc_machine_init_sgx_epc(pcms); x86_cpus_init(x86ms, pcmc->default_cpu_version); - kvmclock_create(pcmc->kvmclock_create_always); + if (kvm_enabled()) { + kvmclock_create(pcmc->kvmclock_create_always); + } /* pci enabled */ if (pcmc->pci_enabled) { From patchwork Tue Jun 20 08:32:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 694452 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp187974wrm; Tue, 20 Jun 2023 01:33:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HhED3vPkJOc1V8ygrO/4eWhqFYszv/jC31+bKm9h9vleD3fwNJhFXh8ma9mVFvpoSc/ND X-Received: by 2002:ad4:5f08:0:b0:630:1e0:1345 with SMTP id fo8-20020ad45f08000000b0063001e01345mr14152075qvb.59.1687250004131; Tue, 20 Jun 2023 01:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687250004; cv=none; d=google.com; s=arc-20160816; b=AKBxl1aG8EJ2VNXEbOsVlwRcIO/dMa2d/BUHhb64pG3j523UsXmZYMbYhflpGs1Ydq dUZQFwAIVyqO3CiMGt8c9RqOu5Y886tUB74TdDdfKJtfOe/t4YjTCSbOiQjkFbzr7V4j V9pcyysju2aKt3R/0KkASpzu7wFdLhEJbuMkWqYS4INVGOJ5xlD+WG/G3fOHSJC4QFkF vPBmezDCqVXm4+HneS9TVa5Z4P3QXdMYVAY0s5eRYASXaXJK+1ImyunK4VNUInEYIaQK yl5HgYq+0+66sIHHjICCh1rlS9FT1QI8Nb8oSAm1D1ML9aQ5l5W2AAaSP/zo8AGiACmM 2dJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hHeaAAV3ecaC5191lrrTDI3ODMtZRKyKR+rtQqyfdog=; b=c1EIju5Xkh21D+2w3ycez8DPuGl7MtoKt62YN8vOxxmNYOYxaNlFfeIMMXi0Xue8zW +9LQeWXMS252f7i+XdWZV0eiP5JXtCEWhfXqCZFIBbKzE1tWTbp1Jm538g6AC2oaiqOT 38x0l5+jCDAK902AzUe3FbRp+qjVZ+uxPlGfGIpRhb6W7x3Ni2yPBTIXy8uz/giZxPen +baFzYP9uv+nQcw981XNxGszgiW3hrqDQ2e+RgoKdG1+RUPvneQnv/MsgH+XDUhII/3r r44vWAlLgiH+q7umd2qRgaDIglAOXFuyyzxne2+UnYGOU1QQWZ9Pn9hfm8yOKgV59KXb 1xng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iUJ4og1P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r13-20020ad4576d000000b0063009c96812si644810qvx.3.2023.06.20.01.33.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 01:33:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iUJ4og1P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBWnH-0006BL-RU; Tue, 20 Jun 2023 04:32:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBWnB-0006Ay-Ba for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:32:51 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBWn9-000852-HS for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:32:49 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9875c2d949eso537213666b.0 for ; Tue, 20 Jun 2023 01:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687249965; x=1689841965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hHeaAAV3ecaC5191lrrTDI3ODMtZRKyKR+rtQqyfdog=; b=iUJ4og1PJgdDP6JnKHhDGXUT//pbRS55dQgwdlVQtEZpmnboLcwkfCsd4/3IIMQ0dn GZplQoJWfNw0blvx+00gBvsyhl4XAMIP2Bk0cE6cPVUdu4uH3Qs3YWxMZGYsZKierlkG nE+mtGIEIO36AG6pUNQudPmEzXcDV6ppGefdT/gqVG4hvo42QOVgSJX9nMv+GcHNqC9c 7sb8TbGyBYaxpB5W2MKsfKWQc9Yhx8twrfolQY8N8x2yjx46VR6VaG3sus2Pj1niLYMu zmh8pDLQv6KP5E1N8fND45TJhadTsU6n3ZpJTB9yFYclY9lwHrtGIdZAUl7DobIESibO LfSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249965; x=1689841965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hHeaAAV3ecaC5191lrrTDI3ODMtZRKyKR+rtQqyfdog=; b=WvZnWO3yZSso6RPKw7uNpSs/jHF/tRu+u3PHp1Je24+0GB/7jayu43r9ZLst6LgZBQ 5IbxSsLrl60v9TcR5/I+HrTXqkoPDywIVhTGUhjm3LzmEMPij0H3LY/bN8B6g4glg7Rw /++AXr9LLFa/QchIZt6DcD+xHUBespNiwXmBkT2hbm6FP6AzaMDQ3SaYBKu2L32W/Ugz NupnkV665y+PPnOo/fOhywcRpmxZubwi8ZPg7Zo+ilcjdZo8LOdSuSwZvaLIBV2Wclyv dEO5aPshBnTcO2WhPdZPycKAJ8vG4d4Vt5Q1G1rcMflcgzk0ASoyKL9m6YXhYv9kMrVh ErdA== X-Gm-Message-State: AC+VfDxAStgr/lyzQh1psq77jdVLIPIkUoHlmREYXsAypjW81FZ44FB8 UuZgIEqGFNtAxTLCWG4tQQDOwWqk2+TzlLBrYdy8Pw== X-Received: by 2002:a17:907:7fa4:b0:977:e916:9b83 with SMTP id qk36-20020a1709077fa400b00977e9169b83mr14118889ejc.8.1687249965484; Tue, 20 Jun 2023 01:32:45 -0700 (PDT) Received: from m1x-phil.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id s19-20020a170906355300b0098921e1b064sm784307eja.181.2023.06.20.01.32.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Jun 2023 01:32:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Michael S. Tsirkin" , Sergio Lopez , Eduardo Habkost , Paolo Bonzini , kvm@vger.kernel.org, Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 2/2] hw/i386: Rename 'hw/kvm/clock.h' -> 'hw/i386/kvm/clock.h' Date: Tue, 20 Jun 2023 10:32:28 +0200 Message-Id: <20230620083228.88796-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230620083228.88796-1-philmd@linaro.org> References: <20230620083228.88796-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org kvmclock_create() is only implemented in hw/i386/kvm/clock.h. Restrict the "hw/kvm/clock.h" header to i386 by moving it to hw/i386/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- RFC: No other arch had to implement this for 12 years, safe enough to restrict to x86? --- {include/hw => hw/i386}/kvm/clock.h | 4 ++-- hw/i386/kvm/clock.c | 2 +- hw/i386/microvm.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename {include/hw => hw/i386}/kvm/clock.h (85%) diff --git a/include/hw/kvm/clock.h b/hw/i386/kvm/clock.h similarity index 85% rename from include/hw/kvm/clock.h rename to hw/i386/kvm/clock.h index 3efe0a871c..401c7e445b 100644 --- a/include/hw/kvm/clock.h +++ b/hw/i386/kvm/clock.h @@ -10,8 +10,8 @@ * See the COPYING file in the top-level directory. */ -#ifndef HW_KVM_CLOCK_H -#define HW_KVM_CLOCK_H +#ifndef HW_I386_KVM_CLOCK_H +#define HW_I386_KVM_CLOCK_H void kvmclock_create(bool create_always); diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 0824c6d313..34348a3324 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -22,7 +22,7 @@ #include "kvm/kvm_i386.h" #include "migration/vmstate.h" #include "hw/sysbus.h" -#include "hw/kvm/clock.h" +#include "hw/i386/kvm/clock.h" #include "hw/qdev-properties.h" #include "qapi/error.h" diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 6b762bc18e..8deeb62774 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -32,7 +32,7 @@ #include "hw/loader.h" #include "hw/irq.h" -#include "hw/kvm/clock.h" +#include "hw/i386/kvm/clock.h" #include "hw/i386/microvm.h" #include "hw/i386/x86.h" #include "target/i386/cpu.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 715c063eec..85fe41327c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -46,7 +46,7 @@ #include "hw/ide/piix.h" #include "hw/irq.h" #include "sysemu/kvm.h" -#include "hw/kvm/clock.h" +#include "hw/i386/kvm/clock.h" #include "hw/sysbus.h" #include "hw/i2c/smbus_eeprom.h" #include "exec/memory.h" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a0553f70f7..9e6602dfde 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -35,7 +35,7 @@ #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" #include "sysemu/kvm.h" -#include "hw/kvm/clock.h" +#include "hw/i386/kvm/clock.h" #include "hw/pci-host/q35.h" #include "hw/pci/pcie_port.h" #include "hw/qdev-properties.h"