* kvm guest for 486 sx
@ 2009-07-06 19:58 Jerry Geis
2009-07-07 9:54 ` Avi Kivity
0 siblings, 1 reply; 15+ messages in thread
From: Jerry Geis @ 2009-07-06 19:58 UTC (permalink / raw)
To: kvm
I wish to run as a guest a 486 SX equivalent
is there an option to disable the floating point support?
Is it possible to do this?
Thanks,
Jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-06 19:58 kvm guest for 486 sx Jerry Geis
@ 2009-07-07 9:54 ` Avi Kivity
2009-07-07 12:06 ` Jerry Geis
0 siblings, 1 reply; 15+ messages in thread
From: Avi Kivity @ 2009-07-07 9:54 UTC (permalink / raw)
To: Jerry Geis; +Cc: kvm
On 07/06/2009 10:58 PM, Jerry Geis wrote:
> I wish to run as a guest a 486 SX equivalent
> is there an option to disable the floating point support?
>
> Is it possible to do this?
>
Try -cpu 486,-fpu.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 9:54 ` Avi Kivity
@ 2009-07-07 12:06 ` Jerry Geis
2009-07-07 12:17 ` Avi Kivity
2009-07-07 12:19 ` Gleb Natapov
0 siblings, 2 replies; 15+ messages in thread
From: Jerry Geis @ 2009-07-07 12:06 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> On 07/06/2009 10:58 PM, Jerry Geis wrote:
>> I wish to run as a guest a 486 SX equivalent
>> is there an option to disable the floating point support?
>>
>> Is it possible to do this?
>>
>
> Try -cpu 486,-fpu.
>
Avi,
Running this command:
qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
-usb -cpu 486,-fpu &
I get a seg fault:
qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
I am running kvm-87 centos 5.3 x86_64.
Jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 12:06 ` Jerry Geis
@ 2009-07-07 12:17 ` Avi Kivity
2009-07-07 12:31 ` Jerry Geis
2009-07-07 12:36 ` Jerry Geis
2009-07-07 12:19 ` Gleb Natapov
1 sibling, 2 replies; 15+ messages in thread
From: Avi Kivity @ 2009-07-07 12:17 UTC (permalink / raw)
To: Jerry Geis; +Cc: kvm
On 07/07/2009 03:06 PM, Jerry Geis wrote:
>> Try -cpu 486,-fpu.
>>
>
> Avi,
>
> Running this command:
> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
> -usb -cpu 486,-fpu &
>
> I get a seg fault:
> qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
> 0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
>
>
> I am running kvm-87 centos 5.3 x86_64.
Add -no-kvm-irqchip. A 486 doesn't have a local APIC, which the code
expects.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 12:06 ` Jerry Geis
2009-07-07 12:17 ` Avi Kivity
@ 2009-07-07 12:19 ` Gleb Natapov
1 sibling, 0 replies; 15+ messages in thread
From: Gleb Natapov @ 2009-07-07 12:19 UTC (permalink / raw)
To: Jerry Geis; +Cc: Avi Kivity, kvm
On Tue, Jul 07, 2009 at 08:06:10AM -0400, Jerry Geis wrote:
> Avi Kivity wrote:
>> On 07/06/2009 10:58 PM, Jerry Geis wrote:
>>> I wish to run as a guest a 486 SX equivalent
>>> is there an option to disable the floating point support?
>>>
>>> Is it possible to do this?
>>>
>>
>> Try -cpu 486,-fpu.
>>
> Avi,
>
> Running this command:
> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
> -usb -cpu 486,-fpu &
>
> I get a seg fault:
> qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
> 0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
>
>
> I am running kvm-87 centos 5.3 x86_64.
>
Apply the patch and try again please.
diff --git a/hw/apic.c b/hw/apic.c
index 778a853..3e79377 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -955,7 +955,8 @@ static void kvm_kernel_lapic_load_from_user(APICState *s)
void qemu_kvm_load_lapic(CPUState *env)
{
#ifdef KVM_CAP_IRQCHIP
- if (kvm_enabled() && kvm_vcpu_inited(env) && qemu_kvm_irqchip_in_kernel()) {
+ if (kvm_enabled() && kvm_vcpu_inited(env) &&
+ qemu_kvm_irqchip_in_kernel() && env->apic_state) {
kvm_kernel_lapic_load_from_user(env->apic_state);
}
#endif
--
Gleb.
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 12:17 ` Avi Kivity
@ 2009-07-07 12:31 ` Jerry Geis
2009-07-07 12:36 ` Jerry Geis
1 sibling, 0 replies; 15+ messages in thread
From: Jerry Geis @ 2009-07-07 12:31 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> On 07/07/2009 03:06 PM, Jerry Geis wrote:
>>> Try -cpu 486,-fpu.
>>>
>>
>> Avi,
>>
>> Running this command:
>> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
>> -usb -cpu 486,-fpu &
>>
>> I get a seg fault:
>> qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
>> 0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
>>
>>
>> I am running kvm-87 centos 5.3 x86_64.
>
> Add -no-kvm-irqchip. A 486 doesn't have a local APIC, which the code
> expects.
>
This works. Thanks.
Jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 12:17 ` Avi Kivity
2009-07-07 12:31 ` Jerry Geis
@ 2009-07-07 12:36 ` Jerry Geis
2009-07-07 12:50 ` Avi Kivity
1 sibling, 1 reply; 15+ messages in thread
From: Jerry Geis @ 2009-07-07 12:36 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> On 07/07/2009 03:06 PM, Jerry Geis wrote:
>>> Try -cpu 486,-fpu.
>>>
>>
>> Avi,
>>
>> Running this command:
>> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
>> -usb -cpu 486,-fpu &
>>
>> I get a seg fault:
>> qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
>> 0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
>>
>>
>> I am running kvm-87 centos 5.3 x86_64.
>
> Add -no-kvm-irqchip. A 486 doesn't have a local APIC, which the code
> expects.
>
Running with this line:
qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
-usb -cpu 486,-fpu -no-kvm-irqchip &
My /proc/cpuinfo shows the follow:
processor : 0
vendor_id : AuthenticAMD
cpu family : 4
model : 0
model name : 04/00
stepping : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : no
cpuid level : 0
wp : yes
flags :
bogomips : 2965.50
clflush size : 32
power management:
Notice FPU indicates yes and I requested -fpu on the command line.
also is this a 486 as it says AMD?
Thanks,
Jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 12:36 ` Jerry Geis
@ 2009-07-07 12:50 ` Avi Kivity
2009-07-07 13:15 ` Jerry Geis
0 siblings, 1 reply; 15+ messages in thread
From: Avi Kivity @ 2009-07-07 12:50 UTC (permalink / raw)
To: Jerry Geis; +Cc: kvm
On 07/07/2009 03:36 PM, Jerry Geis wrote:
>
> Avi Kivity wrote:
>> On 07/07/2009 03:06 PM, Jerry Geis wrote:
>>>> Try -cpu 486,-fpu.
>>>>
>>>
>>> Avi,
>>>
>>> Running this command:
>>> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
>>> -usb -cpu 486,-fpu &
>>>
>>> I get a seg fault:
>>> qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
>>> 0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
>>>
>>>
>>> I am running kvm-87 centos 5.3 x86_64.
>>
>> Add -no-kvm-irqchip. A 486 doesn't have a local APIC, which the code
>> expects.
>>
> Running with this line:
> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
> -usb -cpu 486,-fpu -no-kvm-irqchip &
>
>
>
> My /proc/cpuinfo shows the follow:
> processor : 0
> vendor_id : AuthenticAMD
> cpu family : 4
> model : 0
> model name : 04/00
> stepping : 0
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : no
> cpuid level : 0
> wp : yes
> flags :
> bogomips : 2965.50
> clflush size : 32
> power management:
>
>
> Notice FPU indicates yes and I requested -fpu on the command line.
I think it detects the host fpu as a 487 coprocessor. Anything in dmesg
about it? Note there's no fpu in the flags: line.
That's a kvm kernel bug.
> also is this a 486 as it says AMD?
You can override it if you like, -cpu 486,vendor=AuthenticAMD (I think).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 12:50 ` Avi Kivity
@ 2009-07-07 13:15 ` Jerry Geis
2009-07-07 13:23 ` Avi Kivity
0 siblings, 1 reply; 15+ messages in thread
From: Jerry Geis @ 2009-07-07 13:15 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> On 07/07/2009 03:36 PM, Jerry Geis wrote:
>>
>> Avi Kivity wrote:
>>> On 07/07/2009 03:06 PM, Jerry Geis wrote:
>>>>> Try -cpu 486,-fpu.
>>>>>
>>>>
>>>> Avi,
>>>>
>>>> Running this command:
>>>> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1
>>>> -no-acpi -usb -cpu 486,-fpu &
>>>>
>>>> I get a seg fault:
>>>> qemu-system-x86[15419]: segfault at c ip 0000000000458b95 sp
>>>> 0000000041d9df90 error 4 in qemu-system-x86_64[400000+208000]
>>>>
>>>>
>>>> I am running kvm-87 centos 5.3 x86_64.
>>>
>>> Add -no-kvm-irqchip. A 486 doesn't have a local APIC, which the
>>> code expects.
>>>
>> Running with this line:
>> qemu-system-x86_64 -net nic,model=rtl8139 -net user -hda $1 -no-acpi
>> -usb -cpu 486,-fpu -no-kvm-irqchip &
>>
>>
>>
>> My /proc/cpuinfo shows the follow:
>> processor : 0
>> vendor_id : AuthenticAMD
>> cpu family : 4
>> model : 0
>> model name : 04/00
>> stepping : 0
>> fdiv_bug : no
>> hlt_bug : no
>> f00f_bug : no
>> coma_bug : no
>> fpu : yes
>> fpu_exception : no
>> cpuid level : 0
>> wp : yes
>> flags :
>> bogomips : 2965.50
>> clflush size : 32
>> power management:
>>
>>
>> Notice FPU indicates yes and I requested -fpu on the command line.
>
> I think it detects the host fpu as a 487 coprocessor. Anything in
> dmesg about it? Note there's no fpu in the flags: line.
>
> That's a kvm kernel bug.
>
>> also is this a 486 as it says AMD?
>
> You can override it if you like, -cpu 486,vendor=AuthenticAMD (I think).
>
Sorry - I thought the " -cpu 486,-fpu " was the way to turn off the fpu.
I 'm trying to emulute a 486 sx that has no fpu.
Do I not have the command line correct? qemu-system-x86_64 -net
nic,model=rtl8139 -net user -hda $1 -no-acpi -usb -cpu 486,-fpu
-no-kvm-irqchip
the vendor_id is OK just not what I expected to see.
Jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 13:15 ` Jerry Geis
@ 2009-07-07 13:23 ` Avi Kivity
2009-07-07 14:58 ` Jerry Geis
2009-07-08 11:04 ` Andre Przywara
0 siblings, 2 replies; 15+ messages in thread
From: Avi Kivity @ 2009-07-07 13:23 UTC (permalink / raw)
To: Jerry Geis; +Cc: kvm
On 07/07/2009 04:15 PM, Jerry Geis wrote:
>>> Notice FPU indicates yes and I requested -fpu on the command line.
>>
>> I think it detects the host fpu as a 487 coprocessor. Anything in
>> dmesg about it? Note there's no fpu in the flags: line.
>>
>> That's a kvm kernel bug.
>>
>>> also is this a 486 as it says AMD?
>>
>> You can override it if you like, -cpu 486,vendor=AuthenticAMD (I think).
>>
>
> Sorry - I thought the " -cpu 486,-fpu " was the way to turn off the fpu.
> I 'm trying to emulute a 486 sx that has no fpu.
I thought so too, but in fact it emulates a 486sx+487. We can make it
emulate a 486sx without a 487, but that will take a kernel patch.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 13:23 ` Avi Kivity
@ 2009-07-07 14:58 ` Jerry Geis
2009-07-07 15:38 ` Avi Kivity
2009-07-08 11:04 ` Andre Przywara
1 sibling, 1 reply; 15+ messages in thread
From: Jerry Geis @ 2009-07-07 14:58 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> On 07/07/2009 04:15 PM, Jerry Geis wrote:
>>>> Notice FPU indicates yes and I requested -fpu on the command line.
>>>
>>> I think it detects the host fpu as a 487 coprocessor. Anything in
>>> dmesg about it? Note there's no fpu in the flags: line.
>>>
>>> That's a kvm kernel bug.
>>>
>>>> also is this a 486 as it says AMD?
>>>
>>> You can override it if you like, -cpu 486,vendor=AuthenticAMD (I
>>> think).
>>>
>>
>> Sorry - I thought the " -cpu 486,-fpu " was the way to turn off the fpu.
>> I 'm trying to emulute a 486 sx that has no fpu.
>
> I thought so too, but in fact it emulates a 486sx+487. We can make it
> emulate a 486sx without a 487, but that will take a kernel patch.
>
I'd be interested in that if you can make it happen.
jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 14:58 ` Jerry Geis
@ 2009-07-07 15:38 ` Avi Kivity
2009-07-07 23:35 ` Jerry Geis
0 siblings, 1 reply; 15+ messages in thread
From: Avi Kivity @ 2009-07-07 15:38 UTC (permalink / raw)
To: Jerry Geis; +Cc: kvm
On 07/07/2009 05:58 PM, Jerry Geis wrote:
>> I thought so too, but in fact it emulates a 486sx+487. We can make
>> it emulate a 486sx without a 487, but that will take a kernel patch.
>
> I'd be interested in that if you can make it happen.
I don't think I'll get around to it soon. I'll happily apply a patch
though.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 15:38 ` Avi Kivity
@ 2009-07-07 23:35 ` Jerry Geis
0 siblings, 0 replies; 15+ messages in thread
From: Jerry Geis @ 2009-07-07 23:35 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> On 07/07/2009 05:58 PM, Jerry Geis wrote:
>>> I thought so too, but in fact it emulates a 486sx+487. We can make
>>> it emulate a 486sx without a 487, but that will take a kernel patch.
>>
>> I'd be interested in that if you can make it happen.
>
> I don't think I'll get around to it soon. I'll happily apply a patch
> though.
>
I wish could. I'll have to wait or you.
jerry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-07 13:23 ` Avi Kivity
2009-07-07 14:58 ` Jerry Geis
@ 2009-07-08 11:04 ` Andre Przywara
2009-07-08 11:25 ` Avi Kivity
1 sibling, 1 reply; 15+ messages in thread
From: Andre Przywara @ 2009-07-08 11:04 UTC (permalink / raw)
To: Avi Kivity; +Cc: Jerry Geis, kvm
Avi Kivity wrote:
> On 07/07/2009 04:15 PM, Jerry Geis wrote:
>>>> Notice FPU indicates yes and I requested -fpu on the command line.
>>>
>>> I think it detects the host fpu as a 487 coprocessor. Anything in
>>> dmesg about it? Note there's no fpu in the flags: line.
>>>
>>> That's a kvm kernel bug.
>>>
>>>> also is this a 486 as it says AMD?
>>>
>>> You can override it if you like, -cpu 486,vendor=AuthenticAMD (I think).
>>>
>>
>> Sorry - I thought the " -cpu 486,-fpu " was the way to turn off the fpu.
>> I 'm trying to emulute a 486 sx that has no fpu.
>
> I thought so too, but in fact it emulates a 486sx+487.
-fpu does not help here, as the injected 486 CPUID limits the level to
0, so effectively no other leaf than leaf 0 is checked by the guest.
That's why the FPU bit, which is 0000_0001.EDX:0, is not honored.
I bumped up the level to 1 and set the model to 2, which should mimic a
later 486SX chip, together with -fpu Linux (2.6.21) still insisted on
fpu: yes (probably determined by probing FPU instructions).
> We can make it
> emulate a 486sx without a 487, but that will take a kernel patch.
What are you thinking of? Forcing CR0.EM to 1 (and don't let the guest
change it), then inject #NM into the guest?
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448 3567 12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: kvm guest for 486 sx
2009-07-08 11:04 ` Andre Przywara
@ 2009-07-08 11:25 ` Avi Kivity
0 siblings, 0 replies; 15+ messages in thread
From: Avi Kivity @ 2009-07-08 11:25 UTC (permalink / raw)
To: Andre Przywara; +Cc: Jerry Geis, kvm
On 07/08/2009 02:04 PM, Andre Przywara wrote:
>
>> emulate a 486sx without a 487, but that will take a kernel patch.
> What are you thinking of? Forcing CR0.EM to 1 (and don't let the guest
> change it), then inject #NM into the guest?
Yes.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-07-08 11:22 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-06 19:58 kvm guest for 486 sx Jerry Geis
2009-07-07 9:54 ` Avi Kivity
2009-07-07 12:06 ` Jerry Geis
2009-07-07 12:17 ` Avi Kivity
2009-07-07 12:31 ` Jerry Geis
2009-07-07 12:36 ` Jerry Geis
2009-07-07 12:50 ` Avi Kivity
2009-07-07 13:15 ` Jerry Geis
2009-07-07 13:23 ` Avi Kivity
2009-07-07 14:58 ` Jerry Geis
2009-07-07 15:38 ` Avi Kivity
2009-07-07 23:35 ` Jerry Geis
2009-07-08 11:04 ` Andre Przywara
2009-07-08 11:25 ` Avi Kivity
2009-07-07 12:19 ` Gleb Natapov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox