From patchwork Tue Sep 8 14:25:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 274261 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=-12.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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 ED393C43461 for ; Tue, 8 Sep 2020 14:28:57 +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 6E91E206B5 for ; Tue, 8 Sep 2020 14:28: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="BW4aikP8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E91E206B5 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]:36748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFecC-0001DJ-Gh for qemu-devel@archiver.kernel.org; Tue, 08 Sep 2020 10:28:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFeaO-0005SW-Ud for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kFeZZ-0006mO-IC for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575171; 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=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=BW4aikP8PPdjwjxqh1co/X1stkiJss+iHh8a3dGVsR+RFYoBzd/U04C41ZeG720Rcdj0Pk FuKJXBz5DsxTZz15DciCCD1TeJMjhH++Pn7pNvglFjrLKqtW0yVUGAgVRkYTWijcQ5HvAB gjtZExxRgzKnEzL/7xSt6Gefwa/2RSo= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-125-9IhXfhFUNvqCGgKQtfvVfA-1; Tue, 08 Sep 2020 10:26:07 -0400 X-MC-Unique: 9IhXfhFUNvqCGgKQtfvVfA-1 Received: by mail-wr1-f69.google.com with SMTP id f18so7031205wrv.19 for ; Tue, 08 Sep 2020 07:26:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=GQAsOjlZ/qzRxwLTQJw48g3quU0X/O2qK5lbxWxw++gFFe2VdGtg9RUx+gcDT6j1eS tzRxNgwLB2a3MnO/6HeT3PiCTPm6lSnsFDBK1x7YUEUhlt1BpiCl4+IyIAY1EVK/4+Rd G75sbtehuloMPaMmIQagsgOMydLlwuh2t0TckpspeuYXnmt3oRk2BQTwLhMV9P/4fgE9 emhE+NWJH2n3DvEXlxCEbOsJMmOP4cT2E2gycLMA4GERSlPG8yZdt8cnrPi7OB6dw4sj VJJMSsbBmPpx6GlAELreMtM2TovLPI9vaF5+24oDUQrbGg/42q135w+u1EtvHvaRehc1 ctXA== X-Gm-Message-State: AOAM530IxAddWL60QC64dX3CupPG2UnZ0hbfPbVuPtceU5AZi6TvoG9q nuhwcRUnAcKNeOMxLpaQNuCJi8bx9FBzoAlcGW4FjhcTD+qq7+8GkQtB1920B4boNm0BIlTkDvR ov+04NYcmvLLLg2E= X-Received: by 2002:adf:efc9:: with SMTP id i9mr28298434wrp.187.1599575166447; Tue, 08 Sep 2020 07:26:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy17scw5GBd0vKOfK7z1JRSIOHwjuajPWIItLLQxN9yoqVYIMsCoqxbS7A7Vn2FqxWJdDcxOw== X-Received: by 2002:adf:efc9:: with SMTP id i9mr28298412wrp.187.1599575166224; Tue, 08 Sep 2020 07:26:06 -0700 (PDT) Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id b2sm32569506wmh.47.2020.09.08.07.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:26:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/5] hw/i386/q35: Remove unreachable Xen code on Q35 machine Date: Tue, 8 Sep 2020 16:25:55 +0200 Message-Id: <20200908142559.192945-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908142559.192945-1-philmd@redhat.com> References: <20200908142559.192945-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 02:10:54 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: Stefano Stabellini , Eduardo Habkost , Paul Durrant , "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Anthony Perard , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Xen accelerator requires specific changes to a machine to be able to use it. See for example the 'Xen PC' machine configure its PCI bus calling pc_xen_hvm_init_pci(). There is no 'Xen Q35' machine declared. This code was probably added while introducing the Q35 machine, based on the existing PC machine (see commit df2d8b3ed4 "Introduce q35 pc based chipset emulator"). Remove the unreachable code to simplify this file. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Anthony PERARD --- hw/i386/pc_q35.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 0cb9c18cd44..f3506269fe0 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,9 +34,7 @@ #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/xen/xen.h" #include "sysemu/kvm.h" -#include "sysemu/xen.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "hw/qdev-properties.h" @@ -179,10 +177,6 @@ static void pc_q35_init(MachineState *machine) x86ms->below_4g_mem_size = machine->ram_size; } - if (xen_enabled()) { - xen_hvm_init(pcms, &ram_memory); - } - x86_cpus_init(x86ms, pcmc->default_cpu_version); kvmclock_create(); @@ -208,10 +202,7 @@ static void pc_q35_init(MachineState *machine) } /* allocate ram and load rom/bios */ - if (!xen_enabled()) { - pc_memory_init(pcms, get_system_memory(), - rom_memory, &ram_memory); - } + pc_memory_init(pcms, get_system_memory(), rom_memory, &ram_memory); /* create pci host bus */ q35_host = Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); @@ -271,7 +262,7 @@ static void pc_q35_init(MachineState *machine) assert(pcms->vmport != ON_OFF_AUTO__MAX); if (pcms->vmport == ON_OFF_AUTO_AUTO) { - pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport = ON_OFF_AUTO_ON; } /* init basic PC hardware */ From patchwork Tue Sep 8 14:25:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 305928 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=-12.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, USER_AGENT_GIT autolearn=unavailable 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 B3CB9C43461 for ; Tue, 8 Sep 2020 14:29:36 +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 2405A206B5 for ; Tue, 8 Sep 2020 14:29: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="J82RGm7x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2405A206B5 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]:40124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFecp-0002Zu-51 for qemu-devel@archiver.kernel.org; Tue, 08 Sep 2020 10:29:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFeaP-0005Sp-3o for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:59338 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kFeZb-0006mn-NG for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575174; 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=L9MSzTqEXdEyImaMC4bb2Kv6juBLliyTUBhWiXmnlsA=; b=J82RGm7xEY9tz9OFscJkzXqpCzLOWMbplQ+5al8ObNgCTPq1w5Uf9OMisKx+V/RhhZEza9 zlctDB5gikXKHhjryQzqVA/aBD5FuaH6VDoznfApq5PacwWuleoMillvlB8pQZVnqMoVIY DQXlIJpw8EfgmNdGoac6F9JEIQxuPzU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-348-3C-dNyfbOGODQ3R8A1OznA-1; Tue, 08 Sep 2020 10:26:13 -0400 X-MC-Unique: 3C-dNyfbOGODQ3R8A1OznA-1 Received: by mail-wm1-f70.google.com with SMTP id l26so3529122wmg.7 for ; Tue, 08 Sep 2020 07:26:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L9MSzTqEXdEyImaMC4bb2Kv6juBLliyTUBhWiXmnlsA=; b=U7DXjWIjQS5Q0506I58j7vXD4Hq8tc4UOi8waDmO6uNRS/o8lpoVmv1rNKz8W5p3pF ZjTw4KsBvpX5jzzMjHF9F8iC1fWWyU+qgwrFKw1LyL4HLn3zthE241s5ViO9DtZMF7vb hB48/nKOb2ly4T/zTfXE1ZUY1k70w1ctbUtKmlrta+jBE9ozu9GOVMdU/Mi5q9Ee7zaz fn0jvLjVE/FtwFXAai9iGSF6Hv2QXR3ShTZiI2cYpUwHN/ws4IotOCToJvaWfqSd2ukT xVo1bNuBL7IemEsCZi3I2OaWKLoDp9ytiGNtpxVQsNUbm00famWXyclr3LDNXV6alEGt fbsA== X-Gm-Message-State: AOAM532XJbtQN1xLaXztjGAjTU0zIawzhU4bdqnsRfgiwwUofU4R8Ul4 ipMFUOoIjt7bag0nFeCVJ0Wthbwyk1Iqntsun5EeevgKjQB6QvDLAPMg41GVagwVPk2NATFsxrl 3hNKwRUcZCvY3MIo= X-Received: by 2002:a1c:5f46:: with SMTP id t67mr4633437wmb.71.1599575171514; Tue, 08 Sep 2020 07:26:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3vgB6KYzGWWNNlxEePF5U1CwXzF+kjRAXT8UQ0UbqHEu67mnmI4scehmYDtJwRd7p3yPSHg== X-Received: by 2002:a1c:5f46:: with SMTP id t67mr4633412wmb.71.1599575171290; Tue, 08 Sep 2020 07:26:11 -0700 (PDT) Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id a10sm30865798wmj.38.2020.09.08.07.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:26:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/5] hw/i386/xen: Rename X86/PC specific function as xen_hvm_init_pc() Date: Tue, 8 Sep 2020 16:25:56 +0200 Message-Id: <20200908142559.192945-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908142559.192945-1-philmd@redhat.com> References: <20200908142559.192945-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 02:10: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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Eduardo Habkost , Paul Durrant , "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Anthony Perard , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" xen_hvm_init() is only meanful to initialize a X86/PC machine, rename it as xen_hvm_init_pc(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen.h | 2 +- accel/stubs/xen-stub.c | 2 +- hw/i386/pc_piix.c | 6 +++--- hw/i386/xen/xen-hvm.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index 771dd447f2b..b2b459964cb 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -30,7 +30,7 @@ qemu_irq *xen_interrupt_controller_init(void); void xenstore_store_pv_console_info(int i, struct Chardev *chr); -void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory); +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory); void xen_register_framebuffer(struct MemoryRegion *mr); diff --git a/accel/stubs/xen-stub.c b/accel/stubs/xen-stub.c index 8ae658acff5..fa3dddbce57 100644 --- a/accel/stubs/xen-stub.c +++ b/accel/stubs/xen-stub.c @@ -46,7 +46,7 @@ void xen_register_framebuffer(MemoryRegion *mr) { } -void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory) +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory) { } diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 32b1453e6a8..3e008bb0b1a 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -117,8 +117,8 @@ static void pc_init1(MachineState *machine, * so legacy non-PAE guests can get as much memory as possible in * the 32bit address space below 4G. * - * - Note that Xen has its own ram setp code in xen_ram_init(), - * called via xen_hvm_init(). + * - Note that Xen has its own ram setup code in xen_ram_init(), + * called via xen_hvm_init_pc(). * * Examples: * qemu -M pc-1.7 -m 4G (old default) -> 3584M low, 512M high @@ -127,7 +127,7 @@ static void pc_init1(MachineState *machine, * qemu -M pc,max-ram-below-4g=4G -m 3968M -> 3968M low (=4G-128M) */ if (xen_enabled()) { - xen_hvm_init(pcms, &ram_memory); + xen_hvm_init_pc(pcms, &ram_memory); } else { if (!pcms->max_ram_below_4g) { pcms->max_ram_below_4g = 0xe0000000; /* default: 3.5G */ diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index cde981bad66..49748cda3fb 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -1395,7 +1395,7 @@ static int xen_map_ioreq_server(XenIOState *state) return 0; } -void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory) +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory) { MachineState *ms = MACHINE(pcms); unsigned int max_cpus = ms->smp.max_cpus; From patchwork Tue Sep 8 14:25:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 305927 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=-12.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, USER_AGENT_GIT autolearn=unavailable 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 B47A7C43461 for ; Tue, 8 Sep 2020 14:31:17 +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 4524021D43 for ; Tue, 8 Sep 2020 14:31:17 +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="HhGvXUDx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4524021D43 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]:47408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFeeS-0005gi-6L for qemu-devel@archiver.kernel.org; Tue, 08 Sep 2020 10:31:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFeaP-0005TB-6g for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:34376 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kFeZi-0006qm-45 for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575180; 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=8VUrfo15vNafeYg0h4TuIp0D8UFhdJzYacZhDlojTCw=; b=HhGvXUDxQ+4XXUJ0pgoq621A7+XUM026bmF8Xb6po2aQbyRdVxrVaGUwJT2shnxTDAC7z5 /g0WKWrnXerXuXd/NvURrA3IjySEy4ctquaqNHQ04Npn8klgRMedGsggBbInxxJXzqGv+P D6MPtZvjozMaghlZK0qucGVMSMIpax8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-rq2Bu_SkOFCay8n-R_6RPg-1; Tue, 08 Sep 2020 10:26:18 -0400 X-MC-Unique: rq2Bu_SkOFCay8n-R_6RPg-1 Received: by mail-wm1-f69.google.com with SMTP id u5so4540232wme.3 for ; Tue, 08 Sep 2020 07:26:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8VUrfo15vNafeYg0h4TuIp0D8UFhdJzYacZhDlojTCw=; b=OolI6nddd+1hE97L55LgYw8mY/DQchZ7zf66yIz4iapyCNjJOS736xm0UPENSeHdc2 VDNu4v5WKEyP+Ysk5ODMsDcjlO06eRmmiUC0JiX94uqmg2cAIpeNaCo813GVnJexZXiS r8NwOwgtcgFkR336hyC3CcItAozQh8xVzUuLlqgXR0xee3Mu/Y1jq8Mrs8IvciDhop/3 WGCdazlCpLkdEF3xJN+GyDme1x3h9RUIPsEzBNorM3GI7F0JZTccP/CJb+0DkT/8PHAc G8d0jhi0CjuBZ8cmcUtprgnHgcxdJ/y1HIUdRc2FoziTMmwGCsmyqAuyrD1XGJajgUoM 32Ow== X-Gm-Message-State: AOAM533Pa31hpTyuVAuAhCtPa2rSmu6Fo4EbMpOes59A3X9TW3uPx0jL OyE1+sGCBctoiiK69nP2HEqUSDlkPkED2yknZKbJzdADd5q+GaVPtns5zFRXbPDmK/cBwpDZ3Di Vk10zr/z6Tt4xbto= X-Received: by 2002:adf:ded0:: with SMTP id i16mr28998781wrn.372.1599575176516; Tue, 08 Sep 2020 07:26:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkszmGXOLnkk3CcObVMEgsSL3kaacDO7vyqNMMFdP08ftv4yg2yphpdxx/O0+be5EyVAQmTg== X-Received: by 2002:adf:ded0:: with SMTP id i16mr28998760wrn.372.1599575176292; Tue, 08 Sep 2020 07:26:16 -0700 (PDT) Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id 188sm56090648wmz.2.2020.09.08.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:26:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/5] stubs: Split accelerator / hardware related stubs Date: Tue, 8 Sep 2020 16:25:57 +0200 Message-Id: <20200908142559.192945-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908142559.192945-1-philmd@redhat.com> References: <20200908142559.192945-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 02:10: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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Eduardo Habkost , Paul Durrant , "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Anthony Perard , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Move hardware stubs unrelated from the accelerator to xen-hw-stub.c. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/xen-stub.c | 41 +---------------------------------- stubs/xen-hw-stub.c | 49 ++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + stubs/meson.build | 1 + 4 files changed, 52 insertions(+), 40 deletions(-) create mode 100644 stubs/xen-hw-stub.c diff --git a/accel/stubs/xen-stub.c b/accel/stubs/xen-stub.c index fa3dddbce57..7ba0b697f49 100644 --- a/accel/stubs/xen-stub.c +++ b/accel/stubs/xen-stub.c @@ -6,50 +6,11 @@ */ #include "qemu/osdep.h" -#include "hw/xen/xen.h" +#include "sysemu/xen.h" #include "qapi/qapi-commands-misc.h" bool xen_allowed; -void xenstore_store_pv_console_info(int i, Chardev *chr) -{ -} - -int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num) -{ - return -1; -} - -void xen_piix3_set_irq(void *opaque, int irq_num, int level) -{ -} - -void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len) -{ -} - -void xen_hvm_inject_msi(uint64_t addr, uint32_t data) -{ -} - -int xen_is_pirq_msi(uint32_t msi_data) -{ - return 0; -} - -qemu_irq *xen_interrupt_controller_init(void) -{ - return NULL; -} - -void xen_register_framebuffer(MemoryRegion *mr) -{ -} - -void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory) -{ -} - void qmp_xen_set_global_dirty_log(bool enable, Error **errp) { } diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c new file mode 100644 index 00000000000..d14efef49e9 --- /dev/null +++ b/stubs/xen-hw-stub.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 Citrix Systems UK Ltd. + * + * SPDX-License-Identifier: GPL-2.0-or-later + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "hw/xen/xen.h" + +void xenstore_store_pv_console_info(int i, Chardev *chr) +{ +} + +int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num) +{ + return -1; +} + +void xen_piix3_set_irq(void *opaque, int irq_num, int level) +{ +} + +void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len) +{ +} + +void xen_hvm_inject_msi(uint64_t addr, uint32_t data) +{ +} + +int xen_is_pirq_msi(uint32_t msi_data) +{ + return 0; +} + +qemu_irq *xen_interrupt_controller_init(void) +{ + return NULL; +} + +void xen_register_framebuffer(MemoryRegion *mr) +{ +} + +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory) +{ +} diff --git a/MAINTAINERS b/MAINTAINERS index 7d0a5e91e4f..b3366713903 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -480,6 +480,7 @@ F: include/hw/block/dataplane/xen* F: include/hw/xen/ F: include/sysemu/xen.h F: include/sysemu/xen-mapcache.h +F: stubs/xen-hw-stub.c Guest CPU Cores (HAXM) --------------------- diff --git a/stubs/meson.build b/stubs/meson.build index e0b322bc282..c3e318a57f3 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -46,4 +46,5 @@ stub_ss.add(files('vm-stop.c')) stub_ss.add(files('win32-kbd-hook.c')) if have_system stub_ss.add(files('semihost.c')) + stub_ss.add(when: 'CONFIG_XEN', if_false: files('xen-hw-stub.c')) endif From patchwork Tue Sep 8 14:25:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 274260 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=-12.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, USER_AGENT_GIT autolearn=unavailable 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 CC3ACC433E2 for ; Tue, 8 Sep 2020 14:29:25 +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 6DF70221E5 for ; Tue, 8 Sep 2020 14:29:25 +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="C0bS9mW4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DF70221E5 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]:39428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFece-0002IQ-In for qemu-devel@archiver.kernel.org; Tue, 08 Sep 2020 10:29:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFeaP-0005Sz-57 for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:05 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:53301 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kFeZo-0006ra-Uf for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575184; 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=PKU6z94K7UIxWkqADbhCdk+fTBY5NmZMu8z2vQrSItw=; b=C0bS9mW49YnvLU89SLxzYcFjhDaRI6t6NxspnPDek8R/H4vaTlsgMIG9oIgxF1e7/yQCDf TXj+oZNjxosQHwvlwP5XbDFqDI37/vjuLg9Pg6sbut8K+HjfgfYhbY9/GODIqcUc+hMX1G IYEZjyP0TQqCsa0PHPMj8PHWvv1CQ3A= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-539-UPM2H5oIO9CF3hrdllYomQ-1; Tue, 08 Sep 2020 10:26:22 -0400 X-MC-Unique: UPM2H5oIO9CF3hrdllYomQ-1 Received: by mail-wr1-f72.google.com with SMTP id 33so7009223wrk.12 for ; Tue, 08 Sep 2020 07:26:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PKU6z94K7UIxWkqADbhCdk+fTBY5NmZMu8z2vQrSItw=; b=HjpmkwgjFQti5IOzDCD7K67z6O14MsFyFI2Ozp8S1aUuFzTq1sGsxYXt6vxWjssGge SiTbYfR+As2tVPYYiAMBg8m/CV3F0BojImI/iZExXcyNaFJPDLSNiSzV/tY3CZtElqiY BjXIOlFst6e8e/sdPhJhJXyTPmyyyjIVJl+Ljux7wfp3sDIAxmkaz8g54ypNA7y6onxb w4VD4caMbMZhA/h0pOr+fKaJWnrx2f9j3iZKQuls4X+M+JntuSZIHWkxXQ53Lzu+R/D1 ybUgmdw4cdXy5+b05MNorTvSQ5jhaj9VHDM12ou1HoeeZVQyducKk7bBk4Gmb7MtvrAI 9FSQ== X-Gm-Message-State: AOAM5310SMjzFalAnSfVUtUEUK06j/6fM1tcv6HKSYzFo5fzhMZ32m/o HQ95/2UX32AebrerEkOTwqKisNqZeRcYKo1mFLb/zgBmjvwWD3GCCoPSUIhI+MLEUiScHmrVwXh lKzZ1hmlPXy4Ut4A= X-Received: by 2002:adf:e690:: with SMTP id r16mr22862684wrm.15.1599575181396; Tue, 08 Sep 2020 07:26:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi9E+6zi0GSsRROj52mze2J8TZAWamqoyYBE/YoqC5pV7oZ//ef2PGOt34D9MOXVPg3sxNYQ== X-Received: by 2002:adf:e690:: with SMTP id r16mr22862661wrm.15.1599575181175; Tue, 08 Sep 2020 07:26:21 -0700 (PDT) Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id h8sm34388736wrw.68.2020.09.08.07.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:26:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/5] hw/xen: Split x86-specific declaration from generic hardware ones Date: Tue, 8 Sep 2020 16:25:58 +0200 Message-Id: <20200908142559.192945-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908142559.192945-1-philmd@redhat.com> References: <20200908142559.192945-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 03:00:34 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Eduardo Habkost , Paul Durrant , "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Anthony Perard , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" xen_hvm_init() is restricted to the X86 architecture. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-x86.h | 15 +++++++++++++++ include/hw/xen/xen.h | 2 -- hw/i386/pc_piix.c | 2 +- hw/i386/xen/xen-hvm.c | 1 + 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 include/hw/xen/xen-x86.h diff --git a/include/hw/xen/xen-x86.h b/include/hw/xen/xen-x86.h new file mode 100644 index 00000000000..85e3db1b8de --- /dev/null +++ b/include/hw/xen/xen-x86.h @@ -0,0 +1,15 @@ +/* + * Xen X86-specific + * + * Copyright 2020 Red Hat, Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef QEMU_HW_XEN_X86_H +#define QEMU_HW_XEN_X86_H + +#include "hw/i386/pc.h" + +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory); + +#endif /* QEMU_HW_XEN_X86_H */ diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index b2b459964cb..1406648ca58 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -30,8 +30,6 @@ qemu_irq *xen_interrupt_controller_init(void); void xenstore_store_pv_console_info(int i, struct Chardev *chr); -void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory); - void xen_register_framebuffer(struct MemoryRegion *mr); #endif /* QEMU_HW_XEN_H */ diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3e008bb0b1a..43205f48188 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -46,7 +46,7 @@ #include "hw/sysbus.h" #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" -#include "hw/xen/xen.h" +#include "hw/xen/xen-x86.h" #include "exec/memory.h" #include "exec/address-spaces.h" #include "hw/acpi/acpi.h" diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 49748cda3fb..e03c59e53da 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -22,6 +22,7 @@ #include "hw/xen/xen_common.h" #include "hw/xen/xen-legacy-backend.h" #include "hw/xen/xen-bus.h" +#include "hw/xen/xen-x86.h" #include "qapi/error.h" #include "qapi/qapi-commands-misc.h" #include "qemu/error-report.h" From patchwork Tue Sep 8 14:25:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 305929 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=-12.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, USER_AGENT_GIT autolearn=unavailable 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 692FAC433E2 for ; Tue, 8 Sep 2020 14:28: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 E5C59221E5 for ; Tue, 8 Sep 2020 14:28: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="GiMGQq8U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5C59221E5 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]:36730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFecC-0001Cv-LE for qemu-devel@archiver.kernel.org; Tue, 08 Sep 2020 10:28:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFeaO-0005RM-GE for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:50769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kFeZr-0006t4-7d for qemu-devel@nongnu.org; Tue, 08 Sep 2020 10:27:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575189; 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=BaphSdiGhAZ4WeZEOB6GUUl46i+DVX/CX44TODloQyM=; b=GiMGQq8U7SZcAxZCFkwfGbp/KTM+X/Qzhawm/HoMCi1fJXWGRC5RuzR3MLKTISqXQIX99h AvfTVBma+jhvgHtjiNvFy0RNgJZPDA8cloyhPMR/P/7rOUeE8M46olYy2dzty8IMVpXMj8 ovh2Sk9/lY4n2BN+oAcP1Yri9e3LCNE= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-158-42-hpC9qOtGgNAfYs6XeBA-1; Tue, 08 Sep 2020 10:26:27 -0400 X-MC-Unique: 42-hpC9qOtGgNAfYs6XeBA-1 Received: by mail-wr1-f69.google.com with SMTP id a12so7046747wrg.13 for ; Tue, 08 Sep 2020 07:26:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BaphSdiGhAZ4WeZEOB6GUUl46i+DVX/CX44TODloQyM=; b=ErVE9tkF68CEKrzEvBRiO/Qe/MOruEZeh3J3gzMssLBCznaDPVCdo064o1IGntVXMf 2biFDZc1yWtqEwJ3qAlT3/uQvokNVpzqKnDnpVvtazbwOBWw6O62Swc2kEVg0MuroPhg /DxVqo+kjKcQkJfprFyOWJa1WilE1jh/C2mVU/WhYADMKOoY/5/vw7eWYW+R8hZ/QRhX gwyzuxOaSlTsu7AyjULtfYyIqAW2moISspLCw7QfcvrJZp4tM/8rXsXIUQ0sq2HJ90jQ KptiIAX+fPZq9zUU8qFC/upZsUVFTvXlHiuJu4ZG//1sz77iIpNG/MFeWfBRYG0NvUr4 wgDQ== X-Gm-Message-State: AOAM532wdp81anNXcEXIvb7yT+SmRKIETYbuqAshxbHKLFvAOdJakzq8 //PPJFuvPCPCd3oL9p9HaOBvfHeC4qnVBXf1EVlMWaODo3B/ptjjk/3s7/JBo8qWdfs1QoRjMrw 9Xm7HYssTr3x1hYI= X-Received: by 2002:a1c:39c4:: with SMTP id g187mr4575967wma.126.1599575186441; Tue, 08 Sep 2020 07:26:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG1Q8mWXfEdH5JVru40UflvHEFaoABVR/a5qha22ZTatoY4EPmWAN5D43sEgEnSTkTauJZww== X-Received: by 2002:a1c:39c4:: with SMTP id g187mr4575941wma.126.1599575186206; Tue, 08 Sep 2020 07:26:26 -0700 (PDT) Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id q15sm34307052wrr.8.2020.09.08.07.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:26:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/5] typedefs: Restrict PCMachineState to 'hw/i386/pc.h' Date: Tue, 8 Sep 2020 16:25:59 +0200 Message-Id: <20200908142559.192945-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908142559.192945-1-philmd@redhat.com> References: <20200908142559.192945-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 02:11:34 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: Stefano Stabellini , Eduardo Habkost , Paul Durrant , "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Anthony Perard , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The PCMachineState type is only used under hw/i386/. We don't need to forward-declare it for all architectures, restrict it to the X86 one. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 ++-- include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index fe52e165b27..d4ebefcf2b4 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -19,7 +19,7 @@ * @boot_cpus: number of present VCPUs * @smp_dies: number of dies per one package */ -struct PCMachineState { +typedef struct PCMachineState { /*< private >*/ X86MachineState parent_obj; @@ -50,7 +50,7 @@ struct PCMachineState { /* ACPI Memory hotplug IO base address */ hwaddr memhp_io_base; -}; +} PCMachineState; #define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device" #define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g" diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 427027a9707..6281eae3b55 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -90,7 +90,6 @@ typedef struct PCIExpressDevice PCIExpressDevice; typedef struct PCIExpressHost PCIExpressHost; typedef struct PCIHostDeviceAddress PCIHostDeviceAddress; typedef struct PCIHostState PCIHostState; -typedef struct PCMachineState PCMachineState; typedef struct PostcopyDiscardState PostcopyDiscardState; typedef struct Property Property; typedef struct PropertyInfo PropertyInfo;