• Xiantao Zhang's avatar
    KVM: ia64: Re-organize data sturure of guests' data area · a917f7af
    Xiantao Zhang authored
    1. Increase the size of data area to 64M
    2. Support more vcpus and memory, 128 vcpus and 256G memory are supported
       for guests.
    3. Add the boundary check for memory and vcpu allocation.
    
    With this patch, kvm guest's data area looks as follow:
      *
      *            +----------------------+  ------- KVM_VM_DATA_SIZE
      *            |     vcpu[n]'s data   |   |     ___________________KVM_STK_OFFSET
      *            |                      |   |    /                   |
      *            |        ..........    |   |   /vcpu's struct&stack |
      *            |        ..........    |   |  /---------------------|---- 0
      *            |     vcpu[5]'s data   |   | /       vpd            |
      *            |     vcpu[4]'s data   |   |/-----------------------|
      *            |     vcpu[3]'s data   |   /         vtlb           |
      *            |     vcpu[2]'s data   |  /|------------------------|
      *            |     vcpu[1]'s data   |/  |         vhpt           |
      *            |     vcpu[0]'s data   |____________________________|
      *            +----------------------+   |
      *            |    memory dirty log  |   |
      *            +----------------------+   |
      *            |    vm's data struct  |   |
      *            +----------------------+   |
      *            |                      |   |
      *            |                      |   |
      *            |                      |   |
      *            |                      |   |
      *            |                      |   |
      *            |                      |   |
      *            |                      |   |
      *            |   vm's p2m table  |      |
      *            |                      |   |
      *            |                      |   |
      *            |                      |   |  |
      * vm's data->|                      |   |  |
      *            +----------------------+ ------- 0
      * To support large memory, needs to increase the size of p2m.
      * To support more vcpus, needs to ensure it has enough space to
      * hold vcpus' data.
      */
    Signed-off-by: default avatarXiantao Zhang <xiantao.zhang@intel.com>
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    a917f7af
kvm_host.h 16 KB