public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Zhang, Xiantao" <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] Make ioapic.c independent of x86 header files
Date: Sun, 16 Dec 2007 21:47:50 +0200	[thread overview]
Message-ID: <476580E6.9040207@qumranet.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDCAD04B7-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Zhang, Xiantao wrote:
> From: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Date: Sun, 16 Dec 2007 23:41:50 +0800
> Subject: [PATCH] kvm: Split irq.h into two parts, and make ioapic
> independent of
> X86 header files.
>
> This patch splits irq.h into two parts, and make ioapic independent of
> X86 header files.
>   


>  2 files changed, 100 insertions(+), 87 deletions(-)
>  create mode 100644 arch/x86/kvm/ioapic.h
>
> diff --git a/arch/x86/kvm/ioapic.h b/arch/x86/kvm/ioapic.h
> new file mode 100644
> index 0000000..5a01013
> --- /dev/null
> +++ b/arch/x86/kvm/ioapic.h
> @@ -0,0 +1,98 @@
> +#ifndef __KVM_IO_APIC_H
> +#define __KVM_IO_APIC_H
>   

blank line here

> +#include <linux/kvm_host.h>
> +#include "iodev.h"
> +
> +}
> +
> +static inline int irqchip_in_kernel(struct kvm *kvm)
> +{
> +	return ioapic_irqchip(kvm) != NULL;
> +}
>   

This doesn't belong here.  Also, the definition is changed -- you should 
have noted that.

I think for ia64 you can set irqchip_in_kernel() to return true 
unconditionally.

> +void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
>   

Doesn't belong here, maybe kvm_host.h.

> +struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm *kvm, u8 vector,
> +				       unsigned long bitmap);
> +void kvm_ioapic_update_eoi(struct kvm *kvm, int vector);
> +int kvm_ioapic_init(struct kvm *kvm);
> +void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level);
> +void kvm_ioapic_reset(struct kvm_ioapic *ioapic);
> +
> +int kvm_apic_match_physical_addr(struct kvm_lapic *apic, u16 dest);
> +int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda);
> +int kvm_apic_set_irq(struct kvm_vcpu *vcpu, u8 vec, u8 trig);
> +int kvm_create_lapic(struct kvm_vcpu *vcpu);
> +void kvm_free_lapic(struct kvm_vcpu *vcpu);
>   

The non-ioapic functions shouldn't be here.


-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

  parent reply	other threads:[~2007-12-16 19:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-16 15:55 [PATCH] Make ioapic.c independent of x86 header files Zhang, Xiantao
     [not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD04B7-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-16 19:47   ` Avi Kivity [this message]
     [not found]     ` <476580E6.9040207-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-12-17  6:34       ` [PATCH] [0/3] Make ioapic.c independent of x86 header files V2 Zhang, Xiantao
     [not found]         ` <42DFA526FC41B1429CE7279EF83C6BDCB12EDA-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-17 10:59           ` 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=476580E6.9040207@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@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