Re: [patch 2/5] KVM: reintroduce guest mode bit and unify remote request code

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

 



On Thu, Aug 27, 2009 at 11:15:23AM +0300, Avi Kivity wrote:
> On 08/27/2009 04:20 AM, Marcelo Tosatti wrote:
>> Split KVM_REQ_KICKED in two bits: KVM_VCPU_KICKED, to indicate
>> whether a vcpu has been IPI'ed, and KVM_VCPU_GUEST_MODE, in a separate
>> vcpu_state variable.
>>
>> Unify remote requests with kvm_vcpu_kick.
>>
>> Synchronous requests wait on KVM_VCPU_GUEST_MODE, via wait_on_bit/wake_up_bit.
>>
>>    
>
> I did miss guest_mode.
>
>> +	unsigned long vcpu_state;
>>    
>
> Why not bool guest_mode?  Saves two atomics per exit.

It must be atomic since GUEST_MODE / VCPU_KICKED bits are manipulated by
multiple CPU's.

--
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