Matt Wilson
2013-Jun-19 18:21 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
On Wed, Jun 19, 2013 at 11:42:06AM +0100, Alex Bligh wrote:> > --On 19 June 2013 10:13:17 +0000 Paul Durrant > <Paul.Durrant@citrix.com> wrote: > > >>We obviously can''t say to users "Are you running Windows and are you > >>running PV drivers >= X.Y, if so set lever A to position B, otherwise if > >>you are running some other OS or an earlier version of the Windows PV > >>driver set it to position A". > > > >Why not? The device can be chosen on a per-VM basis. > > Not everyone knows what guest some random user will be running > (consider cloud platforms).I agree. If this is really the only solution, we would need to have both versions presented to the guest so that old drivers continue to work without any intervention. Matt> Expecting an admin to introspect the guest is not a good plan. > Having the same set of levers that work at least reasonably with > everything is the way to go. >
Tim Deegan
2013-Jun-19 20:15 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
At 11:21 -0700 on 19 Jun (1371640904), Matt Wilson wrote:> On Wed, Jun 19, 2013 at 11:42:06AM +0100, Alex Bligh wrote: > > > > --On 19 June 2013 10:13:17 +0000 Paul Durrant > > <Paul.Durrant@citrix.com> wrote: > > > > >>We obviously can''t say to users "Are you running Windows and are you > > >>running PV drivers >= X.Y, if so set lever A to position B, otherwise if > > >>you are running some other OS or an earlier version of the Windows PV > > >>driver set it to position A". > > > > > >Why not? The device can be chosen on a per-VM basis. > > > > Not everyone knows what guest some random user will be running > > (consider cloud platforms). > > I agree. If this is really the only solution, we would need to have > both versions presented to the guest so that old drivers continue to > work without any intervention.I suspect that if we expose both, both sets of drivers try to run the same PV connections, and hilarity ensues. Tim.
Paul Durrant
2013-Jun-20 07:47 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Tim Deegan [mailto:tim@xen.org] > Sent: 19 June 2013 21:15 > To: Matt Wilson > Cc: Alex Bligh; Paul Durrant; xen-devel@lists.xen.org; Ian Campbell; qemu- > devel@nongnu.org > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > At 11:21 -0700 on 19 Jun (1371640904), Matt Wilson wrote: > > On Wed, Jun 19, 2013 at 11:42:06AM +0100, Alex Bligh wrote: > > > > > > --On 19 June 2013 10:13:17 +0000 Paul Durrant > > > <Paul.Durrant@citrix.com> wrote: > > > > > > >>We obviously can''t say to users "Are you running Windows and are you > > > >>running PV drivers >= X.Y, if so set lever A to position B, otherwise if > > > >>you are running some other OS or an earlier version of the Windows > PV > > > >>driver set it to position A". > > > > > > > >Why not? The device can be chosen on a per-VM basis. > > > > > > Not everyone knows what guest some random user will be running > > > (consider cloud platforms). > > > > I agree. If this is really the only solution, we would need to have > > both versions presented to the guest so that old drivers continue to > > work without any intervention. > > I suspect that if we expose both, both sets of drivers try to run the > same PV connections, and hilarity ensues. >Actually I think I can make that work, and it is the conclusion I came to after Alex''s comment. I''ll create a new patch which introduces a new device, let''s call it citrix-pv-bus or somesuch, which will have the necessary device id and revision and will be a dedicate device purely for the Citrix PV drivers. Then, if someone wants to create a VM which will be able use Citrix PV drivers they add this device to their config but leave all other aspects of the config unchanged, thus not precluding using that VM with any drivers that bind to the xen platform device. If someone has a VM that has the old Citrix drivers installed, or GPLPV, I think I should be able to spot this and make sure that the new bus driver quiesces itself to prevent strangeness ensuing. If and when said previous drivers are un-installed then the new bus driver can wake up and enumerate the device nodes for the other pv drivers and Windows Update can carry on doing its stuff. Paul
Alex Bligh
2013-Jun-20 08:08 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
--On 20 June 2013 07:47:12 +0000 Paul Durrant <Paul.Durrant@citrix.com> wrote:> If someone has a VM that has the old Citrix drivers installed, or GPLPV, > I think I should be able to spot this and make sure that the new bus > driver quiesces itself to prevent strangeness ensuing. If and when said > previous drivers are un-installed then the new bus driver can wake up and > enumerate the device nodes for the other pv drivers and Windows Update > can carry on doing its stuff.I have no clue about Windows device drivers, so this may be a silly suggestion. If your suggestion above already requires a Xen code change, one possibility might be copy the idea behind the PCI unplug logic. Either if the new PCI device is used, it could unplug the old one, or vice versa. Drivers magically unplugging themselves may not be ideal, but it beats having 2 drivers fighting over the same device. -- Alex Bligh
Paul Durrant
2013-Jun-20 08:19 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Alex Bligh [mailto:alex@alex.org.uk] > Sent: 20 June 2013 09:09 > To: Paul Durrant; Tim (Xen.org); Matt Wilson > Cc: xen-devel@lists.xen.org; Ian Campbell; qemu-devel@nongnu.org; Alex > Bligh > Subject: RE: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > > > --On 20 June 2013 07:47:12 +0000 Paul Durrant <Paul.Durrant@citrix.com> > wrote: > > > If someone has a VM that has the old Citrix drivers installed, or GPLPV, > > I think I should be able to spot this and make sure that the new bus > > driver quiesces itself to prevent strangeness ensuing. If and when said > > previous drivers are un-installed then the new bus driver can wake up and > > enumerate the device nodes for the other pv drivers and Windows Update > > can carry on doing its stuff. > > I have no clue about Windows device drivers, so this may be a silly > suggestion. If your suggestion above already requires a Xen code change, > one possibility might be copy the idea behind the PCI unplug logic. Either > if the new PCI device is used, it could unplug the old one, or vice versa. > Drivers magically unplugging themselves may not be ideal, but it beats > having 2 drivers fighting over the same device. >Unfortunately, whilst it sounds good on the face of it, it''s not as straightforward as that. The old Citrix PV drivers did not just bind to the Xen platform device, and make that device go away automagically would actually cause the system disk to disappear without any clean fallback to emulation. As long as nothing actually breaks if and when Windows fetches the new PV bus driver from Windows Update then we can document the need to manually uninstall any other PV drivers. Paul
Tim Deegan
2013-Jun-20 08:56 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
At 07:47 +0000 on 20 Jun (1371714432), Paul Durrant wrote:> > > I agree. If this is really the only solution, we would need to have > > > both versions presented to the guest so that old drivers continue to > > > work without any intervention. > > > > I suspect that if we expose both, both sets of drivers try to run the > > same PV connections, and hilarity ensues. > > > > Actually I think I can make that work, and it is the conclusion I came > to after Alex''s comment.Ah, nice! In that case, I''m a lot less worried -- we can just expose both versions/devices by default and there''s no need for a visible control knob tied to driver version (except maybe for debugging). It means an ''unsupported'' device appearing on other/older OSes, which is unfortunate, but ISTR only Windows really complains visibly about that. Tim.
Paul Durrant
2013-Jun-20 09:25 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Tim Deegan [mailto:tim@xen.org] > Sent: 20 June 2013 09:56 > To: Paul Durrant > Cc: Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; Ian Campbell; qemu- > devel@nongnu.org > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > At 07:47 +0000 on 20 Jun (1371714432), Paul Durrant wrote: > > > > I agree. If this is really the only solution, we would need to have > > > > both versions presented to the guest so that old drivers continue to > > > > work without any intervention. > > > > > > I suspect that if we expose both, both sets of drivers try to run the > > > same PV connections, and hilarity ensues. > > > > > > > Actually I think I can make that work, and it is the conclusion I came > > to after Alex''s comment. > > Ah, nice! In that case, I''m a lot less worried -- we can just expose > both versions/devices by default and there''s no need for a visible > control knob tied to driver version (except maybe for debugging). > > It means an ''unsupported'' device appearing on other/older OSes, which is > unfortunate, but ISTR only Windows really complains visibly about that. >Yes, I think only Windows complains and we should be able to post an article somewhere saying ''don''t worry about it'' :-) Paul
Ian Campbell
2013-Jun-26 10:39 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
On Thu, 2013-06-20 at 09:56 +0100, Tim Deegan wrote:> At 07:47 +0000 on 20 Jun (1371714432), Paul Durrant wrote: > > > > I agree. If this is really the only solution, we would need to have > > > > both versions presented to the guest so that old drivers continue to > > > > work without any intervention. > > > > > > I suspect that if we expose both, both sets of drivers try to run the > > > same PV connections, and hilarity ensues. > > > > > > > Actually I think I can make that work, and it is the conclusion I came > > to after Alex''s comment. > > Ah, nice! In that case, I''m a lot less worried -- we can just expose > both versions/devices by default and there''s no need for a visible > control knob tied to driver version (except maybe for debugging). > > It means an ''unsupported'' device appearing on other/older OSes, which is > unfortunate, but ISTR only Windows really complains visibly about that.I''m not at all convinced this is a good approach. Are we going to add a third, forth and fifth device whenever Linux, BSD, $other-OS paint themselves into a corner somehow WRT their internal driver model vs their Xen PV drivers? AFAIK the Citrix PV drivers have never been formally supported on anything other than XenServer and XCP (and I''m not sure about "formally" for XCP), so this is really an issue of supporting upgrades for people running those. I think rather than making hacks upstream, which will effectively need to be supported forever, the hack should be done on the XenServer side and take advantage of whatever the supported upgrade path is (N+1 or N+2 or whatever). This way the hack can eventually go away. For anyone who grabbed the older drivers and used them outside of the context of XenServer or XCP this is a documentation/awareness issue. Can we use the blacklisting functionality of the PV unplug protocol to blacklist previous versions of the Citrix PV drivers? I wouldn''t consider this an unsuitable thing to do in upstream, in fact it would be using it for exactly the purpose for which it was designed. As long as this is sufficient to boot with emulated devices in order to switch to the newer drivers that should be good enough. Ian.
Paul Durrant
2013-Jun-26 11:23 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Ian Campbell > Sent: 26 June 2013 11:40 > To: Tim (Xen.org) > Cc: Paul Durrant; Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; qemu- > devel@nongnu.org > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > On Thu, 2013-06-20 at 09:56 +0100, Tim Deegan wrote: > > At 07:47 +0000 on 20 Jun (1371714432), Paul Durrant wrote: > > > > > I agree. If this is really the only solution, we would need to have > > > > > both versions presented to the guest so that old drivers continue to > > > > > work without any intervention. > > > > > > > > I suspect that if we expose both, both sets of drivers try to run the > > > > same PV connections, and hilarity ensues. > > > > > > > > > > Actually I think I can make that work, and it is the conclusion I came > > > to after Alex''s comment. > > > > Ah, nice! In that case, I''m a lot less worried -- we can just expose > > both versions/devices by default and there''s no need for a visible > > control knob tied to driver version (except maybe for debugging). > > > > It means an ''unsupported'' device appearing on other/older OSes, which is > > unfortunate, but ISTR only Windows really complains visibly about that. > > I''m not at all convinced this is a good approach. Are we going to add a > third, forth and fifth device whenever Linux, BSD, $other-OS paint > themselves into a corner somehow WRT their internal driver model vs > their Xen PV drivers? >Is there any harm in having a separate device for each OS''s PV drivers? I agree it''s not entirely elegant, but at least it allows for revision control when you need it.> AFAIK the Citrix PV drivers have never been formally supported on > anything other than XenServer and XCP (and I''m not sure about "formally" > for XCP), so this is really an issue of supporting upgrades for people > running those. I think rather than making hacks upstream, which will > effectively need to be supported forever, the hack should be done on the > XenServer side and take advantage of whatever the supported upgrade path > is (N+1 or N+2 or whatever). This way the hack can eventually go away. > For anyone who grabbed the older drivers and used them outside of the > context of XenServer or XCP this is a documentation/awareness issue. > > Can we use the blacklisting functionality of the PV unplug protocol to > blacklist previous versions of the Citrix PV drivers? I wouldn''t > consider this an unsuitable thing to do in upstream, in fact it would be > using it for exactly the purpose for which it was designed. As long as > this is sufficient to boot with emulated devices in order to switch to > the newer drivers that should be good enough. >We could blacklist all existing Citrix PV drivers in upstream QEMU, to avoid the clash, but that seems like a very unfriendly approach. Also, it''s not going to stop someone with an existing VM, who happens to be using legacy Citrix PV drivers (an AWS VM for instance) receiving a driver from Windows Update that will blue-screen their VM on next reboot. Hence the only way forward is to bind the new drivers to something new, that we can control, so we know what driver a VM is going to get from Windows Update. And we may indeed need to modify its revision in future so that we can retire old sets of PV drivers and replace them with new ones, but only for newer XenServer releases. Thus, I also propose to make the PCI revision of the new device a command line parameter. Paul
Ian Campbell
2013-Jun-26 11:53 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
On Wed, 2013-06-26 at 12:23 +0100, Paul Durrant wrote:> > -----Original Message----- > > From: Ian Campbell > > Sent: 26 June 2013 11:40 > > To: Tim (Xen.org) > > Cc: Paul Durrant; Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; qemu- > > devel@nongnu.org > > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > > version 2. > > > > On Thu, 2013-06-20 at 09:56 +0100, Tim Deegan wrote: > > > At 07:47 +0000 on 20 Jun (1371714432), Paul Durrant wrote: > > > > > > I agree. If this is really the only solution, we would need to have > > > > > > both versions presented to the guest so that old drivers continue to > > > > > > work without any intervention. > > > > > > > > > > I suspect that if we expose both, both sets of drivers try to run the > > > > > same PV connections, and hilarity ensues. > > > > > > > > > > > > > Actually I think I can make that work, and it is the conclusion I came > > > > to after Alex''s comment. > > > > > > Ah, nice! In that case, I''m a lot less worried -- we can just expose > > > both versions/devices by default and there''s no need for a visible > > > control knob tied to driver version (except maybe for debugging). > > > > > > It means an ''unsupported'' device appearing on other/older OSes, which is > > > unfortunate, but ISTR only Windows really complains visibly about that. > > > > I''m not at all convinced this is a good approach. Are we going to add a > > third, forth and fifth device whenever Linux, BSD, $other-OS paint > > themselves into a corner somehow WRT their internal driver model vs > > their Xen PV drivers? > > > > Is there any harm in having a separate device for each OS''s PV > drivers? I agree it''s not entirely elegant, but at least it allows for > revision control when you need it. > > > AFAIK the Citrix PV drivers have never been formally supported on > > anything other than XenServer and XCP (and I''m not sure about "formally" > > for XCP), so this is really an issue of supporting upgrades for people > > running those. I think rather than making hacks upstream, which will > > effectively need to be supported forever, the hack should be done on the > > XenServer side and take advantage of whatever the supported upgrade path > > is (N+1 or N+2 or whatever). This way the hack can eventually go away. > > For anyone who grabbed the older drivers and used them outside of the > > context of XenServer or XCP this is a documentation/awareness issue. > > > > Can we use the blacklisting functionality of the PV unplug protocol to > > blacklist previous versions of the Citrix PV drivers? I wouldn''t > > consider this an unsuitable thing to do in upstream, in fact it would be > > using it for exactly the purpose for which it was designed. As long as > > this is sufficient to boot with emulated devices in order to switch to > > the newer drivers that should be good enough. > > > > We could blacklist all existing Citrix PV drivers in upstream QEMU, to > avoid the clash, but that seems like a very unfriendly approach. Also, > it''s not going to stop someone with an existing VM, who happens to be > using legacy Citrix PV drivers (an AWS VM for instance) receiving a > driver from Windows Update that will blue-screen their VM on next > reboot. Hence the only way forward is to bind the new drivers to > something new, that we can control, so we know what driver a VM is > going to get from Windows Update.Is it not also possible to issue a new version of the old driver via Windows update, e.g. a stunt one which just disables itself? Or to have the new one somehow reach out and nobble the old one. Or have the new one detect the presence of the old one and refuse to install until it has been removed?> And we may indeed need to modify its revision in future so that we > can retire old sets of PV drivers and replace them with new ones, but > only for newer XenServer releases. Thus, I also propose to make the > PCI revision of the new device a command line parameter.So this ugliness is really just the thin end of the wedge and all users of these drivers in the future are going to need to be educated on which magic qemu option they need to go with the version of the driver they are running? And when they get an update they might need to go into their configuration and change it or else risk a blue screen on the next reboot? That sounds like madness to me... It may be acceptable for XenServer to tie versions of the PV drivers to specific versions of XenServer but I''m afraid that is not acceptable upstream, we can''t just go around willy nilly breaking compatibility between front and backends, this is why we have feature flags, negotiation and fallbacks. It would be one thing to accept this unfortunate event and take a one time hack to dig you out of a hole. But in that case it would really need to be the case that the new version of the drivers are designed with sufficient future proofing mechanisms that any future changes can be handled internally. It seems to me like you intend to treat this mechanism as an ongoing deliberate mechanism rather than a one off fix for a historical mistake. Ian.
Tim Deegan
2013-Jun-26 11:57 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
At 11:23 +0000 on 26 Jun (1372245783), Paul Durrant wrote:> We could blacklist all existing Citrix PV drivers in upstream QEMU, > to avoid the clash, but that seems like a very unfriendly > approach. Also, it''s not going to stop someone with an existing VM, > who happens to be using legacy Citrix PV drivers (an AWS VM for > instance) receiving a driver from Windows Update that will blue-screen > their VM on next reboot. Hence the only way forward is to bind the new > drivers to something new, that we can control, so we know what driver > a VM is going to get from Windows Update.I don''t think you ever got an answer about whether this could be finagled using version numbers in the drivers. Also: would it not be possible to have a blkfront driver (even a trivial one) in your new bus driver so it can detect and avoid this problem? Or: have your bus driver detect when the blkfront driver is missing and not unplug the emulated disk? In fact wouldn''t having the emulated disk driver do the unplug solve it for free?> And we may indeed need to > modify its revision in future so that we can retire old sets of PV > drivers and replace them with new ones, but only for newer XenServer > releases. Thus, I also propose to make the PCI revision of the new > device a command line parameter.I''d rather not. This gets straight back to having host-admin controls that have to manually be matched to in-guest software. Tim.
Paul Durrant
2013-Jun-26 12:06 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Tim Deegan [mailto:tim@xen.org] > Sent: 26 June 2013 12:58 > To: Paul Durrant > Cc: Ian Campbell; Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; qemu- > devel@nongnu.org > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > At 11:23 +0000 on 26 Jun (1372245783), Paul Durrant wrote: > > We could blacklist all existing Citrix PV drivers in upstream QEMU, > > to avoid the clash, but that seems like a very unfriendly > > approach. Also, it''s not going to stop someone with an existing VM, > > who happens to be using legacy Citrix PV drivers (an AWS VM for > > instance) receiving a driver from Windows Update that will blue-screen > > their VM on next reboot. Hence the only way forward is to bind the new > > drivers to something new, that we can control, so we know what driver > > a VM is going to get from Windows Update. > > I don''t think you ever got an answer about whether this could be > finagled using version numbers in the drivers.No, we thought about that and I don''t believe it would be possible.> Also: would it not be possible to have a blkfront driver (even a trivial > one) in your new bus driver so it can detect and avoid this problem? > > Or: have your bus driver detect when the blkfront driver is missing and > not unplug the emulated disk? In fact wouldn''t having the emulated disk > driver do the unplug solve it for free? >The issue is the old s/w not the new s/w. The old drivers make assumptions about each other''s presence as we can''t change that because they are already out there.> > And we may indeed need to > > modify its revision in future so that we can retire old sets of PV > > drivers and replace them with new ones, but only for newer XenServer > > releases. Thus, I also propose to make the PCI revision of the new > > device a command line parameter. > > I''d rather not. This gets straight back to having host-admin controls > that have to manually be matched to in-guest software. >Well not really. This is just the same as a h/w vendor shipping a new device. The drivers for the old device are still there on Windows Update; so no change. The new drivers are for the new device so only download when it is present. Setting the revision number for the ''citrix pv bus'' device would only be like choosing which emulated NIC you want. Paul
Tim Deegan
2013-Jun-26 12:36 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
At 12:06 +0000 on 26 Jun (1372248391), Paul Durrant wrote:> > -----Original Message----- > > From: Tim Deegan [mailto:tim@xen.org] > > Sent: 26 June 2013 12:58 > > To: Paul Durrant > > Cc: Ian Campbell; Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; qemu- > > devel@nongnu.org > > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > > version 2. > > > > At 11:23 +0000 on 26 Jun (1372245783), Paul Durrant wrote: > > > We could blacklist all existing Citrix PV drivers in upstream QEMU, > > > to avoid the clash, but that seems like a very unfriendly > > > approach. Also, it''s not going to stop someone with an existing VM, > > > who happens to be using legacy Citrix PV drivers (an AWS VM for > > > instance) receiving a driver from Windows Update that will blue-screen > > > their VM on next reboot. Hence the only way forward is to bind the new > > > drivers to something new, that we can control, so we know what driver > > > a VM is going to get from Windows Update. > > > > I don''t think you ever got an answer about whether this could be > > finagled using version numbers in the drivers. > > No, we thought about that and I don''t believe it would be possible.This doc makes it look like it''s just a matter of choosing appropriate version and dates: http://msdn.microsoft.com/en-us/library/windows/hardware/gg487453.aspx> > Also: would it not be possible to have a blkfront driver (even a trivial > > one) in your new bus driver so it can detect and avoid this problem? > > > > Or: have your bus driver detect when the blkfront driver is missing and > > not unplug the emulated disk? In fact wouldn''t having the emulated disk > > driver do the unplug solve it for free? > > The issue is the old s/w not the new s/w. The old drivers make > assumptions about each other''s presence as we can''t change that > because they are already out there.The issue you mentioned was that the old drivers bound the block driver to the PCI device, and when your new driver is installed you get STOP 7B because the system disk is missing (because I guess you''d need the new xenbus driver to come up before it will trigger installing the new block driver). So can the new driver not fix this, either by running a trivial blkfront itself or by allowing the emulated IDE controller to live?> > > And we may indeed need to > > > modify its revision in future so that we can retire old sets of PV > > > drivers and replace them with new ones, but only for newer XenServer > > > releases. Thus, I also propose to make the PCI revision of the new > > > device a command line parameter. > > > > I''d rather not. This gets straight back to having host-admin controls > > that have to manually be matched to in-guest software. > > Well not really. This is just the same as a h/w vendor shipping a new > device.Well, that would be more like having the PCI revision reflect the Xen version. Which might be a reasonable idea, if there is to be a second PCI device. But metaphors aside, it''s still requiring an admin change in order to match the software inside the VM, which as we''ve seen is unpopular with admins. :) Tim.
Paul Durrant
2013-Jun-26 13:00 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Tim Deegan [mailto:tim@xen.org] > Sent: 26 June 2013 13:36 > To: Paul Durrant > Cc: Ian Campbell; Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; qemu- > devel@nongnu.org > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > At 12:06 +0000 on 26 Jun (1372248391), Paul Durrant wrote: > > > -----Original Message----- > > > From: Tim Deegan [mailto:tim@xen.org] > > > Sent: 26 June 2013 12:58 > > > To: Paul Durrant > > > Cc: Ian Campbell; Matt Wilson; Alex Bligh; xen-devel@lists.xen.org; > qemu- > > > devel@nongnu.org > > > Subject: Re: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI > device > > > version 2. > > > > > > At 11:23 +0000 on 26 Jun (1372245783), Paul Durrant wrote: > > > > We could blacklist all existing Citrix PV drivers in upstream QEMU, > > > > to avoid the clash, but that seems like a very unfriendly > > > > approach. Also, it''s not going to stop someone with an existing VM, > > > > who happens to be using legacy Citrix PV drivers (an AWS VM for > > > > instance) receiving a driver from Windows Update that will blue-screen > > > > their VM on next reboot. Hence the only way forward is to bind the > new > > > > drivers to something new, that we can control, so we know what driver > > > > a VM is going to get from Windows Update. > > > > > > I don''t think you ever got an answer about whether this could be > > > finagled using version numbers in the drivers. > > > > No, we thought about that and I don''t believe it would be possible. > > This doc makes it look like it''s just a matter of choosing appropriate > version and dates: > http://msdn.microsoft.com/en- > us/library/windows/hardware/gg487453.aspx >The issue, I believe, is that DriverVerDate trumps DriverVerVersion and AFAIK we can''t fake an old date because the driver signing process will not allow it.> > > Also: would it not be possible to have a blkfront driver (even a trivial > > > one) in your new bus driver so it can detect and avoid this problem? > > > > > > Or: have your bus driver detect when the blkfront driver is missing and > > > not unplug the emulated disk? In fact wouldn''t having the emulated disk > > > driver do the unplug solve it for free? > > > > The issue is the old s/w not the new s/w. The old drivers make > > assumptions about each other''s presence as we can''t change that > > because they are already out there. > > The issue you mentioned was that the old drivers bound the block driver > to the PCI device, and when your new driver is installed you get STOP 7B > because the system disk is missing (because I guess you''d need the new > xenbus driver to come up before it will trigger installing the new block > driver). > > So can the new driver not fix this, either by running a trivial blkfront > itself or by allowing the emulated IDE controller to live? >Aha, the old drivers have a registry override which will cause them to quiesce so I could have the new driver go and set that to make them shut up. That might allow us to cleanly take over on the next reboot.> > > > And we may indeed need to > > > > modify its revision in future so that we can retire old sets of PV > > > > drivers and replace them with new ones, but only for newer XenServer > > > > releases. Thus, I also propose to make the PCI revision of the new > > > > device a command line parameter. > > > > > > I''d rather not. This gets straight back to having host-admin controls > > > that have to manually be matched to in-guest software. > > > > Well not really. This is just the same as a h/w vendor shipping a new > > device. > > Well, that would be more like having the PCI revision reflect the Xen > version. Which might be a reasonable idea, if there is to be a second > PCI device. > > But metaphors aside, it''s still requiring an admin change in order to > match the software inside the VM, which as we''ve seen is unpopular with > admins. :) >Yes, but that''s more of a business decision than an architectural one. As you say, it may well be unpopular and thus is something I''d prefer we didn''t do unless we absolutely have to. What we can''t do is have drivers being downloaded from Windows Update into systems where we know they are going to break things so I would like the new device to have enough tunability to avoid a trainwreck, and a parameterised revision is just enough :-) Thus, I still prefer to have a new device and leave the old one alone. Paul
Alex Bligh
2013-Jun-26 20:00 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
--On 26 June 2013 12:06:31 +0000 Paul Durrant <Paul.Durrant@citrix.com> wrote:> The issue is the old s/w not the new s/w. The old drivers make > assumptions about each other''s presence as we can''t change that because > they are already out there.Then (without knowing the details) what''s to prevent the new drivers not making such assumptions, and carrying some versioning information, such that we need one new PCI device now, but no more in the future? -- Alex Bligh
Paul Durrant
2013-Jun-27 08:29 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: Alex Bligh [mailto:alex@alex.org.uk] > Sent: 26 June 2013 21:00 > To: Paul Durrant; Tim (Xen.org) > Cc: Ian Campbell; Matt Wilson; xen-devel@lists.xen.org; qemu- > devel@nongnu.org; Alex Bligh > Subject: RE: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device > version 2. > > > > --On 26 June 2013 12:06:31 +0000 Paul Durrant <Paul.Durrant@citrix.com> > wrote: > > > The issue is the old s/w not the new s/w. The old drivers make > > assumptions about each other''s presence as we can''t change that because > > they are already out there. > > Then (without knowing the details) what''s to prevent the new drivers not > making such assumptions, and carrying some versioning information, such > that we need one new PCI device now, but no more in the future? >The new drivers are architected very differently such that they are suitable for Windows Update. That means each driver is separately installable and upgradeable and can make no assumptions about presence or version of any other driver. Thus all discovery is done at runtime and each individual interface carries a version number. I still think we need the option to control some aspect of the PCI device that the top level bus driver binds to so that we have the possibility of using different PV drivers sets on different VMs. I''m not saying that this is necessarily a good idea but the idea of a virtual hardware platform version (which is essentially what I believe this top level device represents, since we have no other way of indicating that to Windows Update) has precedent; VMWare have had such a concept for a very long time (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003746) and so it seems quite reasonable for a product such as XenServer to have a similar concept. I''ll submit code for a new Citrix PV Bus device shortly. Paul
Paul Durrant
2013-Jun-27 10:58 UTC
Re: [Qemu-devel] [PATCH] Add Xen platform PCI device version 2.
> -----Original Message----- > From: qemu-devel-bounces+paul.durrant=citrix.com@nongnu.org > [mailto:qemu-devel-bounces+paul.durrant=citrix.com@nongnu.org] On > Behalf Of Paul Durrant > Sent: 27 June 2013 09:29 > To: Alex Bligh; Tim (Xen.org) > Cc: qemu-devel@nongnu.org; Ian Campbell; Matt Wilson; xen- > devel@lists.xen.org > Subject: Re: [Qemu-devel] [Xen-devel] [PATCH] Add Xen platform PCI device > version 2. > > > -----Original Message----- > > From: Alex Bligh [mailto:alex@alex.org.uk] > > Sent: 26 June 2013 21:00 > > To: Paul Durrant; Tim (Xen.org) > > Cc: Ian Campbell; Matt Wilson; xen-devel@lists.xen.org; qemu- > > devel@nongnu.org; Alex Bligh > > Subject: RE: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI > device > > version 2. > > > > > > > > --On 26 June 2013 12:06:31 +0000 Paul Durrant <Paul.Durrant@citrix.com> > > wrote: > > > > > The issue is the old s/w not the new s/w. The old drivers make > > > assumptions about each other''s presence as we can''t change that > because > > > they are already out there. > > > > Then (without knowing the details) what''s to prevent the new drivers not > > making such assumptions, and carrying some versioning information, such > > that we need one new PCI device now, but no more in the future? > > > > The new drivers are architected very differently such that they are suitable > for Windows Update. That means each driver is separately installable and > upgradeable and can make no assumptions about presence or version of any > other driver. Thus all discovery is done at runtime and each individual > interface carries a version number. > I still think we need the option to control some aspect of the PCI device that > the top level bus driver binds to so that we have the possibility of using > different PV drivers sets on different VMs. I''m not saying that this is > necessarily a good idea but the idea of a virtual hardware platform version > (which is essentially what I believe this top level device represents, since we > have no other way of indicating that to Windows Update) has precedent; > VMWare have had such a concept for a very long time > (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US > &cmd=displayKC&externalId=1003746) and so it seems quite reasonable for > a product such as XenServer to have a similar concept. I''ll submit code for a > new Citrix PV Bus device shortly. >I had a chat with Tim and there may be chance we can do something sensible and still bind to the usual Xen platform device ID so I''m going to give that a try first. Paul