• Laurent Vivier's avatar
    KVM: SVM: Let gcc to choose which registers to save (x86_64) · 54a08c04
    Laurent Vivier authored
    This patch lets GCC to determine which registers to save when we
    switch to/from a VCPU in the case of AMD x86_64.
    
    * Original code saves following registers:
    
        rbx, rcx, rdx, rsi, rdi, rbp,
        r8, r9, r10, r11, r12, r13, r14, r15
    
    * Patched code:
    
      - informs GCC that we modify following registers
        using the clobber description:
    
        rbx, rcx, rdx, rsi, rdi
        r8, r9, r10, r11, r12, r13, r14, r15
    
      - rbp is saved (pop/push) because GCC seems to ignore its use in the clobber
        description.
    Signed-off-by: default avatarLaurent Vivier <Laurent.Vivier@bull.net>
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    54a08c04
svm.c 43.1 KB