Andrea Gelmini | 21 May 14:11 2016
Picon
Gravatar

[uml-user] [PATCH 0263/1529] Fix typo

Signed-off-by: Andrea Gelmini <andrea.gelmini <at> gelma.net>
---
 arch/um/os-Linux/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index 0e39b99..6caa556 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
 <at>  <at>  -91,7 +91,7  <at>  <at>  int os_timer_set_interval(void* timer, void* i)
 /**
  * os_timer_remain() - returns the remaining nano seconds of the given interval
  *                     timer
- * Because this is the remaining time of an interval timer, which correspondends
+ * Because this is the remaining time of an interval timer, which correspondences
  * to HZ, this value can never be bigger than one second. Just
  * the nanosecond part of the timer is returned.
  * The returned time is relative to the start time of the interval timer.
--

-- 
2.8.2.534.g1f66975

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
kail-gj | 16 May 10:05 2016

[uml-user] Kernel panic - not syncing: No init found using initramfs

Hi, 
    I build my uml from source with CONFIG_INITRAMFS_SOURCE configured with a rootfs text file.  I specify the init file to  busybox as
    file /bin/busybox /home/xxxx/busybox/busybox 755 0 0 /init /bin/sh in rootfs text file. 
    But it does not work and output "kernel panic - not syncing: No init found" error. The full boot log is followed. 
    Please help me, thanks.
-------------------------------------------------
boot log:
-------------------------------------------------
$ ./linux 
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Linux version 2.6.32.8 (chipX /home/chipX/chipX/fhos/trunk/build.um.d/linux <at> suzhou-chipX) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 Sun May 15 17:42:40 CST 2016
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8080
Kernel command line: root=98:0
PID hash table entries: 128 (order: -2, 1024 bytes)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Memory: 28892k available
Hierarchical RCU implementation.
NR_IRQS:15
Calibrating delay loop... 91.54 BogoMIPS (lpj=457728)
Mount-cache hash table entries: 256
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Using 2.6 host AIO
NET: Registered protocol family 16
Switching to clocksource itimer
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 2, 16384 bytes)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
NET: Registered protocol family 22
TCP cubic registered
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
IRQ 3/console-write: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 2/console: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.32.8
RIP: 0033:[<0000003630a32907>]
RSP: 00007ffff3b091b8  EFLAGS: 00000206
RAX: 0000000000000000 RBX: 00000000000063fc RCX: ffffffffffffffff
RDX: 0000000000000000 RSI: 0000000000000013 RDI: 00000000000063fc
RBP: 00000000000063f8 R08: 0000000000000000 R09: 00007ffff3b0920c
R10: 00007ffff3b08f40 R11: 0000000000000206 R12: 00007f56d0bce6a8
R13: 00007ffff3b093b8 R14: 0000000000000008 R15: 0000000000000001
Call Trace: 
61c27dd8:  [<600115ef>]
61c27df8:  [<600368c2>]
61c27e38:  [<600ef777>]
61c27e58:  [<60060b3d>]
61c27ed8:  [<6000e31a>]
61c27ef8:  [<6000fea9>]
61c27f28:  [<6000e0a9>]
61c27f48:  [<6000117e>]
61c27f68:  [<600188fe>]
61c27f70:  [<600010ac>]
61c27fb8:  [<600188e3>]
61c27fd8:  [<6000f3f3>]

Segmentation fault (core dumped)


 

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
kail-gj | 14 May 08:05 2016

[uml-user] Device eth0 does not seem to be present

Hi,

    My uml came to a strange status, which open up 6 xterm windows and hang on.
    Two questions:
    1. Why does it to bring up eth0?
    2. Why 6 xterm windows is opened?
    3. Why my uml is hanged on?
    
    Any device is appreciated.

Jotus
    ---------------------------------------------------------
    boot log:
    --------------------------------------------------------
    Bringing up loopback interface:    [OK]
    Bringing up interface  eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED]
    FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory
    Mount other filesystem:    [OK]
    Retrigger failed udev events[OK]
    IRQ 13/xterm: IRQ_DISABLED is not guaranteed on shared IRQs
    Warning: Cannot convert string "nil2" to type FontStruct
    IRQ 13/xterm: IRQ_DISABLED is not guaranteed on shared IRQs
    Warning: Cannot convert string "nil2" to type FontStruct
    IRQ 13/xterm: IRQ_DISABLED is not guaranteed on shared IRQs
    Warning: Cannot convert string "nil2" to type FontStruct
    IRQ 13/xterm: IRQ_DISABLED is not guaranteed on shared IRQs
    Warning: Cannot convert string "nil2" to type FontStruct
    IRQ 13/xterm: IRQ_DISABLED is not guaranteed on shared IRQs
    Warning: Cannot convert string "nil2" to type FontStruct
    IRQ 13/xterm: IRQ_DISABLED is not guaranteed on shared IRQs
    Warning: Cannot convert string "nil2" to type FontStruct
    remove_umid_dir - remove_files_and_dir failed with err = -3


 

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
kail-gj | 13 May 15:57 2016

[uml-user] mount: cannot remount block device /dev/ubda read-write, is write-protected

Hi, 
    I build my UML linux from source and build my filesystem using mkrootfs tools, and run with ./linux ubda=../../rfs-1/root_fs mem=512m.
    I changed my mkrootfs one line from 
            addline etc/fstab               "/dev/ubd/0      /               ext2    defaults 1 1"
    to
            addline etc/fstab               "/dev/ubda      /               ext2    defaults 0 0"
    to solve the other problem "[/sbin/fsck.ext2 (1) -- /] fsck.ext2 -a /dev/ubd/0".
    Now a new problem troubles me. The boot log is with "
RQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
Welcome to Red Hat Enterprise Linux Server
Starting udev: modprobe: FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory

line_ioctl: tty0: unknown ioctl: 0x541e
[  OK  ]
Setting hostname localhost:  [  OK  ]
Checking filesystems
Checking all file systems.
[  OK  ]
Remounting root filesystem in read-write mode:  mount: cannot remount block device /dev/ubda read-write, is write-protected
[FAILED]
can't create lock file /etc/mtab~408: Read-only file system (use -n flag to override)
Mounting local filesystems:  [FAILED]
touch: cannot touch `/.autorelabel': Read-only file system
touch: cannot touch `/var/lib/random-seed': Read-only file system
chmod: cannot access `/var/lib/random-seed': No such file or directory
rm: cannot remove `/var/run/utmp': Read-only file system
/etc/rc.d/rc.sysinit: line 597: /var/run/utmp: Read-only file system
touch: cannot touch `/var/log/wtmp': Read-only file system
/etc/rc.d/rc.sysinit: line 594: plymouth: command not found
chgrp: changing group of `/var/run/utmp': Read-only file system
chgrp: changing group of `/var/log/wtmp': Read-only file system
chmod: changing permissions of `/var/run/utmp': Read-only file system
chmod: changing permissions of `/var/log/wtmp': Read-only file system
chown: cannot access `/tmp/.ICE-unix': No such file or directory
Enabling /etc/fstab swaps:  [  OK  ]
modprobe: FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory

/etc/rc.d/rc.sysinit: line 654: /var/log/dmesg: Read-only file system
/etc/rc.d/rc.sysinit: line 659: plymouth: command not found
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
modprobe: FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory

IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
Entering non-interactive startup
FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  Device eth0 does not seem to be present, delaying initialization.
[FAILED]
FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory
touch: cannot touch `/var/lock/subsys/network': Read-only file system
awk: cmd. line:1: fatal: cannot open file `/etc/mtab' for reading (No such file or directory)
xterm_open : run_helper failed, errno = 2
Failed to open console 2, err = -2
xterm_open : run_helper failed, errno = 2
Failed to open console 3, err = -2
xterm_open : run_helper failed, errno = 2
Failed to open console 5, err = -2
xterm_open : run_helper failed, errno = 2
Failed to open console 1, err = -2
xterm_open : run_helper failed, errno = 2
Failed to open console 6, err = -2
xterm_open : run_helper failed, errno = 2
Failed to open console 4, err = -2
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
init: tty (/dev/tty2) main process (571) terminated with status 1
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
init: tty (/dev/tty2) main process ended, respawning
xterm_open : run_helper failed, errno = 2
"
    Any suggestion or hints is much appreciated.

    <at> Toralf Forster, I find you had met the same problem and how did you solve it finally?

Jotus.



 



 

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
kail-gj | 13 May 06:48 2016

[uml-user] UML boot question for help

Hi,

     I try to boot my uml with command ./linux ubda=../../rfs-1/root_fs mem=512m but it is failed. The boot log is 

$ ./linux ubda=../../rfs-1/root_fs mem=512m
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...OK
Checking PROT_EXEC mmap in /dev/shm/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 16764928 bytes to physical memory to account for exec-shield gap
Linux version 2.6.32.8 (chipX /home/chipX/chipX/fhos/trunk/linux <at> suzhou-chipX) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 Fri May 13 10:46:03 CST 2016
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 133317
Kernel command line: ubda=../../rfs-1/root_fs mem=512m root=98:0
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Memory: 504188k available
Hierarchical RCU implementation.
NR_IRQS:15
Calibrating delay loop... 100.76 BogoMIPS (lpj=503808)
Mount-cache hash table entries: 256
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Using 2.6 host AIO
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource itimer
NET: Registered protocol family 2
IP route cache hash table entries: 8192 (order: 4, 65536 bytes)
TCP established hash table entries: 32768 (order: 7, 524288 bytes)
TCP bind hash table entries: 32768 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 32768 bind 32768)
TCP reno registered
NET: Registered protocol family 1
IRQ 9/mconsole: IRQF_DISABLED is not guaranteed on shared IRQs
mconsole (version 2) initialized on /home/chipX/.uml/mq9xu4/mconsole
Checking host MADV_REMOVE support...OK
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 985
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
TCP cubic registered
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
Initializing software serial port version 1
console [mc-1] enabled
 ubda: unknown partition table
VFS: Mounted root (ext2 filesystem) readonly on device 98:0.
IRQ 3/console-write: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 2/console: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
Welcome to Red Hat Enterprise Linux Server
Starting udev: modprobe: FATAL: Could not load /lib/modules/2.6.32.8/modules.dep: No such file or directory

line_ioctl: tty0: unknown ioctl: 0x541e
[  OK  ]
Setting hostname localhost:  [  OK  ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext2 (1) -- /] fsck.ext2 -a /dev/ubd/0 #### Different from your boot log
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/ubd/0 is mounted.
fsck.ext2: No such file or directory while trying to open /dev/ubd/0
/dev/ubd/0: 
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
/dev/fd/9: line 2: plymouth: command not found
Press enter for maintenance
(or type Control-D to continue):

Any suggestion or hint is much appreciated.

Thanks, Jotus



 

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
Marcelo E. Magallon | 30 Mar 17:41 2016

[uml-user] Strange behavior when trying to use UML with Yocto

Hi,

I apologize in advance for the fuzzy details, but I'm hoping someone can 
ask the right questions to provide that missing information.

A couple of people are trying to integrate UML with a Yocto-based 
distribution called OpenSwitch (http://openswitch.net/). The relevant 
change request can be seen here:

https://review.openswitch.net/#/c/6079/

The OPS build process builds a full kernel and userspace, and Christian 
did a proof of concept integrating UML with that build process. 
Everything *seems* to be working fine, except that we are seeing strange 
behaviors at runtime.

Christian build the whole thing inside a VM, which has Debian 8 
installed. When he tries to boot the image, everything works fine.

When I try to reproduce Christian's results, I use a computer with 
Debian 8 installed in it (no VM), generate the image and boot. That 
alone seems to work, but several components inside the system exhibit 
strange behavior. OPS uses systemd, and journald starts spewing out 
messages about not being able to write a log entry. There's another 
component (OVSDB) which has a helper program create a database for it at 
boot time, and that component is behaving in a strange manner: it reads 
a file to translate it into a different format, and although strace does 
not reveal any errors, the output file is truncated (filesystem is 
ext4). There's also an issue with OpenSSH generating keys at boot time, 
and those keys are also truncated.

We have even tried with Christian's generated image on the computer 
where things fail, and it stills fails. I have generate an image out of 
a chroot to eliminate inconsistencies between the two build 
environments, and as far as we can tell, everything is the same, but it 
still fails. Christian tried building the same thing using actual 
hardware (no VM), and it fails. Weird thing is that if you take that 
image to the VM, it works.

Perhaps we are misunderstanding how UML works. Is it possible to run 
kernel version X (UML) on top of kernel version Y (X > Y)? How are 
system calls handled? I'm asking because we found a thread where someone 
asked the kernel headers to be installed so that a toolchain for the 
target environment can be generated, but the reply back then is that 
"that doesn't make sense". In our case the host is running 3.16 and the 
UML kernel is 4.5. The VM where things work is the same.

One thing we have noticed is that when the host is not a VM, systemd 
says the virtualization technology is UML. When the host is the VM, 
systemd says the virtualization technology is vmware. Scanning the code 
it does not seem to be doing anything different based on that.

I can provide the binaries that I compiled and are failing upon request 
if you want to take a look at the error yourself.

I'm looking forward to your questions regarding this,

Marcelo

Attachment (smime.p7s): application/pkcs7-signature, 6286 bytes
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
Ashwanth kumar | 28 Mar 20:08 2016
Picon

[uml-user] Login prompt not seen


Hi,

I am trying to run UML on linux-4.4.6 with rootfs created by closely following this link http://web2.clarkson.edu/class/cs644/kernel/setup/uml/uml.html except for the inittab part.
I do not see the login prompt when i run it. But i am able to connect to the virtual consoles using screen.

Do not see output file descriptor for con0. Am i missing something in my rootfs?
$ uml_mconsole VoTvJ8 config con0
OK fd:0

Attaching the stdout from running below cmd
$./linux ubd0=../rootfs mem=256M 


Thanks,
Ashwanth                                                                                                                         
Attachment (uml_stdout): application/octet-stream, 15 KiB
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
mr.q | 14 Jan 08:24 2016
Picon

[uml-user] reboot guest OS ??? is it possible ?

Hello all,

I recently investigate on UML, and i have a little issue with the way system
reboots. (btw i dont know if this the way to go *really*)

My config is for host: debian jessie out of the box..
for guest OS i try several kernel and filesytstem but both hangs with the same
issues:
FS1 : debootstraped fs from Debian jessie
FS2 : devloop.org.uk filesystem Debian jessie.

Kernel1: 3.16 custom compiled kernel (.config from devloop.uk.org)
Kernel2: linux.uml debian kernel from package user-mode-linux
Kernel3: compiled devloop.uk.org kernel 3.18

if i launch 1 station and reboot from the guest OS shell, i saw on the host a
uml_watchdog process that seems to kill my guest OS few seconds after...

I cant find any documentation concerning this uml_watchdog, can't figure out how
it spawn from guest OS reboot...

but i am quite sure it is the culprit since copying /bin/true
to /usr/bin/uml_watchdog solve the issue... however i still have defunct process
(ex uml_watchdog).

The source of this uml_watchdog.c i found on internet doesnt make me much sense
since it looks like just looking from input on stdin ?.

Btw UML Watchdog timer is enabled on the guest OS.. not sure it is correctly
running since the quest OS complains about error on device 130 which is
/dev/watchdog

Does anyone have clue about uml_watchdog ???

I definitively think reboot somewhere else from uml_mconsole is a *BAD* idea....

more coming....

Trying to share the same root filesystem on 2 UML:

linux.uml ubda=/tmp/m1.cow,./filesystem mem=256M con0=fd:0,fd:1 con=null
linux.uml ubda=/tmp/m2.cow,./filesystem mem=256M con0=fd:0,fd:1 con=null

if i launch these 2 stations and reboot them from shell at the same time, one
hang, the other reboot fine.

and as usual it looks ok if i do this from uml_mconsole xxx reboot .

The bad news is that i would like to give user the opportunity to rebbot a guest
OS without giving access to the host....

Any help greatly apprciated, since i spend much time trying to debug this issue.
I can still do further investigation...

Thx

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Ricardo Nunes | 24 Nov 17:30 2015
Picon
Gravatar

[uml-user] New IRQ support

I've already made that question a few weeks ago but I couldn't make it work.

So, in order to support new IRQs I understand that we need to follow those steps:

  1. Add the IRQ IDs to /kernel/arch/um/include/asm/irq.h, or at least change LAST_IRQ macro value to the bigger IRQ ID;
  2. Create one file per IRQ: is that a host or UML file? I'm trying to follow random driver example but /dev/random exists in both;
  3. When I need to throw an IRQ I just have to write something on the file and send a SIGIO signal. Which process needs to receive the SIGIO?

In my system I'm using the original driver and using a userspace application to emulate the hardware (communication through netlink sockets). So, the emulator decides when IRQs needs to be launched and, at the moment, communicates that to the kernel driver.

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
Balaco Baco | 12 Nov 01:15 2015

Re: [uml-user] Website is in need of many small changes and updates?

On Sat, Oct 31, 2015, at 05:46, Richard Weinberger wrote:
> Am 31.10.2015 um 02:12 schrieb Balaco Baco:
> > I do not have a final working step by step from zero until now. One is
> > giving compiling errors. The working UML (unknown origin, I don't know
> > how I made that before) + Debian64 downloaded (and how changed a bit
> > after booting it)... but it has no network, and I don't know why is
> > that. Can you tell? Not even a ping works: "Network is unreachable". The
> > host machine is normal, of course.
> 
> As with any virtual machine you need to connect your VM somehow to your
> host.
> tap is a common way. The website has instructions. Old, but still valid.
> 

I just saw this unread message. And there is a few things to say about
this one. :)

Some old instructions in the website do not work. For example, the
kernel version used there was not practical for me. And you also said
it's too old - although I won't mind that fact alone.

> > Basic question: how to shutdown a running UML? How are we suppose to do
> > it? Running 'shutdown now' from that Debian does not turn it off. Must I
> > open another SSH session to kill it, or just close the session if
> > nothing else is needed?
> 
> What about "poweroff"? As with any Linux.
>

I have never heard about poweroff. In all the years I have used linux
(more than a decade) I always used shutdown to... to turn off the
computer (I would say "to shutdown"... but that would be too funny
here).

Debian has poweroff too. It worked. :-/ (but I swear I never used it...
and "shutdown now" always worked in real machines, to turn them off...)

> > I'm used http://user-mode-linux.sourceforge.net/source.html as a base to
> > what I have done (although I "updated" the suggested version there, as
> > discussed before). And changed almost nothing in the default config
> > before compiling...
> > 
> > When I have something that works, that source.html page is easy to
> > improve and needs many changes. Output of wget... not useful at all - we
> > surely can assume users will know how to download and extract files,
> > right?
> 
> I assume that an user is able to build a kernel.
> 

Fair enough. But I think that UML should be also aimed at users without
much knowledge in kernel compilation because sometimes we could just
want a virtual and easy, although safe, "root power". The reason why I'm
trying to get UML to work right now is one of these cases.

-- 
  Balaco

--

-- 
http://www.fastmail.com - Same, same, but different...

------------------------------------------------------------------------------
Balaco Baco | 11 Nov 17:13 2015

[uml-user] Detail with one config warning

There is one details that did not work for me, but it was easy to "fix"
(quotes because I'm not sure it is the best fix). But someone else may
find it useful.

Detailed steps so everyone can compare doing it, if needed:

>  1. get one kernel source package from https://cdn.kernel.org/
>  (I tried these steps with more than one option, searching for the older and more stable
>  version; if the results are different for you, try another one; below I copied my 4.2.6 try; 3.18 does not
have this problem)

>  2. extract it.
$ tar xJf ...
$ cd lin<TAB>

>  3. first step...
$ make defconfig ARCH=um #uml1

*** Default configuration is based on 'x86_64_defconfig'
kernel/time/Kconfig:157:warning: range is invalid
#
# configuration written to .config
#

> That warning is strange. I did not like it. So I just edited that file, and changed it! :D hehehe

$ vim kernel/time/Kconfig  # if it spitted a diff for line 157:
-        range 1 NR_CPUS
+       range 1 1

> So, again...
# make defconfig ARCH=um #uml1
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#

> So, assume the next steps have no problem, except that I don't know
> how to make my UML access the Internet... this is in another
> discussion, though

> ... ?
$ make menuconfig ARCH=um #uml2

> Build it
$ make ARCH=um #uml3 uml4 uml5

> Run it now... but where is my Internet? :( hehehehe

$ ./vmlinux # the output name changed!? :P

-- 
  Balaco

--

-- 
http://www.fastmail.com - Access your email from home and the web

------------------------------------------------------------------------------

Gmane