From nobody Sun Feb 8 14:52:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1663850667; cv=none; d=zohomail.com; s=zohoarc; b=W4EaJP5yj/+l9QiwS+hTbVuwuvaCPh1xRcBYmme3T0KfkXBO1nIqTMutxDMk05sHQ0RvvqBA/fzNb0sSvz+IN0LdGnzahwkbsQlY+bd7XGXs9Q47mC8/nRajZAu8M0fr9vvCgGZ/EGFOKRDrKI2N69IrEAV80zQBWQTOcqwoAmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663850667; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MsM7VwdO4jf5+yXs89/Jb2BugK5DNfkrXG0PPPtNrxg=; b=jV7g/jV66DvVsxYqTbWuv27b9oYfzmIhrJvWFtV4oR7/FnZVNyVCTV2o0w8j8za9yHsTFE73BGiqpRc/BvXyDZVSbSn1Zb7Z2pqJ0c65CUAnjh9YUYCTx07Tqe5x7RE6nXkM5xdFl5g8uxd12LDqsqQt8E/y+IWMJy7Lb3Ys5so= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1663850667517123.37803235637875; Thu, 22 Sep 2022 05:44:27 -0700 (PDT) Received: from localhost ([::1]:53230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obLZ3-0000Ol-PN for importer@patchew.org; Thu, 22 Sep 2022 08:44:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obLDY-0001o0-GT for qemu-devel@nongnu.org; Thu, 22 Sep 2022 08:22:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:16856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obLDW-0000w1-Ql for qemu-devel@nongnu.org; Thu, 22 Sep 2022 08:22:12 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 05:22:09 -0700 Received: from sqa-gate.sh.intel.com (HELO robert-clx2.tsp.org) ([10.239.48.212]) by orsmga005.jf.intel.com with ESMTP; 22 Sep 2022 05:22:07 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663849330; x=1695385330; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PsoLe8vgHzR+AwIMYbvv3iaU4zCz8BxOcycp5wGPxHg=; b=m78hy2Z1VVIRA8X5VPSxZl3AfNwm1DRf6LVhlWmnWvIpTKJhxkiOr18I 5rxUkHxeW0Yg18giXiYK4hpTicWOHyfxXB8J4u2QkPvM86xj5HdODtHo2 PHaF1wX7Z1B8og/4rQ3an+VEytZVj51GhRL7LJjStYE+JkU6yHAnJR3eZ 4Tf3S0jko0xUoY+pnea75y7GMb+2VGYHW3n2m1RL5JTHWwn98biVBUvX7 1FEB8c3M62kDdjzJyG6HHNXtNtZTDFO1wxPYZ11weHKuU4kXtjKoFEZVd b7MIz8B/GOdJytf9THCX6dNzdGJQB1GlfIVtJhjwOE8vRgXLfYeupfYIx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301128373" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="301128373" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="795063231" From: Robert Hoo To: imammedo@redhat.com, mst@redhat.com, xiaoguangrong.eric@gmail.com, ani@anisinha.ca, jingqi.liu@intel.com Cc: qemu-devel@nongnu.org, robert.hu@intel.com, Robert Hoo Subject: [PATCH v4 2/5] acpi/ssdt: Fix aml_or() and aml_and() in if clause Date: Thu, 22 Sep 2022 20:21:52 +0800 Message-Id: <20220922122155.1326543-3-robert.hu@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220922122155.1326543-1-robert.hu@linux.intel.com> References: <20220922122155.1326543-1-robert.hu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=134.134.136.24; envelope-from=robert.hu@linux.intel.com; helo=mga09.intel.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1663850668644100001 Content-Type: text/plain; charset="utf-8" In If condition, using bitwise and/or, rather than logical and/or. The result change in AML code: If (((Local6 =3D=3D Zero) | (Arg0 !=3D Local0))) =3D=3D> If (((Local6 =3D=3D Zero) || (Arg0 !=3D Local0))) If (((ObjectType (Arg3) =3D=3D 0x04) & (SizeOf (Arg3) =3D=3D One))) =3D=3D> If (((ObjectType (Arg3) =3D=3D 0x04) && (SizeOf (Arg3) =3D=3D One))) Fixes: 90623ebf603 ("nvdimm acpi: check UUID") Fixes: 4568c948066 ("nvdimm acpi: save arg3 of _DSM method") Signed-off-by: Robert Hoo Reviewed-by: Jingqi Liu Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 31e46df0bd..201317c611 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -1037,7 +1037,7 @@ static void nvdimm_build_common_dsm(Aml *dev, =20 uuid_invalid =3D aml_lnot(aml_equal(uuid, expected_uuid)); =20 - unsupport =3D aml_if(aml_or(unpatched, uuid_invalid, NULL)); + unsupport =3D aml_if(aml_lor(unpatched, uuid_invalid)); =20 /* * function 0 is called to inquire what functions are supported by @@ -1069,10 +1069,9 @@ static void nvdimm_build_common_dsm(Aml *dev, * in the DSM Spec. */ pckg =3D aml_arg(3); - ifctx =3D aml_if(aml_and(aml_equal(aml_object_type(pckg), + ifctx =3D aml_if(aml_land(aml_equal(aml_object_type(pckg), aml_int(4 /* Package */)) /* It is a Package? */, - aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? *= /, - NULL)); + aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? *= /)); =20 pckg_index =3D aml_local(2); pckg_buf =3D aml_local(3); --=20 2.31.1