From nobody Sun Dec 14 06:32:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1667861332; cv=none; d=zohomail.com; s=zohoarc; b=i4Cd08XX8aFaijIosiiP4filAjPb2d54TXKEO4EcyvGCY2PHIgD5KbdfN00x3SwnX4xgpBdvyGscQGnFLC1dmyTMapcoDtsSWbTRSNW2Nnyi69HPBRrSQQ9xdE/oAZvGwPR9foIjytZ67MipPwR02SgsfS1lxXyLYeLh6shWzbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667861332; h=Content-Type: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=vr1Y5Ue2DsD1Zo1HCdv3uKEJFz1/uay4tMw6YA67Sxk=; b=deZTZyWu2lstG1DdxwBMRlf7pREib3evpWk0d3sNZnRtB3pzEG1Txxdu18y83BTJnoIt8uDT3hIQbqBHi+h5LPrwvBuJQrR+sQoLjnW0r6wUDRce6SANnW4M7XF6rjy++IJ8J/uuHIaVoEwzzVgsVBI6YMpFYNfsZPQilxAfRKg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1667861332750524.9346572965258; Mon, 7 Nov 2022 14:48:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osAuD-0006F0-TY; Mon, 07 Nov 2022 17:47:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osAuC-0006Ep-H3 for qemu-devel@nongnu.org; Mon, 07 Nov 2022 17:47:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osAuB-0001Ud-3z for qemu-devel@nongnu.org; Mon, 07 Nov 2022 17:47:48 -0500 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-106-5yn8rBLQN_KmBva5UC0t2A-1; Mon, 07 Nov 2022 17:47:45 -0500 Received: by mail-qk1-f198.google.com with SMTP id w4-20020a05620a444400b006fa24b2f394so11372046qkp.15 for ; Mon, 07 Nov 2022 14:47:45 -0800 (PST) Received: from redhat.com ([87.249.138.11]) by smtp.gmail.com with ESMTPSA id l17-20020a05620a28d100b006b615cd8c13sm7949774qkp.106.2022.11.07.14.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 14:47:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667861266; 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: in-reply-to:in-reply-to:references:references; bh=vr1Y5Ue2DsD1Zo1HCdv3uKEJFz1/uay4tMw6YA67Sxk=; b=iOY1DHbwjcr36fMs+U3sCP2Q+yISTo4wvwxcunkoU3gCoRy0s6sgxRASgnEDxl66NsIVHS JNnmcwdbLcoAhynqHINAlsabcg4HmZZve8IRbZy/uH8EsHeksyg+6aeNH2Yg/eA1MTvqND QeISXgiSrdltrHErmy09kwOqZh+fPFc= X-MC-Unique: 5yn8rBLQN_KmBva5UC0t2A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vr1Y5Ue2DsD1Zo1HCdv3uKEJFz1/uay4tMw6YA67Sxk=; b=JAvAQqpd49yq53s9nHwE1QJWukChvn6LmS3xztQXZ/glkEbzW7scwJGv3SUmq7VK25 WvbG9C1a+C07i+xUP9fMcia1+9RWKnprnQpbkp+gMpnmELX8A3CiGst5F/8+67QJs/5r dKf93L5LyEj9QvEKj7lOTR6c1QKESX+jfqGxYmXKdp6OtO1dK5F0xv0sH5dYGK4E+yjo u/pzFKsCkTSeJ7HxVAT/bgI8Gf5dJ4KF6tbnuy8okS6kvj4RQMEwQwFOVEvp1O3YDEZu 9QNUUu/PVYgxzoxuAlJhWZi9HTE5IOF/kPUFUEfhB2tAqyjxzZBMp6UxFlPqGG1kbkop sOmQ== X-Gm-Message-State: ACrzQf1lLEUDaUm3wFnWicJhmLkyEApw93sF6IViF3na+UL7ZCxX+5ir HWHBR7mUbMD0cXqMTKFzpE5BkxEWbPfA/7eYIS+Koi3P51LBYHy1Wc+Xybg9DQhtOe3B2e3V/HD sdLNHLAP0JXORdve8IB8GyS6oIS9puNFtLm2H6KUu/6D72N7ITkep2kxxGs2B X-Received: by 2002:a05:622a:1dc9:b0:3a5:2980:d5bf with SMTP id bn9-20020a05622a1dc900b003a52980d5bfmr32548204qtb.28.1667861264857; Mon, 07 Nov 2022 14:47:44 -0800 (PST) X-Google-Smtp-Source: AMsMyM7cryIpdWtcAByInByck4lHjnXFRhksiz+4DBWfWGTZTX+jI5aIUNB9qJHy0fyyhSdj1vlRsw== X-Received: by 2002:a05:622a:1dc9:b0:3a5:2980:d5bf with SMTP id bn9-20020a05622a1dc900b003a52980d5bfmr32548186qtb.28.1667861264561; Mon, 07 Nov 2022 14:47:44 -0800 (PST) Date: Mon, 7 Nov 2022 17:47:39 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Robert Hoo , Jingqi Liu , Igor Mammedov , Ani Sinha Subject: [PULL v4 03/83] acpi/ssdt: Fix aml_or() and aml_and() in if clause Message-ID: <20221107224600.934080-4-mst@redhat.com> References: <20221107224600.934080-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221107224600.934080-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent 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: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667861333834100002 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Robert Hoo 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 Message-Id: <20220922122155.1326543-3-robert.hu@linux.intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 MST