Avi Kivity kirjoitti:
On 03/25/2010 12:36 PM, Pekka Enberg wrote:
+4.35 KVM_SET_TSS_ADDR
+
+Capability: KVM_CAP_SET_TSS_ADDR
+Architectures: x86
+Type: vm ioctl
+Parameters: unsigned long tss_address (in)
+Returns: 0 on success, -1 on error
+
+This ioctl defines the physical address of a three-page region in
the guest
+physical address space. The region must be within the first 4GB of the
+guest physical address space and must not conflict with any memory slot
+or any mmio address. The guest may malfunction if it accesses this
memory
+region.
+
+This ioctl is required on Intel-based hosts.
I don't quite understand what it's _used for_ from the above
description. I assume it's about task state segment...?
It's a quirk in the Intel implementation of hardware virtualization
extensions. You cannot enter guest mode in vmx with the guest cr0.pe
cleared (i.e. real mode), so kvm enters the guest in vm86 mode which is
fairly similar and tries to massage things so it looks to the guest as
if it is running in real mode. Unfortunately, vm86 mode requires a task
state segment in the address space, and there is no way for us to hide
it. kvm doesn't know anything about the guest physical memory map, so
it has to rely on userspace to supply an unused region.
I don't think such a technical description of an implementation detail
has a place in the API reference; maybe in internal documentation.
Sure but it would be nice to have something along the lines of "This is
needed on Intel hardware because of a quirk in the virtualization
implementation" and maybe point the reader to a more appropriate
document (internals document, Intel manuals, ...).
Pekka
--
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