summaryrefslogtreecommitdiffstats
path: root/test/kvm-targetstep_guest.S
blob: 6625c54da07c63871e9515867b5fdf0192ea5f39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "cachepc/const.h"

#define TARGET_SET 15

.text
.align(16)
.code16gcc

guest:
.rept L1_LINESIZE * L1_SETS * 2
    nop
.endr

    mov $0, %cx
    mov $CPC_GUEST_START_TRACK, %bx
    mov $KVM_HC_CPC_VMMCALL_SIGNAL, %ax
    vmmcall

    mov $(L1_LINESIZE * (L1_SETS + 11)), %bx
    movb (%bx), %bl

    mov $(L1_LINESIZE * (L1_SETS + 13)), %bx
    movb (%bx), %bl

    mov $(L1_LINESIZE * (L1_SETS + 15)), %bx
    movb (%bx), %bl

    # this should only be partially single-stepped if
    # single-stepping is limited to the first page
.rept L1_LINESIZE * L1_SETS * 2
    nop
.endr

    mov $0, %cx
    mov $CPC_GUEST_STOP_TRACK, %bx
    mov $KVM_HC_CPC_VMMCALL_SIGNAL, %ax
    vmmcall

    jmp guest