From patchwork Mon Jan 9 09:26:17 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: 640592 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2039774pvb; Mon, 9 Jan 2023 01:28:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXq/gFhvDsCkXy3Qb7CkZF25qXXLdBxfSplnZZHeo2gY5Tf/4Wp0O5unDBWE44S1c51wB4 X-Received: by 2002:a0c:c390:0:b0:4c7:29a8:1ff9 with SMTP id o16-20020a0cc390000000b004c729a81ff9mr72502704qvi.30.1673256520732; Mon, 09 Jan 2023 01:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673256520; cv=none; d=google.com; s=arc-20160816; b=MmMyQRntRd0VW5IQqJ0CwL8B9L+CaT887JUGKTzreH5bj1ig67jcv535+nMXQ57AKz VPrQASJarRgXVezwbMcORaJjF5gr1ts3KFNMNattOUWuNOL3WSVHyo8CGtDlqGxhsS49 ZBD99artwNCbMFcF0EHKfbOcgH3mtuBlTxldz+0+qQM3T5mArPfu4DWhdvsHqHUpwzzy ys9ELJaJNBoUkX/BdihAITjK8DJYjniEu1Ko1t99C2aOKjhqcdpEJZ3E+HHTTxI7eKLs cf/GvcayauPc2P6OZCWVbyDZeqJTmjq/QggcrJ8WzA59wu2douDk+ZJUeh+Xjkjfwlog JK7g== 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=lSI1q8Pr7ikyNEHE0ptbDijcSvsZa7X5vhrpcvBH7wI=; b=VQ3olhOcQLONphxxTr5YfcDt/VN2UZ9JEjRFjoQwoDA872YdMGR8KrxiXwf2KC/pRy sMgyVQhkJUJLadLKIydKo2fsZlurwy/iB6cGuKgP8Hgqse/n0YmqfrkfM1Jbl4tSPoAk tqQMLwJbg7ZpP7lbJtEDw1DuvNzhC64ab+wPQ4/qxQQtGMCtAMA4A5ueuVRX0PipNxDL /c4kZqkviUFK76VgyJfzaG3cubXlqIHwz6r4CM+oxBdeTZ4nN/0ij6y9mv3Z76f95/pb rSNXzWV6hdOHuWhRKBuZcnqkPbI3U7KOt7MNfxZUCjTQZKH0Ka7nk4Ic6VM/BGPZN4H3 prQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PupitDtL; 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 dv12-20020ad44eec000000b005321cec271bsi4357738qvb.186.2023.01.09.01.28.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 01:28:40 -0800 (PST) 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=PupitDtL; 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 1pEoQw-00048R-71; Mon, 09 Jan 2023 04:27:10 -0500 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 1pEoQu-00047d-7V for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:27:08 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEoQs-0005a1-Kz for qemu-devel@nongnu.org; Mon, 09 Jan 2023 04:27:07 -0500 Received: by mail-wm1-x32d.google.com with SMTP id m8-20020a05600c3b0800b003d96f801c48so8505328wms.0 for ; Mon, 09 Jan 2023 01:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=lSI1q8Pr7ikyNEHE0ptbDijcSvsZa7X5vhrpcvBH7wI=; b=PupitDtLY7UghG6gW4N1I7E1STzB5G8pOzgskfDpFcRYuZwfJe8ZKSUTyleOJrXxUC 26x+hvdXdg4GUermlxOi+IbsxnL+REoNdkcETJ+XzA5NuqwheVrAd/QJ54m25LoxFmvQ X0UeQDajIOU75/tK/D7e6s+PmgAMpoVinxtPmI04UeYh0VjXTMhdUIzvQid1Aoe+QPCe hpU0DEqefpi2wP0r9bq/RrvTmZYvjgQdF9AWfUkh9+99o5NrqrQWYeYTY4lJAGCJsS16 ygg/+niSmnveo3hvClsBNEyzLOX1opS3Xt2s9qGXu3mC1y46k9cGrfUxvaSG/s7mrSgd M7Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=lSI1q8Pr7ikyNEHE0ptbDijcSvsZa7X5vhrpcvBH7wI=; b=jgv7l6PPvY+oopKxG/68kzlYDAcZLhUugWxzNGCOgmBpaYZG3qv+IkDorrR98TA+MY Cw9Alr+4koGxu7YcMwMjbUS08ojW4bZ3989h/8zA56k50aDkuEAmAwprAk9ALXsyFW76 +J1CFhthy58NBVugNDu7EHTzoLMQgnwVSAbBL4UmxY4RTv+yaDikDluLP3Vf6sPZoPgf WerAUThUtS5ceYOyfvsY05eioZkMQw+sD+TNzSxgoh2bQ76BMI8bZfsSmLxwjn/OUo4I jcL7Z97j8x9v90bCslckeG3mhC/TVmkGBHfwL+rC+G7yUpVlnWHTk5HL2066Ep8pfFZz xR+w== X-Gm-Message-State: AFqh2kphHCavaPhNDRvATrgmxHYEa0HrYDwLdVAXBXeu0WkG2vl8obkl bFs26VDoZ4OjY1/M15aJ1VMZ2n8+/ye1fn9t X-Received: by 2002:a05:600c:1f12:b0:3cf:8155:2adc with SMTP id bd18-20020a05600c1f1200b003cf81552adcmr46860643wmb.33.1673256425207; Mon, 09 Jan 2023 01:27:05 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i3-20020a1c5403000000b003d35c09d4b9sm15151704wmb.40.2023.01.09.01.27.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Jan 2023 01:27:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jan Kiszka , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , "Michael S. Tsirkin" , qemu-arm@nongnu.org, Eduardo Habkost , Markus Armbruster , Richard Henderson , Peter Maydell , Thomas Huth , Marcel Apfelbaum , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 9/9] hw/i386/kvm: Convert TYPE_KVM_CLOCK from SysBus to QDev Date: Mon, 9 Jan 2023 10:26:17 +0100 Message-Id: <20230109092617.80224-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230109092617.80224-1-philmd@linaro.org> References: <20230109092617.80224-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 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 Nothing in TYPE_KVM_CLOCK access the SysBus API, convert it to a plain QDev. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index df70b4a033..da0984b5a0 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -35,7 +35,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(KVMClockState, KVM_CLOCK) struct KVMClockState { /*< private >*/ - SysBusDevice busdev; + DeviceState busdev; /*< public >*/ uint64_t clock; @@ -322,7 +322,7 @@ static void kvmclock_class_init(ObjectClass *klass, void *data) static const TypeInfo kvmclock_info = { .name = TYPE_KVM_CLOCK, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(KVMClockState), .class_init = kvmclock_class_init, }; @@ -338,7 +338,7 @@ void kvmclock_create(bool create_always) if (create_always || cpu->env.features[FEAT_KVM] & ((1ULL << KVM_FEATURE_CLOCKSOURCE) | (1ULL << KVM_FEATURE_CLOCKSOURCE2))) { - sysbus_create_simple(TYPE_KVM_CLOCK, -1, NULL); + qdev_realize(qdev_new(TYPE_KVM_CLOCK), NULL, &error_fatal)); } }