From nobody Tue Nov 26 13:38:46 2024 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=1707909566; cv=none; d=zohomail.com; s=zohoarc; b=FyPpbNpxyb9CfhAUUEN1oQgpff7mLA59smEBubqrs4LYmim0L0XraHHFHbfKacIHv4lPXqP/joJVHdlFU34HbgaD/XjvQ104qhT6m6JFCiOYKjnpbVSLK+eFYyS0UzQ8nFXiyJUvWIX076q7VsPmDoffPWh6ukbSE038tdwm13k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707909566; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fN72J8WFo/Zhfl2CffZ0fQwcDGfJHksFH3RcOtTuZe8=; b=FgSAXTb72spARRz1SfAv3BlNtJJXsyA7X+mS646TW+dvvoRE/YJeCsj/ef6zQ5h1eDe4VKUBG4l7+ipfI0nEDDBC+tQj7uLLiQ39uX8f5pXv1epLZ630NYERW6oXtsUkKt1KdiEIuAMj6N0bXt2Rw0xRgS2sjHbF3CuvK0mEivY= 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 1707909566708814.9903151514677; Wed, 14 Feb 2024 03:19:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raDFc-00060q-MX; Wed, 14 Feb 2024 06:16:28 -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 1raDF2-00058n-Db for qemu-devel@nongnu.org; Wed, 14 Feb 2024 06:15:56 -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 1raDF0-0007Iz-Ae for qemu-devel@nongnu.org; Wed, 14 Feb 2024 06:15:52 -0500 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-414-D0D05RZFPVWLauXp_ikMYg-1; Wed, 14 Feb 2024 06:15:48 -0500 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5621c809a3bso452539a12.2 for ; Wed, 14 Feb 2024 03:15:48 -0800 (PST) Received: from redhat.com ([2.52.26.67]) by smtp.gmail.com with ESMTPSA id p5-20020a056402074500b005638caeff4bsm121063edy.22.2024.02.14.03.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 03:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707909349; 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=fN72J8WFo/Zhfl2CffZ0fQwcDGfJHksFH3RcOtTuZe8=; b=UqN0QEHUOTDIVq3+XsGQ/5P2qXNzRquUPdqcKBvB7QKUyGWGCBa52NGWM6nRsilpTjuGdB FNS45o6NU9168d28aogvkfDf8eJWoTkIhcxAFmWlBpGM32uFYpH6Rr1tSG2lHd17nhTbZX BPljTqKa8dEEWlZuMavOpdiTwgmxUYc= X-MC-Unique: D0D05RZFPVWLauXp_ikMYg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707909347; x=1708514147; 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=fN72J8WFo/Zhfl2CffZ0fQwcDGfJHksFH3RcOtTuZe8=; b=uQKTRiuu7tcsVhnOvwYux30w+78Q6+LkawNpaZkQQxIHrBGBItKyXnfUpS8C1xnFyf bJEe3rLyxZLxnphvdSd+5iLCcLALOYx2eBHA6eNby8RtxJL9iHcfbNXV+RDtY4hPaDGN LI/y7/2tvD3jgcjh6byQX//ug743UHm2Qc41tpSJ2fP+U52vmilORA1rW1uW+nVoQpwj wuSrhR+9zOH6GBjMb2mshwFZTIItHLwfU7sxOWEUxABA6V0ieG/ZpeNB7XsaoDYs1cYC /ajrfBs/SuxfyFBxPa0MZHhJrrxEhqkvEUQCljvYxrCqpuF4zmngn2f05WZCKnelJyzA GjNQ== X-Gm-Message-State: AOJu0YyB5M4l2XeZhVyVx17rFVRTdMdZNG3t8jR9YFiMoZawjoVW6kjF 0PzF9NAKbQS5a5r0ml9cowhT+hnQfAKixgt2Rp6kdXp7hDj2HSg8u80s3wGQT5FlBusem23qxuo cGuCIuvJiEIWH4xYqraEZFmNfj+NIDEEUy3LzWRw/sdypEHAFUtgTe+IhIV1EDy0b3J4Lxu520p 3lj5rGjIJwOTHPwUOx9IweIGiriq+1Sw== X-Received: by 2002:a05:6402:6d7:b0:563:906f:4171 with SMTP id n23-20020a05640206d700b00563906f4171mr48809edy.18.1707909346985; Wed, 14 Feb 2024 03:15:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2inKnnQZXSTc38j06fXNv/Qm5ehexs4T0dLjIipcBJlyOy4+oa0xYf608qMCASnFXkw+DQA== X-Received: by 2002:a05:6402:6d7:b0:563:906f:4171 with SMTP id n23-20020a05640206d700b00563906f4171mr48788edy.18.1707909346640; Wed, 14 Feb 2024 03:15:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWLqZBjidmXq5/6GbRdJN3FwsNBUZBvo+5WavW6BjtG2mn8jO5BpcZ+0HeMxLZAVJ0myX8bCA+D1mg1ni4a7cZC79wTOi4EKeK0Oc+umUmEfAhshXZsg29kES4qOWsUKVynnCc34josebIC5Z6G1iJmHCfnL/mYQ7IKL0VPwa/n0op1LR4zK9LVitudZcqZFqWFcC2PhJs7gcgUygil1Yj9DdqfZnaG33BcrZ1GZ3xlzRpYNNDDnIvgq+HpmbBzDW+u0pdAQ+VqCXky2XthKvWrCeCFjpOUDC6z Date: Wed, 14 Feb 2024 06:15:43 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Jonathan Cameron , Igor Mammedov , Ani Sinha , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PULL 47/60] hw/i386: Fix _STA return value for ACPI0017 Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.504, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1707909568163100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jonathan Cameron Found whilst testing a series for the linux kernel that actually bothers to check if enabled is set. 0xB is the option used for vast majority of DSDT entries in QEMU. It is a little odd for a device that doesn't really exist and is simply a hook to tell the OS there is a CEDT table but 0xB seems a reasonable choice and avoids need to special case this device in the OS. Means: * Device present. * Device enabled and decoding it's resources. * Not shown in UI * Functioning properly * No battery (on this device!) Signed-off-by: Jonathan Cameron Message-Id: <20240126120132.24248-12-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d5c6c94474..d3ce96dd9f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1415,7 +1415,7 @@ static void build_acpi0017(Aml *table) aml_append(dev, aml_name_decl("_HID", aml_string("ACPI0017"))); =20 method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x01))); + aml_append(method, aml_return(aml_int(0x0B))); aml_append(dev, method); build_cxl_dsm_method(dev); =20 --=20 MST