* [PATCH] Make new PCI device probe work with older hypervisors
@ 2008-07-07 12:40 Espen Skoglund
2008-07-07 12:55 ` Keir Fraser
0 siblings, 1 reply; 9+ messages in thread
From: Espen Skoglund @ 2008-07-07 12:40 UTC (permalink / raw)
To: xen-devel
Be a bit more forgiving if hyervisor does not implement the
manage_pci_add hypercall.
Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
--
diff -r bb937c2f7382 drivers/xen/core/pci.c
--- a/drivers/xen/core/pci.c Fri Jul 04 17:55:07 2008 +0100
+++ b/drivers/xen/core/pci.c Mon Jul 07 13:34:32 2008 +0100
@@ -19,7 +19,7 @@
manage_pci.devfn = pci_dev->devfn;
r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add, &manage_pci);
- if (r)
+ if (r && r != -ENOSYS)
return r;
r = pci_bus_probe(dev);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 12:40 [PATCH] Make new PCI device probe work with older hypervisors Espen Skoglund
@ 2008-07-07 12:55 ` Keir Fraser
2008-07-07 13:54 ` Espen Skoglund
0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-07 12:55 UTC (permalink / raw)
To: Espen Skoglund, xen-devel
Thanks. One thing also -- do old dom0 kernels work with new Xen (i.e., do we
have compatibility both ways)?
-- Keir
On 7/7/08 13:40, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
> Be a bit more forgiving if hyervisor does not implement the
> manage_pci_add hypercall.
>
> Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
>
> --
> diff -r bb937c2f7382 drivers/xen/core/pci.c
> --- a/drivers/xen/core/pci.c Fri Jul 04 17:55:07 2008 +0100
> +++ b/drivers/xen/core/pci.c Mon Jul 07 13:34:32 2008 +0100
> @@ -19,7 +19,7 @@
> manage_pci.devfn = pci_dev->devfn;
>
> r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add, &manage_pci);
> - if (r)
> + if (r && r != -ENOSYS)
> return r;
>
> r = pci_bus_probe(dev);
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 12:55 ` Keir Fraser
@ 2008-07-07 13:54 ` Espen Skoglund
2008-07-07 14:37 ` Keir Fraser
0 siblings, 1 reply; 9+ messages in thread
From: Espen Skoglund @ 2008-07-07 13:54 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Espen Skoglund
For older dom0 kernels Xen will not know which PCI devices exists in
the system. This has the implication that
a) IOMMU device assignment will not work, and
b) assigning MSI interrupts will not work.
The only way to avoid these "limitations" is to either perform PCI bus
enumaration at startup or to create new pci_devs on deamand (e.g.,
when guest wants to assign an MSI to a new unknown device).
Given that MSIs (and to a lesser extent IOMMUs) have only recently
found their way into Xen, I'm not sure whether it calls for having to
support a-few-weeks-old dom0s in Xen.
eSk
[Keir Fraser]
> Thanks. One thing also -- do old dom0 kernels work with new Xen
> (i.e., do we have compatibility both ways)?
> -- Keir
> On 7/7/08 13:40, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>> Be a bit more forgiving if hyervisor does not implement the
>> manage_pci_add hypercall.
>>
>> Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
>>
>> --
>> diff -r bb937c2f7382 drivers/xen/core/pci.c
>> --- a/drivers/xen/core/pci.c Fri Jul 04 17:55:07 2008 +0100
>> +++ b/drivers/xen/core/pci.c Mon Jul 07 13:34:32 2008 +0100
>> @@ -19,7 +19,7 @@
>> manage_pci.devfn = pci_dev->devfn;
>>
>> r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add, &manage_pci);
>> - if (r)
>> + if (r && r != -ENOSYS)
>> return r;
>>
>> r = pci_bus_probe(dev);
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 13:54 ` Espen Skoglund
@ 2008-07-07 14:37 ` Keir Fraser
2008-07-07 14:54 ` Espen Skoglund
0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-07 14:37 UTC (permalink / raw)
To: Espen Skoglund; +Cc: xen-devel
As long as setups with older dom0 kernels do not suffer feature regression
when only the hypervisor is upgraded, I think it's fine.
-- Keir
On 7/7/08 14:54, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
> For older dom0 kernels Xen will not know which PCI devices exists in
> the system. This has the implication that
>
> a) IOMMU device assignment will not work, and
> b) assigning MSI interrupts will not work.
>
> The only way to avoid these "limitations" is to either perform PCI bus
> enumaration at startup or to create new pci_devs on deamand (e.g.,
> when guest wants to assign an MSI to a new unknown device).
>
> Given that MSIs (and to a lesser extent IOMMUs) have only recently
> found their way into Xen, I'm not sure whether it calls for having to
> support a-few-weeks-old dom0s in Xen.
>
> eSk
>
>
> [Keir Fraser]
>> Thanks. One thing also -- do old dom0 kernels work with new Xen
>> (i.e., do we have compatibility both ways)?
>
>> -- Keir
>
>> On 7/7/08 13:40, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>
>>> Be a bit more forgiving if hyervisor does not implement the
>>> manage_pci_add hypercall.
>>>
>>> Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
>>>
>>> --
>>> diff -r bb937c2f7382 drivers/xen/core/pci.c
>>> --- a/drivers/xen/core/pci.c Fri Jul 04 17:55:07 2008 +0100
>>> +++ b/drivers/xen/core/pci.c Mon Jul 07 13:34:32 2008 +0100
>>> @@ -19,7 +19,7 @@
>>> manage_pci.devfn = pci_dev->devfn;
>>>
>>> r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add, &manage_pci);
>>> - if (r)
>>> + if (r && r != -ENOSYS)
>>> return r;
>>>
>>> r = pci_bus_probe(dev);
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 14:37 ` Keir Fraser
@ 2008-07-07 14:54 ` Espen Skoglund
2008-07-07 14:57 ` Keir Fraser
0 siblings, 1 reply; 9+ messages in thread
From: Espen Skoglund @ 2008-07-07 14:54 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Espen Skoglund
What kind of feature regressions are we talking about here? Does
there exist some sort of list of what features Xen must support, or
must new hypervisors support all features that have ever been present
in xen-unstable.hg?
For machines supporting VT-d, removing the PCI enumeration from the
VT-d code means that older dom0 kernels will not work with the latest
hypervisor. Is this unacceptable or is VT-d support considered an
experimental feature?
eSk
[Keir Fraser]
> As long as setups with older dom0 kernels do not suffer feature
> regression when only the hypervisor is upgraded, I think it's fine.
> -- Keir
> On 7/7/08 14:54, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>> For older dom0 kernels Xen will not know which PCI devices exists in
>> the system. This has the implication that
>>
>> a) IOMMU device assignment will not work, and
>> b) assigning MSI interrupts will not work.
>>
>> The only way to avoid these "limitations" is to either perform PCI bus
>> enumaration at startup or to create new pci_devs on deamand (e.g.,
>> when guest wants to assign an MSI to a new unknown device).
>>
>> Given that MSIs (and to a lesser extent IOMMUs) have only recently
>> found their way into Xen, I'm not sure whether it calls for having to
>> support a-few-weeks-old dom0s in Xen.
>>
>> eSk
>>
>>
>> [Keir Fraser]
>>> Thanks. One thing also -- do old dom0 kernels work with new Xen
>>> (i.e., do we have compatibility both ways)?
>>
>>> -- Keir
>>
>>> On 7/7/08 13:40, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>>
>>>> Be a bit more forgiving if hyervisor does not implement the
>>>> manage_pci_add hypercall.
>>>>
>>>> Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
>>>>
>>>> --
>>>> diff -r bb937c2f7382 drivers/xen/core/pci.c
>>>> --- a/drivers/xen/core/pci.c Fri Jul 04 17:55:07 2008 +0100
>>>> +++ b/drivers/xen/core/pci.c Mon Jul 07 13:34:32 2008 +0100
>>>> @@ -19,7 +19,7 @@
>>>> manage_pci.devfn = pci_dev->devfn;
>>>>
>>>> r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add, &manage_pci);
>>>> - if (r)
>>>> + if (r && r != -ENOSYS)
>>>> return r;
>>>>
>>>> r = pci_bus_probe(dev);
>>>>
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xensource.com
>>>> http://lists.xensource.com/xen-devel
>>
>>
>>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 14:54 ` Espen Skoglund
@ 2008-07-07 14:57 ` Keir Fraser
2008-07-07 15:04 ` Espen Skoglund
0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-07 14:57 UTC (permalink / raw)
To: Espen Skoglund; +Cc: xen-devel
On 7/7/08 15:54, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
> For machines supporting VT-d, removing the PCI enumeration from the
> VT-d code means that older dom0 kernels will not work with the latest
> hypervisor. Is this unacceptable or is VT-d support considered an
> experimental feature?
If old dom0 kernels will not work with new Xen on any system supporting
VT-d, even when VT-d features are not going to be used (e.g., for device
passthrough), then that's not really acceptable.
If you have to upgrade your dom0 kernel to make use of new features which
VT-d enables, that's perfectly acceptable.
-- Keir
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 14:57 ` Keir Fraser
@ 2008-07-07 15:04 ` Espen Skoglund
2008-07-07 15:07 ` Keir Fraser
0 siblings, 1 reply; 9+ messages in thread
From: Espen Skoglund @ 2008-07-07 15:04 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Espen Skoglund
[Keir Fraser]
> On 7/7/08 15:54, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>> For machines supporting VT-d, removing the PCI enumeration from the
>> VT-d code means that older dom0 kernels will not work with the
>> latest hypervisor. Is this unacceptable or is VT-d support
>> considered an experimental feature?
> If old dom0 kernels will not work with new Xen on any system
> supporting VT-d, even when VT-d features are not going to be used
> (e.g., for device passthrough), then that's not really acceptable.
> If you have to upgrade your dom0 kernel to make use of new features
> which VT-d enables, that's perfectly acceptable.
Ok. In that case you'd better revert 17975:a3e4840b1584 and make sure
that the PCI device enumration is never taken out of Xen.
eSk
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 15:04 ` Espen Skoglund
@ 2008-07-07 15:07 ` Keir Fraser
2008-07-07 15:11 ` Espen Skoglund
0 siblings, 1 reply; 9+ messages in thread
From: Keir Fraser @ 2008-07-07 15:07 UTC (permalink / raw)
To: Espen Skoglund; +Cc: xen-devel
On 7/7/08 16:04, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>> If old dom0 kernels will not work with new Xen on any system
>> supporting VT-d, even when VT-d features are not going to be used
>> (e.g., for device passthrough), then that's not really acceptable.
>
>> If you have to upgrade your dom0 kernel to make use of new features
>> which VT-d enables, that's perfectly acceptable.
>
> Ok. In that case you'd better revert 17975:a3e4840b1584 and make sure
> that the PCI device enumration is never taken out of Xen.
If we revert just that one changeset, will the other patches (including the
new hypercalls) still work okay?
-- Keir
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Make new PCI device probe work with older hypervisors
2008-07-07 15:07 ` Keir Fraser
@ 2008-07-07 15:11 ` Espen Skoglund
0 siblings, 0 replies; 9+ messages in thread
From: Espen Skoglund @ 2008-07-07 15:11 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Espen Skoglund
F[Keir Fraser]
> On 7/7/08 16:04, "Espen Skoglund" <espen.skoglund@netronome.com> wrote:
>>> If old dom0 kernels will not work with new Xen on any system
>>> supporting VT-d, even when VT-d features are not going to be used
>>> (e.g., for device passthrough), then that's not really acceptable.
>>
>>> If you have to upgrade your dom0 kernel to make use of new features
>>> which VT-d enables, that's perfectly acceptable.
>>
>> Ok. In that case you'd better revert 17975:a3e4840b1584 and make sure
>> that the PCI device enumration is never taken out of Xen.
> If we revert just that one changeset, will the other patches
> (including the new hypercalls) still work okay?
Yes.
eSk
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-07-07 15:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 12:40 [PATCH] Make new PCI device probe work with older hypervisors Espen Skoglund
2008-07-07 12:55 ` Keir Fraser
2008-07-07 13:54 ` Espen Skoglund
2008-07-07 14:37 ` Keir Fraser
2008-07-07 14:54 ` Espen Skoglund
2008-07-07 14:57 ` Keir Fraser
2008-07-07 15:04 ` Espen Skoglund
2008-07-07 15:07 ` Keir Fraser
2008-07-07 15:11 ` Espen Skoglund
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.