Hello Avi,

seems that I mixed up the slot initialization, instead of making the first 
slot always 0 I made it always 1. Lets go back to Carstens variant, since I 
dont like nested ifdefs. The compiler will remove the dead code anyway.

Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]>

---
 libkvm.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: libkvm/libkvm.c
===================================================================
--- libkvm.orig/libkvm.c
+++ libkvm/libkvm.c
@@ -78,7 +78,7 @@ int get_free_slot(kvm_context_t kvm)
        int i;
        int tss_ext;
 
-#if defined(KVM_CAP_SET_TSS_ADDR) && !defined(__s390__)
+#if defined(KVM_CAP_SET_TSS_ADDR)
        tss_ext = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_SET_TSS_ADDR);
 #else
        tss_ext = 0;
@@ -92,8 +92,11 @@ int get_free_slot(kvm_context_t kvm)
        if (tss_ext > 0)
                i = 0;
        else
+#if !defined(__s390__)
                i = 1;
-
+#else
+               i = 0;
+#endif
        for (; i < KVM_MAX_NUM_MEM_REGIONS; ++i)
                if (!slots[i].len)
                        return i;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to