All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15
@ 2014-05-06 18:35 gsomlo
  2014-05-07  6:29 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: gsomlo @ 2014-05-06 18:35 UTC (permalink / raw)
  To: jan.kiszka; +Cc: kvm

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---

Jan,

After today's pull from kvm, I also need this to build against my
Fedora 20 kernel (3.13.10-200.fc20.x86_64).

Thanks,
  Gabriel

 x86/external-module-compat.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index dde9463..e62486b 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -1480,6 +1480,11 @@ static inline int __register_hotcpu_notifier(struct notifier_block *nb)
 {
 	return 0;
 }
+static inline int pci_enable_msix_exact(struct pci_dev *dev,
+		      struct msix_entry *entries, int nvec)
+{
+	return -ENOSYS;
+}
 #endif
 
 #ifndef MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15
  2014-05-06 18:35 [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15 gsomlo
@ 2014-05-07  6:29 ` Jan Kiszka
  2014-05-07  6:54   ` Paolo Bonzini
  2014-05-07 13:19   ` Gabriel L. Somlo
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Kiszka @ 2014-05-07  6:29 UTC (permalink / raw)
  To: gsomlo; +Cc: kvm

On 2014-05-06 20:35, gsomlo@gmail.com wrote:
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> ---
> 
> Jan,
> 
> After today's pull from kvm, I also need this to build against my
> Fedora 20 kernel (3.13.10-200.fc20.x86_64).

Which version did you pull? Neither next nor queue contain this change yet.

> 
> Thanks,
>   Gabriel
> 
>  x86/external-module-compat.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
> index dde9463..e62486b 100644
> --- a/x86/external-module-compat.h
> +++ b/x86/external-module-compat.h
> @@ -1480,6 +1480,11 @@ static inline int __register_hotcpu_notifier(struct notifier_block *nb)
>  {
>  	return 0;
>  }
> +static inline int pci_enable_msix_exact(struct pci_dev *dev,
> +		      struct msix_entry *entries, int nvec)
> +{
> +	return -ENOSYS;
> +}

First, this is not x86-specific, thus should go to
external-module-compat-comm.h. Second, pci_enable_msix_exact was
introduced with 3.14. And then I think we can (and should) provide the
original content of this wrapper once it is needed, not a stub.

Right now I'm seeing different build problems:

http://buildbot.kiszka.org/kvm-kmod/builders/4-latest-kvm/builds/1788/steps/3.11-x86-64/logs/stdio

Didn't look into details yet.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15
  2014-05-07  6:29 ` Jan Kiszka
@ 2014-05-07  6:54   ` Paolo Bonzini
  2014-05-07 13:19   ` Gabriel L. Somlo
  1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-05-07  6:54 UTC (permalink / raw)
  To: Jan Kiszka, kvm

Il 07/05/2014 08:29, Jan Kiszka ha scritto:
> On 2014-05-06 20:35, gsomlo@gmail.com wrote:
>> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
>> ---
>>
>> Jan,
>>
>> After today's pull from kvm, I also need this to build against my
>> Fedora 20 kernel (3.13.10-200.fc20.x86_64).
>
> Which version did you pull? Neither next nor queue contain this change yet.

It went in via kvm/master.  It was submitted before 3.15, but I didn't 
send it during the merge window because: 1) we had to wait for the 
function itself to get in via the PCI tree; 2) Marcelo didn't know about 
this patch.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15
  2014-05-07  6:29 ` Jan Kiszka
  2014-05-07  6:54   ` Paolo Bonzini
@ 2014-05-07 13:19   ` Gabriel L. Somlo
  2014-05-07 17:14     ` Paolo Bonzini
  1 sibling, 1 reply; 5+ messages in thread
From: Gabriel L. Somlo @ 2014-05-07 13:19 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: kvm

On Wed, May 07, 2014 at 08:29:19AM +0200, Jan Kiszka wrote:
> On 2014-05-06 20:35, gsomlo@gmail.com wrote:
> > Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> > ---
> > 
> > Jan,
> > 
> > After today's pull from kvm, I also need this to build against my
> > Fedora 20 kernel (3.13.10-200.fc20.x86_64).
> 
> Which version did you pull? Neither next nor queue contain this change yet.

I have 89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (Linux 3.15-rc4) as
the top commit.

> Right now I'm seeing different build problems:
> 
> http://buildbot.kiszka.org/kvm-kmod/builders/4-latest-kvm/builds/1788/steps/3.11-x86-64/logs/stdio
> 
> Didn't look into details yet.

That's kernel 3.11, afaict, so entirely different problem :)

> >  x86/external-module-compat.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
> > index dde9463..e62486b 100644
> > --- a/x86/external-module-compat.h
> > +++ b/x86/external-module-compat.h
> > @@ -1480,6 +1480,11 @@ static inline int __register_hotcpu_notifier(struct notifier_block *nb)
> >  {
> >  	return 0;
> >  }
> > +static inline int pci_enable_msix_exact(struct pci_dev *dev,
> > +		      struct msix_entry *entries, int nvec)
> > +{
> > +	return -ENOSYS;
> > +}
> 
> First, this is not x86-specific, thus should go to
> external-module-compat-comm.h. Second, pci_enable_msix_exact was
> introduced with 3.14. And then I think we can (and should) provide the
> original content of this wrapper once it is needed, not a stub.

The patch I sent fixed building for 3.13.10-200.fc20.x86_64; as soon
as I upgraded to 3.14.2-200.fc20.x86_64 (about half hour later), I
could build for it just fine, no errors.

So I don't really *need* this fix anymore, but given what you said and
that it works fine on 3.14 without a patch (at least for me), the
patch *should* then probably be:

diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index 086127d..94b18cc 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -1401,3 +1401,11 @@ static inline void guest_exit(void)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
 static inline void smp_mb__after_srcu_read_unlock(void) {}
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+static inline int pci_enable_msix_exact(struct pci_dev *dev,
+                     struct msix_entry *entries, int nvec)
+{
+       return -ENOSYS;
+}
+#endif
--

except I can't test it anymore without rebooting to 3.13, which I can't
do right away :)

Regards,
--G


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15
  2014-05-07 13:19   ` Gabriel L. Somlo
@ 2014-05-07 17:14     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-05-07 17:14 UTC (permalink / raw)
  To: Gabriel L. Somlo, Jan Kiszka; +Cc: kvm

Il 07/05/2014 15:19, Gabriel L. Somlo ha scritto:
> On Wed, May 07, 2014 at 08:29:19AM +0200, Jan Kiszka wrote:
>> On 2014-05-06 20:35, gsomlo@gmail.com wrote:
>>> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
>>> ---
>>>
>>> Jan,
>>>
>>> After today's pull from kvm, I also need this to build against my
>>> Fedora 20 kernel (3.13.10-200.fc20.x86_64).
>>
>> Which version did you pull? Neither next nor queue contain this change yet.
> 
> I have 89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (Linux 3.15-rc4) as
> the top commit.
> 
>> Right now I'm seeing different build problems:
>>
>> http://buildbot.kiszka.org/kvm-kmod/builders/4-latest-kvm/builds/1788/steps/3.11-x86-64/logs/stdio
>>
>> Didn't look into details yet.
> 
> That's kernel 3.11, afaict, so entirely different problem :)

Probably time to kill srcu.c altogether, since it's available on 2.6.19.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-07 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06 18:35 [kvm-kmod PATCH] Provide pci_enable_msix_exact() for kernels < 3.15 gsomlo
2014-05-07  6:29 ` Jan Kiszka
2014-05-07  6:54   ` Paolo Bonzini
2014-05-07 13:19   ` Gabriel L. Somlo
2014-05-07 17:14     ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.