From patchwork Thu Nov 5 13:39:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 319893 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 40DDDC4742C for ; Thu, 5 Nov 2020 13:43:48 +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 A86152072E for ; Thu, 5 Nov 2020 13:43:47 +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="FSpNOBvY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A86152072E 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]:34296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafYI-0006d2-GY for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:43:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUK-0001Oz-I0 for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUI-0003X9-Rj for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583577; 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=CQSyVFvqV+tEgAGmEnC97qBsAQgtHbwKse28WqGZH7g=; b=FSpNOBvYGQ/J97rvpFlpZTAxT4doynEwk0l7YIXAwEsC6DywXdttTtXD4JY4iJyh2H+d+l dKm6MtlPkhDKbYlsfaaq6zBrRjnn2h9YBxY4KdMlpN/MaQrc2l6jq7GwYRTXBfm1tNENql TCVNQ+msRUAp6kJ9VevBtvf8/I5Bikk= 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-395-zQA_vjPePFaxAdRlRqWX8A-1; Thu, 05 Nov 2020 08:39:34 -0500 X-MC-Unique: zQA_vjPePFaxAdRlRqWX8A-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 036B9805F14; Thu, 5 Nov 2020 13:39:33 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 577D05B4CC; Thu, 5 Nov 2020 13:39:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 845C59D10; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 01/12] [testing] disable xhci msix Date: Thu, 5 Nov 2020 14:39:12 +0100 Message-Id: <20201105133923.23821-2-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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/11/05 01:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , 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 --- hw/usb/hcd-xhci-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index b78fcd2bb2d5..0a0954042ff3 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -239,7 +239,7 @@ static void qemu_xhci_instance_init(Object *obj) XHCIState *xhci = &s->xhci; s->msi = ON_OFF_AUTO_OFF; - s->msix = ON_OFF_AUTO_AUTO; + s->msix = ON_OFF_AUTO_OFF; xhci->numintrs = XHCI_MAXINTRS; xhci->numslots = XHCI_MAXSLOTS; xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); From patchwork Thu Nov 5 13:39:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 318536 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 44A72C4741F for ; Thu, 5 Nov 2020 13:41:01 +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 7F46020729 for ; Thu, 5 Nov 2020 13:41:00 +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="C6/IEii/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F46020729 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]:53656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafVb-0002x1-DJ for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:40:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUB-0001Fq-02 for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafU9-0003Qp-Bv for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583568; 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=0VBYicJ6FWuL5UYNPKwg9SuCEm4GOXsnfoC15oaHUDc=; b=C6/IEii/ulNn+pZA3ItTSOuTHWrEpV4JTtoy0XpjSk06TO0CeHYDplFYeVSJunLWZqRXqz dLOtSRWPLAvW97whjkJJGNH6wkTKlsmmCx+OfkgwfqcNUBWEyBuqis/Us1c7fGOKDUga3o of+Po4GUO57qII7yMNXGfESEAOvEyBI= 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-295-b7MDyTKtPoqZV_6EDo2QaA-1; Thu, 05 Nov 2020 08:39:25 -0500 X-MC-Unique: b7MDyTKtPoqZV_6EDo2QaA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0793805F04; Thu, 5 Nov 2020 13:39:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AF874DA35; Thu, 5 Nov 2020 13:39:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8DDAA9D15; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 02/12] x86: rewrite gsi_handler() Date: Thu, 5 Nov 2020 14:39:13 +0100 Message-Id: <20201105133923.23821-3-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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/11/05 01:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rewrite function to use switch() for IRQ number mapping. Check i8259_irq exists before raising it so the function also works in case no i8259 (aka pic) is present. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/x86.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 5944fc44edca..b67e7b789f89 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -588,11 +588,17 @@ void gsi_handler(void *opaque, int n, int level) GSIState *s = opaque; trace_x86_gsi_interrupt(n, level); - if (n < ISA_NUM_IRQS) { - /* Under KVM, Kernel will forward to both PIC and IOAPIC */ - qemu_set_irq(s->i8259_irq[n], level); + switch (n) { + case 0 ... ISA_NUM_IRQS - 1: + if (s->i8259_irq[n]) { + /* Under KVM, Kernel will forward to both PIC and IOAPIC */ + qemu_set_irq(s->i8259_irq[n], level); + } + /* fall through */ + case ISA_NUM_IRQS ... IOAPIC_NUM_PINS - 1: + qemu_set_irq(s->ioapic_irq[n], level); + break; } - qemu_set_irq(s->ioapic_irq[n], level); } void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name) From patchwork Thu Nov 5 13:39:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 318534 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 02F0FC55179 for ; Thu, 5 Nov 2020 13:43:48 +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 3347520729 for ; Thu, 5 Nov 2020 13:43:46 +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="WHkXgyuj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3347520729 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]:34128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafYH-0006Ym-2A for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:43:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUM-0001U2-DK for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:52236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUI-0003X2-Ta for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583577; 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=eXWXnay92VkGKCADVi7aX6mu0TDgFQ6kUiwH/zRRoCM=; b=WHkXgyujOB6YAuVOKBsv8l81/DB7Y1+EejUMjg3ceucSud/wMjf8QiYlzalTk26kBos3u3 amUcY0fRNRiUOAAMshu7MNnq5q9fbu5XzhGL0s2i72lEkdMFnrlIYxZlL70AGMJSfTGfbM Y1mBMNUoLZ5LJy3sCfnnunuRbuQ48Us= 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-438-58uiqNSRNG2DG0KCvWZj4w-1; Thu, 05 Nov 2020 08:39:35 -0500 X-MC-Unique: 58uiqNSRNG2DG0KCvWZj4w-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 915AA19080AC; Thu, 5 Nov 2020 13:39:34 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D6A455794; Thu, 5 Nov 2020 13:39:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9EF4F9D16; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 03/12] x86: add support for second ioapic Date: Thu, 5 Nov 2020 14:39:14 +0100 Message-Id: <20201105133923.23821-4-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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=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/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add ioapic_init_secondary to initialize it, wire up in gsi handling and acpi apic table creation. Signed-off-by: Gerd Hoffmann --- include/hw/i386/ioapic.h | 1 + include/hw/i386/ioapic_internal.h | 2 +- include/hw/i386/x86.h | 3 +++ hw/i386/acpi-common.c | 10 ++++++++++ hw/i386/x86.c | 20 ++++++++++++++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/include/hw/i386/ioapic.h b/include/hw/i386/ioapic.h index 59fcb158a734..1323b4b8ff6e 100644 --- a/include/hw/i386/ioapic.h +++ b/include/hw/i386/ioapic.h @@ -22,6 +22,7 @@ #define IOAPIC_NUM_PINS 24 #define IO_APIC_DEFAULT_ADDRESS 0xfec00000 +#define IO_APIC_SECONDARY_ADDRESS (IO_APIC_DEFAULT_ADDRESS + 0x10000) #define TYPE_KVM_IOAPIC "kvm-ioapic" #define TYPE_IOAPIC "ioapic" diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h index 0ac9e2400d6b..4cebd2e32c9f 100644 --- a/include/hw/i386/ioapic_internal.h +++ b/include/hw/i386/ioapic_internal.h @@ -27,7 +27,7 @@ #include "qemu/notify.h" #include "qom/object.h" -#define MAX_IOAPICS 1 +#define MAX_IOAPICS 2 #define IOAPIC_LVT_DEST_SHIFT 56 #define IOAPIC_LVT_DEST_IDX_SHIFT 48 diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index 739fac50871b..3f9b052cfc34 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -50,6 +50,7 @@ struct X86MachineState { ISADevice *rtc; FWCfgState *fw_cfg; qemu_irq *gsi; + DeviceState *ioapic2; GMappedFile *initrd_mapped_file; HotplugHandler *acpi_dev; @@ -120,10 +121,12 @@ bool x86_machine_is_acpi_enabled(const X86MachineState *x86ms); typedef struct GSIState { qemu_irq i8259_irq[ISA_NUM_IRQS]; qemu_irq ioapic_irq[IOAPIC_NUM_PINS]; + qemu_irq ioapic2_irq[IOAPIC_NUM_PINS]; } GSIState; qemu_irq x86_allocate_cpu_irq(void); void gsi_handler(void *opaque, int n, int level); void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name); +DeviceState *ioapic_init_secondary(GSIState *gsi_state); #endif diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 8a769654060e..91970837bb68 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -103,6 +103,16 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *linker, io_apic->address = cpu_to_le32(IO_APIC_DEFAULT_ADDRESS); io_apic->interrupt = cpu_to_le32(0); + if (x86ms->ioapic2) { + AcpiMadtIoApic *io_apic2; + io_apic2 = acpi_data_push(table_data, sizeof *io_apic); + io_apic2->type = ACPI_APIC_IO; + io_apic2->length = sizeof(*io_apic); + io_apic2->io_apic_id = ACPI_BUILD_IOAPIC_ID + 1; + io_apic2->address = cpu_to_le32(IO_APIC_SECONDARY_ADDRESS); + io_apic2->interrupt = cpu_to_le32(24); + } + if (x86ms->apic_xrupt_override) { intsrcovr = acpi_data_push(table_data, sizeof *intsrcovr); intsrcovr->type = ACPI_APIC_XRUPT_OVERRIDE; diff --git a/hw/i386/x86.c b/hw/i386/x86.c index b67e7b789f89..628118e8b410 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -598,6 +598,9 @@ void gsi_handler(void *opaque, int n, int level) case ISA_NUM_IRQS ... IOAPIC_NUM_PINS - 1: qemu_set_irq(s->ioapic_irq[n], level); break; + case IOAPIC_NUM_PINS ... IOAPIC_NUM_PINS * 2 - 1: + qemu_set_irq(s->ioapic2_irq[n - IOAPIC_NUM_PINS], level); + break; } } @@ -624,6 +627,23 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name) } } +DeviceState *ioapic_init_secondary(GSIState *gsi_state) +{ + DeviceState *dev; + SysBusDevice *d; + unsigned int i; + + dev = qdev_new(TYPE_IOAPIC); + d = SYS_BUS_DEVICE(dev); + sysbus_realize_and_unref(d, &error_fatal); + sysbus_mmio_map(d, 0, IO_APIC_SECONDARY_ADDRESS); + + for (i = 0; i < IOAPIC_NUM_PINS; i++) { + gsi_state->ioapic2_irq[i] = qdev_get_gpio_in(dev, i); + } + return dev; +} + struct setup_data { uint64_t next; uint32_t type; From patchwork Thu Nov 5 13:39:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 319892 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 0160EC55179 for ; Thu, 5 Nov 2020 13:46:58 +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 4779F206B6 for ; Thu, 5 Nov 2020 13:46:57 +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="V/h6UQ1f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4779F206B6 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]:42498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafbM-0001gc-3a for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:46:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUN-0001WT-8g for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUJ-0003Xj-QU for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583579; 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=g+ORTAV4QV7qK7W4rX+ydMFdvM78hX0Yyjib+4Eqz9U=; b=V/h6UQ1fI95S1eECPuHHPeGY3+JOeJ2kSaW28im+MMDN38572gava5B/0/YTWAdugXqbHR ABtbD/mTwxSfLWBwizk+o3fbBarXwI2EsT7gFlYYJsy/4szN28RhdNl0vuxKaaBQsHw1BS VEOF71Q6mqfuWwfxx0E0QWA6HeDeZr0= 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-133-6rAN_pvYMJWBxnC75IGtLA-1; Thu, 05 Nov 2020 08:39:35 -0500 X-MC-Unique: 6rAN_pvYMJWBxnC75IGtLA-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 5F92C1084C80; Thu, 5 Nov 2020 13:39:34 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E87E55798; Thu, 5 Nov 2020 13:39:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AA7429D17; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 04/12] microvm: make number of virtio transports runtime configurable Date: Thu, 5 Nov 2020 14:39:15 +0100 Message-Id: <20201105133923.23821-5-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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/11/05 01:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , 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 --- include/hw/i386/microvm.h | 2 +- hw/i386/microvm.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index 0fc216007777..c5d60bacb5e8 100644 --- a/include/hw/i386/microvm.h +++ b/include/hw/i386/microvm.h @@ -52,7 +52,6 @@ /* Platform virtio definitions */ #define VIRTIO_MMIO_BASE 0xfeb00000 -#define VIRTIO_NUM_TRANSPORTS 8 #define VIRTIO_CMDLINE_MAXLEN 64 #define GED_MMIO_BASE 0xfea00000 @@ -98,6 +97,7 @@ struct MicrovmMachineState { /* Machine state */ uint32_t virtio_irq_base; + uint32_t virtio_num_transports; bool kernel_cmdline_fixed; Notifier machine_done; Notifier powerdown_req; diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 5428448b7059..e92f236bf442 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -178,8 +178,13 @@ static void microvm_devices_init(MicrovmMachineState *mms) kvmclock_create(true); - mms->virtio_irq_base = x86_machine_is_acpi_enabled(x86ms) ? 16 : 5; - for (i = 0; i < VIRTIO_NUM_TRANSPORTS; i++) { + mms->virtio_irq_base = 5; + mms->virtio_num_transports = 8; + if (x86_machine_is_acpi_enabled(x86ms)) { + mms->virtio_irq_base = 16; + } + + for (i = 0; i < mms->virtio_num_transports; i++) { sysbus_create_simple("virtio-mmio", VIRTIO_MMIO_BASE + i * 512, x86ms->gsi[mms->virtio_irq_base + i]); From patchwork Thu Nov 5 13:39:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 318535 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 3B367C4742C for ; Thu, 5 Nov 2020 13:41:10 +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 4E7C320729 for ; Thu, 5 Nov 2020 13:41:09 +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="KgCZvX2z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E7C320729 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]:54034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafVj-00036I-RV for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:41:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUE-0001JL-H0 for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafU9-0003Qt-Bv for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583568; 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=0TbG4AoAx/hvAhTH6MVEwrwEJ1wCnRZR07N8NUwtarU=; b=KgCZvX2zqaY6gxTELr/UbgEEvPVjyvRHYc+/czyBI84M4prRbgyNCZ77E16xu0nvZNMF9a JHLQ3wCI2y32grIR+S5aWnYyhrwmPuCn+nBRCy2lMmcqv9bNoCywziSTQwvsDa50oWvwYf O3udGjO5wfRBV6P12WQUzpFlKxAOIEA= 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-262-clGiJcTGM5WioF1Ld2HXpw-1; Thu, 05 Nov 2020 08:39:26 -0500 X-MC-Unique: clGiJcTGM5WioF1Ld2HXpw-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 B598E1084C8F; Thu, 5 Nov 2020 13:39:25 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DA6719D6C; Thu, 5 Nov 2020 13:39:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B5EAF9C87; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 05/12] microvm: make pcie irq base runtime configurable Date: Thu, 5 Nov 2020 14:39:16 +0100 Message-Id: <20201105133923.23821-6-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , 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 Reviewed-by: Igor Mammedov --- include/hw/i386/microvm.h | 2 +- hw/i386/microvm.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index c5d60bacb5e8..f1e9db059b85 100644 --- a/include/hw/i386/microvm.h +++ b/include/hw/i386/microvm.h @@ -66,7 +66,6 @@ #define PCIE_MMIO_SIZE 0x20000000 #define PCIE_ECAM_BASE 0xe0000000 #define PCIE_ECAM_SIZE 0x10000000 -#define PCIE_IRQ_BASE 12 /* Machine type options */ #define MICROVM_MACHINE_PIT "pit" @@ -96,6 +95,7 @@ struct MicrovmMachineState { bool auto_kernel_cmdline; /* Machine state */ + uint32_t pcie_irq_base; uint32_t virtio_irq_base; uint32_t virtio_num_transports; bool kernel_cmdline_fixed; diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index e92f236bf442..5e4182b47464 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -181,6 +181,7 @@ static void microvm_devices_init(MicrovmMachineState *mms) mms->virtio_irq_base = 5; mms->virtio_num_transports = 8; if (x86_machine_is_acpi_enabled(x86ms)) { + mms->pcie_irq_base = 12; mms->virtio_irq_base = 16; } @@ -226,12 +227,12 @@ static void microvm_devices_init(MicrovmMachineState *mms) mms->gpex.mmio32.size = PCIE_MMIO_SIZE; mms->gpex.ecam.base = PCIE_ECAM_BASE; mms->gpex.ecam.size = PCIE_ECAM_SIZE; - mms->gpex.irq = PCIE_IRQ_BASE; + mms->gpex.irq = mms->pcie_irq_base; create_gpex(mms); - x86ms->pci_irq_mask = ((1 << (PCIE_IRQ_BASE + 0)) | - (1 << (PCIE_IRQ_BASE + 1)) | - (1 << (PCIE_IRQ_BASE + 2)) | - (1 << (PCIE_IRQ_BASE + 3))); + x86ms->pci_irq_mask = ((1 << (mms->pcie_irq_base + 0)) | + (1 << (mms->pcie_irq_base + 1)) | + (1 << (mms->pcie_irq_base + 2)) | + (1 << (mms->pcie_irq_base + 3))); } else { x86ms->pci_irq_mask = 0; } From patchwork Thu Nov 5 13:39:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 319894 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 CBFB4C4741F for ; Thu, 5 Nov 2020 13:43:46 +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 48D9D2072E for ; Thu, 5 Nov 2020 13:43:46 +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="gRhKHZtU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48D9D2072E 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]:34136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafYH-0006Z2-4Y for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:43:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUE-0001Jd-Ky for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:24371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUA-0003R1-Sx for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583568; 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=yw2kauyKMh3FQod1x634Vpf4/YB25IOYhhK07dk3RPA=; b=gRhKHZtUveB2QYG4+jgEJ6Xuo5OcJV7JAWqMRiDWnvTaUbgd733EYHHHr2TeTzxdsRJTVO 5Pha13UfdJ0GH3V4ulOnftkfe/p7+HU9V+mG538/D/3sLSwN6dwdo7DSao33/Q4qIww4ii rOaQdiEOCiT+EptgEpfwdf1+tCk6krk= 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-186-fn6n59uDNf62MqpSoJUAxg-1; Thu, 05 Nov 2020 08:39:26 -0500 X-MC-Unique: fn6n59uDNf62MqpSoJUAxg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AFEACE06A4; Thu, 5 Nov 2020 13:39:25 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C7E55C5DE; Thu, 5 Nov 2020 13:39:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BF5A99C90; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 06/12] microvm: drop microvm_gsi_handler() Date: Thu, 5 Nov 2020 14:39:17 +0100 Message-Id: <20201105133923.23821-7-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" With the improved gsi_handler() we don't need our private version any more. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/microvm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 5e4182b47464..829b376a1278 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -96,13 +96,6 @@ static void microvm_set_rtc(MicrovmMachineState *mms, ISADevice *s) rtc_set_memory(s, 0x5d, val >> 16); } -static void microvm_gsi_handler(void *opaque, int n, int level) -{ - GSIState *s = opaque; - - qemu_set_irq(s->ioapic_irq[n], level); -} - static void create_gpex(MicrovmMachineState *mms) { X86MachineState *x86ms = X86_MACHINE(mms); @@ -163,12 +156,7 @@ static void microvm_devices_init(MicrovmMachineState *mms) /* Core components */ gsi_state = g_malloc0(sizeof(*gsi_state)); - if (mms->pic == ON_OFF_AUTO_ON || mms->pic == ON_OFF_AUTO_AUTO) { - x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); - } else { - x86ms->gsi = qemu_allocate_irqs(microvm_gsi_handler, - gsi_state, GSI_NUM_PINS); - } + x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(), &error_abort); From patchwork Thu Nov 5 13:39:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 318533 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 DA57AC4741F for ; Thu, 5 Nov 2020 13:46:55 +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 0845A206B6 for ; Thu, 5 Nov 2020 13:46:54 +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="aimmhcvy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0845A206B6 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]:42234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafbJ-0001a5-QT for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:46:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUE-0001Ju-Ng for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:59011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUB-0003Rv-7I for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583569; 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=ocHmmvH58NJwG62968PWSsc3cweYMHIqjocC9w6dLtY=; b=aimmhcvyNIvA++RxXKID5p8nIXgeXjHxlQKnfCK0RVUyvuP9uIFfoMLuYWZqZunW9Is5wQ +F51v/XhtKn/jJ449JpPTmEAes2j3BnpBQoQD2T64v5fXpKUykLZltv6zImWkH1IlEFZwb vwLvIoUvPvwjov/P2+IsW3D8wHLVZ78= 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-497-cFtH4QeeOR-D0vO0Z-Z6mw-1; Thu, 05 Nov 2020 08:39:27 -0500 X-MC-Unique: cFtH4QeeOR-D0vO0Z-Z6mw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BA8AE06A6; Thu, 5 Nov 2020 13:39:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DE025C22D; Thu, 5 Nov 2020 13:39:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CCFD89CA5; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 07/12] microvm: add second ioapic Date: Thu, 5 Nov 2020 14:39:18 +0100 Message-Id: <20201105133923.23821-8-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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/11/05 01:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Create second ioapic, route virtio-mmio IRQs to it, allow more virtio-mmio devices (24 instead of 8). Needs ACPI, enabled by default, can be turned off using -machine ioapic2=off Signed-off-by: Gerd Hoffmann --- include/hw/i386/microvm.h | 2 ++ hw/i386/microvm.c | 51 ++++++++++++++++++++++++++++++++-- tests/qtest/bios-tables-test.c | 8 +++--- 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index f1e9db059b85..f25f8374413f 100644 --- a/include/hw/i386/microvm.h +++ b/include/hw/i386/microvm.h @@ -72,6 +72,7 @@ #define MICROVM_MACHINE_PIC "pic" #define MICROVM_MACHINE_RTC "rtc" #define MICROVM_MACHINE_PCIE "pcie" +#define MICROVM_MACHINE_IOAPIC2 "ioapic2" #define MICROVM_MACHINE_ISA_SERIAL "isa-serial" #define MICROVM_MACHINE_OPTION_ROMS "x-option-roms" #define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline" @@ -90,6 +91,7 @@ struct MicrovmMachineState { OnOffAuto pit; OnOffAuto rtc; OnOffAuto pcie; + OnOffAuto ioapic2; bool isa_serial; bool option_roms; bool auto_kernel_cmdline; diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 829b376a1278..cae0d8fc8692 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -145,30 +145,50 @@ static void create_gpex(MicrovmMachineState *mms) } } +static int microvm_ioapics(MicrovmMachineState *mms) +{ + if (!x86_machine_is_acpi_enabled(X86_MACHINE(mms))) { + return 1; + } + if (mms->ioapic2 == ON_OFF_AUTO_OFF) { + return 1; + } + return 2; +} + static void microvm_devices_init(MicrovmMachineState *mms) { X86MachineState *x86ms = X86_MACHINE(mms); ISABus *isa_bus; ISADevice *rtc_state; GSIState *gsi_state; + int ioapics; int i; /* Core components */ - + ioapics = microvm_ioapics(mms); gsi_state = g_malloc0(sizeof(*gsi_state)); - x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); + x86ms->gsi = qemu_allocate_irqs(gsi_handler, gsi_state, + IOAPIC_NUM_PINS * ioapics); isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(), &error_abort); isa_bus_irqs(isa_bus, x86ms->gsi); ioapic_init_gsi(gsi_state, "machine"); + if (ioapics > 1) { + x86ms->ioapic2 = ioapic_init_secondary(gsi_state); + } kvmclock_create(true); mms->virtio_irq_base = 5; mms->virtio_num_transports = 8; - if (x86_machine_is_acpi_enabled(x86ms)) { + if (x86ms->ioapic2) { + mms->pcie_irq_base = 16; + mms->virtio_irq_base = 24; + mms->virtio_num_transports = 24; + } else if (x86_machine_is_acpi_enabled(x86ms)) { mms->pcie_irq_base = 12; mms->virtio_irq_base = 16; } @@ -544,6 +564,23 @@ static void microvm_machine_set_pcie(Object *obj, Visitor *v, const char *name, visit_type_OnOffAuto(v, name, &mms->pcie, errp); } +static void microvm_machine_get_ioapic2(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) +{ + MicrovmMachineState *mms = MICROVM_MACHINE(obj); + OnOffAuto ioapic2 = mms->ioapic2; + + visit_type_OnOffAuto(v, name, &ioapic2, errp); +} + +static void microvm_machine_set_ioapic2(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) +{ + MicrovmMachineState *mms = MICROVM_MACHINE(obj); + + visit_type_OnOffAuto(v, name, &mms->ioapic2, errp); +} + static bool microvm_machine_get_isa_serial(Object *obj, Error **errp) { MicrovmMachineState *mms = MICROVM_MACHINE(obj); @@ -620,6 +657,7 @@ static void microvm_machine_initfn(Object *obj) mms->pit = ON_OFF_AUTO_AUTO; mms->rtc = ON_OFF_AUTO_AUTO; mms->pcie = ON_OFF_AUTO_AUTO; + mms->ioapic2 = ON_OFF_AUTO_AUTO; mms->isa_serial = true; mms->option_roms = true; mms->auto_kernel_cmdline = true; @@ -693,6 +731,13 @@ static void microvm_class_init(ObjectClass *oc, void *data) object_class_property_set_description(oc, MICROVM_MACHINE_PCIE, "Enable PCIe"); + object_class_property_add(oc, MICROVM_MACHINE_IOAPIC2, "OnOffAuto", + microvm_machine_get_ioapic2, + microvm_machine_set_ioapic2, + NULL, NULL); + object_class_property_set_description(oc, MICROVM_MACHINE_IOAPIC2, + "Enable second IO-APIC"); + object_class_property_add_bool(oc, MICROVM_MACHINE_ISA_SERIAL, microvm_machine_get_isa_serial, microvm_machine_set_isa_serial); diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index f23a5335a875..0a0ce76ffcf9 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1115,7 +1115,7 @@ static void test_acpi_microvm_tcg(void) test_data data; test_acpi_microvm_prepare(&data); - test_acpi_one(" -machine microvm,acpi=on,rtc=off", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=off", &data); free_test_data(&data); } @@ -1126,7 +1126,7 @@ static void test_acpi_microvm_usb_tcg(void) test_acpi_microvm_prepare(&data); data.variant = ".usb"; - test_acpi_one(" -machine microvm,acpi=on,usb=on,rtc=off", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,usb=on,rtc=off", &data); free_test_data(&data); } @@ -1137,7 +1137,7 @@ static void test_acpi_microvm_rtc_tcg(void) test_acpi_microvm_prepare(&data); data.variant = ".rtc"; - test_acpi_one(" -machine microvm,acpi=on,rtc=on", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=on", &data); free_test_data(&data); } @@ -1149,7 +1149,7 @@ static void test_acpi_microvm_pcie_tcg(void) test_acpi_microvm_prepare(&data); data.variant = ".pcie"; data.tcg_only = true; /* need constant host-phys-bits */ - test_acpi_one(" -machine microvm,acpi=on,rtc=off,pcie=on", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=off,pcie=on", &data); free_test_data(&data); } From patchwork Thu Nov 5 13:39:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 319895 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 73975C4741F for ; Thu, 5 Nov 2020 13:41: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 8FEBD20729 for ; Thu, 5 Nov 2020 13:41: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="AkdjCE9C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FEBD20729 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]:54068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafVk-00037E-3J for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:41:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUE-0001J7-DP for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUA-0003S2-T4 for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583569; 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=7I2Y+BzFF7UNrpxwtCjfJEL2JGTEhD0bmNNAxB4LsiY=; b=AkdjCE9CQxmqxsZHsEd4xqP6vNfJu4aMEocG+aXsvrF+WX2vNzfsBcR3S2yEw32vk0xo+v XZ7FfR9K03brKgcKP7btOTHYL16rFoHyhjf1mHt9j0Poz/EHQoL4bIl3ySuCdK1keDJy3R S/vKaPslxptwDIUeW2B10h6Nu7qfdis= 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-355-iTTmSjsjPOW9o0xgI6r_dg-1; Thu, 05 Nov 2020 08:39:27 -0500 X-MC-Unique: iTTmSjsjPOW9o0xgI6r_dg-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 ADDF080474C; Thu, 5 Nov 2020 13:39:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B8F619C4F; Thu, 5 Nov 2020 13:39:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D69AF9CAE; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 08/12] tests/acpi: allow updates for expected data files Date: Thu, 5 Nov 2020 14:39:19 +0100 Message-Id: <20201105133923.23821-9-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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/11/05 01:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , 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..191ac230b013 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/APIC.ioapic2", +"tests/data/acpi/microvm/DSDT.ioapic2", From patchwork Thu Nov 5 13:39:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 319890 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 5AAD1C55179 for ; Thu, 5 Nov 2020 13:48:45 +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 AE889206B6 for ; Thu, 5 Nov 2020 13:48:44 +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="XMkXhNkk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE889206B6 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]:50660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafd5-00054x-EI for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:48:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUY-0001ja-UC for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUW-0003bx-MJ for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583589; 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=rOgTZqRkdmH4J17LgCiMlVJh97oQo6ssZspInf7FNis=; b=XMkXhNkkNeEYhe7n759ocIt5oH4pfhX1OfxPSCAj4igUe5f9hcgFof/iQltdjfuKSpLaqj 47yiJCstGgfFTl9cttcRao2XSH6e0/A8Dcfy6/R4bl1yhOy4solk1C1zcOc0EeWLMlx4bu uMx0ZPYGxAJfwjk0YEYU/PJ5qGMsED4= 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-101-rKyQqcEnMDCuoFgrPkfAvA-1; Thu, 05 Nov 2020 08:39:46 -0500 X-MC-Unique: rKyQqcEnMDCuoFgrPkfAvA-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 B607C804756; Thu, 5 Nov 2020 13:39:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id A25CC5D9D5; Thu, 5 Nov 2020 13:39:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E76CC9CBB; Thu, 5 Nov 2020 14:39:23 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 10/12] tests/acpi: add ioapic2=on test for microvm Date: Thu, 5 Nov 2020 14:39:21 +0100 Message-Id: <20201105133923.23821-11-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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/11/05 01:14:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , 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 0a0ce76ffcf9..4c4e6dd1e9cc 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1154,6 +1154,17 @@ static void test_acpi_microvm_pcie_tcg(void) free_test_data(&data); } +static void test_acpi_microvm_ioapic2_tcg(void) +{ + test_data data; + + test_acpi_microvm_prepare(&data); + data.variant = ".ioapic2"; + test_acpi_one(" -machine microvm,acpi=on,ioapic2=on,rtc=off", + &data); + free_test_data(&data); +} + static void test_acpi_virt_tcg_numamem(void) { test_data data = { @@ -1280,6 +1291,7 @@ int main(int argc, char *argv[]) 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); + qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2_tcg); if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } From patchwork Thu Nov 5 13:39:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 318532 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 1678CC5517A for ; Thu, 5 Nov 2020 13:46:58 +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 6A04A20739 for ; Thu, 5 Nov 2020 13:46:57 +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="Y6lbSCer" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A04A20739 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]:42566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kafbM-0001iD-B6 for qemu-devel@archiver.kernel.org; Thu, 05 Nov 2020 08:46:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kafUL-0001Sj-Tq for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:37030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kafUI-0003We-TT for qemu-devel@nongnu.org; Thu, 05 Nov 2020 08:39:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604583576; 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=HsAkdQedvNyjeOcNIHo1UFp8zKNKfkUJO6xO4TDi/Zg=; b=Y6lbSCer1RbKp+d8YmzyJdBvqbSfI2Spkd6jKMHgH6G1HyWxHMOj9lVH4u0t1tfnORyjwi uVuY0rbBm9SPqYWFntOGDE/46id7nuxn+uWTumdMOl5TcD2UQmH8vKcC/dJUYLQ+yDqHTB GkGeU5QZXiOMfoD0E8avob7R3RYbfeo= 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-108-wCb0G4tRPBilbyB9rudAhg-1; Thu, 05 Nov 2020 08:39:34 -0500 X-MC-Unique: wCb0G4tRPBilbyB9rudAhg-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 04A49805F16; Thu, 5 Nov 2020 13:39:33 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C3435B4CF; Thu, 5 Nov 2020 13:39:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0431A9B09; Thu, 5 Nov 2020 14:39:24 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 12/12] tests/acpi: disallow updates for expected data files Date: Thu, 5 Nov 2020 14:39:23 +0100 Message-Id: <20201105133923.23821-13-kraxel@redhat.com> In-Reply-To: <20201105133923.23821-1-kraxel@redhat.com> References: <20201105133923.23821-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=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/11/04 22:46:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_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: Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , 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 deletions(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 191ac230b013..dfb8523c8bf4 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/microvm/APIC.ioapic2", -"tests/data/acpi/microvm/DSDT.ioapic2",