Skip to content
Snippets Groups Projects
  • Bibo Mao's avatar
    6bdbb73d
    LoongArch: KVM: Fix GPA size issue about VM · 6bdbb73d
    Bibo Mao authored
    
    Physical address space is 48 bit on Loongson-3A5000 physical machine,
    however it is 47 bit for VM on Loongson-3A5000 system. Size of physical
    address space of VM is the same with the size of virtual user space (a
    half) of physical machine.
    
    Variable cpu_vabits represents user address space, kernel address space
    is not included (user space and kernel space are both a half of total).
    Here cpu_vabits, rather than cpu_vabits - 1, is to represent the size of
    guest physical address space.
    
    Also there is strict checking about page fault GPA address, inject error
    if it is larger than maximum GPA address of VM.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    6bdbb73d
    History
    LoongArch: KVM: Fix GPA size issue about VM
    Bibo Mao authored
    
    Physical address space is 48 bit on Loongson-3A5000 physical machine,
    however it is 47 bit for VM on Loongson-3A5000 system. Size of physical
    address space of VM is the same with the size of virtual user space (a
    half) of physical machine.
    
    Variable cpu_vabits represents user address space, kernel address space
    is not included (user space and kernel space are both a half of total).
    Here cpu_vabits, rather than cpu_vabits - 1, is to represent the size of
    guest physical address space.
    
    Also there is strict checking about page fault GPA address, inject error
    if it is larger than maximum GPA address of VM.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>