From nobody Sat Apr 20 11:35:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599575173; cv=none; d=zohomail.com; s=zohoarc; b=WE+mYjvwqkmAeVX4vGsdW2M+8650Ph0KJHIv7GGPpy0GQcICT3XAb83RMa0xlmosjE/U1gmWhNvlPIp9sBFP2hLefNRyyG4REZjiNj5xSTH3NlHg79tISaeWxZmqd+Eqh3t/NGlaqGTAW8iSrJ+ouLv0fUa8oH81ynnAXOlp2ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599575173; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=c+f3WSHlrYIITP5D9n3Tl8YZ3wQB7xGZ/kTp4xNtQKUv0Ypie/z/RY5r7FBxxmQc76/F/m4dWr7U6ijbsv84F/K0VFEdtdf1tFBpAVH2eSIBbhyopL8zxb5FfxxMd66s6Gs1Ghf7eC+db9q3DtGO7ATITL14MFgrHDX2GYRVfPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1599575173709444.660054597623; Tue, 8 Sep 2020 07:26:13 -0700 (PDT) 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-67-ZomUyyg1PiWmWVN5GHcpOA-1; Tue, 08 Sep 2020 10:26:07 -0400 Received: by mail-wr1-f69.google.com with SMTP id j7so5416698wro.14 for ; Tue, 08 Sep 2020 07:26:07 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575169; 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=B3g9ZLNYnPlAPoVdmPuXhl9Ee6kBXsUEnGRW/Cl9V4w81LHDZhjM/5c2ST6D6fxgLjv8qs fVqQFeGdbtu+0YoICVwhyEeZhG+loRsslr//YQyRr/Alw7VjMoVhV45ECLC4QKFLer9VRS vJE4nYQqs3rJMdSe3kLSFXBgkxKxsSg= X-MC-Unique: ZomUyyg1PiWmWVN5GHcpOA-1 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=hf4Dlgea3S2dNGQjPxe1vkV+w7DlZLzule980FctHQ6RRkjaBrqnRHKjJYvg0Vh3ja 2pVqvz8CqST5rKHTHoNnQN5ML/ZSSJVUrPg+e+9wssEtF6eicVCCiOu1VGpFEwPpVKYT rMIwc9OZHfC2gUdbvBSJ7ZeMsFRT/FUXFxe11a+ZP2jvGMRken08Fzs/GOC6EITNNemt Z7GoEnWtGz8u+7U+ItVIF9FRbvz0p4jVRkEj8c6vI0TZOsdYPlWBFeS5p7AyMd0KOm0f yuQk/Az5Z2mdA3yfdWKa9cxh+OKjfol0mSTAtT7CHRTIg7C8l3AKMeep9DVoP59mNnOQ CeyQ== X-Gm-Message-State: AOAM533Kx7iaXj5lro5+Hvjna6FAZX18hGpPlKLe/fBIZpipODGDCwIw 5p+14yTkJOC0Aem58TQ5WPHJNC8BvJBD2T7yGw6i5lld2QbDmh9dFLRS4BtOnAqbn9D7oY6Cd0X dTWYTAXjWYqUrfQ== X-Received: by 2002:adf:efc9:: with SMTP id i9mr28298430wrp.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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , "Michael S. Tsirkin" , Paul Durrant , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Stefano Stabellini , Paolo Bonzini , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A9 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 =3D machine->ram_size; } =20 - if (xen_enabled()) { - xen_hvm_init(pcms, &ram_memory); - } - x86_cpus_init(x86ms, pcmc->default_cpu_version); =20 kvmclock_create(); @@ -208,10 +202,7 @@ static void pc_q35_init(MachineState *machine) } =20 /* 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); =20 /* create pci host bus */ q35_host =3D Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); @@ -271,7 +262,7 @@ static void pc_q35_init(MachineState *machine) =20 assert(pcms->vmport !=3D ON_OFF_AUTO__MAX); if (pcms->vmport =3D=3D ON_OFF_AUTO_AUTO) { - pcms->vmport =3D xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport =3D ON_OFF_AUTO_ON; } =20 /* init basic PC hardware */ --=20 2.26.2 From nobody Sat Apr 20 11:35:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599575175; cv=none; d=zohomail.com; s=zohoarc; b=Z2avzi3RbJnndWetwOlPbOFszId7p/H01+6X2GpmcUXBQeHVeTxBck7Wda/5zVdszaTaqexwvTIeBV8UgzC2vdtdmuIKdzxfCnboyWkfb4yWqpJuKl5xvYIfgXdOLr5491yBVplBZBKIE9s+fO8xKqvUZ6fEwK+Rzi0Ey2NTCOI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599575175; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=L9MSzTqEXdEyImaMC4bb2Kv6juBLliyTUBhWiXmnlsA=; b=QT6vwnoug9WvWesWNOGBBsm0USXxsIHi+l75AFpullygmzhpqjQTh1nnGfe9BbG+1YPVhkiuT5yDTFiGIV8979QxBMwjqFOtiDi2zOK/+P8z0KZ4nCpfzmEjE2HAAiGlC8XFoHX41aJcwQQ1sCyeHRkjixntgdUF53Zm4TOdgp8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1599575175742111.04538678283086; Tue, 8 Sep 2020 07:26:15 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-X3m1YCh9NVq-NWDM0rKGiA-1; Tue, 08 Sep 2020 10:26:12 -0400 Received: by mail-wm1-f71.google.com with SMTP id u5so4540132wme.3 for ; Tue, 08 Sep 2020 07:26:12 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: X3m1YCh9NVq-NWDM0rKGiA-1 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=jZLG6tLBhHPw1mFEATo6RZxzdGI01XtBe5qNZyofAc+4p1tng0Rhy6gHrqDhqXebjc 44MDAItxmGmuL/iKK7XBMjVYpcyr34vsR/G5BPlo6YhhFKanlbM7ov0aP8EKfctw9aDQ wYT0fyGhtxZDrtcG0KKsqaFCO8sJKuZ4OeBvcIrS6GCY/MBS8+npCkugfCVNL1jhQ7m0 ftc75cNfOI0w01Doi4QdJ3fCYPJWbV0jlQSDUbebqCvy5Mw8SbiY0eZr89Y5fJ+anuy6 DzLRqWRxGVszlfN+fq6BZrt4Ju1IgtYWT3YuTNnWOCZuP0ZNp6FPumQHwWxRsVYscmfu Yt+g== X-Gm-Message-State: AOAM533rhXQjmaIPu1raCUEfyBFlKhrMdS7n/T4Oh4S5D7fVbmuWnB2c FgLitwJ8sdOMWoh8I9HDhrDy2UQVpGrMe2IyYG0uv3G/4BbIsc30eUGPuizIw+29URqSGtV1pbF ukJbb2rHJTiQwfA== X-Received: by 2002:a1c:5f46:: with SMTP id t67mr4633434wmb.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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , "Michael S. Tsirkin" , Paul Durrant , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Stefano Stabellini , Paolo Bonzini , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A9 --- 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); =20 void xenstore_store_pv_console_info(int i, struct Chardev *chr); =20 -void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory); +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory); =20 void xen_register_framebuffer(struct MemoryRegion *mr); =20 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) { } =20 -void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory) +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory) { } =20 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=3D4G -m 3968M -> 3968M low (=3D4G-1= 28M) */ 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 =3D 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; } =20 -void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory) +void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory) { MachineState *ms =3D MACHINE(pcms); unsigned int max_cpus =3D ms->smp.max_cpus; --=20 2.26.2 From nobody Sat Apr 20 11:35:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599575183; cv=none; d=zohomail.com; s=zohoarc; b=kBQsq2u9cLwKbMXFVyMi7eVT6ry5hgveh0NsekcyLU45jZ8zXxbOb3Zszn/+LMdyMXQ4CYc0MP77XQ09Xhtk4aydPVLz93hTmKSAOdcfpW0vA6YCOWZj/WCUbeUycroiZAySnFMi3mifpIfLHEwVDfDy3m/TkmFvEcSUSHM/L6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599575183; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=8VUrfo15vNafeYg0h4TuIp0D8UFhdJzYacZhDlojTCw=; b=bYbs471frqtdG5VjxG0oLw/UmpChNC4V6NfLoLmdCbqHPSkkzw7wSOHa0kJC97LVR/ZzzGCq2GYs6rlcIgZgFxscfAgWr/vxVtqVljhRHeoRjudQ9eGAYhLo/wlpygQ4TklVHIeQxtJqMsh8eNw+jLHn93aSc2LTvwcE3FIjcls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1599575183698108.7598982574666; Tue, 8 Sep 2020 07:26:23 -0700 (PDT) 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-165-cqwRUxEkPzSxGhZGukPMnw-1; Tue, 08 Sep 2020 10:26:19 -0400 Received: by mail-wm1-f69.google.com with SMTP id m25so4814482wmi.0 for ; Tue, 08 Sep 2020 07:26:18 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599575181; 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=I76dOChoERE+YVeQxA2yoLNiWtuyvdvsvRk80OfazFzcpVspsVo41fskFlGwl4wCEvpzL+ gRSTyIGn1g0zhZVoTJD1e4TqOCQ/UNnvYBBAHI+fOJewU/DiM0auwOtdAaeApV705LIHEf 6BNF/Voas7xalGyhe/Bohoj4b0FPTHw= X-MC-Unique: cqwRUxEkPzSxGhZGukPMnw-1 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=f0UCUIang2463g1NgpkkxryHD5Wk1GLsgQHpsSxrQgWM9VCCnnOSix0jrEC9310nju W5hkkvP0ouGRix4uNFfO4kONzFKzHdgajsqWE5hwm8nj30c4qoc/ZqcwE7rpNbXquXF6 pR9sSZRSqcE0DiQ9qVPuPT3yYbA7FnXCJuryJL7bQ2BJYFIf8XdA++byJxhQ/nZcEU3s L8yhIOy07pPkQKPqLUVkhK1Y9mArggCRqagOA6jrBJQ3Mnff+Eh+KX2pGsK8GmnQSPsw moBjO9L2V3hs/dPiAlDsAjfj+/wYctg9x4hLlPQZ8kvkQ1s+dpp7YTAPyoWafbqi0CUB KiuQ== X-Gm-Message-State: AOAM532WyCITYT49PuoR/Rw2w32FV4y7EIIrFkhWFu6I9U8uaTYmG4Py ePyPKYfqsCHV9hi0/rF+fH2gFFg1awqcIuM3RJKAAU/MNfIsV4JnZOtn/Y8bmjUmI6N9qTNlQxO gBSdCUoFQs5fQJg== X-Received: by 2002:adf:ded0:: with SMTP id i16mr28998780wrn.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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , "Michael S. Tsirkin" , Paul Durrant , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Stefano Stabellini , Paolo Bonzini , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Move hardware stubs unrelated from the accelerator to xen-hw-stub.c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 @@ */ =20 #include "qemu/osdep.h" -#include "hw/xen/xen.h" +#include "sysemu/xen.h" #include "qapi/qapi-commands-misc.h" =20 bool xen_allowed; =20 -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 late= r. + * 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 =20 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 --=20 2.26.2 From nobody Sat Apr 20 11:35:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599575201; cv=none; d=zohomail.com; s=zohoarc; b=Vn5jRjqamBBTi/VVk2ZvOzZ8xK3xOnhv5BcfreT51XAgOfjtJH+rLGp5v1FIccmL/IXUy4jLmnqFOji1n9ZYLfs0pxmRUkg4rgmprgkJCsOcFjczeIUBAlC7df5xjn6BtV6CnxSVpGFYeSxl43Wkhs/f2GDw3ffMgIWqFkVr3Lc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599575201; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PKU6z94K7UIxWkqADbhCdk+fTBY5NmZMu8z2vQrSItw=; b=NQFWUsDoujbpSpwxx2hZsRc2gi4JSHmkRMSVJMNMx2NTtwAVP4qEE6u39gKQL0j78ZRcChIJuOc2EoANXUH1okvk2Y6HbZnvULwLNEZfUz4/ofFWCgmIYMWJRZngbM1IMTKPGNQdYWM4WB3K1CnwYSo25tdGW5AAjKjW/CBuWXU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1599575201810990.9743218894926; Tue, 8 Sep 2020 07:26:41 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFeZm-0004cj-FT; Tue, 08 Sep 2020 14:26:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFeZl-0004aJ-8Q for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 14:26:25 +0000 Received: from us-smtp-delivery-1.mimecast.com (unknown [205.139.110.61]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 546c4246-e748-4f16-b64c-a03486c3ff1f; Tue, 08 Sep 2020 14:26:24 +0000 (UTC) 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-58-ceIv4dnkP06kRg3HQqPg0A-1; Tue, 08 Sep 2020 10:26:22 -0400 Received: by mail-wm1-f69.google.com with SMTP id w3so4802775wmg.4 for ; Tue, 08 Sep 2020 07:26:22 -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) X-Inumbo-ID: 546c4246-e748-4f16-b64c-a03486c3ff1f 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= X-MC-Unique: ceIv4dnkP06kRg3HQqPg0A-1 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=aZ2Kb8GvccXQKdkzatHY54YTGe155kcUuA5r62jILTm6kl+DILO4FTXlALQXpjILv3 zJFT810Ud5b1YkwJi9owYCBepVtL+l4biX3Sxn2cQ+v/6OJGxAesJ9y4oz4aeGsO1Tjj h16MMjHMvJsMIDCprTAkH96e1s1woYBCCo4Oog6Z8VZ7BKHVMDUU/Sa9IS29k2wXx8vV zZ81eBfsnVqCjUMJT/JGp9eyKOsFv7lnnFj9oLlVUToJPM8yPAVDtAXKMEFVMGOWL6Tb +T8yppUDM2N1AUCW+bJVFVniZqj/Dp7FmMJLQZ+nXsCHlkC9Agdq5ebWi+4r5VDe6sN0 ay6Q== X-Gm-Message-State: AOAM533sJzCMbk0WrYaQ8j/Fahffbjpxjdnr4JqVxL6X9bwZ7jnUiWda LJYGsL+jDN5oH4K0YrIgpGSJ/sy3Anwx8ArKWEwS3nePTAQYGWLZbFUTl41ZI+xpIA3rhmnFFDC rOh4H/yNphg4soHR5/pNZLf9MUsY= X-Received: by 2002:adf:e690:: with SMTP id r16mr22862680wrm.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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , "Michael S. Tsirkin" , Paul Durrant , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Stefano Stabellini , Paolo Bonzini , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) xen_hvm_init() is restricted to the X86 architecture. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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); =20 void xenstore_store_pv_console_info(int i, struct Chardev *chr); =20 -void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory); - void xen_register_framebuffer(struct MemoryRegion *mr); =20 #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" --=20 2.26.2 From nobody Sat Apr 20 11:35:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599575207; cv=none; d=zohomail.com; s=zohoarc; b=FS2Umm365IpIPI56DlNrI2OSqBoWmBwSYb9/IuKtwjP1SC6Br+VGX1CtuQGO2aDw+ao06iayZ43mJnewhe6s/Yk/hi5gAokGYbblss1OoBWVW5XSH89dZPFzfXTh0A1uvVBCUO5bJb/B83GpCiUMbESnvhLzSzZ/A307cq9h12M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599575207; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BaphSdiGhAZ4WeZEOB6GUUl46i+DVX/CX44TODloQyM=; b=PMdoA9/jgeAfenN68IM8e15/JARil8EbKDktD3wDmVdT7EoWc85VXSzgtvsU2p/63yzvxyQSk3/H5k6M6j/pOdSQXCg0A8bl3qslmudGBhhdrVBzPTXy/+M2Foj4DnlXmfBtLglcTjMfrkx6AYXo66o8v7RPBUdY5tKyBsprjMk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1599575207853980.6659995702535; Tue, 8 Sep 2020 07:26:47 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFeZr-0004g4-UQ; Tue, 08 Sep 2020 14:26:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFeZq-0004fG-LU for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 14:26:30 +0000 Received: from us-smtp-delivery-1.mimecast.com (unknown [205.139.110.120]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id c6ffeb93-9a04-4c1d-b07a-f84dc0118820; Tue, 08 Sep 2020 14:26:29 +0000 (UTC) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-168-9BBEVFbHNamLZGcgTF1jOw-1; Tue, 08 Sep 2020 10:26:28 -0400 Received: by mail-wm1-f71.google.com with SMTP id m125so4791650wmm.7 for ; Tue, 08 Sep 2020 07:26:27 -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) X-Inumbo-ID: c6ffeb93-9a04-4c1d-b07a-f84dc0118820 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= X-MC-Unique: 9BBEVFbHNamLZGcgTF1jOw-1 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=krujiwoEqktPRMWlZElHYPt1u1Ju6oPmE5RmabZ3VCg8S7yrk/wisz8qwB9Fwwblqt 4x9M08CpIqGhjHnmeJtOYyqxhqpqbBZvCYAp5EyGG1cuZOgFicOr01KrsLxIhkhj3QeX 3sXWnJjWbr4t6oN9H7SOL5XTKaYlTj+NuDq182mfmwSpN4ONtuAe95h05GTdgbNrtKNJ /7+i9MQJ7h8D/6kzBTN/6o0R+exCBeHFQhQcG9j0TNdcAJoKgv4CDwPVfDRIGhNxSbkN 1xntaX5XppDj+MV7Qv0pfMCr5y2FO+PQD9WrH6rclf77OPMp/IdpdYzlCtNUtC3+3YO8 yomg== X-Gm-Message-State: AOAM530RWkQltDJxNjFtuJBuwdojAg82gWREWbOEjzx+u5JhDKdZ93bw dsk+SpzJwhWoBVFyzF7UJfVKq8DKrxPE/a6nv6avQkwoAg51NN/Izqr2+aFX76/QOMwZExr04tu iv2ZaS4xzQkaRAO3YKshrTHsX/d8= X-Received: by 2002:a1c:39c4:: with SMTP id g187mr4575974wma.126.1599575186442; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony Perard , "Michael S. Tsirkin" , Paul Durrant , Eduardo Habkost , Marcel Apfelbaum , Richard Henderson , Stefano Stabellini , Paolo Bonzini , xen-devel@lists.xenproject.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A9 --- 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; =20 @@ -50,7 +50,7 @@ struct PCMachineState { =20 /* ACPI Memory hotplug IO base address */ hwaddr memhp_io_base; -}; +} PCMachineState; =20 #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; --=20 2.26.2