From nobody Mon Feb 9 15:11:28 2026 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