hw/Makefile.objs question
I am trying to compile the very last qemu with vfio_pci enabled. VFIO_PCI is added as below:
./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac
./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.o
And it worked before. However it does not anymore as it seems that everything in hw/ (and vfio_pci.c as well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with CONFIG_VFIO_PCI=y.
What is the correct solution?
Signature · 1 line
Alexey
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 22 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.
Quoted 5 lines
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
If the file compiles the same for all three, put CONFIG_VFIO_PCI=y into default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 27 lines · Andreas Färber
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 26 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.
Quoted 5 lines
Quoted 1 line
What is the correct solution?
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.
It only compiles with ./configure --enable-vfio-pci which may or may not set CONFIG_VFIO_PCI to "y". Your proposal makes it always "y" (for selected platforms).
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
Signature · 1 line
Alexey
Am 21.06.2012 13:21, schrieb Alexey Kardashevskiy:
Quoted 30 lines · Andreas Färber
Quoted 29 lines
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 27 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
Quoted 7 lines
Quoted 3 lines
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.It only compiles with ./configure --enable-vfio-pci which may or may not set
CONFIG_VFIO_PCIto "y". Your proposal makes it always "y" (for selected platforms).
Apply some creativity, there's surely examples around. The question is whether the contents of vfio_pci.o changes or not. If not, then you only need to build it once in libhwX/, depending on $config_target_mak, and link to the appropriate targets. If it accesses CPU internals then it must be built per target.
Quoted 4 lines
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
No, in this case the condition would be set from configure as before, it only moves from Makefile.target to the appropriate Makefile.objs. Note that to limit it to ppc64 (as opposed to ppc) some additional ifeq check would be needed, as before.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 36 lines · Andreas Färber
Am 21.06.2012 13:21, schrieb Alexey Kardashevskiy:
Quoted 35 lines · Andreas Färber
Quoted 32 lines
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 22 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.Quoted 5 lines
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.
Quoted 5 lines
Quoted 2 lines
It only compiles with ./configure --enable-vfio-pci which may or may not set
CONFIG_VFIO_PCIto "y". Your proposal makes it always "y" (for selected platforms).Apply some creativity, there's surely examples around. The question is whether the contents of vfio_pci.o changes or not.
Applied already and gave up, this is why I am writing here :) What would be a good example of a device which is enabled by configure script?
Quoted 4 lines
If not, then you only
need to build it once in libhwX/, depending on $config_target_mak, and link to the appropriate targets. If it accesses CPU internals then it must be built per target.
$config_target_mak points to ppc64-softmmu/config-target.mak, not in the root folder. When executed in libhw64, it is not visible to makefile.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
No, in this case the condition would be set from configure as before, it only moves from Makefile.target to the appropriate Makefile.objs. Note that to limit it to ppc64 (as opposed to ppc) some additional ifeq check would be needed, as before.
Signature · 1 line
Alexey
Quoted 37 lines · Alexey Kardashevskiy
Quoted 36 lines · Andreas Färber
Am 21.06.2012 13:21, schrieb Alexey Kardashevskiy:
Quoted 35 lines · Andreas Färber
Quoted 32 lines
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 22 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y">> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.Quoted 5 lines
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It only compiles with ./configure --enable-vfio-pci which may or may not set
CONFIG_VFIO_PCIto "y". Your proposal makes it always "y" (for selected platforms).Apply some creativity, there's surely examples around. The question is whether the contents of vfio_pci.o changes or not.
Applied already and gave up, this is why I am writing here :) What would be a good example of a device which is enabled by configure script?
We don't have a great way to do this. CONFIG_VIRTFS is the best example.
You need three things:
1) a CONFIG_ variable set by configure (whether the user wants VFIO)
2) a CONFIG_ variable set by the target default-config/ whether the board supports VFIO. This could just be CONFIG_PCI btw.
3) a variable that you create in Makefile.objs that is only set if (1) && (2) are both set to y
You can then use the variable from (3) to do obj-$(CONFIG_...) in the appropriate Makefiles.obj.
Regards,
Anthony Liguori
Quoted 23 lines
Quoted 5 lines
If not, then you only
need to build it once in libhwX/, depending on $config_target_mak, and link to the appropriate targets. If it accesses CPU internals then it must be built per target.$config_target_mak points to ppc64-softmmu/config-target.mak, not in the root folder. When executed in libhw64, it is not visible to makefile.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
No, in this case the condition would be set from configure as before, it only moves from Makefile.target to the appropriate Makefile.objs. Note that to limit it to ppc64 (as opposed to ppc) some additional ifeq check would be needed, as before.
Am 21.06.2012 15:10, schrieb Alexey Kardashevskiy:
Quoted 37 lines · Andreas Färber
Quoted 36 lines
Am 21.06.2012 13:21, schrieb Alexey Kardashevskiy:
Quoted 35 lines · Andreas Färber
Quoted 32 lines
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 22 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.Quoted 5 lines
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It only compiles with ./configure --enable-vfio-pci which may or may not set
CONFIG_VFIO_PCIto "y". Your proposal makes it always "y" (for selected platforms).Apply some creativity, there's surely examples around. The question is whether the contents of vfio_pci.o changes or not.
Applied already and gave up, this is why I am writing here :) What would be a good example of a device which is enabled by configure script?
You're missing my point: We need to know *where* the .o file needs to go, then we can point you to appropriate examples. Making things depend on configure options should be trivial from there.
My understanding is that VFIO depends only on Linux/KVM support so I don't understand why you'd be excluding VFIO for ppc. s390 has no PCI AFAIU so that'd be okay.
Quoted 7 lines
Quoted 4 lines
If not, then you only
need to build it once in libhwX/, depending on $config_target_mak, and link to the appropriate targets. If it accesses CPU internals then it must be built per target.$config_target_mak points to ppc64-softmmu/config-target.mak, not in the root folder. When executed in libhw64, it is not visible to makefile.
Correct. You keep mixing up both approaches I named...
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different Makefile than before.
*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
You still haven't answered the question of which of these two cases applies here, so I cannot say more than I already have. Anthony's 3) elaborates on my briefly mentioned ifeq.
Andreas
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
No, in this case the condition would be set from configure as before, it only moves from Makefile.target to the appropriate Makefile.objs. Note that to limit it to ppc64 (as opposed to ppc) some additional ifeq check would be needed, as before.
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 47 lines · Andreas Färber
Am 21.06.2012 15:10, schrieb Alexey Kardashevskiy:
Quoted 37 lines · Andreas Färber
Quoted 36 lines
Am 21.06.2012 13:21, schrieb Alexey Kardashevskiy:
Quoted 35 lines · Andreas Färber
Quoted 32 lines
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 22 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.Quoted 5 lines
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It only compiles with ./configure --enable-vfio-pci which may or may not set
CONFIG_VFIO_PCIto "y". Your proposal makes it always "y" (for selected platforms).Apply some creativity, there's surely examples around. The question is whether the contents of vfio_pci.o changes or not.
Applied already and gave up, this is why I am writing here :) What would be a good example of a device which is enabled by configure script?
Quoted 7 lines
You're missing my point: We need to know *where* the .o file needs to go, then we can point you to appropriate examples. Making things depend on configure options should be trivial from there.
My understanding is that VFIO depends only on Linux/KVM support so I don't understand why you'd be excluding VFIO for ppc. s390 has no PCI AFAIU so that'd be okay.
FWIW, VFIO really only depends on Linux + PCI, but we probably want to set defaults so that it doesn't get build on platforms where we know it won't work (no INTx EOI lookup/notifiers). Thanks,
Alex
Quoted 34 lines
Quoted 7 lines
Quoted 4 lines
If not, then you only
need to build it once in libhwX/, depending on $config_target_mak, and link to the appropriate targets. If it accesses CPU internals then it must be built per target.$config_target_mak points to ppc64-softmmu/config-target.mak, not in the root folder. When executed in libhw64, it is not visible to makefile.
Correct. You keep mixing up both approaches I named...
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different
Makefilethan before.*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
You still haven't answered the question of which of these two cases applies here, so I cannot say more than I already have. Anthony's 3) elaborates on my briefly mentioned ifeq.
Andreas
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
No, in this case the condition would be set from configure as before, it only moves from Makefile.target to the appropriate Makefile.objs. Note that to limit it to ppc64 (as opposed to ppc) some additional ifeq check would be needed, as before.
Quoted 60 lines · Andreas Färber
Am 21.06.2012 15:10, schrieb Alexey Kardashevskiy:
Quoted 37 lines · Andreas Färber
Quoted 36 lines
Am 21.06.2012 13:21, schrieb Alexey Kardashevskiy:
Quoted 35 lines · Andreas Färber
Quoted 32 lines
Am 21.06.2012 05:22, schrieb Alexey Kardashevskiy:
Quoted 22 lines
I am trying to compile the very last qemu with
vfio_pcienabled.VFIO_PCIis added as below:./configure:
case "$target_arch2" in
i386|x86_64|ppc64)
if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then
echo "CONFIG_VFIO_PCI=y" >> $config_target_mak
fi
esac./Makefile.target:
# VFIO PCI device assignment
obj-$(CONFIG_VFIO_PCI) += vfio_pci.oAnd it worked before. However it does not anymore as it seems that everything in hw/ (and
vfio_pci.cas well as is in hw/ and it is a device) can be only compiled via hw/Makefile.objs and hw/ppc/Makefile.objs (my platform is POWER), it is ignored if to keep it as is.Quoted 5 lines
So I have to move "obj-$(CONFIG_VFIO_PCI) += vfio_pci.o" to hw/Makefile.objs (and change obj- to hw-obj-) but the hw/Makefile.objs does not include (directly or indirectly) generated ppc64-softmmu/config-target.mak with
CONFIG_VFIO_PCI=y.What is the correct solution?
If the file compiles the same for all three, put
CONFIG_VFIO_PCI=yinto default-configs/{i386,x86_64,ppc64}-softmmu.mak and do hw-obj-$(CONFIG_VFIO_PCI) += in hw/Makefile.objs.Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It only compiles with ./configure --enable-vfio-pci which may or may not set
CONFIG_VFIO_PCIto "y". Your proposal makes it always "y" (for selected platforms).Apply some creativity, there's surely examples around. The question is whether the contents of vfio_pci.o changes or not.
Applied already and gave up, this is why I am writing here :) What would be a good example of a device which is enabled by configure script?
You're missing my point: We need to know *where* the .o file needs to go, then we can point you to appropriate examples. Making things depend on configure options should be trivial from there.
My understanding is that VFIO depends only on Linux/KVM support so I don't understand why you'd be excluding VFIO for ppc. s390 has no PCI AFAIU so that'd be okay.
Quoted 5 lines
Quoted 4 lines
If not, then you only
need to build it once in libhwX/, depending on $config_target_mak, and link to the appropriate targets. If it accesses CPU internals then it must be built per target.
Quoted 8 lines
Quoted 2 lines
$config_target_mak points to ppc64-softmmu/config-target.mak, not in the root folder. When executed in libhw64, it is not visible to makefile.
Correct. You keep mixing up both approaches I named...
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different
Makefilethan before.
Aaaa. This is the case and this is what I did at the first place but I thought it was wrong. Ok.
Quoted 7 lines
*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
You still haven't answered the question of which of these two cases applies here, so I cannot say more than I already have. Anthony's 3) elaborates on my briefly mentioned ifeq.
2 Alex: seems that now we should build qemu+vfio like below:
Makefile.target +0 -3
@@ -154,9 +154,6 @@ endif endif obj-$(CONFIG_IVSHMEM) += ivshmem.o -# VFIO PCI device assignment -obj-$(CONFIG_VFIO_PCI) += vfio_pci.o - # Hardware support ifeq ($(TARGET_ARCH), sparc64) obj-y += hw/sparc64/
configure +3 -6
@@ -3735,12 +3735,9 @@ case "$target_arch2" in *) echo "CONFIG_NO_XEN=y" >> $config_target_mak esac -case "$target_arch2" in - i386|x86_64|ppc64) - if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then - echo "CONFIG_VFIO_PCI=y" >> $config_target_mak - fi -esac +if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then + echo "CONFIG_VFIO_PCI=y" >> $config_target_mak +fi case "$target_arch2" in i386|x86_64|ppcemb|ppc|ppc64|s390x) # Make sure the target and host cpus are compatible
hw/i386/Makefile.objs +2 -0
@@ -9,5 +9,7 @@ obj-y += pc_sysfw.o obj-$(CONFIG_XEN) += xen_platform.o xen_apic.o obj-$(CONFIG_KVM) += kvm/clock.o kvm/apic.o kvm/i8259.o kvm/ioapic.o kvm/i8254.o obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o +# VFIO PCI device assignment +obj-$(CONFIG_VFIO_PCI) += vfio_pci.o obj-y := $(addprefix ../,$(obj-y))
hw/ppc/Makefile.objs +3 -0
@@ -25,4 +25,7 @@ obj-$(CONFIG_FDT) += ../device_tree.o # Xilinx PPC peripherals obj-y += xilinx_ethlite.o +# VFIO PCI device assignment +obj-$(CONFIG_VFIO_PCI) += vfio_pci.o + obj-y := $(addprefix ../,$(obj-y))
Quoted 11 lines
Andreas
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Otherwise, add to hw/{i386,ppc}/Makefile.objs - or with Anthony's proposal from yesterday hw/Makefile.objs becomes possible, too.
Again, it will be unconditional "y".
No, in this case the condition would be set from configure as before, it only moves from Makefile.target to the appropriate Makefile.objs. Note that to limit it to ppc64 (as opposed to ppc) some additional ifeq check would be needed, as before.
thanks!
Signature · 1 line
Alexey
Il 21/06/2012 16:04, Andreas Färber ha scritto:
Quoted 8 lines
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different
Makefilethan before.*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
You only need the latter. Whether to compile it is decided by config-all-devices.mak, but that file is automatically generated by looking at all targets.
Paolo
Am 02.07.2012 12:36, schrieb Paolo Bonzini:
Quoted 6 lines
Il 21/06/2012 16:04, Andreas Färber ha scritto:
Quoted 5 lines
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different
Makefilethan before.
Quoted 7 lines
Quoted 3 lines
*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
You only need the latter. Whether to compile it is decided by config-all-devices.mak, but that file is automatically generated by looking at all targets.
I was referring to hw-obj-$(CONFIG_FOO) in hw/Makefile.objs and CONFIG_USES_FOO_IF_ENABLED=y in default-configs/ppc64-softmmu.mak.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
02.07.2012 20:36, Paolo Bonzini пишет:
Quoted 6 lines
Il 21/06/2012 16:04, Andreas Färber ha scritto:
Quoted 5 lines
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different
Makefilethan before.
Quoted 7 lines
Quoted 3 lines
*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
You only need the latter. Whether to compile it is decided by config-all-devices.mak, but that file is automatically generated by looking at all targets.
At the moment, VFIO has #ifdef TARGET_PPC64 so it should be compiled per target, i.e. the first way. Or not?
Signature · 3 lines
With best regards Alexey Kardashevskiy -- icq: 52150396
Am 02.07.2012 14:10, schrieb Alexey Kardashevskiy:
Quoted 11 lines
02.07.2012 20:36, Paolo Bonzini пишет:
Quoted 10 lines
Il 21/06/2012 16:04, Andreas Färber ha scritto:
Quoted 8 lines
*If* the file is built per target (hw/ppc64/Makefile.objs), then you can use *-softmmu/config-target.mak and just need to use a different
Makefilethan before.*If* the file is built per libhw (hw/Makefile.objs), then you need one option whether to compile it and another for whether to link it into a particular target.
Quoted 6 lines
Quoted 3 lines
You only need the latter. Whether to compile it is decided by config-all-devices.mak, but that file is automatically generated by looking at all targets.
At the moment, VFIO has #ifdef
TARGET_PPC64so it should be compiled per target, i.e. the first way. Or not?
Yes, I believe so.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg