From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75E00C433DB for ; Mon, 8 Feb 2021 18:48:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0088264E84 for ; Mon, 8 Feb 2021 18:48:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0088264E84 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Ba8-0001ik-0u for qemu-devel@archiver.kernel.org; Mon, 08 Feb 2021 13:48:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l95L5-0005Zc-29 for qemu-devel@nongnu.org; Mon, 08 Feb 2021 07:08:24 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:45166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l95L1-0008Fi-6N for qemu-devel@nongnu.org; Mon, 08 Feb 2021 07:08:22 -0500 Received: by mail-ed1-x532.google.com with SMTP id t5so17707916eds.12 for ; Mon, 08 Feb 2021 04:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v6vzA5DyWEzzwaUkNwGbJxbKI8hzMwwsOzJCyXpoIR8=; b=GtGJCCZegjFunANqdEJK/dlMV1eMRYpuPnMs22UCDCf8trVUa1JAdb3WDnfGKKO2Ez XpKjVgXziwEOCGMvZIReOuK3qz5fi8Q3RsjrtY1Qy3e+QEU1H7Wv9jq5TGHqyb8CfnA6 Ea06NgV7aBke+1bshU+pU+yLLv0ptvzLnVRUYpmfo7u9MMyLmq8sIdeYDHT+dVXnIGqx kb46F3/q24bon6dOQPwX6EfOFnkKlCF43lexfQvOp63NNH/7RxOYpu//sZo45EZNb3UY nb/uKywoKSsa4p3xOqHgzkfZj0GyCOFWnq02UaCZBgyJPOPZbuPGbmQ9XpYKdjDEKUW1 DP9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v6vzA5DyWEzzwaUkNwGbJxbKI8hzMwwsOzJCyXpoIR8=; b=CAdNYIrnq664eCC/+cOFpP85vJYNa1EcTloKxG3day2uya5mUODw3QBE4svygofmvl Vf7JaVzoOxYOfaYph1t9WbE2WrwyABbl9x+GfSm52/2AcpedzpKwAl972udmFNFnjA34 Wt0M+bo//CwSuy6FikKO8jKeoBW3HYxqeHwZft+S0ONzdFYw3EowGudBngG+jHoeONwV o/deoviMzVYYXEghpJGtnlRl2V/Gj1n5yLS2+CqBvt0awWOv7+FS+BbY2uEvJFoCsKW6 fR8W4+Z/Syrqh4jZrsBfYHYObcfnHh0K5C3pvoBx2p7tvCOGfm1o5P7J9L6WmPnKLA6i lpGw== X-Gm-Message-State: AOAM53042y9ZJ78WHQO2Lea0tCh+glRauk5T9pgyQLUxLFpdIz1w3OCL pxX8Le/CANqtDn7efJvvyK8e8ECV7uKPEDwO5Epj3A== X-Google-Smtp-Source: ABdhPJx2qe4uUlAv7yTCs5LJ2WEh75SxO4G03VHlKR5AaRUMwAYm5y6Z/Pflkbv6vxJBtDKo4IRagvwGDyVpNXMz51Q= X-Received: by 2002:a50:9e01:: with SMTP id z1mr15258408ede.44.1612786094240; Mon, 08 Feb 2021 04:08:14 -0800 (PST) MIME-Version: 1.0 References: <5213f033-19dc-bc40-bfd7-10b8c676539b@redhat.com> In-Reply-To: <5213f033-19dc-bc40-bfd7-10b8c676539b@redhat.com> From: Peter Maydell Date: Mon, 8 Feb 2021 12:08:02 +0000 Message-ID: Subject: Re: getting the console output for s390 cdrom-test? To: Thomas Huth Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x532.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x , Eric Farman , Cornelia Huck , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, 8 Feb 2021 at 11:34, Thomas Huth wrote: > Looks like the SCSI controller returned VIRTIO_SCSI_S_FAILURE instead of the > expected VIRTIO_SCSI_S_BAD_TARGET here (see virtio_scsi_locate_device() in > pc-bios/s390-ccw/virtio-scsi.c). > > The question is: How could that happen? If I get hw/scsi/virtio-scsi.c > right, this is only set by virtio_scsi_fail_cmd_req(), i.e. it only happens > if virtio_scsi_parse_req() returned -ENOTSUP ... which indicates that there > was something wrong with the VirtIOSCSIReq request? Yes, virtio_scsi_parse_req() returns ENOTSUP because it fails the "if (out_size && in_size)" test. I am becoming somewhat suspicious that the s390-ccw BIOS's implementation of virtio is not putting in sufficient barriers, and so if you get unlucky then the QEMU thread sees an inconsistent view of the in-memory virtio data structures. For instance, the virtio spec says you must have a memory barrier after writing the available ring entries and before incrementing the available index, but pc-bios/s390-ccw/virtio.c:vring_send_buf() has no kind of enforcement of ordering between these two steps. Linux's arch/s390/include/asm/barrier.h suggests s390 needs real CPU barrier insns here; even if it didn't you would at least want enough of a compiler-barrier to tell the compiler not to try to reorder anything past it. thanks -- PMM