Avi Kivity wrote:
Christian Borntraeger wrote:
Am Dienstag, 29. Juli 2008 schrieb Avi Kivity:
They all start with 0 AFAIK (kvm also starts with 0, it just wants it to be a special slot).

Now my brain hurts....
Ok, so I read this as: ppc, ia64 and s390 can start with slot 0 and it is not a special slot.
On x86 slot 0 is special, if
* KVM_CAP_SET_TSS_ADDR is not available
or
* The ioctl VM_CAP_SET_TSS_ADDR returns <=0


I think this is right.  Izik can you confirm?

yea kernels that dont have KVM_CAP_SET_TSS_ADDR should be treated like that.


+#if defined(__x86_64__) || defined(__i386__)
+#if defined(KVM_CAP_SET_TSS_ADDR)
+    if (ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_SET_TSS_ADDR) > 0)

Should be <= here?

+        i++;
+#else
+    i++;
+#endif
+#endif

Suggest a helper, kvm_supports_set_tss_addr(), to reduce further braindamage.


--
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