On 01.12.2017 12:10, Darren Anderson wrote: > Hi, > > I'm having a slight problem with some user space code that I have > written which causes an error. > > When I attempt to map more than 67 pages of host memory into the > guest, KVM_CREATE_VCPU fails. Please see the link below for a small > test that I have written which causes the problem. > > https://pastebin.com/qjZJ5MMN > > Note that I am using an Intel Core i7 7500U CPU. My kernel version is > 4.10.0-40 (x64). > > I would appreciate any help or advice that you can offer. You try to create a memory slot where we already have a private memory slot. Start address you want: 0xfffbc000 Start address of EPT identity tables (default): 0xfffbc000 Also see 726b99c4f73c ("KVM: x86: document special identity map address value"). There is a way to change the address of the EPT identity tables. diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index e63a35f..22bc5a0 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1124,6 +1124,9 @@ 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. +Setting the address to 0 will result in resetting the address to its default +(0xfffbc000). + This ioctl is required on Intel-based hosts. This is needed on Intel hardware because of a quirk in the virtualization implementation (see the internals documentation when it pops into existence). > > Kind Regards, > Darren Anderson > -- Thanks, David / dhildenb