lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EDC8F4B.7040308@redhat.com>
Date:	Mon, 05 Dec 2011 11:30:51 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Liu ping fan <kernelfans@...il.com>
CC:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	aliguori@...ibm.com, gleb@...hat.com, jan.kiszka@....de
Subject: Re: [PATCH] kvm: make vcpu life cycle separated from kvm instance

On 12/05/2011 07:29 AM, Liu ping fan wrote:
> like this,
> #define kvm_for_each_vcpu(idx, cnt, vcpup, kvm) \
> 	for (idx = 0, cnt = 0, vcpup = kvm_get_vcpu(kvm, idx); \
> 	     cnt < atomic_read(&kvm->online_vcpus) && \
> 	     idx < KVM_MAX_VCPUS; \
> 	     idx++, (vcpup == NULL)?:cnt++, vcpup = kvm_get_vcpu(kvm, idx)) \
> 	     if (vcpup == NULL) \
> 	          continue; \
> 	     else
>
>
> A little ugly, but have not thought a better way out :-)
>

#define kvm_for_each_vcpu(vcpu, it) for (vcpu = kvm_fev_init(&it); vcpu;
vcpu = kvm_fev_next(&it, vcpu))

Though that doesn't give a good place for rcu_read_unlock().



-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ