public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Beth Kon <eak@us.ibm.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)
Date: Sun, 14 Jun 2009 11:53:28 +0300	[thread overview]
Message-ID: <4A34BA88.7060204@redhat.com> (raw)
In-Reply-To: <1244771206-19872-5-git-send-email-eak@us.ibm.com>

Beth Kon wrote:
> Signed-off-by: Beth Kon <eak@us.ibm.com>
>
>   

Please write a few words on what this patch does and why.

> ---
>  arch/x86/include/asm/kvm.h |    1 +
>  arch/x86/kvm/i8254.c       |   24 +++++++++++++++++++-----
>  arch/x86/kvm/i8254.h       |    3 ++-
>  arch/x86/kvm/x86.c         |    5 ++++-
>  4 files changed, 26 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
> index 708b9c3..3c44923 100644
> --- a/arch/x86/include/asm/kvm.h
> +++ b/arch/x86/include/asm/kvm.h
> @@ -235,6 +235,7 @@ struct kvm_guest_debug_arch {
>  
>  struct kvm_pit_state {
>  	struct kvm_pit_channel_state channels[3];
> +	u8 hpet_legacy_mode;
>  };
>   

This changes the ABI, breaking older binaries running on newer kernels, 
or newer binaries running on older kernels.

> @@ -340,10 +340,20 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)
>  	}
>  }
>  
> -void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val)
> +void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_start)
>  {
> +	u8 saved_mode;
>  	mutex_lock(&kvm->arch.vpit->pit_state.lock);
> -	pit_load_count(kvm, channel, val);
> +	if (hpet_legacy_start) {
> +		/* save existing mode for later reenablement */
> +		saved_mode = kvm->arch.vpit->pit_state.channels[0].mode;
> +		kvm->arch.vpit->pit_state.channels[0].mode = 0xff; /* disable timer */
> +		pit_load_count(kvm, channel, val);
> +		kvm->arch.vpit->pit_state.channels[0].mode = saved_mode;
> +	} else {
> +			if (!(channel == 0 && kvm->arch.vpit->pit_state.hpet_legacy_mode))
> +			pit_load_count(kvm, channel, val);
>   

Overindented.



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


  reply	other threads:[~2009-06-14  8:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12  1:46 [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Beth Kon
2009-06-12  1:46 ` [PATCH 2/5] " Beth Kon
2009-06-12  1:46 ` [PATCH 3/5] BIOS changes for KVM HPET (v6) Beth Kon
2009-06-12  1:46 ` [PATCH 4/5] Userspace " Beth Kon
2009-06-14  8:55   ` Avi Kivity
2009-06-14  9:00     ` Avi Kivity
2009-06-12  1:46 ` [PATCH 5/5] HPET interaction with in-kernel PIT (v6) Beth Kon
2009-06-14  8:53   ` Avi Kivity [this message]
2009-06-14  9:10     ` Jan Kiszka
2009-06-14  9:18       ` Avi Kivity
2009-06-14  9:26         ` Jan Kiszka
2009-06-14  9:35           ` Avi Kivity
2009-06-14  8:50 ` [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6) Avi Kivity

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=4A34BA88.7060204@redhat.com \
    --to=avi@redhat.com \
    --cc=eak@us.ibm.com \
    --cc=kvm@vger.kernel.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