[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 17/34] pseries: Small cleanup to H_CEDE implementation
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 17/34] pseries: Small cleanup to H_CEDE implementation |
Date: |
Thu, 4 Oct 2012 15:56:39 +0200 |
From: David Gibson <address@hidden>
The H_CEDE hypercall implementation for the pseries machine doesn't trigger
quite the right path in the main cpu exec loop. We should set exit_request
to pop up one extra level and recheck state, and we should set the
exception_index to EXCP_HLT (H_CEDE is roughly equivalent to the hlt
instruction on x86).
In practice, this doesn't really matter except for KVM, and KVM implements
H_CEDE internally so we never hit this code path. But we might as well
get it right, just in case it matters some day.
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr_hcall.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/spapr_hcall.c b/hw/spapr_hcall.c
index abd847f..2df94d1 100644
--- a/hw/spapr_hcall.c
+++ b/hw/spapr_hcall.c
@@ -544,6 +544,8 @@ static target_ulong h_cede(CPUPPCState *env,
sPAPREnvironment *spapr,
hreg_compute_hflags(env);
if (!cpu_has_work(env)) {
env->halted = 1;
+ env->exception_index = EXCP_HLT;
+ env->exit_request = 1;
}
return H_SUCCESS;
}
--
1.6.0.2
- [Qemu-ppc] [PULL 00/34] ppc patch queue 2012-10-04, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 07/34] target-ppc: use the softfloat min/max functions, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 01/34] MAINTAINERS: Document sPAPR (pSeries) machine, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 02/34] MAINTAINERS: Document e500 machines and devices, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 05/34] MAINTAINERS: Document virtex_ml507 machine, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 03/34] MAINTAINERS: Downgrade ppc405 to Odd Fixes, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 06/34] target-ppc: simplify NaN propagation for vector functions, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 08/34] target-ppc: use the softfloat float32_muladd function, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 10/34] ppc: Make kvm_arch_put_registers() put *all* the registers, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 18/34] pseries: Remove C bitfields from xics code, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 17/34] pseries: Small cleanup to H_CEDE implementation,
Alexander Graf <=
- [Qemu-ppc] [PATCH 21/34] pseries: Rework implementation of TCE bypass, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 20/34] pseries: Remove never used flags field from spapr vio devices, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 14/34] pseries: Clear TCE and signal state when resetting PAPR VIO devices, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 29/34] fdt: move dumpdtb interpretation code to device_tree.c, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 26/34] pseries: Set hash table size based on RAM size, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 33/34] pseries: Don't test for MSR_PR for hypercalls under KVM, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 27/34] target-ppc: Remove unused power_mode field from cpu state, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 28/34] target-ppc: Extend FPU state for newer POWER CPUs, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 32/34] PPC: e500: calculate initrd_base like dt_base, Alexander Graf, 2012/10/04
- [Qemu-ppc] [PATCH 30/34] device tree: simplify dumpdtb code, Alexander Graf, 2012/10/04