Alex Bligh
2011-Oct-18 18:57 UTC
[Xen-devel] Compilation problems: oldstyle/xenlinux 2.6.38, blktap2
I am trying to port Andrew Lyon''s oldstyle/xenlinux patches against 2.6.38 to an Ubuntu 2.6.38 Natty kernel. I am running across this problem, which is in essence that the same functions are implemented in blktap2 and blktap2-new: LD drivers/xen/built-in.o drivers/xen/blktap2-new/built-in.o: In function `blktap_ring_init'': /home/amb/xen/ubuntu/git/ubuntu-natty/drivers/xen/blktap2-new/ring.c:521: multiple definition of `blktap_ring_init'' drivers/xen/blktap2/built-in.o:/home/amb/xen/ubuntu/git/ubuntu-natty/drivers/xen/blktap2/ring.c:587: first defined here drivers/xen/blktap2-new/built-in.o: In function `blktap_ring_destroy'': /home/amb/xen/ubuntu/git/ubuntu-natty/drivers/xen/blktap2-new/ring.c:459: multiple definition of `blktap_ring_destroy'' drivers/xen/blktap2/built-in.o:/home/amb/xen/ubuntu/git/ubuntu-natty/drivers/xen/blktap2/ring.c:557: first defined here drivers/xen/blktap2-new/built-in.o: In function `blktap_device_init'': /home/amb/xen/ubuntu/git/ubuntu-natty/drivers/xen/blktap2-new/device.c:550: ... [similar snipped] ... make[2]: *** [drivers/xen/built-in.o] Error 1 make[1]: *** [drivers/xen] Error 2 make: *** [drivers] Error 2 As far as I can tell from the Makefile, both directories are always built: obj-$(CONFIG_XEN_BLKDEV_TAP2) += blktap2/ blktap2-new/ What''s the difference between blktap2 and blktap2-new? Should only one be built? I can''t see a config option that switches between them. I know one option is to just build blktap instead and ignore blktap2. If I want to run this as a dom0 for Xen 3.3, will I lose anything by not having blktap2? -- Alex Bligh CONFIG_X86_XEN_MCE=y CONFIG_XEN_PCIDEV_FRONTEND=y # CONFIG_XEN_PCIDEV_FE_DEBUG is not set CONFIG_NETXEN_NIC=m # CONFIG_TCG_XEN is not set # CONFIG_XEN_WDT is not set CONFIG_XEN=y CONFIG_XEN_INTERFACE_VERSION=0x00030207 # XEN CONFIG_XEN_PRIVILEGED_GUEST=y CONFIG_XEN_PRIVCMD=y CONFIG_XEN_DOMCTL=y CONFIG_XEN_XENBUS_DEV=y CONFIG_XEN_NETDEV_ACCEL_SFC_UTIL=m CONFIG_XEN_BACKEND=y CONFIG_XEN_BLKDEV_BACKEND=y CONFIG_XEN_BLKDEV_TAP=y CONFIG_XEN_BLKDEV_TAP2=y CONFIG_XEN_BLKBACK_PAGEMAP=y CONFIG_XEN_NETDEV_BACKEND=y CONFIG_XEN_NETDEV_TX_SHIFT=8 # CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set # CONFIG_XEN_NETDEV_LOOPBACK is not set CONFIG_XEN_PCIDEV_BACKEND=y CONFIG_XEN_PCIDEV_BACKEND_VPCI=y # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set # CONFIG_XEN_PCIDEV_BE_DEBUG is not set # CONFIG_XEN_TPMDEV_BACKEND is not set CONFIG_XEN_SCSI_BACKEND=m CONFIG_XEN_USB_BACKEND=m CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND=m CONFIG_XEN_SCSI_FRONTEND=m CONFIG_XEN_USB_FRONTEND=m CONFIG_XEN_USB_FRONTEND_HCD_STATS=y # CONFIG_XEN_USB_FRONTEND_HCD_PM is not set CONFIG_XEN_GRANT_DEV=y CONFIG_XEN_FRAMEBUFFER=y CONFIG_XEN_KEYBOARD=y CONFIG_XEN_DISABLE_SERIAL=y CONFIG_XEN_SYSFS=y CONFIG_XEN_NR_GUEST_DEVICES=256 CONFIG_XEN_COMPAT_030002_AND_LATER=y # CONFIG_XEN_COMPAT_030004_AND_LATER is not set # CONFIG_XEN_COMPAT_030100_AND_LATER is not set # CONFIG_XEN_COMPAT_030200_AND_LATER is not set # CONFIG_XEN_COMPAT_030300_AND_LATER is not set # CONFIG_XEN_COMPAT_030400_AND_LATER is not set # CONFIG_XEN_COMPAT_040000_AND_LATER is not set # CONFIG_XEN_COMPAT_040100_AND_LATER is not set # CONFIG_XEN_COMPAT_LATEST_ONLY is not set CONFIG_XEN_COMPAT=0x030002 CONFIG_XEN_SMPBOOT=y CONFIG_XEN_DEVMEM=y CONFIG_XEN_BALLOON=y CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DEV_EVTCHN=m _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Oct-19 07:29 UTC
Re: [Xen-devel] Compilation problems: oldstyle/xenlinux 2.6.38, blktap2
>>> On 18.10.11 at 20:57, Alex Bligh <alex@alex.org.uk> wrote: > As far as I can tell from the Makefile, both directories are always built: > > obj-$(CONFIG_XEN_BLKDEV_TAP2) += blktap2/ blktap2-new/ > > What''s the difference between blktap2 and blktap2-new? Should only > one be built? I can''t see a config option that switches between them.Yeah, assuming he (as always) just took our patches, the this isn''t meant to be used with CONFIG_XEN_BLKDEV_TAP2=y (which we never do). Setting it to =m will get you going. I''ll see if I can adjust this (but only in the current patch sets) so that it won''t end up trying to build both into the kernel. Under the same assumption - the difference between the two is that -new is what is in the pv-ops kernel (but not upstream), while the other is the forward port from the 2.6.18 tree.> I know one option is to just build blktap instead and ignore blktap2. > If I want to run this as a dom0 for Xen 3.3, will I lose anything > by not having blktap2?Quite obviously your kernel will lack support for any of the tap2: protocols. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Alex Bligh
2011-Oct-19 20:40 UTC
Re: [Xen-devel] Compilation problems: oldstyle/xenlinux 2.6.38, blktap2
Jan, --On 19 October 2011 08:29:48 +0100 Jan Beulich <JBeulich@suse.com> wrote:>>>> On 18.10.11 at 20:57, Alex Bligh <alex@alex.org.uk> wrote: >> As far as I can tell from the Makefile, both directories are always >> built: >> >> obj-$(CONFIG_XEN_BLKDEV_TAP2) += blktap2/ blktap2-new/ >> >> What''s the difference between blktap2 and blktap2-new? Should only >> one be built? I can''t see a config option that switches between them. > > Yeah, assuming he (as always) just took our patches, the this isn''t > meant to be used with CONFIG_XEN_BLKDEV_TAP2=y (which we > never do). Setting it to =m will get you going. I''ll see if I can adjust > this (but only in the current patch sets) so that it won''t end up trying > to build both into the kernel.Thanks. Apologies in advance that this email contains several no doubt stupid questions: Stupid question #1: I take it that "our patches" means SUSE''s? Is there a git tree I can pull patches from rebased against something modern (e.g. 2.6.38)? What I''m doing is creating a kernel based on Ubuntu Natty, and I currently have it working with one great blob of Xen patches, rather than the original git paches which would be better. I''m quite happy to publish the tree if that''s useful to people, but I get the feeling it would be more useful if it had the original commits rather than them squashed together in one blob. I''ve got to the stage of it compiling fine (+/- blktap2), packaging fine, but untested.> Under the same assumption - the difference between the two is that > -new is what is in the pv-ops kernel (but not upstream), while the > other is the forward port from the 2.6.18 tree.Stupid question #2: so, if I''m running with Xen 3.3.x, it won''t use any of the pvops stuff. Will a xenlinux/oldstyle kernel ever use any of the pvops stuff? If blktap2 is compiled as a module, how does it know which module to load (blktap2 or blktap2-new) apart from manual insmod?>> I know one option is to just build blktap instead and ignore blktap2. >> If I want to run this as a dom0 for Xen 3.3, will I lose anything >> by not having blktap2? > > Quite obviously your kernel will lack support for any of the tap2: > protocols.Stupid question #3: If this kernel is running as dom0 for 3.3.x, would it use any of the blktap2 stuff anyway? I''m working from memory here but didn''t that come after 3.3.1? And if I''m wrong, aren''t I going to want to build blktap2 (presumably not -new) as a built-in (i.e. "y")? Perhaps I''m missing what tap2 does vs. tap. -- Alex Bligh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Oct-20 07:20 UTC
Re: [Xen-devel] Compilation problems: oldstyle/xenlinux 2.6.38, blktap2
>>> On 19.10.11 at 22:40, Alex Bligh <alex@alex.org.uk> wrote: > --On 19 October 2011 08:29:48 +0100 Jan Beulich <JBeulich@suse.com> wrote: > Stupid question #1: I take it that "our patches" means SUSE''s? Is there a > git tree I can pull patches from rebased against something modern (e.g. > 2.6.38)? What I''m doing is creating a kernel based on Ubuntu Natty, and I > currently have it working with one great blob of Xen patches, rather than > the original git paches which would be better.You could pull openSUSE''s kernel-source-*.src.rpm-s, or go to http://kernel.opensuse.org/git. That''s a fine grained as you will be able to get it.> Stupid question #2: so, if I''m running with Xen 3.3.x, it won''t use > any of the pvops stuff. Will a xenlinux/oldstyle kernel ever use > any of the pvops stuff?I''m trying to merge with drivers that make it upstream, but we''re not going to use the base pvops infrastructure until we''re going to switch over (in the not too far future, hopefully).> If blktap2 is compiled as a module, how does > it know which module to load (blktap2 or blktap2-new) apart from > manual insmod?That''s how it''s expected to work (or in SLES possibly by marking only one of them supported, which will prevent the other from getting loaded).>> Quite obviously your kernel will lack support for any of the tap2: >> protocols. > > Stupid question #3: If this kernel is running as dom0 for 3.3.x, > would it use any of the blktap2 stuff anyway? I''m working from > memory here but didn''t that come after 3.3.1? And if I''m wrong, aren''t > I going to want to build blktap2 (presumably not -new) as a built-in > (i.e. "y")? Perhaps I''m missing what tap2 does vs. tap.Indeed, tap2 appeared in 4.0.0 only, so with 3.3.x you should be safe to leave it off. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Alex Bligh
2011-Oct-20 08:17 UTC
Re: [Xen-devel] Compilation problems: oldstyle/xenlinux 2.6.38, blktap2
Jan, --On 20 October 2011 08:20:20 +0100 Jan Beulich <JBeulich@suse.com> wrote:>>> Quite obviously your kernel will lack support for any of the tap2: >>> protocols. >> >> Stupid question #3: If this kernel is running as dom0 for 3.3.x, >> would it use any of the blktap2 stuff anyway? I''m working from >> memory here but didn''t that come after 3.3.1? And if I''m wrong, aren''t >> I going to want to build blktap2 (presumably not -new) as a built-in >> (i.e. "y")? Perhaps I''m missing what tap2 does vs. tap. > > Indeed, tap2 appeared in 4.0.0 only, so with 3.3.x you should be > safe to leave it off.Thanks. -- Alex Bligh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel