aboutsummaryrefslogtreecommitdiff
path: root/pc-bios
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-02-17 18:31:20 +0100
committerAvi Kivity <avi@redhat.com>2012-02-18 12:16:00 +0200
commit1189aa519ca9d088e3cc6fb621c2690a20077495 (patch)
tree34f6a568d2ccf5927b913963a50612c63c8407a6 /pc-bios
parente5ad936b0fd7dfd7fd7908be6f9f1ca88f63b96b (diff)
kvmvapic: Simplify mp/up_set_tpr
The CH registers is only written, never read. So we can remove these operations and, in case of up_set_tpr, also the ECX push/pop. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/optionrom/kvmvapic.S6
1 files changed, 1 insertions, 5 deletions
diff --git a/pc-bios/optionrom/kvmvapic.S b/pc-bios/optionrom/kvmvapic.S
index e1d8f1825b..856c1e519d 100644
--- a/pc-bios/optionrom/kvmvapic.S
+++ b/pc-bios/optionrom/kvmvapic.S
@@ -202,7 +202,6 @@ mp_isr_is_bigger:
mov %bh, %bl
mp_tpr_is_bigger:
/* %bl = ppr */
- mov %bl, %ch /* ch = ppr */
rol $8, %ebx
/* now: %bl = irr, %bh = ppr */
cmp %bh, %bl
@@ -276,7 +275,6 @@ up_set_tpr_eax:
up_set_tpr:
pushf
push %eax
- push %ecx
push %ebx
reenable_vtpr
@@ -284,7 +282,7 @@ up_set_tpr_failed:
mov vapic, %eax ; fixup
mov %eax, %ebx
- mov 20(%esp), %bl
+ mov 16(%esp), %bl
/* %ebx = new vapic (%bl = tpr, %bh = isr, %b3 = irr) */
@@ -298,7 +296,6 @@ up_isr_is_bigger:
mov %bh, %bl
up_tpr_is_bigger:
/* %bl = ppr */
- mov %bl, %ch /* ch = ppr */
rol $8, %ebx
/* now: %bl = irr, %bh = ppr */
cmp %bh, %bl
@@ -306,7 +303,6 @@ up_tpr_is_bigger:
up_set_tpr_out:
pop %ebx
- pop %ecx
pop %eax
popf
ret $4