All of lore.kernel.org
 help / color / mirror / Atom feed
* KVM_CREATE_VCPU fails on mapping more than 67 pages of host memory into guest
@ 2017-12-01 11:10 Darren Anderson
  2017-12-04  9:20 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Darren Anderson @ 2017-12-01 11:10 UTC (permalink / raw)
  To: kvm

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.

Kind Regards,
Darren Anderson

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: KVM_CREATE_VCPU fails on mapping more than 67 pages of host memory into guest
  2017-12-01 11:10 KVM_CREATE_VCPU fails on mapping more than 67 pages of host memory into guest Darren Anderson
@ 2017-12-04  9:20 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2017-12-04  9:20 UTC (permalink / raw)
  To: Darren Anderson, kvm

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-04  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 11:10 KVM_CREATE_VCPU fails on mapping more than 67 pages of host memory into guest Darren Anderson
2017-12-04  9:20 ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.