On Thursday 04 November 2010 17:47:58 Michael S. Tsirkin wrote: > On Thu, Nov 04, 2010 at 02:18:19PM +0800, Sheng Yang wrote: > > Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx> > > --- > > > > qemu-kvm.c | 15 +++++++++++++++ > > qemu-kvm.h | 6 ++++++ > > 2 files changed, 21 insertions(+), 0 deletions(-) > > > > diff --git a/qemu-kvm.c b/qemu-kvm.c > > index 733d0a9..ba6db51 100644 > > --- a/qemu-kvm.c > > +++ b/qemu-kvm.c > > @@ -1092,6 +1092,21 @@ int kvm_assign_set_msix_entry(kvm_context_t kvm, > > > > { > > > > return kvm_vm_ioctl(kvm_state, KVM_ASSIGN_SET_MSIX_ENTRY, entry); > > > > } > > > > + > > +#ifdef KVM_CAP_DEVICE_MSIX_MASK > > +int kvm_assign_get_msix_entry(kvm_context_t kvm, > > + struct kvm_assigned_msix_entry *entry) > > +{ > > + return kvm_vm_ioctl(kvm_state, KVM_ASSIGN_GET_MSIX_ENTRY, entry); > > +} > > + > > +int kvm_assign_reg_msix_mmio(kvm_context_t kvm, > > + struct kvm_assigned_msix_mmio *msix_mmio) > > +{ > > + return kvm_vm_ioctl(kvm_state, KVM_ASSIGN_REG_MSIX_MMIO, msix_mmio); > > +} > > +#endif > > + > > > > #endif > > > > #if defined(KVM_CAP_IRQFD) && defined(CONFIG_EVENTFD) > > > > diff --git a/qemu-kvm.h b/qemu-kvm.h > > index 9c08ab4..1afdd42 100644 > > --- a/qemu-kvm.h > > +++ b/qemu-kvm.h > > @@ -743,6 +743,12 @@ int kvm_assign_set_msix_nr(kvm_context_t kvm, > > > > struct kvm_assigned_msix_nr *msix_nr); > > > > int kvm_assign_set_msix_entry(kvm_context_t kvm, > > > > struct kvm_assigned_msix_entry *entry); > > > > +#ifdef KVM_CAP_DEVICE_MSIX_MASK > > +int kvm_assign_get_msix_entry(kvm_context_t kvm, > > + struct kvm_assigned_msix_entry *entry); > > +int kvm_assign_reg_msix_mmio(kvm_context_t kvm, > > + struct kvm_assigned_msix_mmio *msix_mmio); > > +#endif > > > > #endif > > > > #else /* !CONFIG_KVM */ > > We are trying to move away from using ifdefs. Stub these out instead? Example? -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html