[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb. |
Date: |
Thu, 11 Dec 2008 23:19:08 +0200 |
On 12/11/08, Hollis Blanchard <address@hidden> wrote:
> Implement hooks called by generic KVM code.
>
> Also add code that will copy the host's CPU and timebase frequencies to the
> guest, which is necessary on KVM because the guest can directly access the
> timebase.
>
> Signed-off-by: Hollis Blanchard <address@hidden>
> +int kvm_arch_put_registers(CPUState *env)
> +{
> + struct kvm_regs regs;
> + int ret;
> + int i;
> +
> + ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
> + if (ret < 0)
> + return ret;
> +
> + /* cr is untouched in qemu and not existant in CPUState fr ppr */
> + /* hflags is a morphed to MSR on ppc, no need to sync that down to
> kvm */
> +
> + regs.pc = env->nip;
> +
> + regs.ctr = env->ctr;
> + regs.lr = env->lr;
> + regs.xer = env->xer;
> + regs.msr = env->msr;
> +
> + regs.srr0 = env->spr[SPR_SRR0];
> + regs.srr1 = env->spr[SPR_SRR1];
> +
> + regs.sprg0 = env->spr[SPR_SPRG0];
> + regs.sprg1 = env->spr[SPR_SPRG1];
> + regs.sprg2 = env->spr[SPR_SPRG2];
> + regs.sprg3 = env->spr[SPR_SPRG3];
> + regs.sprg4 = env->spr[SPR_SPRG4];
> + regs.sprg5 = env->spr[SPR_SPRG5];
> + regs.sprg6 = env->spr[SPR_SPRG6];
> + regs.sprg7 = env->spr[SPR_SPRG7];
> +
> + for (i = 0;i < 32; i++)
> + regs.gpr[i] = env->gpr[i];
> +
> + ret = kvm_vcpu_ioctl(env, KVM_SET_REGS, ®s);
> + if (ret < 0)
> + return ret;
> +
> + return ret;
> +}
Maybe this is a dumb question, but why don't you get/put floating
point registers?
> +#include "device_tree.h"
The sequencing is not correct, you introduce FDT in #4.
- [Qemu-devel] Re: [PATCH 2/6] kvm: sync vcpu state during initialization, (continued)
- [Qemu-devel] Re: [PATCH 2/6] kvm: sync vcpu state during initialization, Hollis Blanchard, 2008/12/11
- Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization, Anthony Liguori, 2008/12/11
- Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization, Hollis Blanchard, 2008/12/12
- Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization, Hollis Blanchard, 2008/12/12
- Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization, Anthony Liguori, 2008/12/13
[Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb., Hollis Blanchard, 2008/12/11
Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.,
Blue Swirl <=
Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb., Hollis Blanchard, 2008/12/11
[Qemu-devel] [PATCH 5/6] PowerPC 440EP SoC emulation, Hollis Blanchard, 2008/12/11
[Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation, Hollis Blanchard, 2008/12/11