RE: [patch] fix kvm_arch_vcpu_ioctl_[gs]et_regs()

"Zhang, Xiantao" <[email protected]>
Newsgroups org.kernel.vger.kvm-ia64
Message-ID <706158FABBBA044BAD4FE898A02E4BC219CABA6D@pdsmsx503.ccr.corp.intel.com>
Jes Sorensen wrote:
> Zhang, Xiantao wrote:
>> Jes
>>    Good work!  I ever talked about the issue with Avi and wanted to
>> enable the logic with the following patch, and Avi thought it may
>> lead to security issues, so deferred to now :)  
>> 
>> One comment:  We still need the logic to save and restore the vcpu's
>> stack for vcpu resuming to the guest in the same environment.  Maybe
>> you can allocate one buf to save it in kvm_reg structure. Xiantao 
> 
> Hi Xiantao,
> 
> I am with Avi on this one - we shouldn't be passing in pointers like
> that. Either we can increase the size of kvm_regs as you mention, but
> it will become *huge* since the stack is 64KB, or we introduce a new
> ioctl just to handle the stack.
> 
> Do you think it would be a problem having the second ioctl for this? I
> would prefer breaking it into two to avoid the kernel having to
> allocate a 128KB chunk for kvm_regs.

Fine to me to add the ioctl, and it should make the logic clear. 
Xiantao
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.