From nobody Sun Apr 28 16:27:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1558548731; cv=none; d=zoho.com; s=zohoarc; b=awFLZv3kQ6eSkXFFErI8SqubWkqUZEURzIb/PSS9IISlUjVcbBmCYJe2Rr2zCFXh39HiaR11tHSyu+bje792SsZ/2eRxdBG+LAKshYRIunyAqzKToq6rSVhEBIorU33nzJOKO2p2+oFDkLCAu29RGKjLxRsp39jWU6moiR0/g7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558548731; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=GrHOmBRAY2jYcg/mOee8McLcO8ozcwNvzDMopr4TQ8c=; b=VQ/B6TMpRNCYFfJLUQnFbs4KRyfgotYwJjs+FUe2yuABrDtJlUVKXQi+7zG+4tJ7lmgc8tUjQ4//N+hBQGkQcAN3Ltu3QlnY/rkyU+lB3hvgG9Xr0G7qY3ELWY3maPupB9K2heJhiRwb5QjrnSebPkj8EZ+GFTOZv6e1tuQOeZ8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1558548731970960.1782370329821; Wed, 22 May 2019 11:12:11 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hTVhK-0006q3-Nx; Wed, 22 May 2019 18:10:42 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hTVhJ-0006py-Eh for xen-devel@lists.xenproject.org; Wed, 22 May 2019 18:10:41 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id e7bed797-7cbc-11e9-8980-bc764e045a96; Wed, 22 May 2019 18:10:39 +0000 (UTC) X-Inumbo-ID: e7bed797-7cbc-11e9-8980-bc764e045a96 Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=igor.druzhinin@citrix.com; spf=Pass smtp.mailfrom=igor.druzhinin@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL02.citrite.net Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of igor.druzhinin@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="igor.druzhinin@citrix.com"; x-sender="igor.druzhinin@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of igor.druzhinin@citrix.com designates 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="igor.druzhinin@citrix.com"; x-sender="igor.druzhinin@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:23.29.105.83 ip4:162.221.156.83 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL02.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa1.hc3370-68.iphmx.com; envelope-from="igor.druzhinin@citrix.com"; x-sender="postmaster@MIAPEX02MSOL02.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: 10a1X91dTv4sCxhQ9Zkez7gVF7HgXlQ9bnUXdNZCEHjXZ2PwZxEA4A8MfGPLD91/AeFXmJgJBZ Vil+QCiXppb5ZdXGK02sCaJi88PtLfJG4K7nqo2MrcBCtsvonOKiVjst8zEuLADngwRYXjNw8E Ot+dIjP0iVtS+RsrAbKO94/MdKQCoZScy8OAzVW432LqzDYYO9GJLqXDeNrauy8ZxXua/BxBz/ DWxaZZ0kiB17l2If67kbMxzmH/5ZesfrW6bj1ViRohLLhOwt6TKOLLkngsfHKhG4wy7ZfMss4y JrI= X-SBRS: 2.7 X-MesageID: 786454 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,500,1549947600"; d="scan'208";a="786454" From: Igor Druzhinin To: Date: Wed, 22 May 2019 19:10:34 +0100 Message-ID: <1558548634-25154-1-git-send-email-igor.druzhinin@citrix.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] libacpi: report PCI slots as enabled only for hotpluggable devices X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: andrew.cooper3@citrix.com, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, Igor Druzhinin Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" DSDT for qemu-xen lacks _STA method of PCI slot object. If _STA method doesn't exist then the slot is assumed to be always present and active which in conjunction with _EJ0 method makes every device ejectable for an OS even if it's not the case. qemu-kvm is able to dynamically add _EJ0 method only to those slots that either have hotpluggable devices or free for PCI passthrough. As Xen lacks this capability we cannot use their way. qemu-xen-traditional DSDT has _STA method which only reports that the slot is present if there is a PCI devices hotplugged there. This is done through querying of its PCI hotplug controller. qemu-xen has similar capability that reports if device is "hotpluggable or absent" which we can use to achieve the same result. Signed-off-by: Igor Druzhinin Reviewed-by: Jan Beulich --- tools/libacpi/mk_dsdt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c index 2daf32c..c5ba4c0 100644 --- a/tools/libacpi/mk_dsdt.c +++ b/tools/libacpi/mk_dsdt.c @@ -439,9 +439,10 @@ int main(int argc, char **argv) pop_block(); } } else { - stmt("OperationRegion", "SEJ, SystemIO, 0xae08, 0x04"); + stmt("OperationRegion", "SEJ, SystemIO, 0xae08, 0x08"); push_block("Field", "SEJ, DWordAcc, NoLock, WriteAsZeros"); indent(); printf("B0EJ, 32,\n"); + indent(); printf("B0RM, 32,\n"); pop_block(); =20 /* hotplug_slot */ @@ -452,6 +453,12 @@ int main(int argc, char **argv) stmt("Store", "%#010x, B0EJ", 1 << slot); } pop_block(); stmt("Name", "_SUN, %i", slot); + push_block("Method", "_STA, 0"); { + push_block("If", "And(B0RM, ShiftLeft(1, %i))", slot); + stmt("Return", "0xF"); + pop_block(); + stmt("Return", "0x0"); + } pop_block(); } pop_block(); } } --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel