qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/i386/x86-iommu: Add missing stubs
@ 2019-12-20 15:42 Philippe Mathieu-Daudé
  2019-12-22 10:31 ` Paolo Bonzini
  2019-12-27 20:19 ` Wainer dos Santos Moschetta
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-20 15:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Sergio Lopez, Michael S. Tsirkin,
	Philippe Mathieu-Daudé, Paolo Bonzini, Alex Bennée,
	Richard Henderson

In commit 6c730e4af9 we introduced a stub to build the MicroVM
machine without Intel IOMMU. This stub is incomplete for the
other PC machines. Add the missing stubs.

Fixes: 6c730e4af9
Reported-by: Travis-CI
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/i386/x86-iommu-stub.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c
index 03576cdccb..c5ba077f9d 100644
--- a/hw/i386/x86-iommu-stub.c
+++ b/hw/i386/x86-iommu-stub.c
@@ -32,3 +32,12 @@ X86IOMMUState *x86_iommu_get_default(void)
     return NULL;
 }
 
+bool x86_iommu_ir_supported(X86IOMMUState *s)
+{
+    return false;
+}
+
+IommuType x86_iommu_get_type(void)
+{
+    abort();
+}
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] hw/i386/x86-iommu: Add missing stubs
  2019-12-20 15:42 [PATCH] hw/i386/x86-iommu: Add missing stubs Philippe Mathieu-Daudé
@ 2019-12-22 10:31 ` Paolo Bonzini
  2019-12-27 21:38   ` Philippe Mathieu-Daudé
  2019-12-27 20:19 ` Wainer dos Santos Moschetta
  1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2019-12-22 10:31 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Sergio Lopez, Michael S. Tsirkin,
	Alex Bennée, Richard Henderson

On 20/12/19 16:42, Philippe Mathieu-Daudé wrote:
> In commit 6c730e4af9 we introduced a stub to build the MicroVM
> machine without Intel IOMMU. This stub is incomplete for the
> other PC machines. Add the missing stubs.

In other words, without this patch you cannot build without Q35 (which
brings in the IOMMU, at least unless building
--without-default-devices).  Is this correct?

Paolo

> 
> Fixes: 6c730e4af9
> Reported-by: Travis-CI
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/i386/x86-iommu-stub.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c
> index 03576cdccb..c5ba077f9d 100644
> --- a/hw/i386/x86-iommu-stub.c
> +++ b/hw/i386/x86-iommu-stub.c
> @@ -32,3 +32,12 @@ X86IOMMUState *x86_iommu_get_default(void)
>      return NULL;
>  }
>  
> +bool x86_iommu_ir_supported(X86IOMMUState *s)
> +{
> +    return false;
> +}
> +
> +IommuType x86_iommu_get_type(void)
> +{
> +    abort();
> +}
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hw/i386/x86-iommu: Add missing stubs
  2019-12-20 15:42 [PATCH] hw/i386/x86-iommu: Add missing stubs Philippe Mathieu-Daudé
  2019-12-22 10:31 ` Paolo Bonzini
@ 2019-12-27 20:19 ` Wainer dos Santos Moschetta
  1 sibling, 0 replies; 4+ messages in thread
From: Wainer dos Santos Moschetta @ 2019-12-27 20:19 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Sergio Lopez, Michael S. Tsirkin,
	Paolo Bonzini, Alex Bennée, Richard Henderson


On 12/20/19 1:42 PM, Philippe Mathieu-Daudé wrote:
> In commit 6c730e4af9 we introduced a stub to build the MicroVM
> machine without Intel IOMMU. This stub is incomplete for the
> other PC machines. Add the missing stubs.
>
> Fixes: 6c730e4af9
> Reported-by: Travis-CI
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   hw/i386/x86-iommu-stub.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c
> index 03576cdccb..c5ba077f9d 100644
> --- a/hw/i386/x86-iommu-stub.c
> +++ b/hw/i386/x86-iommu-stub.c
> @@ -32,3 +32,12 @@ X86IOMMUState *x86_iommu_get_default(void)
>       return NULL;
>   }
>   
> +bool x86_iommu_ir_supported(X86IOMMUState *s)
> +{
> +    return false;
> +}
> +
> +IommuType x86_iommu_get_type(void)
> +{
> +    abort();
> +}

I cannot say the fix is correct, but I can attest - with it - I no 
longer see the build fail when --without-default-devices --disable-user.

Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] hw/i386/x86-iommu: Add missing stubs
  2019-12-22 10:31 ` Paolo Bonzini
@ 2019-12-27 21:38   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-27 21:38 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Peter Maydell, Eduardo Habkost, Sergio Lopez, Michael S. Tsirkin,
	Alex Bennée, Richard Henderson

On 12/22/19 11:31 AM, Paolo Bonzini wrote:
> On 20/12/19 16:42, Philippe Mathieu-Daudé wrote:
>> In commit 6c730e4af9 we introduced a stub to build the MicroVM
>> machine without Intel IOMMU. This stub is incomplete for the
>> other PC machines. Add the missing stubs.
> 
> In other words, without this patch you cannot build without Q35 (which
> brings in the IOMMU, at least unless building
> --without-default-devices).  Is this correct?

No, this is the same, selecting either CONFIG_I440FX or CONFIG_Q35:

   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
make: *** [Makefile:483: x86_64-softmmu/all] Error 2

> Paolo
> 
>>
>> Fixes: 6c730e4af9
>> Reported-by: Travis-CI
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   hw/i386/x86-iommu-stub.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/hw/i386/x86-iommu-stub.c b/hw/i386/x86-iommu-stub.c
>> index 03576cdccb..c5ba077f9d 100644
>> --- a/hw/i386/x86-iommu-stub.c
>> +++ b/hw/i386/x86-iommu-stub.c
>> @@ -32,3 +32,12 @@ X86IOMMUState *x86_iommu_get_default(void)
>>       return NULL;
>>   }
>>   
>> +bool x86_iommu_ir_supported(X86IOMMUState *s)
>> +{
>> +    return false;
>> +}
>> +
>> +IommuType x86_iommu_get_type(void)
>> +{
>> +    abort();
>> +}
>>
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-27 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-20 15:42 [PATCH] hw/i386/x86-iommu: Add missing stubs Philippe Mathieu-Daudé
2019-12-22 10:31 ` Paolo Bonzini
2019-12-27 21:38   ` Philippe Mathieu-Daudé
2019-12-27 20:19 ` Wainer dos Santos Moschetta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).