Message ID | 20231106110336.358-48-philmd@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08D3218E05 for <kvm@vger.kernel.org>; Mon, 6 Nov 2023 11:09:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Qyd27gcY" Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4DD4FA for <kvm@vger.kernel.org>; Mon, 6 Nov 2023 03:09:01 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32d849cc152so3001768f8f.1 for <kvm@vger.kernel.org>; Mon, 06 Nov 2023 03:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699268940; x=1699873740; darn=vger.kernel.org; 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=l0/vWnFHt+cyNHMvzu2dssx7xYyn6IEpyeIo7MQjzWQ=; b=Qyd27gcYpUAX33VuD3V60EEg/WXc1kq2QYg5IXwR+c3PfBhsU7glBHDKlepNdhJSf5 sVAR02LIRRvMd8eX247VxwFXjpaYUfiU+QBqZ8YVQs1OrNxV45n/JJvCcBVe+KCwSWjW i1rqy0EIYq+4n0FuB03lJVY4qc+sEJH3ftifVZKEwM+FepjRBenX22qQ4PwDHnw6D2b6 u1FNKcVZnuX/bYk2kLBcUylV8mRNLvDaDECsfx56rMfPtxPt9NqHUVj8yckPspjh/OxP k2IqMsMsBhnDqhn/ksScJX3fXxctlNy+NUAfbY4U2wnM655XKzYiaBrT2F7MXCIyA+OV K0Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699268940; x=1699873740; 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=l0/vWnFHt+cyNHMvzu2dssx7xYyn6IEpyeIo7MQjzWQ=; b=PecpfpG6X4R4NH4tsSzFIyzN/h+EstzDNxPsgo0E+hqhydqoMBIAm9pN9eLllM8m8A fD0exSMxlFHPtbmDz7pLUk0CYoZeA7Vpi7hHp0MDP926LdpvQQaeTU5gXiOEtM14Rcop VVV1v3RRkqr73s+mwt5wX20b/SP2rB/4tw3aArWczpT05f2xTHLYJD5cnSjpUsSzTRQL ecek0W/q1cJYN+zZqR//2ymuFouylQdb0CSiDhhikIj2kw+PLGRjuXt81XOzIKPbtnD6 Z1HQpyLsDM93GZdXQPESPYqYacQFLeL75uHP6JjPPjKH7rlL3mPfNM+c3DXwSwuXX4V9 UZUA== X-Gm-Message-State: AOJu0YymW5pGaELUN+9cSJKj3B/boRnN1iTlDsttu3czzWkqXp8FzZOd Mmz1k+OHXJjOCAkSshxxaz8q1g== X-Google-Smtp-Source: AGHT+IFsbitm3bJThRshzHVNkwv0m7bE7yeAZoRxHUIurMBc1Abgxn0QnxImhW8tuDAE+j3RuaAyCQ== X-Received: by 2002:a05:6000:1361:b0:32d:9b80:e2c6 with SMTP id q1-20020a056000136100b0032d9b80e2c6mr22417154wrz.26.1699268940275; Mon, 06 Nov 2023 03:09:00 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id z18-20020adfec92000000b0032da8fb0d05sm9132494wrn.110.2023.11.06.03.08.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:08:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Fiona Ebner <f.ebner@proxmox.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, simon.rowe@nutanix.com, John Snow <jsnow@redhat.com> Subject: [PULL 47/60] hw/ide: reset: cancel async DMA operation before resetting state Date: Mon, 6 Nov 2023 12:03:19 +0100 Message-ID: <20231106110336.358-48-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106110336.358-1-philmd@linaro.org> References: <20231106110336.358-1-philmd@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: <kvm.vger.kernel.org> List-Subscribe: <mailto:kvm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:kvm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit |
Series |
[PULL,01/60] vl: Free machine list
|
expand
|
diff --git a/hw/ide/core.c b/hw/ide/core.c index b5e0dcd29b..63ba665f3d 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2515,19 +2515,19 @@ static void ide_dummy_transfer_stop(IDEState *s) void ide_bus_reset(IDEBus *bus) { - bus->unit = 0; - bus->cmd = 0; - ide_reset(&bus->ifs[0]); - ide_reset(&bus->ifs[1]); - ide_clear_hob(bus); - - /* pending async DMA */ + /* pending async DMA - needs the IDEState before it is reset */ if (bus->dma->aiocb) { trace_ide_bus_reset_aio(); blk_aio_cancel(bus->dma->aiocb); bus->dma->aiocb = NULL; } + bus->unit = 0; + bus->cmd = 0; + ide_reset(&bus->ifs[0]); + ide_reset(&bus->ifs[1]); + ide_clear_hob(bus); + /* reset dma provider too */ if (bus->dma->ops->reset) { bus->dma->ops->reset(bus->dma);