From nobody Tue Apr 23 05:32:58 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=1599580557; cv=none; d=zohomail.com; s=zohoarc; b=jgra1ef4LUF2hrAc73cgWFo2lGL7VI9E3psjBV04rRGxAjZI+0rW+VT1B58UaQmqBwBuE61JmMMObhg71AoZ0DK57MPFsE23uD+cBlZTbpKfxpb5blrC7yE+zOCAmZAAvnDlLUAM9tqA0J7ROs2atWhMgrvTaj0w0gVWLwEHuyU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580557; 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=rd1yDVC2PLm/mbyb4s3J2rHQe4El+Eyr3YAhnhSaUkU=; b=UaK2Gb0HeKFGyMDJj08sZoIu8SAaM2rTlF0IOdEbeFwM3VoiyaY+9VKf6Zz86kchpYqA1cPjUPeBxtHL8V0XygJeZ8L2I6ncCp3/0ynlH6/diRgW0oOiwxa/sSeYJGUqVfloCkczjodvECxcZBaO1wuzqD7Bm5L6ng7IoZzJ+CM= 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 1599580557831515.2648696114943; Tue, 8 Sep 2020 08:55:57 -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 1kFfyB-0005lD-EK; Tue, 08 Sep 2020 15:55:43 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfy9-0005kl-Th for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:55:41 +0000 Received: from us-smtp-delivery-124.mimecast.com (unknown [63.128.21.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 03031e26-f964-4298-8c76-6bbb7745c7b7; Tue, 08 Sep 2020 15:55:41 +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-570-2apKmDi0PgCro21DOvmQ4A-1; Tue, 08 Sep 2020 11:55:39 -0400 Received: by mail-wm1-f71.google.com with SMTP id b73so3632786wmb.0 for ; Tue, 08 Sep 2020 08:55:39 -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 b187sm33175270wmb.8.2020.09.08.08.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:55:37 -0700 (PDT) X-Inumbo-ID: 03031e26-f964-4298-8c76-6bbb7745c7b7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580541; 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=jWbm+J8J5T8MvInyC3T8bziRccFbRUw+7afSpolm2v/A+4H90kgWfM1eayAKn7Ki7p6er2 LfmkavgvrfspgpcCPNP2zlWI4dIYkYbxV3k2y8nvY1bcRp/uEmC9/mODpJn1iZP22oXlWN 7RH9/wPMPOGghjiQ9Vae48zxXWijZQc= X-MC-Unique: 2apKmDi0PgCro21DOvmQ4A-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=pwni3Bv+5Zuc69ioAD8hQaM/9YrSQbEL+m7Y6OZcuDwBdsdL2RzWMseeNeMsGcTOFk tRyaAlx32YsFhpWFfLwzw+RDOtCtLVYifQ0U+d3b29iSqaf+flBgJYxJ5M8VqqEds7OR X65e2+n7srHvIS/on14nKum23luslmfPCoUpZWdl7weLXA9ahqw677e+eIn1Ul/khO2K Q746SjBg4UVKBTXt6ibutQEpdAGcsyOvBcJW5SrJf3eO0YGm0yd8eVd9W27jRQ8JTh23 9XAANGuzlnrU1IIMZmepOlsxEyufC6pmqh1D/4S4ZGAa0H8OsknS21fn2bJBxj7iNzzG 0QKg== X-Gm-Message-State: AOAM533apb1h8SGvchv+rqvme03FDxUwPGT/S/MnjrtnbA+JyZv3fk0U uK4Ny9sJ85QosgR7AFO3VDnmdb89cmspmfL0/Ppl5Du5IJpfedd66hXs9DDsHuo+sQ56W9ibvj/ 0ZzBYluQdoRxBRx/BohZREVM3TaI= X-Received: by 2002:a7b:ca56:: with SMTP id m22mr221220wml.12.1599580538030; Tue, 08 Sep 2020 08:55:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYnoWVgP/Ap99zKyQud1Rr5s6XZtll0OYfYZ+la+K5Rnwnnrg8qI1BhbSu4nN0ILR5SpT+xA== X-Received: by 2002:a7b:ca56:: with SMTP id m22mr221200wml.12.1599580537809; Tue, 08 Sep 2020 08:55:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/6] hw/i386/q35: Remove unreachable Xen code on Q35 machine Date: Tue, 8 Sep 2020 17:55:25 +0200 Message-Id: <20200908155530.249806-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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 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 Tue Apr 23 05:32:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1599580546; cv=none; d=zohomail.com; s=zohoarc; b=bSv5IylZFupNkjKw8qza74c3ppExVRfmG/DK/qQwQ9q700dHvx5+WkeyadO9bWHJhhLgFzg5pM1Brg+DDog6Ep1oPDyc5ot55I1Jdg9Q62vRS8ifZtuTM+3+ye3suHx0BFEuouht/pRsRcQI0JlsoFjT8KHXSbd53d4pU+RvKiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580546; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=L9MSzTqEXdEyImaMC4bb2Kv6juBLliyTUBhWiXmnlsA=; b=Tj/MYpBjA6nZXYdqVmCvkp+LjevsnIRXPvub3QrsrAXILyVA7m9pU+C43F82Z2mtYHQbVg3BP6/y5dGn2CQqg//gc75Ah0JoYwi0LMKBNBGRQjScZ2mIedji95ab+B9ag20cv7oytVZMp2L65bUW4+d4C+JAzkYt6zJ9OLSKstk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1599580546868811.4495617576016; Tue, 8 Sep 2020 08:55:46 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-3mH5K4tBNG-mLoSuOwVrxQ-1; Tue, 08 Sep 2020 11:55:44 -0400 Received: by mail-wr1-f71.google.com with SMTP id 33so7161139wre.0 for ; Tue, 08 Sep 2020 08:55:43 -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 x10sm34206389wmi.37.2020.09.08.08.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580545; 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=ic3tYcvyzyVRipYio/4hCGvoBA9rIUoFyi5tafvJd+WiXuk/lV8LayR4S5Rdd5Oz/KaRaP zUiOb3ZLFOMUZlDqFzOWJqURgWIYQFjXxaTahLNTQ5TRqCVfXy2mBXotkoP0aOs0TGNxv3 kz6wj24GIyOWBf8+5s5Or+JPBwXZtAQ= X-MC-Unique: 3mH5K4tBNG-mLoSuOwVrxQ-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=lf++jBsfIWsm0Irb5xLWOpashyxbnki9b50ulSTN0yPLyiBJxklvN9KUWSIptjD4WI Me0xE4EOL403YrNvX6wuGLwlNqxiYUKszQxgMbl1K+iiwDnlbvtrJX9hmjsGStoAiZ1p K2DDObIprwP3+Xw3uRBGvetgP56Uzu6SfSKxx5rzxcSNyoq7qzmNV7nRVh5awwWfZ82s 6vGnWJ9iPIgAGudrWqZU+AlL5Ot/dF+0nm8gbcuRexIExV8XsS5qJZVlPctQUkYotbor y+WVF51ie3YSIxm8vYBFA/W4fJc4RZl0x4deFlYEQbgcQSbQvEKyvQLmHRHF1Njn7rir Vn1g== X-Gm-Message-State: AOAM531gtq6w7ox0GBgyKXpgZZf/A1AhU3wBn80EEBJ4gh3hnCNlvQSs zkz3BuWQZwpVOd3hR0y5EttRqUDBhPRR5ziUpIXuQPTATj/aMlI+wKGsyFCF3hhUjUsC/rG86rN XXx0kOURzFbvKyw== X-Received: by 2002:adf:fa52:: with SMTP id y18mr317413wrr.264.1599580542937; Tue, 08 Sep 2020 08:55:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU6NdtM/r+hGgVHJHbxUzLG0yEYCNZp/OUgIpECe7SNk6Rt9b7NXEaxP7j5zNjVZzl5NvrIA== X-Received: by 2002:adf:fa52:: with SMTP id y18mr317390wrr.264.1599580542761; Tue, 08 Sep 2020 08:55:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 2/6] hw/i386/xen: Rename X86/PC specific function as xen_hvm_init_pc() Date: Tue, 8 Sep 2020 17:55:26 +0200 Message-Id: <20200908155530.249806-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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 Tue Apr 23 05:32:58 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=1599580566; cv=none; d=zohomail.com; s=zohoarc; b=a6x7MitS2ytXIv2SpEx7HZA0IlkGhO6pUvfelpA84XcL37uQ9fuzaAMEGu+iHZphL5ODkgnAIrcKsTfKB6/hlle8Zc40Cm288xACHbprCoavVVcBqUG6M0ToXPZRppV6QbieuYAl/J8PeBlugvn8jciBlzPCorHIxomsd9zC48Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580566; 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=3aIqBnRsvFqZ230wZvv7A0ZAUlxhRiHC/gfnYkiWsME=; b=KWxlMU7jaUIzQUPHsMjakLfbdD5hkytKB2gWomt/y4Wg7ey3Xl8sA90745HzA/AWez0bfVTb/FEcU9494V5nZZyFEeOa0f9k84vlS+ec4sf9PnfQ6cpNkHERBTSS2TlOC/m0u6+9GTMJ6LNOV4eiE8+yOvfW5xLoIwkvFgWUf9U= 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 1599580566622929.4288998945374; Tue, 8 Sep 2020 08:56:06 -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 1kFfyM-0005oE-20; Tue, 08 Sep 2020 15:55:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyL-0005nx-AK for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:55:53 +0000 Received: from us-smtp-delivery-124.mimecast.com (unknown [63.128.21.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id efa0ff6d-de16-4b81-8ec2-c0e131d313d4; Tue, 08 Sep 2020 15:55:52 +0000 (UTC) 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-64-nusdSt86MPSqJL5U_TZ9TA-1; Tue, 08 Sep 2020 11:55:48 -0400 Received: by mail-wr1-f72.google.com with SMTP id n15so7088960wrv.23 for ; Tue, 08 Sep 2020 08:55:48 -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 j14sm34928939wrr.66.2020.09.08.08.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:55:47 -0700 (PDT) X-Inumbo-ID: efa0ff6d-de16-4b81-8ec2-c0e131d313d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580552; 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=3aIqBnRsvFqZ230wZvv7A0ZAUlxhRiHC/gfnYkiWsME=; b=QAbXtG8lq3ZOQd2lnWx811FniS3J4q1SP0HndhDO7vBsRQVhp2il+oX6g7NvKWzWcWPilp T2/Q8yfJmmXQNPulv3sXBbT8ebyABXMNPUyADYaqYxwzF4nzJatGDw1A0hrNZVc3f0tZnK O/4tdwiJdGgF/LRsG/XwNoMFo0Z/FXs= X-MC-Unique: nusdSt86MPSqJL5U_TZ9TA-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=3aIqBnRsvFqZ230wZvv7A0ZAUlxhRiHC/gfnYkiWsME=; b=Ait32pMhWvOzXRTe6/SXfbL99Cs9MdwkmNDV1mwvbV0dLZCAVubWU5h4GgHtqWQ+GW 21rpudtbSURHikxemnoYzK6Jtk7hPgAFWGEGGtoaVwyWZrpWXaif0HTY/WapRmjjAEJA J4kiX5SnS0UBFZGeb+SjlANAU0f1M1/Tc2FGH3fOolhYjyk51r86E5HpSe8XAPnp0tl8 CwVg7FH4Gxu6Y2edh+W+bm7fcvohPFYIp9q3+IwOjVU4YLOWhfWcs7MXamYVZqafvbfV fjfa/Lu0fTkqHp3GIY6Qr4lqsYHql0PLe65Mski/PG0XunLTHkPepdhOEi4JmqvHUhar 0VXg== X-Gm-Message-State: AOAM532RJtuxTNVyELKSt8gBdIlSiR1laRFyAEsyUq0sNpxm39eQDbsO u950O5hNAPr+rRqfHP9a09EQmvbknfoGyUBoR2HhpsOMiJh13zbzfJwbRwzOwSBVHS11NnsBPJv 5cweDtjBsP0YqAyEK8GT3x3iLSFU= X-Received: by 2002:adf:f10a:: with SMTP id r10mr322937wro.86.1599580547717; Tue, 08 Sep 2020 08:55:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydvCW82xRfqRQuTdYF1MHP5+r8Gl/n2M1Hanlh29I5Vyk61N4IxwQtFwRjtnXQqr5GdlWs1A== X-Received: by 2002:adf:f10a:: with SMTP id r10mr322919wro.86.1599580547580; Tue, 08 Sep 2020 08:55:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 3/6] sysemu/xen: Add missing 'exec/cpu-common.h' header for ram_addr_t type Date: Tue, 8 Sep 2020 17:55:27 +0200 Message-Id: <20200908155530.249806-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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) As this header use the ram_addr_t type, it has to include "exec/cpu-common.h" to avoid odd errors such: include/sysemu/xen.h:35:44: error: unknown type name 'ram_addr_t'; did yo= u mean 'in_addr_t'? 35 | static inline void xen_hvm_modified_memory(ram_addr_t start, ram_ad= dr_t length) | ^~~~~~~~~~ | in_addr_t Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/xen.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sysemu/xen.h b/include/sysemu/xen.h index 2c2c429ea8b..0ca25697e4f 100644 --- a/include/sysemu/xen.h +++ b/include/sysemu/xen.h @@ -8,6 +8,8 @@ #ifndef SYSEMU_XEN_H #define SYSEMU_XEN_H =20 +#include "exec/cpu-common.h" + #ifdef NEED_CPU_H # ifdef CONFIG_XEN # define CONFIG_XEN_IS_POSSIBLE --=20 2.26.2 From nobody Tue Apr 23 05:32:58 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=1599580575; cv=none; d=zohomail.com; s=zohoarc; b=cKizr02EL8foqV0IsRsnw+qmL8zS0KOcglmgTI7MMtSE246r/m43CNZilBdsaOZXkEcRDUniHGleEQyhM6qJFMAHfWXSJT++LSPwZwzBqRhX6GcuPA8H+h6ixOWURo7EjhVCkvZfuYk+A9EVoirxkeRL/ibEuW7tMc/e+5sMmhE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580575; 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=8VUrfo15vNafeYg0h4TuIp0D8UFhdJzYacZhDlojTCw=; b=Bt+cqzZ5jxCVLY6105tnLCooNkEVhQgyIHuCji4NRyBftWw5E2xsnHp+Zbjo3+8zaM3pyUcgf5HBPghom9arH2bb9i3TPsc3Awldy/QWN+D1DiVP3Ey3i9PZ2GCQtg2JHGv3UfudOU7x49gv9n7G0OxEtcpI327tn0A07lwViEY= 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 1599580575743150.38832397397118; Tue, 8 Sep 2020 08:56:15 -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 1kFfyQ-0005q4-B1; Tue, 08 Sep 2020 15:55:58 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyO-0005nx-Sk for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:55:56 +0000 Received: from us-smtp-delivery-1.mimecast.com (unknown [207.211.31.120]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 6fb941a8-1ee9-4229-a4bc-6c98a38ea6e2; Tue, 08 Sep 2020 15:55:56 +0000 (UTC) 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-289-OeTm29O6MAqpEFnvKadfAQ-1; Tue, 08 Sep 2020 11:55:54 -0400 Received: by mail-wr1-f69.google.com with SMTP id x15so6257997wrm.7 for ; Tue, 08 Sep 2020 08:55:54 -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 o5sm31934683wmc.33.2020.09.08.08.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:55:51 -0700 (PDT) X-Inumbo-ID: 6fb941a8-1ee9-4229-a4bc-6c98a38ea6e2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580556; 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=N9l4M5mocEv80Jjtzlp8AjaUn59I9cCtFVCqy+n19SFTUK1640WEGVnXvsCsZ2Hecs0Trc z2uW/OBMNOOX58RbYuES+so/itSRQsIf8EL/Zj/7ehFHwYB7jef6SxQi2pNnniFjMW4poq Ex/NWClQIhAxienqouxQQgui0sJQyzY= X-MC-Unique: OeTm29O6MAqpEFnvKadfAQ-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=E7N7arQh3ZH5vEBzijfa3MeDK2v1ZQ2Dpo6ljfF2MoJhZeXz50vPwutGFNZ/45QHpR d3D883VjRbdUcfQVFV7d8viaWN+w5GI2AXWriAY/UKdmzxap+ybUdex8zzozDnDzAw4V YcTuL1RjD6BpMy1O7GgEQE5HQCrGR/4LkpC6OzhlOfbN6UmNJ1McXDMovmX+2j3cAVDI 7OtRyAXUDlZZp9XepNYEV/ZOGjUWSjlxhzmygEB8RO776pTAgY3QDPJgfIe6U1a9JDlA jzpFx+JW1j4p2voIr/QfzxAGaF46kp5WIuJ5OvEdBe6R3xbliMsuZI50yCGrLhTPBd4W Va4w== X-Gm-Message-State: AOAM531oso7E+iQEMx70/E+6r9zSAvr8rwCZrLN3ZCu2+kGsHZl9KL/f 374QHbQci1p8WdplC8XpW9YIjj+92jUiSO9ZDJX22O3AMChb8/3PQfJbAAJASsd1Hlu55l34Wox BDbA1Jv7pUdpWxLgdYcnHvsX7Cvs= X-Received: by 2002:a5d:49d2:: with SMTP id t18mr270730wrs.99.1599580552696; Tue, 08 Sep 2020 08:55:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEdHc1pv7BGXCTe+BIUfFARswN/4qnGyClHhLRspWocVPg/ArmCIreq1geKKgL3FqYCE8gsQ== X-Received: by 2002:a5d:49d2:: with SMTP id t18mr270716wrs.99.1599580552510; Tue, 08 Sep 2020 08:55:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/6] stubs: Split accelerator / hardware related stubs Date: Tue, 8 Sep 2020 17:55:28 +0200 Message-Id: <20200908155530.249806-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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) 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 Tue Apr 23 05:32:58 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=1599580562; cv=none; d=zohomail.com; s=zohoarc; b=JhTka+r6d38kuTzD9xywARV7nDT23T236e5vh7Q/NALvrwdnBxrC86loCii4/zT0VjqRW22fUUbmOYSxlmoQMnjLH3k33rTkAz49PDpHcYDssTHMv7sdGC0nelClC8HZG82TJHlns8DCEhsZp+a6cnJjiNuZSA/Y/D6f3tsgw94= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580562; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=l7Ag5wnuoUQYeKlBzjbRjYp0ocSUB86y3tv8q6ZNJJA=; b=BjVNzwwxUTurkyeOGTIsImHF5NXYh4Gat5BpRvnQ8N4kwXQJGtGO7pDyDq54TamSiIR5jG6PZiVpCRSdbymfomgKA+GOKoWQ5x24wgFbbnv6SPRmzwudhRsIYkM/XWCRHhq6HuCpY0aFNKKus4u05Q9HLybkN3R6Akr6H3jNZV8= 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-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 159958056241169.12887018785557; Tue, 8 Sep 2020 08:56:02 -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-527-2UKolnSDMSOsLcxoEFwGXg-1; Tue, 08 Sep 2020 11:55:59 -0400 Received: by mail-wm1-f69.google.com with SMTP id 189so1460028wme.5 for ; Tue, 08 Sep 2020 08:55:59 -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 11sm32118347wmi.14.2020.09.08.08.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580561; 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=l7Ag5wnuoUQYeKlBzjbRjYp0ocSUB86y3tv8q6ZNJJA=; b=Zp7qXZqq5EDAIUlWGYHmdN4upVhKrIOcOF2iIqmt9g+jFaXaIJ3uDtMbR9zJWj71GIuQEU ESO2TbK44gJzorlmBApBeerNJT1zqejnBa7yztuZntLzYCieIyFuf0KHucjjCmCYb3OEj7 KOlktO4cbfMQWTMHuhyH07folt1L558= X-MC-Unique: 2UKolnSDMSOsLcxoEFwGXg-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=l7Ag5wnuoUQYeKlBzjbRjYp0ocSUB86y3tv8q6ZNJJA=; b=hYncGDDqTT/aEAOwkU2K/Pkeax1PvuoxQMXHnL2WHkc5wM7xaOwKcaiZoOTNz8BVIj 31C7gxoBpkGvsMA91v1eXzj/2+mAthK1jgvkPUSjp9LaJInJPQhW7XMgcoqtAL0fAwL3 pEUTEEawb4VJG2214egSZ9fyQZo3C1hyDCtFdDzkKLgbkSVvWorerWCioP8/Jw6EAwXz 6eowGIoEgBX4im9XwJc4M+xDS+ytNv5dRK8rsgLg4sF+m/1W0FJkURF3Zn2kb/sCf98u ZLfJCLwOqekcArlSRH6DmPd6OY/N7cUqDM33bpElfwTEj4S5BchgDBuY0chf4iXPtzVc CQRA== X-Gm-Message-State: AOAM5327RT6DhGhOM4scOJJWn75MTylP/vnlwDs0l5TyYePNXgsMqQZd dpx1JkuOlNMcSXIStnPiD23g2/IM22+aajBWgOK6x1dPyHrOOI1QBmxk4J7QSjTlZkWCKqDnzKg udfa2yyGbgxT+TA== X-Received: by 2002:a1c:408a:: with SMTP id n132mr171980wma.45.1599580557610; Tue, 08 Sep 2020 08:55:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUFRkRRVJCqVG6l89owtWDMK776psHv3Hm0UYLZ9EZUoKSwjLV4cvgxH1H8jSVri7Qh45g4w== X-Received: by 2002:a1c:408a:: with SMTP id n132mr171968wma.45.1599580557436; Tue, 08 Sep 2020 08:55:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 5/6] hw/xen: Split x86-specific declaration from generic hardware ones Date: Tue, 8 Sep 2020 17:55:29 +0200 Message-Id: <20200908155530.249806-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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_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 + stubs/xen-hw-stub.c | 1 + 5 files changed, 18 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" diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index d14efef49e9..2ea81909217 100644 --- a/stubs/xen-hw-stub.c +++ b/stubs/xen-hw-stub.c @@ -8,6 +8,7 @@ =20 #include "qemu/osdep.h" #include "hw/xen/xen.h" +#include "hw/xen/xen-x86.h" =20 void xenstore_store_pv_console_info(int i, Chardev *chr) { --=20 2.26.2 From nobody Tue Apr 23 05:32:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1599580566; cv=none; d=zohomail.com; s=zohoarc; b=lsWg8Udvp9W6ceuyPH0+CZRjvr9inr+qJ6utizjyqRs/hzBQPscRQ4G6Y5as3rmch503weifhEQPQPMxXoVwzcFhgVowcXmBh0cBQ+CXGYFwqDGePShHKmkrZdfLiB7OPt8VJWJ/IsN18a7JU8V1T4dwmsNqTBp0eqax4mojGTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599580566; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=BaphSdiGhAZ4WeZEOB6GUUl46i+DVX/CX44TODloQyM=; b=c3eHV8+/7AXiRExadBg2bZQCcvs4ZhOC8EHVEsCrOS3Fe+a/VYNJr8pIJyP8MvrTA7+YkDbY8j0vBNCXsJ9b2iHhcL7r/ba9lTOFTnFIh0J/iqadbdu0u6ZohwVybi1xROxCrXaD6UHqyQ7E46lAAWWnZW+DSTHZJMhu8Sq9zo0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 159958056645076.98630583135264; Tue, 8 Sep 2020 08:56:06 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-10-YT8fFTAZMLaP9-zZYWWmmw-1; Tue, 08 Sep 2020 11:56:03 -0400 Received: by mail-wr1-f70.google.com with SMTP id v5so7058526wrs.17 for ; Tue, 08 Sep 2020 08:56:03 -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 d6sm34124785wrq.67.2020.09.08.08.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 08:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580565; 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=bHLb6xxAhFO16+jRrgj+7r7xOY+JCxBlsS+m3ePPG00QNNxbfwORIATWpwV10rtqVVb5vO KIN9qoieTdH0C1+qLElYDfZoTjuXbaWqPebc1r73t8/N5dIbrzaoOPf1ClGvDihYxcOu/1 vLoeQNPucegmOqD6xVeLCGZcbfUYHAU= X-MC-Unique: YT8fFTAZMLaP9-zZYWWmmw-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=LhIv1R9GjcMrBTcWIoyoLMArNXexEECn3kAbcprGyGtnKVUULCykPidbpp0jVkrXhW OPNEwlZ8WKWYH7ePuKf4CS5mnaJHj/d933XRBkiqWghfQJr5lRGZE5O/jUebv6aCWXB8 A6TJ6RTbzOHfZLb3I/lRonR3xo71Rb6whkrIqScIVLg4CpA91xT3UJWIPvgW8GvxJcCt jhX2IP22V2Zmpvn7SW46gKQjfJ6zd6Ttq/EgXr6XwxiPErYNsE8andcVi+PQKl/oL3/w WNvdmh2FWIH9ekwIcy5Keayp96dQ8SaXGGERvtYqxrehBG5b86uHojpYtmQ05O/Cu5LQ 0kWA== X-Gm-Message-State: AOAM530R+eYo0vCbR1ZN5IGUe74yT3Jh1kzrVQavZP9UYkkZ52+CZiYe KDNa0PjKU6zZ2H8h6D9X0rTS+WZI4lGiL4E5jgYjtJY5HHY/uqKLQ0Og6g50ZSZ7fweiIUyY/VC 1tNm5JdqihZ746Q== X-Received: by 2002:a7b:c40b:: with SMTP id k11mr162452wmi.135.1599580562476; Tue, 08 Sep 2020 08:56:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyALjQfs+9IOfen4Ye454tvzuEGIBzUvWIDpuXevuX4q2Ul/ulBEnGqrdlon8zddGjC4+VrrA== X-Received: by 2002:a7b:c40b:: with SMTP id k11mr162434wmi.135.1599580562312; Tue, 08 Sep 2020 08:56:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anthony Perard , Marcel Apfelbaum , xen-devel@lists.xenproject.org, "Michael S. Tsirkin" , Stefano Stabellini , Paolo Bonzini , Paul Durrant , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 6/6] typedefs: Restrict PCMachineState to 'hw/i386/pc.h' Date: Tue, 8 Sep 2020 17:55:30 +0200 Message-Id: <20200908155530.249806-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908155530.249806-1-philmd@redhat.com> References: <20200908155530.249806-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) 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