Intel seems to have accepted this state of affairs. On newer chips, it is much faster to enable and disable virtualization.
How Intel Virtualisation Works
11–20 of 32 posts
Re: How Intel Virtualisation Works
#12Last I checked, every virtualization driver ignored Intel's overcomplicated design choice. They don't keep things going; if they did then they would clash with each other. Instead, they fully shut down virtualization when the VM isn't running code. Intel seems to have accepted this state of affairs. On newer chips, it is much faster to enable and disable virtualization.
Re: How Intel Virtualisation Works
#13It's weird to read a blog post about software that you know in and out. There are a few inaccuracies here and there but it's very clear and well done. Kudos!
thank you that means a lot! please do add any information you think is relevant :)
Also, after moving a VMCS from a physical CPU to another you have to do VMLAUNCH the first time your start the guest on the new CPU, because you had VMCLEARed it on the old CPU. That's it. :-)
Re: How Intel Virtualisation Works
#14Last I checked, every virtualization driver ignored Intel's overcomplicated design choice. They don't keep things going; if they did then they would clash with each other. Instead, they fully shut down virtualization when the VM isn't running code. Intel seems to have accepted this state of affairs. On newer chips, it is much faster to enable and disable virtualization.
No, this is not true. KVM always keeps VMX on, Xen too even when running paravirtualized guests, Hyper-V does not even have a concept of "the VM not running code". Maybe VMware Workstation and VirtualBox?
Re: How Intel Virtualisation Works
#15I haven't read this article yet, but this is more or less the best moment to showcase you guys what a friend of mine made. I think it's really cool. He created a memory allocator in which it is impossible to create dangling pointers. He used it by becoming the kernel through Intel VT-x (i.e. he uses ring 0). He uses libdune for this, which in turn uses Intel VT-x. Check it out at: https://dangless.gaborkozar.me/ I'm…
This is probably interesting enough for its own post.
Re: How Intel Virtualisation Works
#16I haven't read this article yet, but this is more or less the best moment to showcase you guys what a friend of mine made. I think it's really cool. He created a memory allocator in which it is impossible to create dangling pointers. He used it by becoming the kernel through Intel VT-x (i.e. he uses ring 0). He uses libdune for this, which in turn uses Intel VT-x. Check it out at: https://dangless.gaborkozar.me/ I'm…
I'm surprised that doesn't have a larger performance cost, since it's requiring a TLB entry for each memory allocation. I wonder if the benchmarks understate the cost due to being undersized for modern systems.
For what workload?
Re: How Intel Virtualisation Works
#17I haven't read this article yet, but this is more or less the best moment to showcase you guys what a friend of mine made. I think it's really cool. He created a memory allocator in which it is impossible to create dangling pointers. He used it by becoming the kernel through Intel VT-x (i.e. he uses ring 0). He uses libdune for this, which in turn uses Intel VT-x. Check it out at: https://dangless.gaborkozar.me/ I'm…
https://en.wikipedia.org/wiki/Intel_iAPX_432#Object-oriented...
Re: How Intel Virtualisation Works
#18Last I checked, every virtualization driver ignored Intel's overcomplicated design choice. They don't keep things going; if they did then they would clash with each other. Instead, they fully shut down virtualization when the VM isn't running code. Intel seems to have accepted this state of affairs. On newer chips, it is much faster to enable and disable virtualization.
What mainframes have done for years and modern PC VMs do, is type 1 virtualization, whereas stuff like Virtual Box is type 2 virtualization.
Re: How Intel Virtualisation Works
#19Last I checked, every virtualization driver ignored Intel's overcomplicated design choice. They don't keep things going; if they did then they would clash with each other. Instead, they fully shut down virtualization when the VM isn't running code. Intel seems to have accepted this state of affairs. On newer chips, it is much faster to enable and disable virtualization.
No, this is not true. KVM always keeps VMX on, Xen too even when running paravirtualized guests, Hyper-V does not even have a concept of "the VM not running code". Maybe VMware Workstation and VirtualBox?
We could be talking past each other. Here, to clarify, are 3 methods:
x. The driver never does VMXOFF.
y. The driver does VMXON when asked to run a guest. The driver may handle events from the guest (such as page faults or CPUID emulation) without doing VMXOFF, but the driver will do a VMXOFF prior to letting other host processes and drivers run.
z. The driver does VMXOFF every time the VM exits.
We found that choice x was not normally used. If it were, then VMX drivers would not be able to coexist with each other. I'm not saying that everybody uses choice z. Choice y is probably also popular.
Re: How Intel Virtualisation Works
#20Earlier quoted context omitted.
thank you that means a lot! please do add any information you think is relevant :)
The bit about TLBs is a bit confusing, it seems like you're taking about a software TLB but EPT is just a second layer of address translation. Also, after moving a VMCS from a physical CPU to another you have to do VMLAUNCH the first time your start the guest on the new CPU, because you had VMCLEARed it on the old CPU. That's it. :-)