* [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API
@ 2012-07-04 13:39 Michael Ellerman
2012-07-04 14:07 ` Alexander Graf
2012-07-04 20:03 ` Matt Evans
0 siblings, 2 replies; 4+ messages in thread
From: Michael Ellerman @ 2012-07-04 13:39 UTC (permalink / raw)
To: kvm; +Cc: penberg, levinsasha928, asias.hejun, agraf, matt
I think this code was based on an earlier version of the KVM_SET_ONE_REG
API, which at the time was in agraf's tree but not mainline?
Either way it doesn't compile as is, so fix it up.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
tools/kvm/powerpc/kvm-cpu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/kvm/powerpc/kvm-cpu.c b/tools/kvm/powerpc/kvm-cpu.c
index 2505c69..97fc759 100644
--- a/tools/kvm/powerpc/kvm-cpu.c
+++ b/tools/kvm/powerpc/kvm-cpu.c
@@ -137,6 +137,7 @@ static void kvm_cpu__setup_sregs(struct kvm_cpu *vcpu)
*/
struct kvm_sregs sregs;
struct kvm_one_reg reg = {};
+ u64 value;
if (ioctl(vcpu->vcpu_fd, KVM_GET_SREGS, &sregs) < 0)
die("KVM_GET_SREGS failed");
@@ -147,8 +148,9 @@ static void kvm_cpu__setup_sregs(struct kvm_cpu *vcpu)
if (ioctl(vcpu->vcpu_fd, KVM_SET_SREGS, &sregs) < 0)
die("KVM_SET_SREGS failed");
- reg.id = KVM_ONE_REG_PPC_HIOR;
- reg.u.reg64 = 0;
+ reg.id = KVM_REG_PPC_HIOR;
+ value = 0;
+ reg.addr = (u64)&value;
if (ioctl(vcpu->vcpu_fd, KVM_SET_ONE_REG, ®) < 0)
die("KVM_SET_ONE_REG failed");
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API
2012-07-04 13:39 [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API Michael Ellerman
@ 2012-07-04 14:07 ` Alexander Graf
2012-07-04 14:13 ` Pekka Enberg
2012-07-04 20:03 ` Matt Evans
1 sibling, 1 reply; 4+ messages in thread
From: Alexander Graf @ 2012-07-04 14:07 UTC (permalink / raw)
To: Michael Ellerman; +Cc: kvm, penberg, levinsasha928, asias.hejun, matt
On 04.07.2012, at 15:39, Michael Ellerman wrote:
> I think this code was based on an earlier version of the KVM_SET_ONE_REG
> API, which at the time was in agraf's tree but not mainline?
>
> Either way it doesn't compile as is, so fix it up.
Yup, looks good :).
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API
2012-07-04 14:07 ` Alexander Graf
@ 2012-07-04 14:13 ` Pekka Enberg
0 siblings, 0 replies; 4+ messages in thread
From: Pekka Enberg @ 2012-07-04 14:13 UTC (permalink / raw)
To: Alexander Graf; +Cc: Michael Ellerman, kvm, levinsasha928, asias.hejun, matt
On Wed, 4 Jul 2012, Alexander Graf wrote:
> On 04.07.2012, at 15:39, Michael Ellerman wrote:
>
> > I think this code was based on an earlier version of the KVM_SET_ONE_REG
> > API, which at the time was in agraf's tree but not mainline?
> >
> > Either way it doesn't compile as is, so fix it up.
>
> Yup, looks good :).
Applied all patches. Thanks!
Pekka
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API
2012-07-04 13:39 [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API Michael Ellerman
2012-07-04 14:07 ` Alexander Graf
@ 2012-07-04 20:03 ` Matt Evans
1 sibling, 0 replies; 4+ messages in thread
From: Matt Evans @ 2012-07-04 20:03 UTC (permalink / raw)
To: Michael Ellerman; +Cc: kvm, penberg, levinsasha928, asias.hejun, agraf
On 04/07/2012, at 2:39 PM, Michael Ellerman wrote:
> I think this code was based on an earlier version of the KVM_SET_ONE_REG
> API, which at the time was in agraf's tree but not mainline?
>
> Either way it doesn't compile as is, so fix it up.
Bit late, but I concur, all the patches look just swell. Thank you!
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-04 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-04 13:39 [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API Michael Ellerman
2012-07-04 14:07 ` Alexander Graf
2012-07-04 14:13 ` Pekka Enberg
2012-07-04 20:03 ` Matt Evans
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.