diff mbox

[RFC,1/3] configure: disable Xen PCI Passthrough on !x86 archs

Message ID 20170711025703.24194-2-f4bug@amsat.org
State New
Headers show

Commit Message

Philippe Mathieu-Daudé July 11, 2017, 2:57 a.m. UTC
linking on Linux debian/stretch/arm64 with libxen-4.8:

    hw/xen/xen_pt.o: In function `xen_pt_pci_read_config':
    qemu/hw/xen/xen_pt.c:206: undefined reference to `xen_shutdown_fatal_error'
    hw/xen/xen_pt.o: In function `xen_igd_passthrough_isa_bridge_create':
    qemu/hw/xen/xen_pt.c:698: undefined reference to `igd_passthrough_isa_bridge_create'
    hw/xen/xen_pt.o: In function `xen_pt_pci_write_config':
    qemu/hw/xen/xen_pt.c:355: undefined reference to `xen_shutdown_fatal_error'
    hw/xen/xen_pt_config_init.o: In function `xen_pt_status_reg_init':
    qemu/hw/xen/xen_pt_config_init.c:281: undefined reference to `xen_shutdown_fatal_error'
    qemu/hw/xen/xen_pt_config_init.c:275: undefined reference to `xen_shutdown_fatal_error'
    hw/xen/xen_pt_graphics.o: In function `get_vgabios':
    qemu/hw/xen/xen_pt_graphics.c:135: undefined reference to `pci_assign_dev_load_option_rom'
    collect2: error: ld returned 1 exit status
    Makefile:197: recipe for target 'qemu-system-aarch64' failed
    make[1]: *** [qemu-system-aarch64] Error 1

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 configure | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé July 11, 2017, 4:06 p.m. UTC | #1
It seems our minds crossed at the same time since Alex/Pablo fixed it 
and got merged in master as b5ed2e11ef39 "build: disable Xen on ARM" so 
this patch is no more necessary.

Alex/Pablo, any thought on patch 2 regarding xen-mapcache.h?

Phil.

On 07/10/2017 11:57 PM, Philippe Mathieu-Daudé wrote:
> linking on Linux debian/stretch/arm64 with libxen-4.8:
> 
>      hw/xen/xen_pt.o: In function `xen_pt_pci_read_config':
>      qemu/hw/xen/xen_pt.c:206: undefined reference to `xen_shutdown_fatal_error'
>      hw/xen/xen_pt.o: In function `xen_igd_passthrough_isa_bridge_create':
>      qemu/hw/xen/xen_pt.c:698: undefined reference to `igd_passthrough_isa_bridge_create'
>      hw/xen/xen_pt.o: In function `xen_pt_pci_write_config':
>      qemu/hw/xen/xen_pt.c:355: undefined reference to `xen_shutdown_fatal_error'
>      hw/xen/xen_pt_config_init.o: In function `xen_pt_status_reg_init':
>      qemu/hw/xen/xen_pt_config_init.c:281: undefined reference to `xen_shutdown_fatal_error'
>      qemu/hw/xen/xen_pt_config_init.c:275: undefined reference to `xen_shutdown_fatal_error'
>      hw/xen/xen_pt_graphics.o: In function `get_vgabios':
>      qemu/hw/xen/xen_pt_graphics.c:135: undefined reference to `pci_assign_dev_load_option_rom'
>      collect2: error: ld returned 1 exit status
>      Makefile:197: recipe for target 'qemu-system-aarch64' failed
>      make[1]: *** [qemu-system-aarch64] Error 1
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   configure | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 806658c98b..e4b173405a 100755
> --- a/configure
> +++ b/configure
> @@ -2344,8 +2344,15 @@ EOF
>   fi
>   
>   if test "$xen_pci_passthrough" != "no"; then
> -  if test "$xen" = "yes" && test "$linux" = "yes"; then
> -    xen_pci_passthrough=yes
> +  if test "$xen" = "yes"; then
> +    case "$cpu" in
> +    i386|x32|x86_64)
> +        if test "$linux" = "yes"; then
> +            xen_pci_passthrough=yes
> +        fi ;;
> +    *)  echo "Disabling Xen PCI Passthrough (not implemented on $cpu)"
> +        xen_pci_passthrough=no ;;
> +    esac
>     else
>       if test "$xen_pci_passthrough" = "yes"; then
>         error_exit "User requested feature Xen PCI Passthrough" \
>
Alex Bennée July 11, 2017, 4:26 p.m. UTC | #2
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> It seems our minds crossed at the same time since Alex/Pablo fixed it
> and got merged in master as b5ed2e11ef39 "build: disable Xen on ARM"
> so this patch is no more necessary.
>
> Alex/Pablo, any thought on patch 2 regarding xen-mapcache.h?

Pass, I know little of Xen on ARM other than I think it doesn't need
QEMU for device emulation. IIRC the use of QEMU on x86 is to handle the
weird set of devices you can get on a PC without bloating the
hypervisor. ARM is a lot simpler in that regard.

>
> Phil.
>
> On 07/10/2017 11:57 PM, Philippe Mathieu-Daudé wrote:
>> linking on Linux debian/stretch/arm64 with libxen-4.8:
>>
>>      hw/xen/xen_pt.o: In function `xen_pt_pci_read_config':
>>      qemu/hw/xen/xen_pt.c:206: undefined reference to `xen_shutdown_fatal_error'
>>      hw/xen/xen_pt.o: In function `xen_igd_passthrough_isa_bridge_create':
>>      qemu/hw/xen/xen_pt.c:698: undefined reference to `igd_passthrough_isa_bridge_create'
>>      hw/xen/xen_pt.o: In function `xen_pt_pci_write_config':
>>      qemu/hw/xen/xen_pt.c:355: undefined reference to `xen_shutdown_fatal_error'
>>      hw/xen/xen_pt_config_init.o: In function `xen_pt_status_reg_init':
>>      qemu/hw/xen/xen_pt_config_init.c:281: undefined reference to `xen_shutdown_fatal_error'
>>      qemu/hw/xen/xen_pt_config_init.c:275: undefined reference to `xen_shutdown_fatal_error'
>>      hw/xen/xen_pt_graphics.o: In function `get_vgabios':
>>      qemu/hw/xen/xen_pt_graphics.c:135: undefined reference to `pci_assign_dev_load_option_rom'
>>      collect2: error: ld returned 1 exit status
>>      Makefile:197: recipe for target 'qemu-system-aarch64' failed
>>      make[1]: *** [qemu-system-aarch64] Error 1
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   configure | 11 +++++++++--
>>   1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 806658c98b..e4b173405a 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2344,8 +2344,15 @@ EOF
>>   fi
>>     if test "$xen_pci_passthrough" != "no"; then
>> -  if test "$xen" = "yes" && test "$linux" = "yes"; then
>> -    xen_pci_passthrough=yes
>> +  if test "$xen" = "yes"; then
>> +    case "$cpu" in
>> +    i386|x32|x86_64)
>> +        if test "$linux" = "yes"; then
>> +            xen_pci_passthrough=yes
>> +        fi ;;
>> +    *)  echo "Disabling Xen PCI Passthrough (not implemented on $cpu)"
>> +        xen_pci_passthrough=no ;;
>> +    esac
>>     else
>>       if test "$xen_pci_passthrough" = "yes"; then
>>         error_exit "User requested feature Xen PCI Passthrough" \
>>


--
Alex Bennée
Paolo Bonzini July 11, 2017, 4:31 p.m. UTC | #3
On 11/07/2017 18:26, Alex Bennée wrote:
>> It seems our minds crossed at the same time since Alex/Pablo fixed it
>> and got merged in master as b5ed2e11ef39 "build: disable Xen on ARM"
>> so this patch is no more necessary.
>>
>> Alex/Pablo, any thought on patch 2 regarding xen-mapcache.h?
> 
> Pass, I know little of Xen on ARM other than I think it doesn't need
> QEMU for device emulation. IIRC the use of QEMU on x86 is to handle the
> weird set of devices you can get on a PC without bloating the
> hypervisor. ARM is a lot simpler in that regard.

Yes, my understanding is that Xen on ARM doesn't need the mapcache.

Another thing being discussed a few years ago was the creation of
qemu-system-xenpv (aka xenpv-softmmu), where the same code would run on
x86 or ARM.  It would never support TCG, so the --disable-tcg patches
would be a prerequisite for that.

Paolo
diff mbox

Patch

diff --git a/configure b/configure
index 806658c98b..e4b173405a 100755
--- a/configure
+++ b/configure
@@ -2344,8 +2344,15 @@  EOF
 fi
 
 if test "$xen_pci_passthrough" != "no"; then
-  if test "$xen" = "yes" && test "$linux" = "yes"; then
-    xen_pci_passthrough=yes
+  if test "$xen" = "yes"; then
+    case "$cpu" in
+    i386|x32|x86_64)
+        if test "$linux" = "yes"; then
+            xen_pci_passthrough=yes
+        fi ;;
+    *)  echo "Disabling Xen PCI Passthrough (not implemented on $cpu)"
+        xen_pci_passthrough=no ;;
+    esac
   else
     if test "$xen_pci_passthrough" = "yes"; then
       error_exit "User requested feature Xen PCI Passthrough" \