diff mbox

centos 7.2 guest doesn't boot without kvmvapic in TCG mode

Message ID 4712D8F4B26E034E80552F30A67BE0B1A4E7F0@ORSMSX112.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Xu, Anthony April 5, 2017, 12:19 a.m. UTC
I disabled kvmvapic by 



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

Comments

Xu, Anthony April 11, 2017, 2 a.m. UTC | #1
+ 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
diff mbox

Patch

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(),