From patchwork Tue Oct 18 13:29:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 616064 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2641117pvb; Tue, 18 Oct 2022 06:48:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7WjRheH0tOLmuCfBLIfZ4fi56vDWDbusr3fYzGbX2ls+xSJ8CRXzwiEyG4s0wOlJx/uyu+ X-Received: by 2002:a05:620a:4155:b0:6ee:e6b5:efa7 with SMTP id k21-20020a05620a415500b006eee6b5efa7mr1931184qko.54.1666100910532; Tue, 18 Oct 2022 06:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666100910; cv=none; d=google.com; s=arc-20160816; b=Ayk3OmXBgwZx5zqg957Xfcn2UvGbatU2oeRIeCZcKhdQohdx3FRf+x18tpFgKrpY/P S6MHb5bu9q3rVb+UznZf2SiiGhpDzQeFI+P4TwHRVBIkprCdXGKKuwhe3o5eneSP9kkK WW+pOENCTuctMmkdjpfZ5MqBwbQVdIOVcKfvFzPUimvtDC+D0HmEwazu50mIdbLMTW6L ne1YXSb2LkEHUVkDolJAIqmmCKNoCSzmeppfhWPzSpJR3bhbLFno8ik2JClO0piJmE5E 1n2CpUW/bRxOVY8r8D3pObfs9unYIvqM75ff+WRDKIsA4hS0i0ekksMl6TfbHZ9TrVkN 1u8A== 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=8Mj0trnLBbmwbil62VyOFwjoBgFh0LukQgd1Qfq5RB8=; b=h7wvfdm1dSxvWiIe86qGPaaRo0C5wQpdN3eTq/I5aS2YK+QrTmtK/2W/t0AsnreDuk EI+msSYO0g1WoILl097qnjKtUxeThVwE0P/wdK3iEc+4QyQiqJah7TkixFzsuFmuVHa1 Thr+StmSMxJQlDk0vtV6guGFwYPXbn3KXPXtZnNhPllFGqNXVncryxefw86j/cFE50Id 7NR6192LtKJEXhAWmE3nCITbIbgUKQZn4wZJVxzv1N7u8J7YavNt6U1btVcEyqFzHT9X mt5uuAPNXzrXHaDcJx/SCgLMUs92ZfxthYQNALPZ36m5AGpeyhE9XeMcc2mv6C2xIgaq laiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JtswHCO0; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k22-20020ac84796000000b0034454335261si7115792qtq.466.2022.10.18.06.48.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2022 06:48:30 -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=@redhat.com header.s=mimecast20190719 header.b=JtswHCO0; 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=redhat.com Received: from localhost ([::1]:43768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okmxH-000138-KN for patch@linaro.org; Tue, 18 Oct 2022 09:48:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okmgh-0002KB-5p for qemu-devel@nongnu.org; Tue, 18 Oct 2022 09:31:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okmge-00050k-5b for qemu-devel@nongnu.org; Tue, 18 Oct 2022 09:31:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666099875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Mj0trnLBbmwbil62VyOFwjoBgFh0LukQgd1Qfq5RB8=; b=JtswHCO068zQB6igZNCcJ5aFyKKpIiF3tWJMmCSsh1ckcyMWJXwHmMerHSfTe1diLvNV35 Hbgr1LtTQnrvM5Gxd+KooT7J154pe4vkO+L2AAa5gP5sJBP9Suck6/lAxkOl6ypdDzaYF1 3E8LEuZ2bfFL5+sp5G9ge+3mCxo2lF0= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-635-HJpj9CrpN062IhaAz7RTkA-1; Tue, 18 Oct 2022 09:31:13 -0400 X-MC-Unique: HJpj9CrpN062IhaAz7RTkA-1 Received: by mail-ej1-f69.google.com with SMTP id sa6-20020a1709076d0600b0078d84ed54b9so6374052ejc.18 for ; Tue, 18 Oct 2022 06:31:13 -0700 (PDT) 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=8Mj0trnLBbmwbil62VyOFwjoBgFh0LukQgd1Qfq5RB8=; b=dN+Y0QfVuWy+usVcUmoWzNhZ6PW5//+9wNdaeKJU20SMS+6wWxsELRHB+d7lRK4mlQ pAMSzlaDdI2qxdj57Ou4AXMhkfgdyIBPQwJ/m7ggQ5rIiGt/9xY0uPTwphxqzYKdKVIQ m664uETGI7n8FLYHBphKbgeg/X4+MOeE5WbCrwLa0jzJydok44hV1xqR8vIO8k/jFbXb kX6GrEezD+cT2iNfOaKszvGZquhZ2Rd8fBL9gnl05U8bKMYSFHliTvi/r8B3Y8neIxfJ 3zbXtUAagvXJU/xaViaDfYf8RXg0ZTbgCJ8/vWsDEaLC8vchsd0smf0dG2yV1y7PreQC hOdQ== X-Gm-Message-State: ACrzQf15SESsSf762f5MB/SKPTL0FsoPAlgT4DgpNy5XL45VejNul2qE rEkrCjSKrUkkbZd8h6z1T6XO1R6ZZIbS6P9E38VXxM97G8DXst7H8gMSyc/lrvAXEfGYaRUF4Uj A/bEkiWfhDb57BkR6KRX6FFdLMtnn4YHuwmLOD6UI3nTJtkFZQyCCv+LFh6eysnBtfrY= X-Received: by 2002:a17:907:2d0f:b0:78e:9ca5:62af with SMTP id gs15-20020a1709072d0f00b0078e9ca562afmr2428770ejc.334.1666099871787; Tue, 18 Oct 2022 06:31:11 -0700 (PDT) X-Received: by 2002:a17:907:2d0f:b0:78e:9ca5:62af with SMTP id gs15-20020a1709072d0f00b0078e9ca562afmr2428756ejc.334.1666099871547; Tue, 18 Oct 2022 06:31:11 -0700 (PDT) Received: from avogadro.local ([2001:b07:6468:f312:2f4b:62da:3159:e077]) by smtp.gmail.com with ESMTPSA id l17-20020a1709060cd100b00783c545544fsm7500565ejh.215.2022.10.18.06.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 06:31:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Peter Maydell , "Michael S . Tsirkin" Subject: [PULL 07/53] target/i386: Use device_cold_reset() to reset the APIC Date: Tue, 18 Oct 2022 15:29:56 +0200 Message-Id: <20221018133042.856368-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221018133042.856368-1-pbonzini@redhat.com> References: <20221018133042.856368-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.256, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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" From: Peter Maydell The semantic difference between the deprecated device_legacy_reset() function and the newer device_cold_reset() function is that the new function resets both the device itself and any qbuses it owns, whereas the legacy function resets just the device itself and nothing else. The x86_cpu_after_reset() function uses device_legacy_reset() to reset the APIC; this is an APICCommonState and does not have any qbuses, so for this purpose the two functions behave identically and we can stop using the deprecated one. Signed-off-by: Peter Maydell Acked-by: Michael S. Tsirkin Message-Id: <20221013171926.1447899-1-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 90aec2f462..6279745f79 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6043,7 +6043,7 @@ void x86_cpu_after_reset(X86CPU *cpu) } if (cpu->apic_state) { - device_legacy_reset(cpu->apic_state); + device_cold_reset(cpu->apic_state); } #endif }