From nobody Fri May 3 14:44:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605614482; cv=none; d=zohomail.com; s=zohoarc; b=JZ4/lt6eBe5ApkHwu7kSTH4ssIcYPKETaToB/Ys2HImvdrJN4qCA58T5uW74nLVwMkUJXb25Ae7qKWmJCYLufvv2iA5oxMjrTXxjrnJ3rEig3S1yDC+ufWphpWpdvIpjPUBJDmMFmkvpotu5c4822ZHCGkqBkrOohfLjHF2AxRA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605614482; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=BcOAMM8T64H99sWBWVknGqExdGrrYQhRqVV+46dbmRs=; b=BwwS95a51rbSGj0KXh8KGjeKcs7PBHpFSpChLVTArtgjuR8TUo8yrSQBfniHDemOyefQD8TtL8OVd9pyiKyPPo7lkhflPtQn2oI1Athd7jQsMk8lQLVz6gaOgae5jtJlOexxCwSUA9PfB47zoVslUwaVuIkDY7PsD4VmVFW21vo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605614482295674.658075937115; Tue, 17 Nov 2020 04:01:22 -0800 (PST) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-72-J2VKFSCaN4mN-ickAFmbVA-1; Tue, 17 Nov 2020 07:01:19 -0500 Received: by mail-wr1-f70.google.com with SMTP id g5so11439692wrp.5 for ; Tue, 17 Nov 2020 04:01:19 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id e16sm1532063wmk.5.2020.11.17.04.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 04:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605614481; 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; bh=BcOAMM8T64H99sWBWVknGqExdGrrYQhRqVV+46dbmRs=; b=cHJscVspTn1n8UNOd3lnTEcNl/AlUcwsMjr3JYAVSs1B4UM+1hiOBB+fJ9prk2gxe2IaP7 czKIEGC5JllrcxGS4fc2W5yrYv3djn4QoIYP5g0vxVGuMTN6GbeEBmMo7yw6U66tNtCiVO GuZtgRbGykFvE9DWcvzxgG9digUQbfU= X-MC-Unique: J2VKFSCaN4mN-ickAFmbVA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BcOAMM8T64H99sWBWVknGqExdGrrYQhRqVV+46dbmRs=; b=BnuBKaMxacMJoErjPjE5NES8Mwck3enjQEsRwbn9X7/as6flc51TfUulZB/Uk5u3Og zLSvGAofvSYKQ2+Gcx+TU2x/b5HUiUXsznXtBBDXdaCDs+5n3j66oIdWjv4CObrIt/YW r7tIk0VURK0m7Dbit/Ds90/RQvqgRM/CR2oh+AU0ssMtrH76VXwuBoOLXmtlr2PvJ8zl 8apYgF19TvZ8iuHrUbbu6qdiZDPouR8Ys6fWgvWWb4jvCYxWLXCqsg9xpr0Yl71a7Czr Q8mV2J2Jdhr0JQRuiFwGjHCagWBnSjI+rhZWHv0zz99p6XSFZ7RYXDT1HUAhhTPDg41A HKwA== X-Gm-Message-State: AOAM530iL2kgEIZUzcS4K6xAs6FEab+cN56hHH+aYxCKXE5r1xmMUr/A m9izOz6+ydL7UD1R/hCCtsSknz+28YmnejFX7EqG40pJv+j9laPjzDg53YO5t/NAmzRE97Z0Pb1 ToWZgiqIMtJgnGA== X-Received: by 2002:adf:f24a:: with SMTP id b10mr25326561wrp.352.1605614478177; Tue, 17 Nov 2020 04:01:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWqA5VDMUyiYK1SZxCX8gOJVVgIK0vu6h+j/ehAlmDnj0zhrOmywzsvnw39Q6Ym2Yi2Y+5cA== X-Received: by 2002:adf:f24a:: with SMTP id b10mr25326537wrp.352.1605614478020; Tue, 17 Nov 2020 04:01:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Cornelia Huck , Pierre Morel , Matthew Rosato , Halil Pasic , David Hildenbrand , Thomas Huth , Christian Borntraeger , Alex Williamson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH-for-5.2] hw/s390x/pci: Fix endianness issue Date: Tue, 17 Nov 2020 13:01:15 +0100 Message-Id: <20201117120115.1234994-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Fix an endianness issue reported by Cornelia: > s390x tcg guest on x86, virtio-pci devices are not detected. The > relevant feature bits are visible to the guest. Same breakage with > different guest kernels. > KVM guests and s390x tcg guests on s390x are fine. Fixes: 28dc86a0729 ("s390x/pci: use a PCI Group structure") Reported-by: Cornelia Huck Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- RFC because review-only patch, untested --- hw/s390x/s390-pci-inst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 58cd041d17f..cfb54b4d8ec 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -305,7 +305,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_= t ra) ClpReqQueryPciGrp *reqgrp =3D (ClpReqQueryPciGrp *)reqh; S390PCIGroup *group; =20 - group =3D s390_group_find(reqgrp->g); + group =3D s390_group_find(ldl_p(&reqgrp->g)); if (!group) { /* We do not allow access to unknown groups */ /* The group must have been obtained with a vfio device */ --=20 2.26.2