Re: Guest reboot interface

2011-01-07 Thread Scott Wood
On Fri, 7 Jan 2011 16:38:35 +0100
Jan Kiszka  wrote:

> Am 07.01.2011 13:40, Alexander Graf wrote:
> > 
> > On 07.01.2011, at 13:08, Liu Yu-B13201 wrote:
> > 
> >>
> >> Hi all,
> >>
> >> When guest reboot, it's better to reset status by qemu, and then sync them 
> >> back to kvm
> >> However as you know there's no BOOKE mmu emulation in qemu,
> >> So that qemu cannot directly reset BOOKE TLB.
> >> Moreover a lot SPR registers also cannot be reset by qemu.
> >>
> >> As a workaround, we need a interface that qemu can notify kvm to reset the 
> >> status.
> >> My question is, what should the interface be?
> >> Looks like there's no alike interface in other archs.
> >> Should we define a ioctl command number only used by BOOKE or powerpc?
> > 
> > Wouldn't it make more sense to just fake-implement the registers (SPRs and 
> > unused TLB) and sync that back on reset? You don't have to implement the 
> > actual mmu logic, but that keeps things at the same place at least.
> > 
> 
> This is how it's done on x86, and it's the preferred way. There will
> never be such things as KVM_IOCTL_RESET.
> 
> BTW, isn't the TLB state relevant for vmsave/restore? Then it should be
> made accessible for user space anyway.

It'll also be helpful for debugging, and for giving Qemu more control
over how the OS is loaded -- having guest memory start somewhere other
than zero is useful when doing DMA without an IOMMU, and there'll have
to be a TLB entry pointing up there on entry.

-Scott

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


Re: Guest reboot interface

2011-01-07 Thread Jan Kiszka
Am 07.01.2011 13:40, Alexander Graf wrote:
> 
> On 07.01.2011, at 13:08, Liu Yu-B13201 wrote:
> 
>>
>> Hi all,
>>
>> When guest reboot, it's better to reset status by qemu, and then sync them 
>> back to kvm
>> However as you know there's no BOOKE mmu emulation in qemu,
>> So that qemu cannot directly reset BOOKE TLB.
>> Moreover a lot SPR registers also cannot be reset by qemu.
>>
>> As a workaround, we need a interface that qemu can notify kvm to reset the 
>> status.
>> My question is, what should the interface be?
>> Looks like there's no alike interface in other archs.
>> Should we define a ioctl command number only used by BOOKE or powerpc?
> 
> Wouldn't it make more sense to just fake-implement the registers (SPRs and 
> unused TLB) and sync that back on reset? You don't have to implement the 
> actual mmu logic, but that keeps things at the same place at least.
> 

This is how it's done on x86, and it's the preferred way. There will
never be such things as KVM_IOCTL_RESET.

BTW, isn't the TLB state relevant for vmsave/restore? Then it should be
made accessible for user space anyway.

Jan



signature.asc
Description: OpenPGP digital signature


Re: Guest reboot interface

2011-01-07 Thread Alexander Graf

On 07.01.2011, at 13:08, Liu Yu-B13201 wrote:

> 
> Hi all,
> 
> When guest reboot, it's better to reset status by qemu, and then sync them 
> back to kvm
> However as you know there's no BOOKE mmu emulation in qemu,
> So that qemu cannot directly reset BOOKE TLB.
> Moreover a lot SPR registers also cannot be reset by qemu.
> 
> As a workaround, we need a interface that qemu can notify kvm to reset the 
> status.
> My question is, what should the interface be?
> Looks like there's no alike interface in other archs.
> Should we define a ioctl command number only used by BOOKE or powerpc?

Wouldn't it make more sense to just fake-implement the registers (SPRs and 
unused TLB) and sync that back on reset? You don't have to implement the actual 
mmu logic, but that keeps things at the same place at least.


Alex

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


Guest reboot interface

2011-01-07 Thread Liu Yu-B13201

Hi all,

When guest reboot, it's better to reset status by qemu, and then sync them back 
to kvm
However as you know there's no BOOKE mmu emulation in qemu,
So that qemu cannot directly reset BOOKE TLB.
Moreover a lot SPR registers also cannot be reset by qemu.

As a workaround, we need a interface that qemu can notify kvm to reset the 
status.
My question is, what should the interface be?
Looks like there's no alike interface in other archs.
Should we define a ioctl command number only used by BOOKE or powerpc?


Thanks,
Yu
N�r��yb�X��ǧv�^�)޺{.n�+jir)w*jg����ݢj/���z�ޖ��2�ޙ&�)ߡ�a�����G���h��j:+v���w��٥