Boris Od | 24 Dec 11:31
Picon

lguest launch hangs on "Marking TSC..."

Hello all!

I want to add a serial port to lguest as part of a bigger project.

Problem is I can't  even launch it for the past three weeks.

i am using this cmd:

sudo ~/src/linux-2.6.32/Documentation/lguest/lguest 64 ~/src/linux-2.6.32/vmlinux --tunnet=192.168.19.1 --block=/home/borod/lg/initrd-1.1-i386.img root=/dev/vda

[    0.000000] Reserving virtual address space above 0xffc00000
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32.46+drm33.20 (borod <at> borod-laptop) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #1 SMP Wed Dec 14 03:17:21 IST 2011 (Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2)
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   NSC Geode by NSC
[    0.000000]   Cyrix CyrixInstead
[    0.000000]   Centaur CentaurHauls
[    0.000000]   Transmeta GenuineTMx86
[    0.000000]   Transmeta TransmetaCPU
[    0.000000]   UMC UMC UMC UMC
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  LGUEST: 0000000000000000 - 0000000004000000 (usable)
[    0.000000] DMI not present or invalid.
[    0.000000] last_pfn = 0x4000 max_arch_pfn = 0x100000
[    0.000000] Scanning 2 areas for low memory corruption
[    0.000000] modified physical RAM map:
[    0.000000]  modified: 0000000000000000 - 0000000000002000 (usable)
[    0.000000]  modified: 0000000000002000 - 0000000000006000 (reserved)
[    0.000000]  modified: 0000000000006000 - 0000000000007000 (usable)
[    0.000000]  modified: 0000000000007000 - 0000000000010000 (reserved)
[    0.000000]  modified: 0000000000010000 - 0000000004000000 (usable)
[    0.000000] init_memory_mapping: 0000000000000000-0000000004000000
[    0.000000] Using x86 segment limits to approximate NX protection
[    0.000000] 0MB HIGHMEM available.
[    0.000000] 64MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 04000000
[    0.000000]   low ram: 0 - 04000000
[    0.000000]   node 0 low ram: 00000000 - 04000000
[    0.000000]   node 0 bootmap 00021000 - 00021800
[    0.000000] (6 early reservations) ==> bootmem [0000000000 - 0004000000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0000001000 - 0000002000]    EX TRAMPOLINE ==> [0000001000 - 0000002000]
[    0.000000]   #2 [0000006000 - 0000007000]       TRAMPOLINE ==> [0000006000 - 0000007000]
[    0.000000]   #3 [0000100000 - 00008f5f58]    TEXT DATA BSS ==> [0000100000 - 00008f5f58]
[    0.000000]   #4 [0000010000 - 0000021000]          PGTABLE ==> [0000010000 - 0000021000]
[    0.000000]   #5 [0000021000 - 0000022000]          BOOTMAP ==> [0000021000 - 0000022000]
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   Normal   0x00001000 -> 0x00004000
[    0.000000]   HighMem  0x00004000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[3] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00000002
[    0.000000]     0: 0x00000006 -> 0x00000007
[    0.000000]     0: 0x00000010 -> 0x00004000
[    0.000000] Using APIC driver default
[    0.000000] SFI: Simple Firmware Interface v0.7 http://simplefirmware.org
[    0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] No local APIC present or hardware disabled
[    0.000000] APIC: disable apic facility
[    0.000000] PM: Registered nosave memory: 0000000000002000 - 0000000000006000
[    0.000000] PM: Registered nosave memory: 0000000000007000 - 0000000000010000
[    0.000000] Allocating PCI resources starting at 4000000 (gap: 4000000:fc000000)
[    0.000000] Booting paravirtualized kernel on lguest
[    0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] PERCPU: Embedded 14 pages/cpu <at> c1084000 s34936 r0 d22408 u65536
[    0.000000] pcpu-alloc: s34936 r0 d22408 u65536 alloc=16*4096
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16243
[    0.000000] Kernel command line: root=/dev/vda
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Enabling fast FPU save and restore... done.
[    0.000000] Enabling unmasked SIMD FPU exception support... done.
[    0.000000] Initializing CPU#0
[    0.000000] allocated 327680 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Initializing HighMem for node 0 (00000000:00000000)
[    0.000000] Memory: 56260k/65536k available (4738k kernel code, 9200k reserved, 2154k data, 664k init, 0k highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xffb1d000 - 0xffbff000   ( 904 kB)
[    0.000000]     pkmap   : 0xff400000 - 0xff800000   (4096 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff3fe000   ( 939 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]       .init : 0xc07bc000 - 0xc0862000   ( 664 kB)
[    0.000000]       .data : 0xc05a0bd5 - 0xc07bb668   (2154 kB)
[    0.000000]       .text : 0xc0100000 - 0xc05a0bd5   (4738 kB)
[    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:2304 nr_irqs:256
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [hvc0] enabled
[    0.000000] Trying to install interrupt handler for IRQ0
[    0.000000] Marking TSC unstable due to could not calculate TSC khz


and then hangs.

Could not find a solution, will be very grateful for your help.

Thank You.
Boris.
_______________________________________________
Lguest mailing list
Lguest@...
https://lists.ozlabs.org/listinfo/lguest
Eugene Kov | 16 Dec 16:50
Picon
Favicon

Lguest on i5

Hi All,

Until now I used Lguest for research purposes on an intel atom 32bit platform.
Now I want to use it on an i5 machine, which  is  a 64bit platform but the kernel i use (3.0.9) is compiled for  i686. I configured lguest the same as before, but I get

lguest: unhandled trap 13 at 0x100062 (0x0)

when the Launcher process starts.
Does lguest does not work on a 64bit platform although the kernel is 32 bit?
The .config file is attached.
Your help would be much appreciated as it would help my research very much.

Thank you and best regards,

Eugene
Attachment (i5_config): application/octet-stream, 101 KiB
_______________________________________________
Lguest mailing list
Lguest@...
https://lists.ozlabs.org/listinfo/lguest
ron minnich | 14 Jan 06:57
Picon

problem on 3.0.13: unhandled trap 13 at 0x1371e36 (0x0)

OK, it's been a while ... I"ve built lguest on my chromebook. It's an
i686 kernel of course.

The location is at 1371e36 which I realize means nothing but ... it's
in default_entry. It also looks to me like it's long before virtual
addressing is turned on. Things have changed in the kernel in this
particular area so I am not as familiar with it as I was (and soon
will be, again ...)

Could this be some simple screwup on configuration or something I have
to tell lguest somehow?

The command is simple:

lguest 64m vmlinux

I realize I need a root but I want to see it get far enough to
explode. I like fireworks.

thanks for any good hints ...

And, yes, config is set as in the doc, with CONFIG_PARAVIRT=y,
CONFIG_LGUEST_GUEST=y, ..EXPERIMENTAL=y, HIGHMEM64G=n, and so on.

I think I'm doing something dumb, just not sure what ... memory fails me.

thanks

ron
LiMing | 11 Dec 17:26
Picon
Favicon

Re: lguest for ARM

You can download the latest patch from http://sourceforge.net/projects/armlguest/


Mingli

From: wcunning-nNDzPDmKTdnSiEDVxGk4TQ@public.gmane.org
Date: Mon, 5 Dec 2011 10:38:58 -0500
Subject: Re: [Lguest] lguest for ARM
To: myfavor_linux-uAjRD0nVeow@public.gmane.org
CC: lguest <at> lists.ozlabs.org; jpaupore-63aXycvo3TyHXe+LvDLADg@public.gmane.org

It would appear that the /rusty/linux-2.6.git repository was never restored after the kernel.org failure, and I was unable to find that particular repo, or any other kernel repo containing that branch in Rusty's public github/gitorious/whatever repos. Does someone still have a copy that could get reposted somewhere?

Thanks,
William

2011/12/5 LiMing <myfavor_linux-uAjRD0nVeow@public.gmane.org>
Hi,

Try this one first
git clone git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6.git
git checkout arm-lguest


if it cannot work, let me know, I will send you the source code.

Mingli
From: wcunning-nNDzPDmKTdnSiEDVxGk4TQ@public.gmane.org
Date: Mon, 28 Nov 2011 00:47:13 -0500
To: lguest-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
CC: jpaupore-63aXycvo3TyHXe+LvDLADg@public.gmane.org
Subject: [Lguest] lguest for ARM


I cannot seem to find the original lguest for ARM branch in the current working lguest tree (which as far as I can tell, should be Rusty's tree on kernel.org or github). It would appear that this branch was not moved over following the kernel.org breach. Am I right in assuming that this was the failure and where can I find a copy of the code for that?

Thanks,
William Cunningham
Junior, Computer Engineering
University of Michigan


_______________________________________________ Lguest mailing list Lguest-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/lguest



--
William Cunningham
Junior, Computer Engineering
University of Michigan

_______________________________________________
Lguest mailing list
Lguest@...
https://lists.ozlabs.org/listinfo/lguest
Rusty Russell | 6 Dec 13:09
Picon
Gravatar

Re: lguest for ARM

On Mon, 5 Dec 2011 10:38:58 -0500, William Cunningham
<wcunning@...> wrote:
> It would appear that the /rusty/linux-2.6.git repository was never restored
> after the kernel.org failure, and I was unable to find that particular
> repo, or any other kernel repo containing that branch in Rusty's public
> github/gitorious/whatever repos. Does someone still have a copy that could
> get reposted somewhere?

Well, here's the patch which LiMing sent me, which was what I applied to
make the git tree.  It was never properly cleaned up, though if you're
interested that would be a superb thing to do!

Cheers,
Rusty.
PS. Sorry for the attachme,t; it's rather big.

Attachment (patch-2.6.33.6.ARMLGUEST.bz2): application/octet-stream, 78 KiB
_______________________________________________
Lguest mailing list
Lguest@...
https://lists.ozlabs.org/listinfo/lguest
William Cunningham | 28 Nov 06:47
Picon
Favicon

lguest for ARM

I cannot seem to find the original lguest for ARM branch in the current working lguest tree (which as far as I can tell, should be Rusty's tree on kernel.org or github). It would appear that this branch was not moved over following the kernel.org breach. Am I right in assuming that this was the failure and where can I find a copy of the code for that?

Thanks,
William Cunningham
Junior, Computer Engineering
University of Michigan

_______________________________________________
Lguest mailing list
Lguest@...
https://lists.ozlabs.org/listinfo/lguest
Eviatar Khen | 3 Dec 08:53
Picon

Documentation/lguest in kernel 3.0

Hi All,

Is there a reason why the Documentation directrory does not contain the 
"lguest" directory (with the launcher program)?

Will the launcher from previouse releases would work?

Regards,

Eviatar
Steven Rostedt | 8 Oct 23:11
Gravatar

Re: Lguest on x86_64

On Sat, 2011-10-08 at 23:45 +0300, Daniel Baluta wrote:
> +Steven
> 
> On Thu, Oct 6, 2011 at 6:05 PM, Daniel Baluta
<daniel.baluta@...> wrote:
> > Hello,
> >
> > What is the status of lguest on x86_64 ?
> >
> > I know that 3 years ago, there was an effort to port
> > lguest on this architecture, but isn't very clear what
> > happened since then.
> >
> >

The developers (myself and Glauber) were moved out of the virt
departments and it became a side project that neither of us had time to
work on. I still have the source repositories, and with KVM here, we
never really got much push to pursue it.

As a hobby I thought about getting it to work again (it was functional),
but I just don't have the time.

Are people actually interested in it? I'm willing to help others get it
going again (to a limited extent).

-- Steve
Daniel Baluta | 6 Oct 17:05
Picon
Gravatar

Lguest on x86_64

Hello,

What is the status of lguest on x86_64 ?

I know that 3 years ago, there was an effort to port
lguest on this architecture, but isn't very clear what
happened since then.

thanks,
Daniel.
Rusty Russell | 27 Jul 05:43
Picon
Gravatar

Re: question about lguest inside kvm

On Tue, 26 Jul 2011 14:36:57 +0300, Stefanos Geraggelos
<sgerag@...> wrote:
> >> the output was pv_info: kvm. Finally, I tried to comment out the
> >> return -EPERM, the module loaded but when I ran ./lguest it printed a
> >> trap 13 (or something). So, I think it indeed does Tricky Stuff :) and
> >> I though that is wise to drop you an email before I try to dig inside
> >> for the trap thing. Can you point me a solution to that?
> >>
> >> Thanks and sorry for any inconvenience!
> > 
> > Hi Stefanos!
> > 
> >     Fascinating... I think it *should* be OK to run inside KVM, as the
> > parts that kvm paravirt cover do not effect lguest.
> > 
> > Can you send your .config file?
> > 
> > Thanks,
> > Rusty.
> 
> yeap, here it is (attached).

OK.  Two problems; one is related to KVM, another is related to
CONFIG_RELOCATABLE=y.

These three patches fix it for me on your config; do they work for you?

Cheers,
Rusty.

From: Rusty Russell <rusty@...>
Subject: lguest: Allow running under paravirt-enabled KVM.

We actually can run under KVM, as it doesn't paravirtualize anything we
need to use; reduce the check to checking we are the normal ringlevel.

Reported-by: Stefanos Geraggelos <sgerag@...>
Signed-off-by: Rusty Russell <rusty@...># HG changeset patch
---
 drivers/lguest/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -313,7 +313,7 @@ static int __init init(void)
 	int err;

 	/* Lguest can't run under Xen, VMI or itself.  It does Tricky Stuff. */
-	if (paravirt_enabled()) {
+	if (get_kernel_rpl() != 0) {
 		printk("lguest is afraid of being a guest\n");
 		return -EPERM;
 	}

From: Rusty Russell <rusty@...>
Subject: lguest: don't allow KVM-detection cpuid.

Host might be running under KVM, but we shouldn't allow Guest to think it
can use KVM hypercalls (it can't, and it will embarrass itself if it tries).

Signed-off-by: Rusty Russell <rusty@...>
---
 arch/x86/lguest/boot.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -70,6 +70,7 @@
 #include <asm/i387.h>
 #include <asm/stackprotector.h>
 #include <asm/reboot.h>		/* for struct machine_ops */
+#include <asm/kvm_para.h>

 /*G:010
  * Welcome to the Guest!
@@ -455,6 +456,15 @@ static void lguest_cpuid(unsigned int *a
 		*ax &= 0xFFFFF0FF;
 		*ax |= 0x00000500;
 		break;
+
+	/*
+	 * This is used to detect if we're running under KVM.  We might be,
+	 * but that's a Host matter, not us.  So say we're not.
+	 */
+	case KVM_CPUID_SIGNATURE:
+		*bx = *cx = *dx = 0;
+		break;
+
 	/*
 	 * 0x80000000 returns the highest Extended Function, so we futureproof
 	 * like we do above by limiting it to known fields.

From: Rusty Russell <rusty@...>
Subject: lguest: allow booting guest with CONFIG_RELOCATABLE=y

The CONFIG_RELOCATABLE code tries to align the unpack destination to
the value of 'kernel_alignment' in the setup_hdr.  If that's 0, it
tries to unpack to address 0, which in fact causes the gunzip code
to call 'error("Out of memory while allocating output buffer")'.

The bootloader (ie. the lguest Launcher in this case) should be doing
setting this field; the normal bzImage is 16M, we can use the same.

Reported-by: Stefanos Geraggelos <sgerag@...>
Signed-off-by: Rusty Russell <rusty@...>
---
 Documentation/virtual/lguest/lguest.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/virtual/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c
--- a/Documentation/virtual/lguest/lguest.c
+++ b/Documentation/virtual/lguest/lguest.c
@@ -1996,6 +1996,9 @@ int main(int argc, char *argv[])
 	/* We use a simple helper to copy the arguments separated by spaces. */
 	concat((char *)(boot + 1), argv+optind+2);

+	/* Set kernel alignment to 16M (CONFIG_PHYSICAL_ALIGN) */
+	boot->hdr.kernel_alignment = 0x1000000;
+
 	/* Boot protocol version: 2.07 supports the fields for lguest. */
 	boot->hdr.version = 0x207;
Nuno Felicio | 25 Jul 12:18
Picon

Current state of the lguest arm patch

Hello, first i would like to say thanks for the fantastic lguest hypervisor  :)

Im testing the lguest arm patch, after some issues using the patched kernel tree given by the board builder , i have found that using some commands inside  the guest crashes the host.

running reboot -f, crashes the board.


and

running a dummy test like this

while [ 1 ]; do dd if=/bin/busybox of=/teste.bin; sleep 1 ; done
1910+1 records in
1910+1 records out
978416 bytes (955.5KB) copied, Illegal instruction



What is the current state of the arm patch? Im asking because i not sure if the issue is the current state of the arm patch, or my clumsy merge work :)

At this moment testing with a small ramfs image, on a OMAP3 

My board is an igep2





PS: A big thank you for the arm patch author!




Thanks in advance

Nuno
_______________________________________________
Lguest mailing list
Lguest@...
https://lists.ozlabs.org/listinfo/lguest

Gmane