From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
"Yang, Sheng" <sheng.yang@intel.com>
Cc: Avi Kivity <avi@redhat.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: [PATCH] external modules: Fix pre-2.6.18 kernels
Date: Tue, 27 Jan 2009 15:51:08 -0200 [thread overview]
Message-ID: <20090127175108.GA9002@amt.cnet> (raw)
In-Reply-To: <497F365D.7000302@siemens.com>
On Tue, Jan 27, 2009 at 05:29:17PM +0100, Jan Kiszka wrote:
> pci_dev.msi_enabled was introduced in 2.6.18, thus building against
> older kernels now fail. Fix via a compat wrapper.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> kernel/external-module-compat-comm.h | 7 +++++++
> kernel/x86/hack-module.awk | 2 ++
> 2 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
> index 06af36d..937ba12 100644
> --- a/kernel/external-module-compat-comm.h
> +++ b/kernel/external-module-compat-comm.h
> @@ -718,3 +718,10 @@ static inline void cpumask_clear_cpu(int cpu, cpumask_var_t mask)
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
> #define marker_synchronize_unregister() synchronize_sched()
> #endif
> +
> +/* pci_dev.msi_enable was introduced in 2.6.18 */
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
> +#define kvm_pcidev_msi_enabled(dev) 1
> +#else
> +#define kvm_pcidev_msi_enabled(dev) (dev)->msi_enabled
> +#endif
I think this will break device assignment for if the device is not MSI
capable (if works at all in such older kernels).
Need some other way to check if the device is MSI enabled. Perhaps
PCI_MSI_FLAGS_ENABLE bit? Sheng?
next prev parent reply other threads:[~2009-01-27 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 16:29 [PATCH] external modules: Fix pre-2.6.18 kernels Jan Kiszka
2009-01-27 17:51 ` Marcelo Tosatti [this message]
2009-01-29 14:38 ` Sheng Yang
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=20090127175108.GA9002@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=sheng.yang@intel.com \
/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