All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] centos 7.2 guest doesn't boot without kvmvapic in TCG mode
@ 2017-04-05  0:19 Xu, Anthony
  2017-04-11  2:00 ` Xu, Anthony
  0 siblings, 1 reply; 2+ messages in thread
From: Xu, Anthony @ 2017-04-05  0:19 UTC (permalink / raw)
  To: 'qemu-devel@nongnu.org'
  Cc: 'Paolo Bonzini', 'Stefan Hajnoczi'

I disabled kvmvapic by 

diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index c3829e3..52be2b0 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -440,7 +440,7 @@ static const VMStateDescription vmstate_apic_common = {
 static Property apic_properties_common[] = {
     DEFINE_PROP_UINT8("version", APICCommonState, version, 0x14),
     DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control, VAPIC_ENABLE_BIT,
-                    true),
+                    false),
     DEFINE_PROP_BOOL("legacy-instance-id", APICCommonState, legacy_instance_id,
                      false),
     DEFINE_PROP_END_OF_LIST(),


Tried to boot centos guest with this command

./x86_64-softmmu/qemu-system-x86_64 -bios /home/root/guest/seabios.bin 
-machine q35 -m 1G -drive format=raw,file=/home/root/images/centos7.2.img,if=ide,index=0 
-nographic  -nodefaults  -serial pty -monitor pty 
-chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios


Seabios complained 

Seabios output
"
Booting from Hard Disk...
WARNING - Timeout at ahci_command:154!
Boot failed: could not read the boot disk

enter handle_18:
  NULL
Booting from Floppy...
Boot failed: could not read the boot disk

enter handle_18:
  NULL
No bootable device.
"

It can boot with kvmvapic enabled by using the same command.

Seabios output
"
Booting from Hard Disk...
Booting from 0000:7c00
"

In the original commit,
" Therefore, the VAPI is enabled by default, even in TCG mode. Here, no
speedup can be achieved as the emulation overhead of the TPR register is
marginal compared to instruction emulation."

Seems no performance benefit for TCG mode
What's the other benefit of using kvmvapic in TCG mode?

Should we make TCG mode work without kvmvapic?

If we don't need to use kvmvapic in TCG mode, 
we can make kvmvapic code clearer by removing all TCG related code in 
kvmvapic.c.


Anthony

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] centos 7.2 guest doesn't boot without kvmvapic in TCG mode
  2017-04-05  0:19 [Qemu-devel] centos 7.2 guest doesn't boot without kvmvapic in TCG mode Xu, Anthony
@ 2017-04-11  2:00 ` Xu, Anthony
  0 siblings, 0 replies; 2+ messages in thread
From: Xu, Anthony @ 2017-04-11  2:00 UTC (permalink / raw)
  To: 'qemu-devel@nongnu.org'
  Cc: 'Paolo Bonzini', 'Stefan Hajnoczi', rth

+ Richard Henderson

Anthony

> -----Original Message-----
> From: Xu, Anthony
> Sent: Tuesday, April 4, 2017 5:19 PM
> To: 'qemu-devel@nongnu.org' <qemu-devel@nongnu.org>
> Cc: 'Paolo Bonzini' <pbonzini@redhat.com>; 'Stefan Hajnoczi'
> <stefanha@gmail.com>
> Subject: [Qemu-devel] centos 7.2 guest doesn't boot without kvmvapic in
> TCG mode
> 
> I disabled kvmvapic by
> 
> diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
> index c3829e3..52be2b0 100644
> --- a/hw/intc/apic_common.c
> +++ b/hw/intc/apic_common.c
> @@ -440,7 +440,7 @@ static const VMStateDescription
> vmstate_apic_common = {
>  static Property apic_properties_common[] = {
>      DEFINE_PROP_UINT8("version", APICCommonState, version, 0x14),
>      DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control,
> VAPIC_ENABLE_BIT,
> -                    true),
> +                    false),
>      DEFINE_PROP_BOOL("legacy-instance-id", APICCommonState,
> legacy_instance_id,
>                       false),
>      DEFINE_PROP_END_OF_LIST(),
> 
> 
> Tried to boot centos guest with this command
> 
> ./x86_64-softmmu/qemu-system-x86_64 -bios
> /home/root/guest/seabios.bin
> -machine q35 -m 1G -drive
> format=raw,file=/home/root/images/centos7.2.img,if=ide,index=0
> -nographic  -nodefaults  -serial pty -monitor pty
> -chardev stdio,id=seabios -device isa-
> debugcon,iobase=0x402,chardev=seabios
> 
> 
> Seabios complained
> 
> Seabios output
> "
> Booting from Hard Disk...
> WARNING - Timeout at ahci_command:154!
> Boot failed: could not read the boot disk
> 
> enter handle_18:
>   NULL
> Booting from Floppy...
> Boot failed: could not read the boot disk
> 
> enter handle_18:
>   NULL
> No bootable device.
> "
> 
> It can boot with kvmvapic enabled by using the same command.
> 
> Seabios output
> "
> Booting from Hard Disk...
> Booting from 0000:7c00
> "
> 
> In the original commit,
> " Therefore, the VAPI is enabled by default, even in TCG mode. Here, no
> speedup can be achieved as the emulation overhead of the TPR register is
> marginal compared to instruction emulation."
> 
> Seems no performance benefit for TCG mode
> What's the other benefit of using kvmvapic in TCG mode?
> 
> Should we make TCG mode work without kvmvapic?
> 
> If we don't need to use kvmvapic in TCG mode,
> we can make kvmvapic code clearer by removing all TCG related code in
> kvmvapic.c.
> 
> 
> Anthony

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-11  2:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05  0:19 [Qemu-devel] centos 7.2 guest doesn't boot without kvmvapic in TCG mode Xu, Anthony
2017-04-11  2:00 ` Xu, Anthony

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.