public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: High vm-exit latencies during kvm boot-up/shutdown
Date: Tue, 23 Oct 2007 17:59:51 +0200	[thread overview]
Message-ID: <471E1A77.90808@siemens.com> (raw)
In-Reply-To: <471E1290.2000208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Avi Kivity wrote:
>>> Please post a disassembly of your vmx_vcpu_run so we can interpret the
>>> offsets.
>>>     
>> Here it comes:
>>
>> 00002df0 <vmx_vcpu_run>:
>>     2df0:       55                      push   %ebp
>>     2df1:       89 e5                   mov    %esp,%ebp
>>     2df3:       53                      push   %ebx
>>     2df4:       83 ec 08                sub    $0x8,%esp
>>     2df7:       e8 fc ff ff ff          call   2df8 <vmx_vcpu_run+0x8>
>>     2dfc:       8b 5d 08                mov    0x8(%ebp),%ebx
>>     2dff:       0f 20 c0                mov    %cr0,%eax
>>     2e02:       89 44 24 04             mov    %eax,0x4(%esp)
>>     2e06:       c7 04 24 00 6c 00 00    movl   $0x6c00,(%esp)
>>     2e0d:       e8 be d8 ff ff          call   6d0 <vmcs_writel>
>>   
> 
> first trace
> 
> 
>>     2e12:       8b 83 80 0d 00 00       mov    0xd80(%ebx),%eax
>>     2e18:       ba 14 6c 00 00          mov    $0x6c14,%edx
>>     2e1d:       89 d9                   mov    %ebx,%ecx
>>     2e1f:       60                      pusha
>>     2e20:       51                      push   %ecx
>>     2e21:       0f 79 d4                vmwrite %esp,%edx
>>     2e24:       83 f8 00                cmp    $0x0,%eax
>>     2e27:       8b 81 78 01 00 00       mov    0x178(%ecx),%eax
>>     2e2d:       0f 22 d0                mov    %eax,%cr2
>>     2e30:       8b 81 50 01 00 00       mov    0x150(%ecx),%eax
>>     2e36:       8b 99 5c 01 00 00       mov    0x15c(%ecx),%ebx
>>     2e3c:       8b 91 58 01 00 00       mov    0x158(%ecx),%edx
>>     2e42:       8b b1 68 01 00 00       mov    0x168(%ecx),%esi
>>     2e48:       8b b9 6c 01 00 00       mov    0x16c(%ecx),%edi
>>     2e4e:       8b a9 64 01 00 00       mov    0x164(%ecx),%ebp
>>     2e54:       8b 89 54 01 00 00       mov    0x154(%ecx),%ecx
>>     2e5a:       75 05                   jne    2e61 <vmx_vcpu_run+0x71>
>>     2e5c:       0f 01 c2                vmlaunch
>>     2e5f:       eb 03                   jmp    2e64 <vmx_vcpu_run+0x74>
>>     2e61:       0f 01 c3                vmresume
>>     2e64:       87 0c 24                xchg   %ecx,(%esp)
>>     2e67:       89 81 50 01 00 00       mov    %eax,0x150(%ecx)
>>     2e6d:       89 99 5c 01 00 00       mov    %ebx,0x15c(%ecx)
>>     2e73:       ff 34 24                pushl  (%esp)
>>     2e76:       8f 81 54 01 00 00       popl   0x154(%ecx)
>>     2e7c:       89 91 58 01 00 00       mov    %edx,0x158(%ecx)
>>     2e82:       89 b1 68 01 00 00       mov    %esi,0x168(%ecx)
>>     2e88:       89 b9 6c 01 00 00       mov    %edi,0x16c(%ecx)
>>     2e8e:       89 a9 64 01 00 00       mov    %ebp,0x164(%ecx)
>>     2e94:       0f 20 d0                mov    %cr2,%eax
>>     2e97:       89 81 78 01 00 00       mov    %eax,0x178(%ecx)
>>     2e9d:       8b 0c 24                mov    (%esp),%ecx
>>     2ea0:       59                      pop    %ecx
>>     2ea1:       61                      popa
>>     2ea2:       0f 96 c0                setbe  %al
>>     2ea5:       88 83 84 0d 00 00       mov    %al,0xd84(%ebx)
>>     2eab:       c7 04 24 24 48 00 00    movl   $0x4824,(%esp)
>>     2eb2:       e8 49 d2 ff ff          call   100 <vmcs_read32>
>>   
> 
> second trace
> 
>>     2eb7:       a8 03                   test   $0x3,%al
>>     2eb9:       0f 94 c0                sete   %al
>>     2ebc:       0f b6 c0                movzbl %al,%eax
>>     2ebf:       89 83 28 01 00 00       mov    %eax,0x128(%ebx)
>>     2ec5:       b8 7b 00 00 00          mov    $0x7b,%eax
>>     2eca:       8e d8                   mov    %eax,%ds
>>     2ecc:       8e c0                   mov    %eax,%es
>>     2ece:       c7 83 80 0d 00 00 01    movl   $0x1,0xd80(%ebx)
>>     2ed5:       00 00 00
>>     2ed8:       c7 04 24 04 44 00 00    movl   $0x4404,(%esp)
>>     2edf:       e8 1c d2 ff ff          call   100 <vmcs_read32>
>>     2ee4:       25 00 07 00 00          and    $0x700,%eax
>>     2ee9:       3d 00 02 00 00          cmp    $0x200,%eax
>>     2eee:       75 02                   jne    2ef2 <vmx_vcpu_run+0x102>
>>     2ef0:       cd 02                   int    $0x2
>>     2ef2:       83 c4 08                add    $0x8,%esp
>>     2ef5:       5b                      pop    %ebx
>>     2ef6:       5d                      pop    %ebp
>>     2ef7:       c3                      ret
>>     2ef8:       90                      nop
>>     2ef9:       8d b4 26 00 00 00 00    lea    0x0(%esi),%esi
>>
>> Note that the first, unresolved call here goes to mcount().
>>
>>   
> 
> (the -r option to objdump is handy)

Great, one never stops learning. :)

> 
> Exiting on a pending interrupt is controlled by the vmcs word
> PIN_BASED_EXEC_CONTROL, bit PIN_BASED_EXT_INTR_MASK.  Can you check (via
> vmcs_read32()) that the bit is indeed set?
> 
> [if not, a guest can just enter a busy loop and kill a processor]
> 

I traced it right before and after the asm block, and in all cases
(including those with low latency exits) it's just 0x1f, which should be
fine.

Earlier, I also checked GUEST_INTERRUPTIBILITY_INFO and
GUEST_ACTIVITY_STATE, but found neither some suspicious state nor a
difference compared to fast exits.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

  parent reply	other threads:[~2007-10-23 15:59 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 23:09 High vm-exit latencies during kvm boot-up/shutdown Jan Kiszka
     [not found] ` <471D2D8C.1080202-S0/GAf8tV78@public.gmane.org>
2007-10-23  1:05   ` Dong, Eddie
     [not found]     ` <10EA09EFD8728347A513008B6B0DA77A02441127-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-23  6:38       ` Jan Kiszka
     [not found]         ` <471D96DC.7070809-S0/GAf8tV78@public.gmane.org>
2007-10-23  7:46           ` Dong, Eddie
     [not found]             ` <10EA09EFD8728347A513008B6B0DA77A024414D9-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-23  9:08               ` Jan Kiszka
     [not found]                 ` <471DBA1A.2080108-S0/GAf8tV78@public.gmane.org>
2007-10-23  9:46                   ` Avi Kivity
     [not found]                     ` <471DC311.2050003-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-23 13:30                       ` Jan Kiszka
     [not found]                         ` <471DF76B.7040001-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-23 14:19                           ` Avi Kivity
     [not found]                             ` <471E02F7.6080408-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-23 14:41                               ` Jan Kiszka
     [not found]                                 ` <471E0818.6060405-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-23 14:44                                   ` Jan Kiszka
2007-10-23 15:26                                   ` Avi Kivity
     [not found]                                     ` <471E1290.2000208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-23 15:59                                       ` Jan Kiszka [this message]
     [not found]                                         ` <471E1A77.90808-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-23 16:14                                           ` Avi Kivity
     [not found]                                             ` <471E1DCD.5040301-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-23 16:31                                               ` Jan Kiszka
     [not found]                                                 ` <471E21D7.3000309-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-23 16:38                                                   ` Avi Kivity
     [not found]                                                     ` <471E238E.6040005-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-23 16:56                                                       ` Jan Kiszka
     [not found]                                                         ` <471E27B0.1090001-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-23 17:05                                                           ` Avi Kivity
     [not found]                                                             ` <471E29C5.1060807-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-24  8:37                                                               ` Jan Kiszka
     [not found]                                                                 ` <471F0464.4000704-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-24  8:52                                                                   ` Avi Kivity
     [not found]                                                                     ` <471F07C0.8040104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-24  9:16                                                                       ` Jan Kiszka
     [not found]                                                                         ` <471F0D57.3020209-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-24  9:33                                                                           ` Avi Kivity
     [not found]                                                                             ` <471F116D.9080903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-24 16:22                                                                               ` Jan Kiszka
     [not found]                                                                                 ` <471F7143.8040406-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-24 16:52                                                                                   ` Avi Kivity
     [not found]                                                                                     ` <471F7865.7070506-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-25 17:50                                                                                       ` Jan Kiszka
     [not found]                                                                                         ` <4720D76D.7070300-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-25 18:02                                                                                           ` Avi Kivity
     [not found]                                                                                             ` <4720DA42.6090300-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-26  1:41                                                                                               ` Dong, Eddie
     [not found]                                                                                                 ` <10EA09EFD8728347A513008B6B0DA77A02482827-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-26  8:20                                                                                                   ` Avi Kivity
     [not found]                                                                                                     ` <4721A350.7030409-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-26  8:32                                                                                                       ` Dong, Eddie
     [not found]                                                                                                         ` <10EA09EFD8728347A513008B6B0DA77A02482B96-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-26  9:03                                                                                                           ` Jan Kiszka
     [not found]                                                                                                             ` <4721AD49.7010405-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2007-10-26  9:18                                                                                                               ` Dong, Eddie
     [not found]                                                                                                                 ` <10EA09EFD8728347A513008B6B0DA77A02482BE4-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-26  9:37                                                                                                                   ` Dor Laor
2007-10-26 12:21                                                                                                                   ` Avi Kivity
     [not found]                                                                                                                     ` <4721DBE4.6040801-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-29  8:32                                                                                                                       ` Dong, Eddie
2007-10-26  9:25                                                                                                               ` Avi Kivity
2007-10-26  9:18                                                                                                           ` Avi Kivity
     [not found]                                                                                                             ` <4721B0FD.9020006-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-26  9:36                                                                                                               ` Dong, Eddie
     [not found]                                                                                                                 ` <10EA09EFD8728347A513008B6B0DA77A02482BFE-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-26  9:58                                                                                                                   ` Avi Kivity
2007-10-23 14:43                               ` Gregory Haskins
     [not found]                                 ` <1193150619.8343.21.camel-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-10-23 14:50                                   ` Jan Kiszka
2007-10-23  8:16           ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=471E1A77.90808@siemens.com \
    --to=jan.kiszka-kv7wefo6altbdgjk7y7tuq@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox