From patchwork Fri Mar 4 15:40:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12769366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4356C433EF for ; Fri, 4 Mar 2022 15:54:22 +0000 (UTC) Received: from localhost ([::1]:41638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQAG5-00048M-UI for qemu-devel@archiver.kernel.org; Fri, 04 Mar 2022 10:54:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQA2z-0003wU-HI for qemu-devel@nongnu.org; Fri, 04 Mar 2022 10:40:49 -0500 Received: from [2607:f8b0:4864:20::1034] (port=55043 helo=mail-pj1-x1034.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQA2w-00084C-Ug for qemu-devel@nongnu.org; Fri, 04 Mar 2022 10:40:48 -0500 Received: by mail-pj1-x1034.google.com with SMTP id b8so7632139pjb.4 for ; Fri, 04 Mar 2022 07:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NzRV18xlT7e3e62Lfq3qjKJ0W7QMwOSRlZHKm2RB0p0=; b=uUcgLNv+yeKX3y/olqvAUkpBWSIHGasGXF8zNsQWxUwCCADa5HTGWqmfYCC7ML5ga/ Uj80Uk3TRTHvVQFW5CnIPUQhwnZzCR7fWr22EJudlmzNuxdzozd6xtkjgcsWxAZ912Ce d48UoO0L2jE14ZC4x5DioCaiijnzol1kC2RQwjZ1lAHRtAjqK4Kks2UDljYnUYJ0t/HC KFoOyQ8XoTWCJ3gCqgqIPM3uebn1MCkVPpzYZIg86uH/sJn7AsK/sAAT/V52UHpvvWog gtH33g4dOzSzFU0BtgV4w4pX3AND130+T7g5En65y5ebIlQSTNtWL1HKMrXSZL+NhMiH uAMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NzRV18xlT7e3e62Lfq3qjKJ0W7QMwOSRlZHKm2RB0p0=; b=QutWbfOwAxK9ONWAsBEOQJ3xXlSiVywV+xfS/TNn6Bt+kMYAynhY123R5WtSRYjP+R SnGjRXg9y5vdjSN713GoRGNhJK1v0uGqsJQMMNft4XAHREEHGhpOJhiGQsjJXiAcjOYv Eyx1knNkwHBwBMMCCf633Cye+QUG2Uh5l+Ke6Wp3l26plisG0nf8IsVmzP3y5pbVf/TS TSpeY/V5g/AjY54X85p93qI0kizUuSXuqJY34C+qm20fUHD7xWzqQ1vlFRbNG4/jCh/9 nW8OMBGDQAv8TtJQFUpe3PMHa62tEcXeMweIgS7UqxIVsGSRvX/kQXFrQ03TStoNhDDM JBMw== X-Gm-Message-State: AOAM531E4XhxBQCBGFQeCnf+/pmglAilNTBbkdLE0fOqK5UbcmH3UOwv MaZkWa5Mf5qlG19/kQAFLWM21n8gepG2+g== X-Google-Smtp-Source: ABdhPJxOgr3iEVqrwGhXSgW214s1nAk1mWcTOcBKyIA0tovijDlozPbw0Nfpjwbi6S4KB292KaRl6Q== X-Received: by 2002:a17:902:8a91:b0:14f:969b:f6be with SMTP id p17-20020a1709028a9100b0014f969bf6bemr42084397plo.161.1646408443790; Fri, 04 Mar 2022 07:40:43 -0800 (PST) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.152.50]) by smtp.googlemail.com with ESMTPSA id ck20-20020a17090afe1400b001bd0494a4e7sm5448366pjb.16.2022.03.04.07.40.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 07:40:43 -0800 (PST) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v7 0/4] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table Date: Fri, 4 Mar 2022 21:10:28 +0530 Message-Id: <20220304154032.2071585-1-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1034 (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::1034; envelope-from=ani@anisinha.ca; helo=mail-pj1-x1034.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Ani Sinha , imammedo@redhat.com, liavalb@gmail.com, mst@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. To allow "flexible" indication, I don't hardcode the bit at location 1 as on in the IA-PC boot flags, but try to search for i8042 on the ISA bus to verify it exists in the system. Why this is useful you might ask - this patch allows the guest OS to probe and use the i8042 controller without decoding the ACPI AML blob at all. For example, as a developer of the SerenityOS kernel, I might want to allow people to not try to decode the ACPI AML namespace (for now, we still don't support ACPI AML as it's a work in progress), but still to not probe for the i8042 but just use it after looking in the IA-PC boot flags in the ACPI FADT table. Changelog: v7: fixed a compilation issue. the fix was not committed when running "make check" v6: addressed comments from v5. added microvm changes too as a part of this series. v5: Addressed review comments from v4. Also got rid of microvm changes. Will send them in a separate patch. Ani Sinha (1): hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if present Liav Albani (3): tests/acpi: i386: allow FACP acpi table changes hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table tests/acpi: i386: update FACP table differences hw/acpi/aml-build.c | 8 +++++++- hw/i386/acpi-build.c | 8 ++++++++ hw/i386/acpi-microvm.c | 6 ++++++ include/hw/acpi/acpi-defs.h | 1 + include/hw/input/i8042.h | 15 +++++++++++++++ tests/data/acpi/q35/FACP | Bin 244 -> 244 bytes tests/data/acpi/q35/FACP.nosmm | Bin 244 -> 244 bytes tests/data/acpi/q35/FACP.slic | Bin 244 -> 244 bytes tests/data/acpi/q35/FACP.xapic | Bin 244 -> 244 bytes 9 files changed, 37 insertions(+), 1 deletion(-)