All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	qemu-devel@nongnu.org,
	Wainer dos Santos Moschetta <wainersm@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v2] hw/i386: Allow building machines without IOMMU
Date: Mon, 6 Jan 2020 05:00:18 -0500	[thread overview]
Message-ID: <20200106045952-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20191227213931.6286-1-philmd@redhat.com>

On Fri, Dec 27, 2019 at 10:39:31PM +0100, Philippe Mathieu-Daudé wrote:
> Commit 6c730e4af9 introduced a stub to build the MicroVM machine
> without Intel IOMMU suppport. However when configure with
> --without-default-devices, the build fails:
> 
>     LINK    x86_64-softmmu/qemu-system-x86_64
>   /usr/bin/ld: hw/i386/pc.o: in function `pc_machine_done':
>   hw/i386/pc.c:869: undefined reference to `x86_iommu_ir_supported'
>   /usr/bin/ld: hw/i386/acpi-build.o: in function `acpi_build':
>   hw/i386/acpi-build.c:2844: undefined reference to `x86_iommu_get_type'
>   /usr/bin/ld: hw/i386/acpi-build.o: in function `build_dmar_q35':
>   hw/i386/acpi-build.c:2478: undefined reference to `x86_iommu_ir_supported'
>   /usr/bin/ld: hw/i386/acpi-build.o: in function `build_amd_iommu':
>   hw/i386/acpi-build.c:2665: undefined reference to `x86_iommu_ir_supported'
>   /usr/bin/ld: hw/i386/acpi-build.c:2700: undefined reference to `x86_iommu_ir_supported'
>   collect2: error: ld returned 1 exit status
>   make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
> 
> Since currently all PC machines can not be built without IOMMU,
> select X86_IOMMU in the PC config, and remove the stubs.
> 
> Fixes: 6c730e4af9
> Reported-by: Travis-CI
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

I'd rather Paolo applied this in his tree.

> ---
> v2: simplify, remove the stub.
> ---
>  hw/i386/x86-iommu-stub.c | 34 ----------------------------------
>  hw/i386/Kconfig          |  2 +-
>  hw/i386/Makefile.objs    |  1 -
>  3 files changed, 1 insertion(+), 36 deletions(-)
>  delete mode 100644 hw/i386/x86-iommu-stub.c
> 
> diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c
> deleted file mode 100644
> index 03576cdccb..0000000000
> --- a/hw/i386/x86-iommu-stub.c
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -/*
> - * Stubs for X86 IOMMU emulation
> - *
> - * Copyright (C) 2019 Red Hat, Inc.
> - *
> - * Author: Paolo Bonzini <pbonzini@redhat.com>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> -
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> -
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -#include "qemu/osdep.h"
> -#include "hw/i386/x86-iommu.h"
> -
> -void x86_iommu_iec_register_notifier(X86IOMMUState *iommu,
> -                                     iec_notify_fn fn, void *data)
> -{
> -}
> -
> -X86IOMMUState *x86_iommu_get_default(void)
> -{
> -    return NULL;
> -}
> -
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 91cf5843b4..e428322a2c 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -35,6 +35,7 @@ config PC
>      select ACPI_PCI
>      select ACPI_VMGENID
>      select VIRTIO_PMEM_SUPPORTED
> +    select X86_IOMMU
>  
>  config PC_PCI
>      bool
> @@ -105,7 +106,6 @@ config MICROVM
>  
>  config X86_IOMMU
>      bool
> -    depends on PC
>  
>  config VTD
>      bool
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index 8ce1b26533..6ebb6d0cf0 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -7,7 +7,6 @@ obj-$(CONFIG_Q35) += pc_q35.o
>  obj-$(CONFIG_MICROVM) += microvm.o
>  obj-y += fw_cfg.o
>  obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
> -obj-$(call lnot,$(CONFIG_X86_IOMMU)) += x86-iommu-stub.o
>  obj-$(CONFIG_VTD) += intel_iommu.o
>  obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
>  obj-$(CONFIG_XEN) += ../xenpv/ xen/
> -- 
> 2.21.0



      reply	other threads:[~2020-01-06 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-27 21:39 [PATCH v2] hw/i386: Allow building machines without IOMMU Philippe Mathieu-Daudé
2020-01-06 10:00 ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106045952-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.