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>] [day] [month] [year] [list]
Date:	Fri, 19 Dec 2014 12:28:48 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	nick <xerofoify@...il.com>, gleb@...nel.org
CC:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Question about hrtimer_restart apic_timer_fn in lapic.c



On 18/12/2014 19:15, nick wrote:
>       /*
>        * There is a race window between reading and incrementing, but we do
>        * not care about potentially losing timer events in the !reinject
>        * case anyway. Note: KVM_REQ_PENDING_TIMER is implicitly checked
>        * in vcpu_enter_guest.
>        */
>        if (!atomic_read(&ktimer->pending)) {
>                 atomic_inc(&ktimer->pending);
>                 /* FIXME: this code should not know anything about vcpus */
>                 kvm_make_request(KVM_REQ_PENDING_TIMER, vcpu);
>        }
> 
>        if (waitqueue_active(q))
>                 wake_up_interruptible(q);
> 
>         if (lapic_is_periodic(apic)) {
>                hrtimer_add_expires_ns(&ktimer->timer, ktimer->period);
>                return HRTIMER_RESTART;
>          } else
>                 return HRTIMER_NORESTART;
> }
> What is point of the comment, clearly we need access to vcpu in the call as it's a pointer to the apic structure's vcpu
> and we need to call on that particular CPU a request of  KVM_REQ_PENDING_TIMER? Please let me known if I am missing any
> important information.

The idea is that there should be a function in x86.c (something like
kvm_vcpu_set_pending_timer) that calls kvm_make_request, instead of
doing it in lapic.c.

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