[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 08/13] pseries: Small cleanup to H_CEDE implementation
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 08/13] pseries: Small cleanup to H_CEDE implementation |
Date: |
Thu, 13 Sep 2012 12:57:16 +1000 |
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>
---
hw/spapr_hcall.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/spapr_hcall.c b/hw/spapr_hcall.c
index a5990a9..407791d 100644
--- a/hw/spapr_hcall.c
+++ b/hw/spapr_hcall.c
@@ -545,6 +545,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.7.10.4
- [Qemu-ppc] [PATCH 09/13] pseries: Remove C bitfields from xics code, (continued)
- [Qemu-ppc] [PATCH 09/13] pseries: Remove C bitfields from xics code, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 02/13] pseries: Fix and cleanup CPU initialization and reset, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 10/13] pseries: Remove XICS irq type enum type, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 07/13] pseries: Fix XICS reset, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 03/13] pseries: Use new method to correct reset sequence, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 06/13] pseries: Reset emulated PCI TCE tables on system reset, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 05/13] pseries: Clear TCE and signal state when resetting PAPR VIO devices, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 11/13] pseries: Remove never used flags field from spapr vio devices, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 08/13] pseries: Small cleanup to H_CEDE implementation,
David Gibson <=
- [Qemu-ppc] [PATCH 01/13] ppc: Make kvm_arch_put_registers() put *all* the registers, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 12/13] pseries: Rework implementation of TCE bypass, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 04/13] pseries: Add support for new KVM hash table control call, David Gibson, 2012/09/12
- [Qemu-ppc] [PATCH 13/13] pseries: Fix semantics of RTAS int-on, int-off and set-xive functions, David Gibson, 2012/09/12
- Re: [Qemu-ppc] [0/13] pseries patch queue, Alexander Graf, 2012/09/19