KVM: ppc: refactor instruction emulation into generic and core-specific pieces

Cores provide 3 emulation hooks, implemented for example in the new
4xx_emulate.c:
kvmppc_core_emulate_op
kvmppc_core_emulate_mtspr
kvmppc_core_emulate_mfspr

Strictly speaking the last two aren't necessary, but provide for more
informative error reporting ("unknown SPR").

Long term I'd like to have instruction decoding autogenerated from tables of
opcodes, and that way we could aggregate universal, Book E, and core-specific
instructions more easily and without redundant switch statements.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
这个提交包含在:
Hollis Blanchard
2008-11-05 09:36:16 -06:00
提交者 Avi Kivity
父节点 c381a04313
当前提交 75f74f0dbe
修改 8 个文件,包含 415 行新增276 行删除

查看文件

@@ -29,6 +29,7 @@
#include <asm/kvm_ppc.h>
#include <asm/cacheflush.h>
#include "booke.h"
#include "44x_tlb.h"
unsigned long kvmppc_booke_handlers;