8000 KVM_32BIT_GAP · Issue #2 · kvmtool/kvmtool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

KVM_32BIT_GAP #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
evrim opened this issue Aug 27, 2017 · 0 comments
Open

KVM_32BIT_GAP #2

evrim opened this issue Aug 27, 2017 · 0 comments

Comments

@evrim
Copy link
evrim commented Aug 27, 2017

Hello,

kvm.c<x86> reads:

  80 │ /*                                                                                                                     
  81 │  * Allocating RAM size bigger than 4GB requires us to leave a gap                                                      
  82 │  * in the RAM which is used for PCI MMIO, hotplug, and unconfigured                                                    
  83 │  * devices (see documentation of e820_setup_gap() for details).                                                        
  84 │  *                                                                                                                     
  85 │  * If we're required to initialize RAM bigger than 4GB, we will create                                                 
  86 │  * a gap between 0xe0000000 and 0x100000000 in the guest virtual mem space.                                            
  87 │  */
  88 │ 
  89 │ void kvm__init_ram(struct kvm *kvm)                                                                                    
  90 │ {                                                                                                                      
  91 │     u64 phys_start, phys_size;                                                                                         
  92 │     void    *host_mem;                                   

kvm-arch.h<x86> reads:

   9 │ 
  10 │ /*                                                                                                                     
  11 │  * The hole includes VESA framebuffer and PCI memory.                                                                  
  12 │  */
  13 │ #define KVM_32BIT_MAX_MEM_SIZE  (1ULL << 32)                                      
  14 │ #define KVM_32BIT_GAP_SIZE  (768 << 20)                                       
  15 │ #define KVM_32BIT_GAP_START (KVM_32BIT_MAX_MEM_SIZE - KVM_32BIT_GAP_SIZE) 
  17 │ #define KVM_MMIO_START      KVM_32BIT_GAP_START

Gdb tells:

(gdb) p/x (1ULL << 32) - (768 << 20)
$1 = 0xd0000000

confused ⭕️

best,
evrim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0