From patchwork Tue Sep 8 15:55:25 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: 11763525 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A96A618 for ; Tue, 8 Sep 2020 15:56:15 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 F1FCA22A84 for ; Tue, 8 Sep 2020 15:56:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jWbm+J8J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1FCA22A84 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Inumbo-ID: 03031e26-f964-4298-8c76-6bbb7745c7b7 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) 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= 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 X-MC-Unique: 2apKmDi0PgCro21DOvmQ4A-1 Received: by mail-wm1-f71.google.com with SMTP id b73so3632786wmb.0 for ; Tue, 08 Sep 2020 08:55:39 -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=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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 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" 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 15:55:26 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: 11763531 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DBD5618 for ; Tue, 8 Sep 2020 15:56:42 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 D02D822AAE for ; Tue, 8 Sep 2020 15:56:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ic3tYcvy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D02D822AAE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyG-0005mP-Nj; Tue, 08 Sep 2020 15:55:48 +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 1kFfyF-0005kl-0U for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:55:47 +0000 X-Inumbo-ID: eaa9dd96-4609-43c9-821d-ee7c066f5a58 Received: from us-smtp-delivery-124.mimecast.com (unknown [216.205.24.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id eaa9dd96-4609-43c9-821d-ee7c066f5a58; Tue, 08 Sep 2020 15:55:46 +0000 (UTC) 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= 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-255-hhy-JsTiOCqj8uU5MuO9Bg-1; Tue, 08 Sep 2020 11:55:44 -0400 X-MC-Unique: hhy-JsTiOCqj8uU5MuO9Bg-1 Received: by mail-wr1-f71.google.com with SMTP id b7so7126411wrn.6 for ; Tue, 08 Sep 2020 08:55:44 -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=j31KcTX3GTUVFc9e+WyMqvKRAuJHk/MRylnchjHsbZGu/QZ3RW5G8XY6avRf/kpznR S0DCWLWwy39btA9v8NBlORi7RRTCg0DghgA2XSVmK7CvSpcxvSCQf8rBVLW9wW8Zn4GT JhmmzxxJcZU2n/6SjPZ9fnR1x0Jw6lr+80Q+Fjf8rQC0y/0B5nsOYYbXeNh9SwitK2Z+ Wq8UiD0FFcdWyrVgclsB96XSB/emNLY4gIQPg+A/cxejKAWtKbujOriJfCws94qgzauP yvm4nlglowdSjVOBwwoFeeBKWLSNWXu44QDSGuwBQyDQbJxuUmvd+TlZqnUjHwDxmGSU /w5g== X-Gm-Message-State: AOAM530px0idJZLsAdYqX10iuYwfXUNE+pWbVWYpn79QEyDMo1Zr5YTo WKnKb5Oqq3WrEW18TbkL8hOXkwbUpAeMewgIecnUWOovXC6lsN8Ea03ieYYtJEMucZ/cB/Scukg n0Rvdjs7q/0stIn28d862XQbfZro= X-Received: by 2002:adf:fa52:: with SMTP id y18mr317409wrr.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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 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" 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 15:55:27 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: 11763529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6578C746 for ; Tue, 8 Sep 2020 15:56:35 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 39EAC229CA for ; Tue, 8 Sep 2020 15:56:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QAbXtG8l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39EAC229CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Inumbo-ID: efa0ff6d-de16-4b81-8ec2-c0e131d313d4 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) 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= 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 X-MC-Unique: nusdSt86MPSqJL5U_TZ9TA-1 Received: by mail-wr1-f72.google.com with SMTP id n15so7088960wrv.23 for ; Tue, 08 Sep 2020 08:55:48 -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=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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 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" 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 you mean 'in_addr_t'? 35 | static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) | ^~~~~~~~~~ | in_addr_t Signed-off-by: Philippe Mathieu-Daudé --- 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 +#include "exec/cpu-common.h" + #ifdef NEED_CPU_H # ifdef CONFIG_XEN # define CONFIG_XEN_IS_POSSIBLE From patchwork Tue Sep 8 15:55:28 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: 11763537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8352618 for ; Tue, 8 Sep 2020 15:56:55 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 BDC05229CA for ; Tue, 8 Sep 2020 15:56:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N9l4M5mo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDC05229CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Inumbo-ID: 6fb941a8-1ee9-4229-a4bc-6c98a38ea6e2 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) 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= 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 X-MC-Unique: OeTm29O6MAqpEFnvKadfAQ-1 Received: by mail-wr1-f69.google.com with SMTP id x15so6257997wrm.7 for ; Tue, 08 Sep 2020 08:55:54 -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=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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 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" 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 15:55:29 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: 11763539 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D09BA618 for ; Tue, 8 Sep 2020 15:57:32 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 9FDC020738 for ; Tue, 8 Sep 2020 15:57:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Zp7qXZqq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FDC020738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyV-0005sh-OR; Tue, 08 Sep 2020 15:56:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyU-0005s0-1X for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:56:02 +0000 X-Inumbo-ID: 2d188795-9b5b-487f-9b64-ca79f0a36b7d Received: from us-smtp-1.mimecast.com (unknown [207.211.31.81]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 2d188795-9b5b-487f-9b64-ca79f0a36b7d; Tue, 08 Sep 2020 15:56:01 +0000 (UTC) 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= 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-141-ybpaOyRgMIKXt1FTUnF4Bg-1; Tue, 08 Sep 2020 11:55:59 -0400 X-MC-Unique: ybpaOyRgMIKXt1FTUnF4Bg-1 Received: by mail-wm1-f71.google.com with SMTP id c72so3625130wme.4 for ; Tue, 08 Sep 2020 08:55:59 -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=l7Ag5wnuoUQYeKlBzjbRjYp0ocSUB86y3tv8q6ZNJJA=; b=tcppQ/dHe+JjtWvX+oaj8GQ0zKdJ2Po2c02d7zBs0QuVudCqEkXK8XpLM+5+ooBgWj Lu7Z/AFhbz1dwDdo2qddjixZNL97Tz8tNiKmM0yDVzd/x0yuCmmNv0AOPvf9lvzHAPrf l1wyjFhr0zyXUzG2vtef3Xeh9hEsT1/3TLNAEkyGe/P5cPAa+3jGjVp7+BvRjt6dBKjv /OK+a5PQX2dqZV1eMWwPIEr4GPjsMx0meg+74GWY7gouLm0mCJqBkF4k2Ziv1DLdr/zk 5hE91Xrcdrd+vtEv7RrTgnV2FhVJoQnLsLVS3XkUaZLaEKJ5AX+/LQrNqFL2adbXfmQv kwaA== X-Gm-Message-State: AOAM533h/GuIAA3pyTJj8P5Z9uyZ+04v9DFm9dbZxlB2Yx6APhLayAOm QnopC7Un2dmnPSFTSnZjjwoxXgVz0XKq9EEeUIS8Euq2RrTOsU30FAZSjvfuHPfjvCsEemyWkRn k2yClcdA7WvyeeytH7KvRwWOtd/I= X-Received: by 2002:a1c:408a:: with SMTP id n132mr171985wma.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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 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" 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 + 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); 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" 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 @@ #include "qemu/osdep.h" #include "hw/xen/xen.h" +#include "hw/xen/xen-x86.h" void xenstore_store_pv_console_info(int i, Chardev *chr) { From patchwork Tue Sep 8 15:55:30 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: 11763527 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2EC0746 for ; Tue, 8 Sep 2020 15:56:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 726EC229CA for ; Tue, 8 Sep 2020 15:56:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OQO2/jQt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 726EC229CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyb-0005vF-1B; Tue, 08 Sep 2020 15:56:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFfyZ-0005s0-03 for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 15:56:07 +0000 X-Inumbo-ID: 986bef88-0b03-48f7-a305-6a6a4864f9a0 Received: from us-smtp-1.mimecast.com (unknown [205.139.110.61]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 986bef88-0b03-48f7-a305-6a6a4864f9a0; Tue, 08 Sep 2020 15:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599580566; 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=OQO2/jQtnj06aWyy6m2mXgxw+CKr7RxR9RU3GEOx9Dux8xx81tNuzOZRIn8heQXveDso1/ 0mC1RL7K+JLk2p6+6GiwDKCycAf4ujvEj44fvRDWiSJpSvsVOYSEosYU0CD4PXN1UfsVch bksJ07MQTKgEtBItdQxIf4/5Q/tKKl0= 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-188-rtJnU8VXPh-N-mF1btm8KQ-1; Tue, 08 Sep 2020 11:56:04 -0400 X-MC-Unique: rtJnU8VXPh-N-mF1btm8KQ-1 Received: by mail-wr1-f70.google.com with SMTP id x15so6258138wrm.7 for ; Tue, 08 Sep 2020 08:56:04 -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=H2QNtInXtf8KsIMYFrNX4Qa1z0FsNJE64U37CCJXDqN8lx1tiPpB8ABhhn38WKIMLQ x32jJPMWiiiCsP7pyUuMywn5w/ieptWv2RIe4ZedpD8dy1jOFVQgcQOf4sJGXUp17nyx Bm+ixqXydGr2YP5RWsSjwDbl8a+8cx1pzjB3cVrHExYbZGlqNfU/3eqSDbtXqZXeMskS sdfseXV7ZW3gd7GKyifutYsZBuzskuPzICVVYzd/tP1sCTLBu5ltYdmZNQgmtS8AxdKa UBtjUmIWMNjNIXjvLU/NP4FvmY+y6SGtRP+xkTAvUom0SLRNob3/p0PPGUPk2PivJBEm xhlw== X-Gm-Message-State: AOAM530l0QhGhOGGGTchYf2eD4dsEJvxTt7t7jY6RvMRJgWEa1I0rOYM o1bR0nKfSnb6I7YztXA/LTESvlPdRJXwJL4NenG8O2fpsfEFvaDyYMP7y52NOobDhALol7Osu1S mfHBB2ZgTFj3Ynd60H6TH+mUh6T4= X-Received: by 2002:a7b:c40b:: with SMTP id k11mr162450wmi.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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Mathieu-Daud?= =?utf-8?q?=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 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" 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;