From patchwork Thu Oct 1 08:28:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B1AAC4727C for ; Thu, 1 Oct 2020 08:33:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7307020780 for ; Thu, 1 Oct 2020 08:33:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XbXm7tCA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7307020780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNu1e-0002Ec-GE for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:33:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxX-0005va-Vb for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxT-0002Lb-Qu for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:03 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540939; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uhw/aT6jybqBjUiRooeK0gA9wDhuy5RFCPIsE7cPM58=; b=XbXm7tCA3stW6FHg31vNF5nEE8Mi06EV0OspJaQMfS0YQtlPG2W8JbjKvpWTgMYrKrxYRI 9gnoUye7BzL4vcaC1ap+CucE8QnC46OZAUs7iJG4obJn5HvOf/T55R/9bddtQBLz+IEiiS w5Aq++YSyu3JhWE1FhZiMIcw3cERhJc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-563-OgkhBm1_M524hoiTvNDrMg-1; Thu, 01 Oct 2020 04:28:56 -0400 X-MC-Unique: OgkhBm1_M524hoiTvNDrMg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D38C41902EA8; Thu, 1 Oct 2020 08:28:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3AF45DA83; Thu, 1 Oct 2020 08:28:35 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D38BF9A95; Thu, 1 Oct 2020 10:28:34 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 1/9] acpi: add aml builder stubs Date: Thu, 1 Oct 2020 10:28:26 +0200 Message-Id: <20201001082834.15821-2-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add stubs for aml_interrupt and aml_memory32_fixed, these will be needed by followup patches, Signed-off-by: Gerd Hoffmann --- hw/acpi/aml-build-stub.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/acpi/aml-build-stub.c b/hw/acpi/aml-build-stub.c index 58b2e162277f..8d8ad1a31497 100644 --- a/hw/acpi/aml-build-stub.c +++ b/hw/acpi/aml-build-stub.c @@ -57,6 +57,20 @@ Aml *aml_irq_no_flags(uint8_t irq) return NULL; } +Aml *aml_interrupt(AmlConsumerAndProducer con_and_pro, + AmlLevelAndEdge level_and_edge, + AmlActiveHighAndLow high_and_low, AmlShared shared, + uint32_t *irq_list, uint8_t irq_count) +{ + return NULL; +} + +Aml *aml_memory32_fixed(uint32_t addr, uint32_t size, + AmlReadAndWrite read_and_write) +{ + return NULL; +} + Aml *aml_int(const uint64_t val) { return NULL; From patchwork Thu Oct 1 08:28:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 303926 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9732C47420 for ; Thu, 1 Oct 2020 08:37:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 703BE208B6 for ; Thu, 1 Oct 2020 08:37:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KoFAJKhO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 703BE208B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNu5H-0005l7-IP for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:37:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxe-0006Ah-38 for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxb-0002OL-Pk for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:09 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540947; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j9GC9/ihmfVPuNcAnW2v0hGLdwPP8vCySlqQdX6QH/8=; b=KoFAJKhOxdJdc2E3cwrEnlkDk+o0PVXt6UwC1YG0HQT8jiRp5ZfzwFsxae6FjcgGh10i7T OlnwuokBqPGo7CNcvC/SPozWdDrhykcWdlQMYconVWlyZO73YxvgjPtT52LaO+2/rciucM CqD5o0q90qN2e6FDpIqcuLf9PAov0IE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-241-YNEGCN55MQGv-gVaIFGvKA-1; Thu, 01 Oct 2020 04:28:59 -0400 X-MC-Unique: YNEGCN55MQGv-gVaIFGvKA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C9EE9CC30; Thu, 1 Oct 2020 08:28:54 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96FEE7B7C0; Thu, 1 Oct 2020 08:28:35 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E686143BFA3; Thu, 1 Oct 2020 10:28:34 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 2/9] usb/xhci: add include/hw/usb/xhci.h header file Date: Thu, 1 Oct 2020 10:28:27 +0200 Message-Id: <20201001082834.15821-3-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Move a bunch of defines which might be needed outside core xhci code to that place. Add XHCI_ prefixes to avoid name clashes. No functional change. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci-sysbus.h | 1 - hw/usb/hcd-xhci.h | 22 ++++++---------------- include/hw/usb/xhci.h | 19 +++++++++++++++++++ hw/usb/hcd-xhci-nec.c | 4 ++-- hw/usb/hcd-xhci-pci.c | 4 ++-- hw/usb/hcd-xhci-sysbus.c | 4 ++-- hw/usb/hcd-xhci.c | 34 ++++++++++++++++------------------ 7 files changed, 47 insertions(+), 41 deletions(-) create mode 100644 include/hw/usb/xhci.h diff --git a/hw/usb/hcd-xhci-sysbus.h b/hw/usb/hcd-xhci-sysbus.h index a308753ceb9b..fdfcbbee3bf4 100644 --- a/hw/usb/hcd-xhci-sysbus.h +++ b/hw/usb/hcd-xhci-sysbus.h @@ -15,7 +15,6 @@ #include "hcd-xhci.h" #include "hw/sysbus.h" -#define TYPE_XHCI_SYSBUS "sysbus-xhci" #define XHCI_SYSBUS(obj) \ OBJECT_CHECK(XHCISysbusState, (obj), TYPE_XHCI_SYSBUS) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index f859a17e73ee..ccf50ae28bed 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -24,23 +24,13 @@ #include "qom/object.h" #include "hw/usb.h" +#include "hw/usb/xhci.h" #include "sysemu/dma.h" -#define TYPE_XHCI "base-xhci" -#define TYPE_NEC_XHCI "nec-usb-xhci" -#define TYPE_QEMU_XHCI "qemu-xhci" - OBJECT_DECLARE_SIMPLE_TYPE(XHCIState, XHCI) -#define MAXPORTS_2 15 -#define MAXPORTS_3 15 - -#define MAXPORTS (MAXPORTS_2 + MAXPORTS_3) -#define MAXSLOTS 64 -#define MAXINTRS 16 - /* Very pessimistic, let's hope it's enough for all cases */ -#define EV_QUEUE (((3 * 24) + 16) * MAXSLOTS) +#define EV_QUEUE (((3 * 24) + 16) * XHCI_MAXSLOTS) typedef struct XHCIStreamContext XHCIStreamContext; typedef struct XHCIEPContext XHCIEPContext; @@ -217,15 +207,15 @@ typedef struct XHCIState { uint32_t dcbaap_high; uint32_t config; - USBPort uports[MAX_CONST(MAXPORTS_2, MAXPORTS_3)]; - XHCIPort ports[MAXPORTS]; - XHCISlot slots[MAXSLOTS]; + USBPort uports[MAX_CONST(XHCI_MAXPORTS_2, XHCI_MAXPORTS_3)]; + XHCIPort ports[XHCI_MAXPORTS]; + XHCISlot slots[XHCI_MAXSLOTS]; uint32_t numports; /* Runtime Registers */ int64_t mfindex_start; QEMUTimer *mfwrap_timer; - XHCIInterrupter intr[MAXINTRS]; + XHCIInterrupter intr[XHCI_MAXINTRS]; XHCIRing cmd_ring; diff --git a/include/hw/usb/xhci.h b/include/hw/usb/xhci.h new file mode 100644 index 000000000000..dc0c29930dcc --- /dev/null +++ b/include/hw/usb/xhci.h @@ -0,0 +1,19 @@ +#ifndef HW_USB_XHCI_H +#define HW_USB_XHCI_H + +#define TYPE_XHCI "base-xhci" +#define TYPE_NEC_XHCI "nec-usb-xhci" +#define TYPE_QEMU_XHCI "qemu-xhci" +#define TYPE_XHCI_SYSBUS "sysbus-xhci" + +#define XHCI_MAXPORTS_2 15 +#define XHCI_MAXPORTS_3 15 + +#define XHCI_MAXPORTS (XHCI_MAXPORTS_2 + XHCI_MAXPORTS_3) +#define XHCI_MAXSLOTS 64 +#define XHCI_MAXINTRS 16 + +/* must be power of 2 */ +#define XHCI_LEN_REGS 0x4000 + +#endif diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 2efa6fa0f8af..5707b2cabd16 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -34,8 +34,8 @@ static Property nec_xhci_properties[] = { xhci.flags, XHCI_FLAG_SS_FIRST, true), DEFINE_PROP_BIT("force-pcie-endcap", XHCIPciState, xhci.flags, XHCI_FLAG_FORCE_PCIE_ENDCAP, false), - DEFINE_PROP_UINT32("intrs", XHCIPciState, xhci.numintrs, MAXINTRS), - DEFINE_PROP_UINT32("slots", XHCIPciState, xhci.numslots, MAXSLOTS), + DEFINE_PROP_UINT32("intrs", XHCIPciState, xhci.numintrs, XHCI_MAXINTRS), + DEFINE_PROP_UINT32("slots", XHCIPciState, xhci.numslots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index a6d746e1da38..b78fcd2bb2d5 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -240,8 +240,8 @@ static void qemu_xhci_instance_init(Object *obj) s->msi = ON_OFF_AUTO_OFF; s->msix = ON_OFF_AUTO_AUTO; - xhci->numintrs = MAXINTRS; - xhci->numslots = MAXSLOTS; + xhci->numintrs = XHCI_MAXINTRS; + xhci->numslots = XHCI_MAXSLOTS; xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); } diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c index 852ca5103b4d..570618467356 100644 --- a/hw/usb/hcd-xhci-sysbus.c +++ b/hw/usb/hcd-xhci-sysbus.c @@ -69,8 +69,8 @@ static void xhci_sysbus_instance_init(Object *obj) } static Property xhci_sysbus_props[] = { - DEFINE_PROP_UINT32("intrs", XHCISysbusState, xhci.numintrs, MAXINTRS), - DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, MAXSLOTS), + DEFINE_PROP_UINT32("intrs", XHCISysbusState, xhci.numintrs, XHCI_MAXINTRS), + DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 5e8bed9ef90c..79ce5c4be6c4 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -46,15 +46,13 @@ #define TRANSFER_LIMIT 256 #define LEN_CAP 0x40 -#define LEN_OPER (0x400 + 0x10 * MAXPORTS) -#define LEN_RUNTIME ((MAXINTRS + 1) * 0x20) -#define LEN_DOORBELL ((MAXSLOTS + 1) * 0x20) +#define LEN_OPER (0x400 + 0x10 * XHCI_MAXPORTS) +#define LEN_RUNTIME ((XHCI_MAXINTRS + 1) * 0x20) +#define LEN_DOORBELL ((XHCI_MAXSLOTS + 1) * 0x20) #define OFF_OPER LEN_CAP #define OFF_RUNTIME 0x1000 #define OFF_DOORBELL 0x2000 -/* must be power of 2 */ -#define LEN_REGS 0x4000 #if (OFF_OPER + LEN_OPER) > OFF_RUNTIME #error Increase OFF_RUNTIME @@ -62,8 +60,8 @@ #if (OFF_RUNTIME + LEN_RUNTIME) > OFF_DOORBELL #error Increase OFF_DOORBELL #endif -#if (OFF_DOORBELL + LEN_DOORBELL) > LEN_REGS -# error Increase LEN_REGS +#if (OFF_DOORBELL + LEN_DOORBELL) > XHCI_LEN_REGS +# error Increase XHCI_LEN_REGS #endif /* bit definitions */ @@ -3276,11 +3274,11 @@ static void usb_xhci_init(XHCIState *xhci) xhci->usbsts = USBSTS_HCH; - if (xhci->numports_2 > MAXPORTS_2) { - xhci->numports_2 = MAXPORTS_2; + if (xhci->numports_2 > XHCI_MAXPORTS_2) { + xhci->numports_2 = XHCI_MAXPORTS_2; } - if (xhci->numports_3 > MAXPORTS_3) { - xhci->numports_3 = MAXPORTS_3; + if (xhci->numports_3 > XHCI_MAXPORTS_3) { + xhci->numports_3 = XHCI_MAXPORTS_3; } usbports = MAX(xhci->numports_2, xhci->numports_3); xhci->numports = xhci->numports_2 + xhci->numports_3; @@ -3302,7 +3300,7 @@ static void usb_xhci_init(XHCIState *xhci) USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL | USB_SPEED_MASK_HIGH; - assert(i < MAXPORTS); + assert(i < XHCI_MAXPORTS); snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1); speedmask |= port->speedmask; } @@ -3316,7 +3314,7 @@ static void usb_xhci_init(XHCIState *xhci) } port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; - assert(i < MAXPORTS); + assert(i < XHCI_MAXPORTS); snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1); speedmask |= port->speedmask; } @@ -3331,8 +3329,8 @@ static void usb_xhci_realize(DeviceState *dev, Error **errp) XHCIState *xhci = XHCI(dev); - if (xhci->numintrs > MAXINTRS) { - xhci->numintrs = MAXINTRS; + if (xhci->numintrs > XHCI_MAXINTRS) { + xhci->numintrs = XHCI_MAXINTRS; } while (xhci->numintrs & (xhci->numintrs - 1)) { /* ! power of 2 */ xhci->numintrs++; @@ -3340,8 +3338,8 @@ static void usb_xhci_realize(DeviceState *dev, Error **errp) if (xhci->numintrs < 1) { xhci->numintrs = 1; } - if (xhci->numslots > MAXSLOTS) { - xhci->numslots = MAXSLOTS; + if (xhci->numslots > XHCI_MAXSLOTS) { + xhci->numslots = XHCI_MAXSLOTS; } if (xhci->numslots < 1) { xhci->numslots = 1; @@ -3355,7 +3353,7 @@ static void usb_xhci_realize(DeviceState *dev, Error **errp) usb_xhci_init(xhci); xhci->mfwrap_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, xhci_mfwrap_timer, xhci); - memory_region_init(&xhci->mem, OBJECT(dev), "xhci", LEN_REGS); + memory_region_init(&xhci->mem, OBJECT(dev), "xhci", XHCI_LEN_REGS); memory_region_init_io(&xhci->mem_cap, OBJECT(dev), &xhci_cap_ops, xhci, "capabilities", LEN_CAP); memory_region_init_io(&xhci->mem_oper, OBJECT(dev), &xhci_oper_ops, xhci, From patchwork Thu Oct 1 08:28:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18579C4727C for ; Thu, 1 Oct 2020 08:38:22 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 88E4B20780 for ; Thu, 1 Oct 2020 08:38:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Cqfxx5d/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88E4B20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNu6W-0006pj-MP for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:38:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxf-0006Ea-Kg for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxd-0002OT-Nh for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:11 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540948; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S3YEpD+A54YL0EmstK7u8/+0duVoJMgnQOtRH4CPS8Q=; b=Cqfxx5d/ypwlPDyg7d0eEyWv2NKJqWWbfrc4jAyNvcZZcRwu+Igx1D4/+Vbjf4iQT5VgYG yqBbFg0MDwiVAfwChb3TjlqVdh9MdM5XVI7oIMv2MtBP36x79UffJ+aEWQi4hEe3ivhfjf MLzF/lYXU98Uc0scMcCrzi2dK4AOMmQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-eaQQdwRuNHWu7-BssJ3OwA-1; Thu, 01 Oct 2020 04:29:04 -0400 X-MC-Unique: eaQQdwRuNHWu7-BssJ3OwA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AF3363FFE; Thu, 1 Oct 2020 08:28:59 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id A560319C59; Thu, 1 Oct 2020 08:28:35 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F0E9C43BFA5; Thu, 1 Oct 2020 10:28:34 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 3/9] usb/xhci: add xhci_sysbus_build_aml() helper Date: Thu, 1 Oct 2020 10:28:28 +0200 Message-Id: <20201001082834.15821-4-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 02:15:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The helper generates an acpi dsdt device entry for the xhci sysbus device. Signed-off-by: Gerd Hoffmann --- include/hw/usb/xhci.h | 2 ++ hw/usb/hcd-xhci-sysbus.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/hw/usb/xhci.h b/include/hw/usb/xhci.h index dc0c29930dcc..5c90e1373e55 100644 --- a/include/hw/usb/xhci.h +++ b/include/hw/usb/xhci.h @@ -16,4 +16,6 @@ /* must be power of 2 */ #define XHCI_LEN_REGS 0x4000 +void xhci_sysbus_build_aml(Aml *scope, uint32_t mmio, unsigned int irq); + #endif diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c index 570618467356..29185d2261fb 100644 --- a/hw/usb/hcd-xhci-sysbus.c +++ b/hw/usb/hcd-xhci-sysbus.c @@ -13,6 +13,7 @@ #include "trace.h" #include "qapi/error.h" #include "hcd-xhci-sysbus.h" +#include "hw/acpi/aml-build.h" #include "hw/irq.h" static void xhci_sysbus_intr_raise(XHCIState *xhci, int n, bool level) @@ -68,6 +69,20 @@ static void xhci_sysbus_instance_init(Object *obj) s->xhci.intr_raise = xhci_sysbus_intr_raise; } +void xhci_sysbus_build_aml(Aml *scope, uint32_t mmio, unsigned int irq) +{ + Aml *dev = aml_device("XHCI"); + Aml *crs = aml_resource_template(); + + aml_append(crs, aml_memory32_fixed(mmio, XHCI_LEN_REGS, AML_READ_WRITE)); + aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH, + AML_EXCLUSIVE, &irq, 1)); + + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0D10"))); + aml_append(dev, aml_name_decl("_CRS", crs)); + aml_append(scope, dev); +} + static Property xhci_sysbus_props[] = { DEFINE_PROP_UINT32("intrs", XHCISysbusState, xhci.numintrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCISysbusState, xhci.numslots, XHCI_MAXSLOTS), From patchwork Thu Oct 1 08:28:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FBBCC4727C for ; Thu, 1 Oct 2020 08:35:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A79DE20780 for ; Thu, 1 Oct 2020 08:35:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LNwWEK82" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A79DE20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNu3R-00042Z-LY for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:35:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxj-0006O8-Ah for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxg-0002Oi-9x for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540951; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Oc1OP0YmCq756xfyfFCP4vydRCGiWTDUUiq0mvUKHK8=; b=LNwWEK82kczpp7GkeeSv5Hp1fB4spMJhHhh7YhBbfw7FfMtxV0SZyqAto5i60UOS9xukN3 TYZdNUM+zTr4KWBi0boCFgReg2FsjNFPnnPV+13xAS78cyMJVbfU14+zpKUmc4Zx2RJOII kJBTtsE7X8uL/hNKRkxoYBD/KLaCumc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-15-iRr924XuPRebPmXN4Y7YAg-1; Thu, 01 Oct 2020 04:29:07 -0400 X-MC-Unique: iRr924XuPRebPmXN4Y7YAg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A133C80A182; Thu, 1 Oct 2020 08:29:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1D301992F; Thu, 1 Oct 2020 08:28:35 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0948743BFB4; Thu, 1 Oct 2020 10:28:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 4/9] microvm: add usb support Date: Thu, 1 Oct 2020 10:28:29 +0200 Message-Id: <20201001082834.15821-5-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Wire up "usb=on" machine option, when enabled add a sysbus xhci controller with 8 ports. Signed-off-by: Gerd Hoffmann --- include/hw/i386/microvm.h | 5 ++++- hw/i386/acpi-microvm.c | 9 +++++++++ hw/i386/microvm.c | 13 +++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index 91b064575d55..0fc216007777 100644 --- a/include/hw/i386/microvm.h +++ b/include/hw/i386/microvm.h @@ -41,7 +41,7 @@ * 7 | parallel | * 8 | rtc | rtc (rtc=on) * 9 | acpi | acpi (ged) - * 10 | pci lnk | + * 10 | pci lnk | xhci (usb=on) * 11 | pci lnk | * 12 | ps2 | pcie * 13 | fpu | pcie @@ -60,6 +60,9 @@ #define GED_MMIO_BASE_REGS (GED_MMIO_BASE + 0x200) #define GED_MMIO_IRQ 9 +#define MICROVM_XHCI_BASE 0xfe900000 +#define MICROVM_XHCI_IRQ 10 + #define PCIE_MMIO_BASE 0xc0000000 #define PCIE_MMIO_SIZE 0x20000000 #define PCIE_ECAM_BASE 0xe0000000 diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index f16f2311955c..7e8a6894ba26 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -35,6 +35,7 @@ #include "hw/i386/microvm.h" #include "hw/pci/pci.h" #include "hw/pci/pcie_host.h" +#include "hw/usb/xhci.h" #include "hw/virtio/virtio-mmio.h" #include "acpi-common.h" @@ -89,6 +90,13 @@ static void acpi_dsdt_add_virtio(Aml *scope, } } +static void acpi_dsdt_add_xhci(Aml *scope, MicrovmMachineState *mms) +{ + if (machine_usb(MACHINE(mms))) { + xhci_sysbus_build_aml(scope, MICROVM_XHCI_BASE, MICROVM_XHCI_IRQ); + } +} + static void acpi_dsdt_add_pci(Aml *scope, MicrovmMachineState *mms) { if (mms->pcie != ON_OFF_AUTO_ON) { @@ -123,6 +131,7 @@ build_dsdt_microvm(GArray *table_data, BIOSLinker *linker, GED_MMIO_IRQ, AML_SYSTEM_MEMORY, GED_MMIO_BASE); acpi_dsdt_add_power_button(sb_scope); acpi_dsdt_add_virtio(sb_scope, mms); + acpi_dsdt_add_xhci(sb_scope, mms); acpi_dsdt_add_pci(sb_scope, mms); aml_append(dsdt, sb_scope); diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 17e3f2f15265..0f61fc61ca44 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -47,6 +47,7 @@ #include "hw/acpi/acpi.h" #include "hw/acpi/generic_event_device.h" #include "hw/pci-host/gpex.h" +#include "hw/usb/xhci.h" #include "cpu.h" #include "elf.h" @@ -197,6 +198,18 @@ static void microvm_devices_init(MicrovmMachineState *mms) x86ms->acpi_dev = HOTPLUG_HANDLER(dev); } + if (x86_machine_is_acpi_enabled(x86ms) && machine_usb(MACHINE(mms))) { + DeviceState *dev = qdev_new(TYPE_XHCI_SYSBUS); + qdev_prop_set_uint32(dev, "intrs", 1); + qdev_prop_set_uint32(dev, "slots", XHCI_MAXSLOTS); + qdev_prop_set_uint32(dev, "p2", 8); + qdev_prop_set_uint32(dev, "p3", 8); + sysbus_realize(SYS_BUS_DEVICE(dev), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, MICROVM_XHCI_BASE); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, + x86ms->gsi[MICROVM_XHCI_IRQ]); + } + if (x86_machine_is_acpi_enabled(x86ms) && mms->pcie == ON_OFF_AUTO_ON) { /* use topmost 25% of the address space available */ hwaddr phys_size = (hwaddr)1 << X86_CPU(first_cpu)->phys_bits; From patchwork Thu Oct 1 08:28:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272302 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 420C9C4727C for ; Thu, 1 Oct 2020 08:30:37 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C103020759 for ; Thu, 1 Oct 2020 08:30:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YNO0snu7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C103020759 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNtz1-0007kw-LR for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:30:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxX-0005uy-Fx for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23528) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxT-0002LY-IY for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:03 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540939; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1k2AyW/1RNBtNVqpujkKUfcWGWRkFm2kqX3mAaKY4E8=; b=YNO0snu7T2d+W2uIF3bwfVP8SQoQPIRiZC/8llPISSWAlRL5g1gmmrYVca1HVKc20K70QJ nkpu5O3vSObtpMfvgzq70f37mwzvN8azmfEHZKzKtf/gzV/5LeAPKHx2FILLEWDNjRvGXp SdZAYI6RlmX96J1no8ahfdCE11h//GA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-589-9WOo-fttPguC8NQi9c6Lug-1; Thu, 01 Oct 2020 04:28:57 -0400 X-MC-Unique: 9WOo-fttPguC8NQi9c6Lug-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0500D64160; Thu, 1 Oct 2020 08:28:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF2315578D; Thu, 1 Oct 2020 08:28:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1204143BFBB; Thu, 1 Oct 2020 10:28:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 5/9] tests/acpi: allow updates for expected data files Date: Thu, 1 Oct 2020 10:28:30 +0200 Message-Id: <20201001082834.15821-6-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8bf4..afd6b04a475a 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/microvm/DSDT.usb", +"tests/data/acpi/microvm/DSDT.rtc", From patchwork Thu Oct 1 08:28:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 879EEC47420 for ; Thu, 1 Oct 2020 08:30:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0054420780 for ; Thu, 1 Oct 2020 08:30:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N7S/OeqC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0054420780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNtyy-0007cc-27 for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:30:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxW-0005uQ-Gp for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33243) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxT-0002Li-Ru for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:02 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540939; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ap+dbpZQCTL9TeyQPLqP0CXnuaDCGTJnooL8v1braXg=; b=N7S/OeqC/kmxPQ7hMNKCuE/xgCztiafH7o0H7rkTCxwBmAoDknPR4ADLlyfe5tEvVpPyUh zF6raQHNmi9ZCz3/QEm/V4HMrF8mdbrwnkKiD6LKw9j+J5sdlzq8cQPjd2eEas0tn3P8z/ EM7UQMKxirpzgVAuDdT+AJpTWVegP2U= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-595-9EgpA5RnOiWtx_CIkA9Exw-1; Thu, 01 Oct 2020 04:28:57 -0400 X-MC-Unique: 9EgpA5RnOiWtx_CIkA9Exw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0465F19080AC; Thu, 1 Oct 2020 08:28:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADA1A5578A; Thu, 1 Oct 2020 08:28:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 220FC31E21; Thu, 1 Oct 2020 10:28:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 7/9] tests/acpi: add microvm usb test Date: Thu, 1 Oct 2020 10:28:32 +0200 Message-Id: <20201001082834.15821-8-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index edf672d26f0b..ed7aba69c9bd 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1091,6 +1091,17 @@ static void test_acpi_microvm_tcg(void) free_test_data(&data); } +static void test_acpi_microvm_usb_tcg(void) +{ + test_data data; + + test_acpi_microvm_prepare(&data); + data.variant = ".usb"; + test_acpi_one(" -machine microvm,acpi=on,usb=on,rtc=off", + &data); + free_test_data(&data); +} + static void test_acpi_microvm_pcie_tcg(void) { test_data data; @@ -1225,6 +1236,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hmat); qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat); qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); + qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } From patchwork Thu Oct 1 08:28:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 303927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 368D9C4727C for ; Thu, 1 Oct 2020 08:35:07 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ACD6A20780 for ; Thu, 1 Oct 2020 08:35:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="guHWvZPR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACD6A20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNu3N-0003xC-Ka for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:35:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxZ-0005xz-7v for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxU-0002Lz-37 for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:04 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540939; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RIIAH9em71dl76nnlBb8T+Czx8DdEH5u1rF5hNKxUTw=; b=guHWvZPRXvE/ea06R4JmMdspV/qMPH2BBBCnX+0JZn2qFetzVYa/4zWwYr31XBWqrWek7m UID2R9yEluMwyJPymMifQrzVb55eWZOctNOVxSzUVNxzjp2/uFIuRHpT8izchKtEPVIYWA ZsfDVwvpzLPKbBA91ZaI9zffN6R/NlM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-437-AeAr6cBBMQehoMbAhE8scw-1; Thu, 01 Oct 2020 04:28:58 -0400 X-MC-Unique: AeAr6cBBMQehoMbAhE8scw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF91280BD65; Thu, 1 Oct 2020 08:28:52 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9D7B55786; Thu, 1 Oct 2020 08:28:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2B2CB31E23; Thu, 1 Oct 2020 10:28:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 8/9] tests/acpi: add microvm rtc test Date: Thu, 1 Oct 2020 10:28:33 +0200 Message-Id: <20201001082834.15821-9-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ed7aba69c9bd..e62918a5f495 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1102,6 +1102,17 @@ static void test_acpi_microvm_usb_tcg(void) free_test_data(&data); } +static void test_acpi_microvm_rtc_tcg(void) +{ + test_data data; + + test_acpi_microvm_prepare(&data); + data.variant = ".rtc"; + test_acpi_one(" -machine microvm,acpi=on,rtc=on", + &data); + free_test_data(&data); +} + static void test_acpi_microvm_pcie_tcg(void) { test_data data; @@ -1237,6 +1248,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat); qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); + qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } From patchwork Thu Oct 1 08:28:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 303928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F672C4727C for ; Thu, 1 Oct 2020 08:33:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8B4DA20780 for ; Thu, 1 Oct 2020 08:33:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SfOfFYNy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B4DA20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNu1W-00029M-KF for qemu-devel@archiver.kernel.org; Thu, 01 Oct 2020 04:33:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNtxY-0005w4-97 for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNtxT-0002Ll-TH for qemu-devel@nongnu.org; Thu, 01 Oct 2020 04:29:03 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601540939; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AVMcRRphqLATFdXrbVOHne+0E5XTAVDj3f+GRgBbNV4=; b=SfOfFYNy0gJ8E7tVR+F5FL31Iv1BXqQ6cgA5oc/AXh8N9BOmgpB2LIX0G13dJe34zagLoS T3cep9mLT3K5M+20ivKgxHhPQ/lYzNXHAgIN+OgtGnOhDOOSqP3lEL9dV71DFBJtWE7Jca zj9GY69ERBEa6VoNjaRzQdrrJfM1DBA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-wiL7PxryMviJvvG7yPdkVQ-1; Thu, 01 Oct 2020 04:28:58 -0400 X-MC-Unique: wiL7PxryMviJvvG7yPdkVQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7024100648D; Thu, 1 Oct 2020 08:28:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C44D75120; Thu, 1 Oct 2020 08:28:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 340BB31FCE; Thu, 1 Oct 2020 10:28:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 9/9] tests/acpi: update expected data files Date: Thu, 1 Oct 2020 10:28:34 +0200 Message-Id: <20201001082834.15821-10-kraxel@redhat.com> In-Reply-To: <20201001082834.15821-1-kraxel@redhat.com> References: <20201001082834.15821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 04:25:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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.469, 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_H5=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Sai Pavan Boddu , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- tests/data/acpi/microvm/DSDT.rtc | Bin 0 -> 404 bytes tests/data/acpi/microvm/DSDT.usb | Bin 0 -> 414 bytes 3 files changed, 2 deletions(-) diff --git a/tests/data/acpi/microvm/DSDT.rtc b/tests/data/acpi/microvm/DSDT.rtc index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5960d6929a2f88d76aaa324b88b80908ff0698dc 100644 GIT binary patch literal 404 zcmXv~%TB^T6ur|@C{v1~(GX2c2#H%WV2JB>I+P{_YNvonO@>ckYuq3U64&|xe1f0i z=ddE)p}Lv-I_KVVCQ?!HMF1=w&cs-C!{+(b6L(kj&D_I|V!BUg`;$bXWP zIp=%;u2w}rJy(ldo%@u=ggMM1tyd_w12LQQPxw~w;}BQRlL%i!II9SZ`Y}1!2OHcT z1H-w?3!(ox9S6ov1kO`A@eI*M2ngyI9}v{KxfOr}YoKQZYaM3_E;bSG|V76o^Ld+8(i zC_YYC#XB8cxS6^4-1#`?PLKtYPXb`A{IQ6#w!cV3fEr4mYkjlmOl7{xi|hVe^c@w& zf%_nbQ_gu89FTCW14jm6)D6k5 zv@3yg#XvKIN+<(mOgxdqoOf=~1W6YMSZSXot-n>EL~580p|wn92n~Sko|g01x^9Kc z