From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 9/9] KVM: Adds support for halting in the kernel
Date: Tue, 19 Jun 2007 17:48:03 +0300 [thread overview]
Message-ID: <4677ECA3.509@qumranet.com> (raw)
In-Reply-To: <20070531180934.1810.45024.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
Gregory Haskins wrote:
> Halting in userspace requires a relatively cumbersome mechanism to signal the
> halted VCPU. Implementing halt in kernel should be relatively straight
> forward and it eliminates the need for the signaling
>
>
Merging this one in, found some nits:
> +/*
> * This function is invoked whenever we want to interrupt a vcpu that is
> * currently executing in guest-mode. It currently is a no-op because
> * the simple delivery of the IPI to execute this function accomplishes our
> @@ -2481,6 +2556,16 @@ static void kvm_vcpu_intr(struct kvm_irqsink *this,
> BUG_ON(direct_ipi == smp_processor_id());
> ++vcpu->stat.guest_preempt;
> }
> +
> + /*
> + * If the CPU is halted it will be waiting for a wake-up
> + */
> + if (waitqueue_active(&vcpu->irq.wq)) {
>
Why do the check? The only reason I can see is to keep the stats
correct. Otherwise we can do the body of the if unconditionally.
> + wake_up_interruptible_sync(&vcpu->irq.wq);
> + set_tsk_need_resched(current);
>
This is unneeded? I'd expect wake_up_interruptible_sync() to take care
of any rescheduling needed.
> + ++vcpu->stat.halt_wakeup;
> + }
> +
>
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-06-19 14:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-31 18:08 [PATCH 0/9] in-kernel APIC v9 (kernel side) Gregory Haskins
[not found] ` <20070531180005.1810.23884.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-05-31 18:08 ` [PATCH 1/9] KVM: Adds support for in-kernel mmio handlers Gregory Haskins
2007-05-31 18:08 ` [PATCH 2/9] KVM: VMX - fix interrupt checking on light-exit Gregory Haskins
2007-05-31 18:09 ` [PATCH 3/9] KVM: Add irqdevice object Gregory Haskins
[not found] ` <20070531180903.1810.87474.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-06-04 7:13 ` Dong, Eddie
2007-05-31 18:09 ` [PATCH 4/9] KVM: Adds ability to preempt an executing VCPU Gregory Haskins
2007-05-31 18:09 ` [PATCH 5/9] KVM: Add support for in-kernel LAPIC model Gregory Haskins
2007-05-31 18:09 ` [PATCH 6/9] KVM: Adds support for real NMI injection on VMX processors Gregory Haskins
[not found] ` <20070531180919.1810.30009.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-06-01 2:43 ` [PATCH 6/9] KVM: Adds support for real NMI injection onVMX processors Li, Xin B
2007-05-31 18:09 ` [PATCH 7/9] KVM: Adds basic plumbing to support TPR shadow features Gregory Haskins
2007-05-31 18:09 ` [PATCH 8/9] KVM: Add statistics from interrupt subsystem Gregory Haskins
2007-05-31 18:09 ` [PATCH 9/9] KVM: Adds support for halting in the kernel Gregory Haskins
[not found] ` <20070531180934.1810.45024.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-06-19 14:48 ` Avi Kivity [this message]
2007-06-02 22:04 ` [PATCH 0/9] in-kernel APIC v9 (kernel side) Dor Laor
2007-06-03 9:28 ` Avi Kivity
[not found] ` <466289A4.9000201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-06-03 15:39 ` Avi Kivity
2007-06-07 8:20 ` Dong, Eddie
-- strict thread matches above, loose matches on Subject: below --
2007-06-19 19:02 [PATCH 9/9] KVM: Adds support for halting in the kernel Gregory Haskins
2007-05-24 13:22 [PATCH 0/9] in-kernel APIC v8 (kernel side) Gregory Haskins
[not found] ` <20070524131917.11321.17746.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-24 13:23 ` [PATCH 9/9] KVM: Adds support for halting in the kernel Gregory Haskins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4677ECA3.509@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox