Re: [PATCH kvm-unit-tests 3/4] Add support for calling a function in guest mode

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

 



On Sat, Nov 27, 2010 at 11:15:18AM +0200, Avi Kivity wrote:
> On 11/26/2010 04:17 PM, Michael S. Tsirkin wrote:
> >>  +
> >>  +#include "kvmxx.h"
> >>  +#include<boost/function.hpp>
> >
> >This seems to use boost, which is not part of the standard library.
> >Do we want this dependency?
> >We'd need a configure check to verify it's installed.
> >
> 
> I don't mind a boost dependency, but given this is in tr1, I
> switched to that instead.
> 
> >>  +#include<vector>
> >>  +
> >>  +namespace identity {
> >>  +
> >>  +void setup_vm(kvm::vm&  vm);
> >>  +
> >>  +class vcpu {
> >>  +public:
> >>  +    vcpu(kvm::vcpu&  vcpu, boost::function<void ()>  guest_func,
> >>  +	 unsigned long stack_size = 256 * 1024);
> >
> >So the thread stack is moved to use the heap instead?
> 
> Only in guest mode.
> 
> >Can we use pthread_attr_getstacksize and use the regular thread stack?
> >Good for portability.
> 
> In practice 256K should be sufficient.  This is for a unit test, not
> a qemu replacement.


Portability matters though. Isn't it a good idea to replace a bunch
or asm calls with pthread use?

> 
> -- 
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
--
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