Patchwork Re: [PATCH 2/2] ivshmem: Fix compilation without kvm

login
register
mail settings
Submitter Paolo Bonzini
Date Aug. 11, 2010, 5:05 p.m.
Message ID <4C62D84C.5020405@redhat.com>
Download mbox | patch
Permalink /patch/61490/
State New
Headers show

Comments

Paolo Bonzini - Aug. 11, 2010, 5:05 p.m.
On 08/11/2010 03:38 AM, Stefan Weil wrote:
> kvm_set_ioeventfd_mmio_long is only available with CONFIG_KVM.

We should just disable ivshmem for non-KVM


because it is also breaking Windows builds.

Alternatively, the right way to do what this patch does, is to add 
kvm_set_ioeventfd_mmio_long to kvm-stub.c, and to use 
"obj-$(CONFIG_POSIX) += ivshmem.o" in the makefile to work around the 
Windows build problems.

Paolo
Blue Swirl - Aug. 11, 2010, 5:18 p.m.
On Wed, Aug 11, 2010 at 5:05 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 08/11/2010 03:38 AM, Stefan Weil wrote:
>>
>> kvm_set_ioeventfd_mmio_long is only available with CONFIG_KVM.
>
> We should just disable ivshmem for non-KVM
>
> diff --git a/Makefile.target b/Makefile.target
> index b791492..c8281e9 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -191,7 +191,7 @@ obj-y += rtl8139.o
>  obj-y += e1000.o
>
>  # Inter-VM PCI shared memory
> -obj-y += ivshmem.o
> +obj-$(CONFIG_KVM) += ivshmem.o
>
>  # Hardware support
>  obj-i386-y += vga.o
>
> because it is also breaking Windows builds.
>
> Alternatively, the right way to do what this patch does, is to add
> kvm_set_ioeventfd_mmio_long to kvm-stub.c, and to use "obj-$(CONFIG_POSIX)
> += ivshmem.o" in the makefile to work around the Windows build problems.

This patch fixes mingw32 build for me.
Cam Macdonell - Aug. 11, 2010, 5:58 p.m.
On Wed, Aug 11, 2010 at 1:05 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 08/11/2010 03:38 AM, Stefan Weil wrote:
>>
>> kvm_set_ioeventfd_mmio_long is only available with CONFIG_KVM.
>
> We should just disable ivshmem for non-KVM
>
> diff --git a/Makefile.target b/Makefile.target
> index b791492..c8281e9 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -191,7 +191,7 @@ obj-y += rtl8139.o
>  obj-y += e1000.o
>
>  # Inter-VM PCI shared memory
> -obj-y += ivshmem.o
> +obj-$(CONFIG_KVM) += ivshmem.o
>
>  # Hardware support
>  obj-i386-y += vga.o
>
> because it is also breaking Windows builds.
>
> Alternatively, the right way to do what this patch does, is to add
> kvm_set_ioeventfd_mmio_long to kvm-stub.c, and to use "obj-$(CONFIG_POSIX)
> += ivshmem.o" in the makefile to work around the Windows build problems.
>

I think we decided to disable it on non-KVM systems to avoid people
stumbling into atomicity issues with emulation.

> Paolo
>
>
Paolo Bonzini - Aug. 11, 2010, 6:11 p.m.
On 08/11/2010 01:18 PM, Blue Swirl wrote:
> On Wed, Aug 11, 2010 at 5:05 PM, Paolo Bonzini<pbonzini@redhat.com>  wrote:
>> On 08/11/2010 03:38 AM, Stefan Weil wrote:
>>>
>>> kvm_set_ioeventfd_mmio_long is only available with CONFIG_KVM.
>>
>> We should just disable ivshmem for non-KVM
>>
>> diff --git a/Makefile.target b/Makefile.target
>> index b791492..c8281e9 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -191,7 +191,7 @@ obj-y += rtl8139.o
>>   obj-y += e1000.o
>>
>>   # Inter-VM PCI shared memory
>> -obj-y += ivshmem.o
>> +obj-$(CONFIG_KVM) += ivshmem.o
>>
>>   # Hardware support
>>   obj-i386-y += vga.o
>>
>> because it is also breaking Windows builds.
>>
>> Alternatively, the right way to do what this patch does, is to add
>> kvm_set_ioeventfd_mmio_long to kvm-stub.c, and to use "obj-$(CONFIG_POSIX)
>> += ivshmem.o" in the makefile to work around the Windows build problems.
>
> This patch fixes mingw32 build for me.

Looks fine.

Paolo

Patch

diff --git a/Makefile.target b/Makefile.target
index b791492..c8281e9 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -191,7 +191,7 @@  obj-y += rtl8139.o
  obj-y += e1000.o

  # Inter-VM PCI shared memory
-obj-y += ivshmem.o
+obj-$(CONFIG_KVM) += ivshmem.o

  # Hardware support
  obj-i386-y += vga.o