Hello! I am trying to build a custom kernel for myself that is supposed to run a network driver domain. To do so I configured it with the attached settings. Starting the kernel in a VM I get the following output using xen unstable from this morning: Using config file "/etc/xen/yyyy". Started domain yyyy, console on port 9603 ************ REMOTE CONSOLE: CTRL-] TO QUIT ******** Linux version 2.6.10-xen1 (root@xxxx) (gcc version 3.3.5 (Debian 1:3.3.5-6)) #2 Tue Jan 18 20:58:48 CET 2005 BIOS-provided physical RAM map: Xen: 0000000000000000 - 0000000002000000 (usable) 32MB LOWMEM available. DMI not present. Built 1 zonelists Kernel command line: root=/dev/hda1 ro Initializing CPU#0 PID hash table entries: 256 (order: 8, 4096 bytes) Xen reported: 1668.744 MHz processor. Using tsc for high-res timesource Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 30232k/32768k available (1455k kernel code, 2488k reserved, 355k data, 16k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) CPU: L2 Cache: 256K (64 bytes/line) CPU: AMD Athlon(tm) XP 2000+ stepping 01 Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Checking ''hlt'' instruction... disabled NET: Registered protocol family 16 xen_mem: Initialising balloon driver. Initializing Cryptographic API i8042.c: Can''t read CTR while initializing i8042. io scheduler noop registered io scheduler anticipatory registered elevator: using anticipatory as default io scheduler Floppy drive(s): fd0 is unknown type 15 (usb?), fd1 is unknown type 15 (usb?) floppy0: no floppy controllers found RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) Couldn''t register Xen virtual console driver as tty Event-channel device installed. xen_blk: Initialising virtual block device driver mice: PS/2 mouse device common for all mice device-mapper: 4.3.0-ioctl (2004-09-30) initialised: dm-devel@redhat.com NET: Registered protocol family 2 IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 2048 bind 4096) NET: Registered protocol family 1 NET: Registered protocol family 17 ReiserFS: hda1: found reiserfs format "3.6" with standard journal ReiserFS: hda1: using ordered data mode ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 8, max trans len 1024, max batch 900, max commit age 30, max trans age 30 ReiserFS: hda1: checking transaction log (hda1) ReiserFS: hda1: Using r5 hash to sort names VFS: Mounted root (reiserfs filesystem) readonly. Freeing unused kernel memory: 116k freed Unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c01c9cf6 *pde = ma 00000000 pa 55555000 [<c01f8abf>] __xencons_tx_flush+0x1ef/0x270 [<c011a323>] console_device+0x33/0x50 [<c01cacc5>] tty_open+0x95/0x2b0 [<c01cac30>] tty_open+0x0/0x2b0 [<c015c506>] chrdev_open+0xa6/0x170 [<c01527b9>] dentry_open+0xf9/0x170 [<c01526b2>] filp_open+0x62/0x70 [<c0152869>] get_unused_fd+0x39/0xe0 [<c01529d9>] sys_open+0x49/0x90 [<c0105070>] init+0x0/0x110 [<c01050f0>] init+0x80/0x110 [<c0107775>] kernel_thread_helper+0x5/0x10 Oops: 0000 [#1] PREEMPT CPU: 0 EIP: 0061:[<c01c9cf6>] Not tainted VLI EFLAGS: 00010246 (2.6.10-xen1) EIP is at init_dev+0x36/0x5c0 eax: 00000000 ebx: c0322200 ecx: ffffffed edx: 00000000 esi: c0322200 edi: 00000001 ebp: 00500001 esp: c0099eb8 ds: 007b es: 007b ss: 0069 Process swapper (pid: 1, threadinfo=c0098000 task=c000b9e0) Stack: c035decc c02fb1d2 c0099f06 c01f8abf c0099ed8 00000000 00000006 00000003 c029bfe0 c0322200 c0099f18 00500001 c011a323 c029bfe0 c0322200 c036f9c0 00000001 00500001 c01cacc5 c0322200 00000000 c0099f14 00029f3c c02f7700 Call Trace: [<c01f8abf>] __xencons_tx_flush+0x1ef/0x270 [<c011a323>] console_device+0x33/0x50 [<c01cacc5>] tty_open+0x95/0x2b0 [<c01cac30>] tty_open+0x0/0x2b0 [<c015c506>] chrdev_open+0xa6/0x170 [<c01527b9>] dentry_open+0xf9/0x170 [<c01526b2>] filp_open+0x62/0x70 [<c0152869>] get_unused_fd+0x39/0xe0 [<c01529d9>] sys_open+0x49/0x90 [<c0105070>] init+0x0/0x110 [<c01050f0>] init+0x80/0x110 [<c0107775>] kernel_thread_helper+0x5/0x10 Code: c7 44 24 14 00 00 00 00 ff 0d ac 6d 29 c0 0f 88 ef 2f 00 00 f6 86 9c 00 00 00 10 0f 85 5b 05 00 00 8b 86 ac 00 00 00 8b 54 24 50 <8b> 1c 90 85 db 74 75 8b 83 b8 00 00 00 a8 80 75 61 81 7e 74 04 <0>Kernel panic - not syncing: Attempted to kill init! <0>Rebooting in 1 seconds.. ************ REMOTE CONSOLE EXITED ***************** Any ideas? -- Gruss, Tobias ------------------------------------------------------------ Tobias Hunger The box said: ''Windows 95 or better'' tobias@aquazul.com So I installed Linux. ------------------------------------------------------------
> Couldn''t register Xen virtual console driver as ttyYou''re running a kernel with privileged extensions in a privileged domain, and I suspect you have the vga console or virtual terminal (VT) compiled in, and they''re grabbing tty1 before xencons gets a chance. The later failure mode of using an unitiliased console is very ugly and needs fixing. Try putting xencons=ttyS on the kernel command line or perhaps better, remove vga console support. Ian ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Wednesday 19 January 2005 02:31, Ian Pratt wrote:> You''re running a kernel with privileged extensions in a privileged > domain, and I suspect you have the vga console or virtual terminal (VT) > compiled in, and they''re grabbing tty1 before xencons gets a chance.Ah!> The later failure mode of using an unitiliased console is very ugly and > needs fixing.That would be nice. I''ll try my hand on it, but do not expect too much:-)> Try putting xencons=ttyS on the kernel command line or perhaps better, > remove vga console support.How? The options CONFIG_VT, CONFIG_VT_CONSOLE, CONFIG_HW_CONSOLE and CONFIG_VGACONSOLE are not listed in menuconfig. Commenting them out in the .config file will not work either: make readds them before building. The only way to stop those flags from appearing is to "depend !ARCH_XEN" in the Kconfig files where they are defined (I guess/hope there are less intrusive ways, but so far I never had to tweak the kernel build system). Turning the options off results in no output after the initial text from xen, informing me about kernel used, etc. xencons=off behaves the same way. I have no way to interact with the VM but the console, so I am not sure whether this works or not. The -xenU kernels work and give output, but is lacking the necessary HW support I need. PS: Being able to catch kernel panics in screen is so cool! I really like Xen, even though so far I have not managed to set it up completly:-) -- Gruss, Tobias ------------------------------------------------------------ Tobias Hunger The box said: ''Windows 95 or better'' tobias@aquazul.com So I installed Linux. ------------------------------------------------------------
> > Try putting xencons=ttyS on the kernel command line or > perhaps better, > > remove vga console support. > > How? > > The options CONFIG_VT, CONFIG_VT_CONSOLE, CONFIG_HW_CONSOLE and > CONFIG_VGACONSOLE are not listed in menuconfig. Commenting > them out in > the .config file will not work either: make readds them > before building. The > only way to stop those flags from appearing is to "depend > !ARCH_XEN" in the > Kconfig files where they are defined (I guess/hope there are > less intrusive > ways, but so far I never had to tweak the kernel build system).Edit .config and set "# CONFIG_VT_CONSOLE is not set" etc.> Turning the options off results in no output after the > initial text from xen, > informing me about kernel used, etc. xencons=off behaves the > same way. I have > no way to interact with the VM but the console, so I am not > sure whether this > works or not.You''ll also need console=ttyS0 on the kernel command line (please check the syntax).> The -xenU kernels work and give output, but is > lacking the > necessary HW support I need.Please remind me of what you''re trying to set up. Ian ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Wednesday 19 January 2005 13:54, Ian Pratt wrote:> Edit .config and set "# CONFIG_VT_CONSOLE is not set" etc.I did. The flags reappear during make ARCH=xen and the consoles get added to my kernel in spite of those settings. That is why I edited the Kconfig files. Ugly but works...> You''ll also need console=ttyS0 on the kernel command line (please check > the syntax).My results so far: extra="": crash extra="console=xen": no output (hoping that this turns of the other consoles) extra="console=tty2": crash extra="console=ttyS0": no output extra="xencons=ttyS console=ttyS0": crash extra="xencons=off": no output extra="xencons=off console=ttyS0": no output extra="xencons=off console=tty1": no output No config_vm, config_vgaconsole, etc. (nothing set in .config that contains "CONS"): crash No config_vm, ... with modified Kconfig files: no output> Please remind me of what you''re trying to set up.Currently I am trying to set up xen for my router at home. That is the only box I do not absolutely need to work at all times that is powerful enough to handle xen. I am trying to use dom0 for the management of domains only, trying not to have packets traveling through that domain. dom1 is supposed to handle the internal NIC and do the bridging/routing (still undecided on what to use here) for other VMs that normally happens in dom0. I then want to set up the router with access to the external/WLAN NICs in dom2 (connecting to dom2) and a intranet server in dom3 (also talking to dom2 for the intranet connectivity). I think this is a nice playground to try the more advanced features of xen and getting to know the system better. So far I got dom0 with a custom xen0-based kernel (all the network drivers removed) and dom3 with the default xenU kernel up. Both work fine. I am now trying to setup dom1 and move the networking there. dom2 handling the external NICs should be similar to setup to dom1 with a bit of iptable magic added. So how does the console work? How does the console output end up on a port in dom0? -- Gruss, Tobias ------------------------------------------------------------ Tobias Hunger The box said: ''Windows 95 or better'' tobias@aquazul.com So I installed Linux. ------------------------------------------------------------ ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> My results so far: > extra="": crash > extra="console=xen": no output (hoping that this turns of the other consoles) > extra="console=tty2": crash > extra="console=ttyS0": no output > extra="xencons=ttyS console=ttyS0": crash > extra="xencons=off": no output > extra="xencons=off console=ttyS0": no output > extra="xencons=off console=tty1": no output > No config_vm, config_vgaconsole, etc. (nothing set in .config that contains > "CONS"): crash > No config_vm, ... with modified Kconfig files: no outputI''ve fixed the testing and unstable repositories so that the kernel will no longer crash. However, since the problem is that the console cannot be set up because some other driver has got the ''tty0'' or ''ttyS0'' name already, you still won''t get any consol eoutput after init starts. ''xencons=ttyS console=ttyS0'' ought to work. If not then you still have serial drivers configured into your kernel. -- Keir ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Tobias Hunger wrote:> I did. The flags reappear during make ARCH=xen and the consoles get added to > my kernel in spite of those settings. That is why I edited the Kconfig files. > Ugly but works...Are you doing ''make ARCH=xen (menu|x|g)config'' ? If you don''t, the config will probably not be correct for your target architecture.> My results so far: > extra="": crash > extra="console=xen": no output (hoping that this turns of the other consoles) > extra="console=tty2": crash > extra="console=ttyS0": no output > extra="xencons=ttyS console=ttyS0": crash > extra="xencons=off": no output > extra="xencons=off console=ttyS0": no output > extra="xencons=off console=tty1": no output > No config_vm, config_vgaconsole, etc. (nothing set in .config that contains > "CONS"): crash > No config_vm, ... with modified Kconfig files: no outputThis is on an unprivileged domain? Unprivileged domains don''t have a VGA console, and they don''t have access to serial ports; the console is implemented through an inter-domain communication channel, like the virtual network and block devices are. -- Derrik Pates demon@devrandom.net ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It''s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Rumor has it that on Wed, Jan 19, 2005 at 03:04:48PM +0100 Tobias Hunger said:> On Wednesday 19 January 2005 13:54, Ian Pratt wrote: > > Edit .config and set "# CONFIG_VT_CONSOLE is not set" etc. > > I did. The flags reappear during make ARCH=xen and the consoles get added to > my kernel in spite of those settings. That is why I edited the Kconfig files. > Ugly but works...After you edit .config by hand you need to run "make oldconfig" to get the changes to take effect. Cheers, Phil -- Philip R. Auld, Ph.D. Egenera, Inc. Software Architect 165 Forest St. (508) 858-2628 Marlboro, MA 01752 ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Wednesday 19 January 2005 17:54, Derrik Pates wrote:> Are you doing ''make ARCH=xen (menu|x|g)config'' ? If you don''t, the > config will probably not be correct for your target architecture.Yes, I do. The problem is that the console breaks as soon as you set CONFIG_XEN_PHYSDEV_ACCESS is set to y. With that setting CONFIG_VT_CONSOLE, CONFIG_HW_CONSOLE, CONFIG_VGA_CONSOLE, etc. are set to ''y'' and there is no way to turn them off again. You may edit .config and do a ''make ARCH=xen oldconfig'', but afterwards those flags are turned back to ''y''. I changed the Kconfig files that define those flags to force them to the off-state. Afterwards there is some output: xm create -c zzzz Using config file "/etc/xen/zzzz". Started domain zzzz, console on port 9602 ************ REMOTE CONSOLE: CTRL-] TO QUIT ******** Linux version 2.6.10-xen1 (root@yoda) (gcc version 3.3.5 (Debian 1:3.3.5-6)) #2 Wed Jan 19 21:28:29 CET 2005 BIOS-provided physical RAM map: Xen: 0000000000000000 - 0000000002000000 (usable) 32MB LOWMEM available. DMI not present. Built 1 zonelists Kernel command line: root=/dev/hda1 ro That''s it, nothing more:-(> This is on an unprivileged domain? Unprivileged domains don''t have a VGA > console, and they don''t have access to serial ports; the console is > implemented through an inter-domain communication channel, like the > virtual network and block devices are.It is a domain with physical device access but with not a privileged guest. -- Gruss, Tobias ------------------------------------------------------------ Tobias Hunger The box said: ''Windows 95 or better'' tobias@aquazul.com So I installed Linux. ------------------------------------------------------------
> On Wednesday 19 January 2005 17:54, Derrik Pates wrote: > > Are you doing ''make ARCH=xen (menu|x|g)config'' ? If you don''t, the > > config will probably not be correct for your target architecture. > > Yes, I do. > > The problem is that the console breaks as soon as you set > CONFIG_XEN_PHYSDEV_ACCESS is set to y. With that setting CONFIG_VT_CONSOLE, > CONFIG_HW_CONSOLE, CONFIG_VGA_CONSOLE, etc. are set to ''y'' and there is no > way to turn them off again.Yes, that looks to be a "feature" of the drivers/char/Kconfig file, which we only parse for configurations that are to work with hardware-access privileges. So that probably ties up tty0, but you should still be able to register xencons as ttyS0 unless you have accidentally included serial drivers in your kernel config: "xencons=ttyS console=ttyS0" -- Keir ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Thursday 20 January 2005 09:56, Keir Fraser wrote:> Yes, that looks to be a "feature" of the drivers/char/Kconfig file, > which we only parse for configurations that are to work with > hardware-access privileges.Yes, I found that, too.> So that probably ties up tty0, but you should still be able to > register xencons as ttyS0 unless you have accidentally included serial > drivers in your kernel config: > "xencons=ttyS console=ttyS0"I tried that several times: no output whatsoever! I can not see anything wrt. serial ports in my config, so there shouldn''t be drivers for those. Here is a list of differences between my kernel configuration and the one from the default xenU kernel. Maybe I am doing something wrong... I am using a heavily patched Kconfig setup by now, so do not expect to be able to get a similar config by running *config:-) I use a dash to mark options that are not listed in one configuration. xenU: Mine: CONFIG_XEN y y CONFIG_ARCH_XEN y y CONFIG_NO_IDLE_HZ y y CONFIG_XEN_PRIVILEGED_GUEST not set not set CONFIG_XEN_PHYSDEV_ACCESS not set y CONFIG_XEN_BLKDEV_BACKEND not set not set CONFIG_XEN_NETDEV_BACKEND not set y CONFIG_XEN_BLKDEV_FRONTEND y y CONFIG_XEN_NETDEV_FRONTEND y not set CONFIG_XEN_NETDEV_[...]_TRANS[...] not set - CONFIG_XEN_BLKDEV_TAP not set not set CONFIG_XEN_WRITABLE_PAGETABLES y y CONFIG_XEN_SCRUB_PAGES y y CONFIG_HAVE_ARCH_DEV_ALLOC_SKB y y CONFIG_X86 y y CONFIG_X86_64 not set not set I have "hotplug" and "kobject uevents" as well as "loadable modules" disabled, the X86 Processor Configuration is mostly identical (I use Athlon, xenU assumes a P IV). Bus options: CONFIG_PCI - y CONFIG_PCI_DIRECT - y Kernel debugging/Blockdevices/SCSI: I have kernel debugging, loop and initrd disabled and SD missing as well. Networking is mostly identical with my kernel including some drivers and bridging in addition to what xenU has. My kernel has fewer filesystems (only the one it needs to read its root FS) and crypto functionality disabled. Everything else is identical (with my config having comments for all the sections skipped in the xenU kernel configuration). Did I remove too much? Adding XEN_NETDEV_FRONTEND does not change anything by the way. I can provide you with my .config file if someone is interested. -- Gruss, Tobias ------------------------------------------------------------ Tobias Hunger The box said: ''Windows 95 or better'' tobias@aquazul.com So I installed Linux. ------------------------------------------------------------
> On Thursday 20 January 2005 09:56, Keir Fraser wrote: > > Yes, that looks to be a "feature" of the drivers/char/Kconfig file, > > which we only parse for configurations that are to work with > > hardware-access privileges. > > Yes, I found that, too. > > > So that probably ties up tty0, but you should still be able to > > register xencons as ttyS0 unless you have accidentally included serial > > drivers in your kernel config: > > "xencons=ttyS console=ttyS0" > > I tried that several times: no output whatsoever! I can not see anything wrt. > serial ports in my config, so there shouldn''t be drivers for those. >I see no problem if I add those two parameters to my own xenU boot-parameter list. Why not start with a vanilla/default xenU config (perhaps with just the PHYSDEV_ACCESS option added), get that working, and then start adding in options bit by bit? -- Keir ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Thursday 20 January 2005 12:30, Keir Fraser wrote:> I see no problem if I add those two parameters to my own xenU > boot-parameter list. Why not start with a vanilla/default xenU config > (perhaps with just the PHYSDEV_ACCESS option added), get that working, > and then start adding in options bit by bit?That is what I am trying. Adding PHYSDEV_ACCESS causes lots of Kconfig files to get sourced and lots of additional options get added. I am trying to trim those down as far as possible. Maybe I should remove all the drivers I need as well for tests. -- Gruss, Tobias ------------------------------------------------------------ Tobias Hunger The box said: ''Windows 95 or better'' tobias@aquazul.com So I installed Linux. ------------------------------------------------------------