KVM: PPC: ev_idle hcall support for e500 guests
Signed-off-by: Liu Yu <yu.liu@freescale.com> [varun: 64-bit changes] Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:

committed by
Alexander Graf

parent
9202e07636
commit
2f979de8a7
@@ -21,6 +21,10 @@
|
||||
#include <asm/epapr_hcalls.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/code-patching.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
extern void epapr_ev_idle(void);
|
||||
extern u32 epapr_ev_idle_start[];
|
||||
|
||||
bool epapr_paravirt_enabled;
|
||||
|
||||
@@ -41,8 +45,13 @@ static int __init epapr_paravirt_init(void)
|
||||
if (len % 4 || len > (4 * 4))
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0; i < (len / 4); i++)
|
||||
for (i = 0; i < (len / 4); i++) {
|
||||
patch_instruction(epapr_hypercall_start + i, insts[i]);
|
||||
patch_instruction(epapr_ev_idle_start + i, insts[i]);
|
||||
}
|
||||
|
||||
if (of_get_property(hyper_node, "has-idle", NULL))
|
||||
ppc_md.power_save = epapr_ev_idle;
|
||||
|
||||
epapr_paravirt_enabled = true;
|
||||
|
||||
|
Reference in New Issue
Block a user