Skip to contentSkip to conversation

SDL problem with 2.6.21/kvm-17 on x86_64?

PATCH In review Joshua Hoblitt 3 participants 4 messages May 15, 2007 – May 17, 2007 3 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

Hello,

I'm attempting to get kvm-17 to work on a "server" system that has a kernel built without alsa support and libsdl is built without alsa or oss support.

I get this error when attempting to start qemu:
--

$ sudo /usr/local/kvm/bin/qemu-system-x86_64  . -hda vdisk.img -cdrom /data/ipp000.0/jhoblitt/openSUSE-10.2-GM-DVD-x86_64.iso -boot d -m 1024
Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal
error, but for better emulation accuracy either use a 2.6 host Linux
kernel or type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.
kvm_create_vm: Invalid argument
Could not create KVM context
$ lsmod | grep kvm
kvm_amd                19348  0 
kvm                    68040  1 kvm_amd
--

This system has 2 x Opeterson 2220s on a Tyan S2927. I'm guess that this failure is somehow related to sound as when I try to start qemu with -no-kvm...

--
sudo /usr/local/kvm/bin/qemu-system-x86_64 . -hda vdisk.img -cdrom /data/ipp000.0/jhoblitt/openSUSE-10.2-GM-DVD-x86_64.iso -boot d -m 1024 -no-kvm
Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal
error, but for better emulation accuracy either use a 2.6 host Linux kernel or
type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.
Could not initialize SDL - exiting
--

So is the lack of sound hardware the problem here? If so, will it be possible at somepoint to run without it?

-J

--

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Joshua Hoblitt

Hello,

I'm attempting to get kvm-17 to work on a "server" system that has a kernel built without alsa support and libsdl is built without alsa or oss support.

I get this error when attempting to start qemu:
--

Quoted 11 lines
$ sudo /usr/local/kvm/bin/qemu-system-x86_64  . -hda vdisk.img -cdrom /data/ipp000.0/jhoblitt/openSUSE-10.2-GM-DVD-x86_64.iso -boot d -m 1024
Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal
error, but for better emulation accuracy either use a 2.6 host Linux
kernel or type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.
kvm_create_vm: Invalid argument
Could not create KVM context
$ lsmod | grep kvm
kvm_amd                19348  0 
kvm                    68040  1 kvm_amd

Strange. Can you provide an strace of the run?

Quoted 8 lines

--
sudo /usr/local/kvm/bin/qemu-system-x86_64 . -hda vdisk.img -cdrom /data/ipp000.0/jhoblitt/openSUSE-10.2-GM-DVD-x86_64.iso -boot d -m 1024 -no-kvm
Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal
error, but for better emulation accuracy either use a 2.6 host Linux kernel or
type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.
Could not initialize SDL - exiting
--

Quoted 4 lines

So is the lack of sound hardware the problem here? If so, will it be possible at somepoint to run without it?

In addition to the problem above, qemu couldn't access your X server. Try adding '-vnc :1' to the command line.

Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

A message that is not in the archive (sent off-list or not yet received): 4649671D.5000705-atKUWr5tajBWk0Htik3J/[email protected]

#4 lore raw

PATCH 1/1 Handle #SS(0), caused by address size override in vm86 mode

Hi Avi,

I was playing with KVM while booting SuSE Linux 10.1 on it. And I found it was bailing out with #SS fault. I root caused it to the address size override opcode (0x67) from a mov instruction from the boot loader.
The attached patch handles the #SS(0) fault with emulation, letting
guest can proceed further.

Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation.
-------------------------------------------------------------------------
The mind is like a parachute; it works much better when it's open.

commit e7ae040a34ae99ac4eb08701b1a54a7e4315238a

Author: Nitin A Kamble <[email protected]>
Date:   Wed May 16 21:05:58 2007 -0700

Instruction with address size override prefix opcode 0x67 Cause the #SS fault with 0 error code in VM86 mode. <Signed-Off-By: Nitin A Kamble <[email protected]>

drivers/kvm/vmx.c +3 -1
index b1430e1..7d7edb7 100644
@@ -1487,7 +1487,9 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,
 	if (!vcpu->rmode.active)
 		return 0;
 
-	if (vec == GP_VECTOR && err_code == 0)
+    /* Instruction with address size override prefix opcode 0x67
+       Cause the #SS fault with 0 error code in VM86 mode.  */
+	if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0)
 		if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE)
 			return 1;
 	return 0;

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 1179364298.21228.6.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org

#6 lore raw

Re: [PATCH] Handle #SS(0), caused by address size override in vm86 mode

Quoted 8 lines · Nitin A

Hi Avi,

I was playing with KVM while booting SuSE Linux 10.1 on it. And I found it was bailing out with #SS fault. I root caused it to the address size override opcode (0x67) from a mov instruction from the boot loader.
The attached patch handles the #SS(0) fault with emulation, letting
guest can proceed further.

Applied, thanks. Please use Linux style comment next time ( /*
* blah blah
*/
)

Quoted 24 lines

commit e7ae040a34ae99ac4eb08701b1a54a7e4315238a

Author: Nitin A Kamble <[email protected]>
Date:   Wed May 16 21:05:58 2007 -0700

Instruction with address size override prefix opcode 0x67
Cause the #SS fault with 0 error code in VM86 mode.
<Signed-Off-By: Nitin A Kamble <[email protected]>

drivers/kvm/vmx.c +3 -1
index b1430e1..7d7edb7 100644
@@ -1487,7 +1487,9 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,
 	if (!vcpu->rmode.active)
 		return 0;
 
-	if (vec == GP_VECTOR && err_code == 0)
+    /* Instruction with address size override prefix opcode 0x67
+       Cause the #SS fault with 0 error code in VM86 mode.  */
+	if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0)
 		if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE)
 			return 1;
 	return 0;
Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/