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: <4D2D7B93.40109@redhat.com>
Date:	Wed, 12 Jan 2011 11:59:47 +0200
From:	Avi Kivity <avi@...hat.com>
To:	"Nadav Har'El" <nyh@...h.technion.ac.il>
CC:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH v3 2/3] KVM: send IPI to vcpu only when it's in guest
 mode

On 01/12/2011 11:54 AM, Nadav Har'El wrote:
> On Wed, Jan 12, 2011, Xiao Guangrong wrote about "[PATCH v3 2/3] KVM: send IPI to vcpu only when it's in guest mode":
> >  We can interrupt the vcpu only when it's running in guest mode
> >  to reduce IPI
>
> Hi,
>
> I am afraid there's a risk of confusion between the new
>
> 	vcpu->mode = IN_GUEST_MODE;
>
> and the existing
>
> 	is_guest_mode()   (i.e., vcpu->arch.hflags&  HF_GUEST_MASK)
>
> The latter says that the virtual cpu is in guest mode (i.e., the guest used
> VMLAUNCH and is runnning a nested guest), while the former says that the
> physical CPU that this vcpu is currently being run on, is in guest mode - or
> in other words, this vcpu is currently running.
>
> I'm not sure what is the best way to resolve this potential for confusion.
> Maybe on of them is better renamed (e.g., instead of vcpu->mode = IN_GUEST_MODE
> have something like vcpu->running = NOW_RUNNING). Or maybe some good comments
> need to to be written to explain the situation.
>
> Actually, I just noticed that there's already a vcpu->guest_mode which you
> are apparently replacing, so the potential for confusion is already in the
> current code... I.e., in the current code, is_guest_mode(vcpu) does NOT check
> vcpu->guest_mode...
>

Right.  One is from the host's point of view, the other is from the 
guest's point of view.  I'll rename is_guest_mode() to is_nested_guest().

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