RE: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Alexander Graf [mailto:agraf@xxxxxxx]
> Sent: Tuesday, July 03, 2012 2:34 PM
> To: Yoder Stuart-B08248
> Cc: kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel
> 
> 
> On 03.07.2012, at 17:48, Stuart Yoder wrote:
> 
> > From: Liu Yu-B13201 <Yu.Liu@xxxxxxxxxxxxx>
> >
> > And add a new flag definition in kvm_ppc_pvinfo to indicate
> > whether the host supports the EV_IDLE hcall.
> >
> > Signed-off-by: Liu Yu <yu.liu@xxxxxxxxxxxxx>
> > [stuart.yoder@xxxxxxxxxxxxx: cleanup,fixes for conditions allowing idle]
> > Signed-off-by: Stuart Yoder <stuart.yoder@xxxxxxxxxxxxx>
> > ---
> > v12: use EV_HCALL_TOKEN macro
> >
> > Documentation/virtual/kvm/api.txt |    7 +++++--
> > arch/powerpc/include/asm/Kbuild   |    1 +
> > arch/powerpc/kvm/powerpc.c        |   10 ++++++++--
> > include/linux/kvm.h               |    2 ++
> > 4 files changed, 16 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> > index 310fe50..920c3c4 100644
> > --- a/Documentation/virtual/kvm/api.txt
> > +++ b/Documentation/virtual/kvm/api.txt
> > @@ -1190,12 +1190,15 @@ struct kvm_ppc_pvinfo {
> > This ioctl fetches PV specific information that need to be passed to the guest
> > using the device tree or other means from vm context.
> >
> > -For now the only implemented piece of information distributed here is an array
> > -of 4 instructions that make up a hypercall.
> > +The hcall array defines 4 instructions that make up a hypercall.
> >
> > If any additional field gets added to this structure later on, a bit for that
> > additional piece of information will be set in the flags bitmap.
> >
> > +The flags bitmap is defined as:
> > +
> > +   /* the host supports the ePAPR idle hcall
> > +   #define KVM_PPC_PVINFO_FLAGS_EV_IDLE   (1<<0)
> >
> > 4.48 KVM_ASSIGN_PCI_DEVICE
> >
> > diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
> > index 7e313f1..13d6b7b 100644
> > --- a/arch/powerpc/include/asm/Kbuild
> > +++ b/arch/powerpc/include/asm/Kbuild
> > @@ -34,5 +34,6 @@ header-y += termios.h
> > header-y += types.h
> > header-y += ucontext.h
> > header-y += unistd.h
> > +header-y += epapr_hcalls.h
> >
> > generic-y += rwsem.h
> > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> > index 30cf01c..1a4db32 100644
> > --- a/arch/powerpc/kvm/powerpc.c
> > +++ b/arch/powerpc/kvm/powerpc.c
> > @@ -38,8 +38,7 @@
> >
> > int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)
> > {
> > -	return !(v->arch.shared->msr & MSR_WE) ||
> > -	       !!(v->arch.pending_exceptions) ||
> > +	return !!(v->arch.pending_exceptions) ||
> > 	       v->requests;
> > }
> >
> > @@ -86,6 +85,11 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
> >
> > 		/* Second return value is in r4 */
> > 		break;
> > +	case EV_HCALL_TOKEN(EV_EPAPR_VENDOR_ID, EV_IDLE):
> 
> Did you try to compile this? :)

Hmm...could have swore I did. :(
 
> Will fix it up locally.

Thanks.

Stuart

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux