mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
spapr_hcall: Fix little-endian resource handling in H_SET_MODE
This changes resource code definitions to ones used in the host kernel. This fixes H_SET_MODE_RESOURCE_LE (switch between big endian and little endian) to sync registers from KVM before changing LPCR value. This adds a set_spr() helper to update an SPR in a CPU's context to avoid possible races and makes use of it to change LPCR. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
df99d30d4e
commit
a46622fd07
2 changed files with 40 additions and 10 deletions
|
@ -153,8 +153,13 @@ typedef struct sPAPREnvironment {
|
|||
#define H_PP1 (1ULL<<(63-62))
|
||||
#define H_PP2 (1ULL<<(63-63))
|
||||
|
||||
/* H_SET_MODE flags */
|
||||
#define H_SET_MODE_ENDIAN 4
|
||||
/* Values for 2nd argument to H_SET_MODE */
|
||||
#define H_SET_MODE_RESOURCE_SET_CIABR 1
|
||||
#define H_SET_MODE_RESOURCE_SET_DAWR 2
|
||||
#define H_SET_MODE_RESOURCE_ADDR_TRANS_MODE 3
|
||||
#define H_SET_MODE_RESOURCE_LE 4
|
||||
|
||||
/* Flags for H_SET_MODE_RESOURCE_LE */
|
||||
#define H_SET_MODE_ENDIAN_BIG 0
|
||||
#define H_SET_MODE_ENDIAN_LITTLE 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue