diff mbox

[1/2] Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

Message ID 1281550583-11908-1-git-send-email-cam@cs.ualberta.ca
State New
Headers show

Commit Message

Cam Macdonell Aug. 11, 2010, 6:16 p.m. UTC
---
 kvm-stub.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Stefan Weil Aug. 11, 2010, 6:28 p.m. UTC | #1
Am 11.08.2010 20:16, schrieb Cam Macdonell:
> ---
> kvm-stub.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/kvm-stub.c b/kvm-stub.c
> index 3378bd3..d45f9fa 100644
> --- a/kvm-stub.c
> +++ b/kvm-stub.c
> @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t 
> addr, uint16_t val, bool assign)
> {
> return -ENOSYS;
> }
> +
> +int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, 
> bool assign)
> +{
> + return -ENOSYS;
> +}

Your 2nd patch disables build of ivshmem.o on non-kvm systems.
Only ivshmem.c was using kvm_set_ioeventfd_mmio_long, so
up to now, no dummy function in kvm-stub.c is needed.

Regards
Stefan
Cam Macdonell Aug. 11, 2010, 6:32 p.m. UTC | #2
On Wed, Aug 11, 2010 at 2:28 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 11.08.2010 20:16, schrieb Cam Macdonell:
>>
>> ---
>> kvm-stub.c | 5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/kvm-stub.c b/kvm-stub.c
>> index 3378bd3..d45f9fa 100644
>> --- a/kvm-stub.c
>> +++ b/kvm-stub.c
>> @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr,
>> uint16_t val, bool assign)
>> {
>> return -ENOSYS;
>> }
>> +
>> +int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, bool
>> assign)
>> +{
>> + return -ENOSYS;
>> +}
>
> Your 2nd patch disables build of ivshmem.o on non-kvm systems.
> Only ivshmem.c was using kvm_set_ioeventfd_mmio_long, so
> up to now, no dummy function in kvm-stub.c is needed.

Right. It can be left out for now if that's preferred.

Cam
Paolo Bonzini Aug. 11, 2010, 10:07 p.m. UTC | #3
On 08/11/2010 02:32 PM, Cam Macdonell wrote:
> On Wed, Aug 11, 2010 at 2:28 PM, Stefan Weil<weil@mail.berlios.de>  wrote:
>> Am 11.08.2010 20:16, schrieb Cam Macdonell:
>>>
>>> ---
>>> kvm-stub.c | 5 +++++
>>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/kvm-stub.c b/kvm-stub.c
>>> index 3378bd3..d45f9fa 100644
>>> --- a/kvm-stub.c
>>> +++ b/kvm-stub.c
>>> @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr,
>>> uint16_t val, bool assign)
>>> {
>>> return -ENOSYS;
>>> }
>>> +
>>> +int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, bool
>>> assign)
>>> +{
>>> + return -ENOSYS;
>>> +}
>>
>> Your 2nd patch disables build of ivshmem.o on non-kvm systems.
>> Only ivshmem.c was using kvm_set_ioeventfd_mmio_long, so
>> up to now, no dummy function in kvm-stub.c is needed.
>
> Right. It can be left out for now if that's preferred.

No, your patch is correct.  If kvm-stub.c is not complete, the build 
will break the next time someone uses one of those functions.

Paolo
Andreas Färber Aug. 14, 2010, 5:24 p.m. UTC | #4
Am 11.08.2010 um 20:16 schrieb Cam Macdonell:

> ---
> kvm-stub.c |    5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/kvm-stub.c b/kvm-stub.c
> index 3378bd3..d45f9fa 100644
> --- a/kvm-stub.c
> +++ b/kvm-stub.c
> @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t  
> addr, uint16_t val, bool assign)
> {
>     return -ENOSYS;
> }
> +
> +int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val,  
> bool assign)
> +{
> +    return -ENOSYS;
> +}
> -- 
> 1.6.2.5

Acked-by: Andreas Färber <andreas.faerber@web.de>

This fixes linking [1] on Mac OS X.

The patch is missing a Signed-off-by though, same for 2/2.

Andreas

[1]
   LINK  i386-softmmu/qemu
Undefined symbols:
  "_kvm_set_ioeventfd_mmio_long", referenced from:
      _ivshmem_read in ivshmem.o
      _ivshmem_read in ivshmem.o
      _ivshmem_mmio_map in ivshmem.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [qemu] Error 1
make: *** [subdir-i386-softmmu] Error 2
Cam Macdonell Aug. 14, 2010, 11:56 p.m. UTC | #5
On Sat, Aug 14, 2010 at 11:24 AM, Andreas Färber <andreas.faerber@web.de> wrote:
> Am 11.08.2010 um 20:16 schrieb Cam Macdonell:
>
>> ---
>> kvm-stub.c |    5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/kvm-stub.c b/kvm-stub.c
>> index 3378bd3..d45f9fa 100644
>> --- a/kvm-stub.c
>> +++ b/kvm-stub.c
>> @@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr,
>> uint16_t val, bool assign)
>> {
>>    return -ENOSYS;
>> }
>> +
>> +int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, bool
>> assign)
>> +{
>> +    return -ENOSYS;
>> +}
>> --
>> 1.6.2.5
>
> Acked-by: Andreas Färber <andreas.faerber@web.de>
>
> This fixes linking [1] on Mac OS X.
>
> The patch is missing a Signed-off-by though, same for 2/2.

I've re-sent with the sign-off.

Cam

>
> Andreas
>
> [1]
>  LINK  i386-softmmu/qemu
> Undefined symbols:
>  "_kvm_set_ioeventfd_mmio_long", referenced from:
>     _ivshmem_read in ivshmem.o
>     _ivshmem_read in ivshmem.o
>     _ivshmem_mmio_map in ivshmem.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[1]: *** [qemu] Error 1
> make: *** [subdir-i386-softmmu] Error 2
>
diff mbox

Patch

diff --git a/kvm-stub.c b/kvm-stub.c
index 3378bd3..d45f9fa 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -136,3 +136,8 @@  int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
 {
     return -ENOSYS;
 }
+
+int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, bool assign)
+{
+    return -ENOSYS;
+}