Re: 2.6.35-rc1 regression with pvclock and smp guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2010-10-09 03:10, Arjan Koers wrote:
> On 2010-10-09 00:06, Marcelo Tosatti wrote:
>> On Thu, Oct 07, 2010 at 04:47:11PM -1000, Zachary Amsden wrote:
>>> On 10/07/2010 02:12 PM, Arjan Koers wrote:
>>>> On 2010-10-03 01:42, Zachary Amsden wrote:
>>>> ...
>>>>> Umm...  do you guys have this commit?  This is supposed to address the
>>>>> issue where the guest keeps resetting the TSC.  A guest which does that
>>>>> will break kvmclock.  It only happens on SMP, and it's much worse on AMD
>>>>> CPUs...
>>>>>
>>>>> sound like your scenario.
>>>>>
>>>>> commit bd59fc8ff95126f27b7a0df1b6cc602aa428812d
>>>>> Author: Zachary Amsden<zamsden@xxxxxxxxxx>
>>>>> Date:   Thu Aug 19 22:07:26 2010 -1000
>>>>
>>>> This commit fixes the problem:
>>>>
>>>> commit aad07c4f92bae2edaa42bcef84c2afdd0d082458
>>>> Author: Zachary Amsden<zamsden@xxxxxxxxxx>
>>>> Date:   Thu Aug 19 22:07:19 2010 -1000
>>>>
>>>>     KVM: x86: Move TSC reset out of vmcb_init
>>>>
>>>>     The VMCB is reset whenever we receive a startup IPI, so Linux is setting
>>>>     TSC back to zero happens very late in the boot process and destabilizing
>>>>     the TSC.  Instead, just set TSC to zero once at VCPU creation time.
>>>>
>>>>     Why the separate patch?  So git-bisect is your friend.
>>>
>>> Okay, apparently I need to go poke around 2.6.35 and see what
>>> patches made it there and what patches didn't.
>>
>> Backports attached. Michael, Arjan, please give them a try.
>>
> 
> Thanks for the patches.
> 
> Successfully tested with 2.6.34.7, 2.6.35.7 and 2.6.36-rc7 host
> (with a 2.6.35.7 guest).
> 
> It failed with a 2.6.32.24 host. The patch applied, but
> pvclock_clocksource_read on the guest is still producing wrong
> results for CPU 1 while it's booting. I'll re-check tomorrow.

I've performed some more tests on 2.6.32.24 and it turns out that
the wrong value for CPU 1 is not far enough into the future to make
the guest hang, but that may be different on someone else's system.
See the attached boot log 'dmesg-tsc-unstable.txt'. Note that the printk
time doesn't change for a while after switching to clocksource kvm-clock.

On 2.6.32 and 2.6.33, the TSC is unstable, while on 2.6.34+ it's not
(with Marcelo's patches applied). The attached host patches (backported
from 2.6.34) make them all behave like 2.6.34+, with stable TSC. See
boot log 'dmesg-tsc-stable.txt'.
If I'm not mistaken, the code in pvclock_clocksource_read that
causes the hangs will never be reached when the TSC is stable.

[    0.000000] Linux version 2.6.32.24-201010092338-guestmp (arjan@dev-lenny) (gcc version 4.4.5 20100728 (prerelease) (Debian 4.4.4-8) ) #1 SMP Sat Oct 9 23:42:46 UTC 2010
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32.24-201010092338-guestmp root=UUID=22a4b388-70e0-4d2a-9aa1-bd842504378a ro quiet
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
[    0.000000]  BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000001fffd000 (usable)
[    0.000000]  BIOS-e820: 000000001fffd000 - 0000000020000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: feffd00000000000 - ff00100000000000 (reserved)
[    0.000000] DMI 2.4 present.
[    0.000000] last_pfn = 0x1fffd max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: write-back
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 00E0000000 mask FFE0000000 uncachable
[    0.000000]   1 disabled
[    0.000000]   2 disabled
[    0.000000]   3 disabled
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x0, new 0x7010600070106
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] Using GB pages for direct mapping
[    0.000000] init_memory_mapping: 0000000000000000-000000001fffd000
[    0.000000]  0000000000 - 001fe00000 page 2M
[    0.000000]  001fe00000 - 001fffd000 page 4k
[    0.000000] kernel direct mapping tables up to 1fffd000 @ 8000-b000
[    0.000000] RAMDISK: 17df5000 - 1803d7b1
[    0.000000] ACPI: RSDP 00000000000fdb80 00014 (v00 BOCHS )
[    0.000000] ACPI: RSDT 000000001fffde10 00034 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACP 000000001ffffe40 00074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.000000] ACPI: DSDT 000000001fffdfd0 01E22 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
[    0.000000] ACPI: FACS 000000001ffffe00 00040
[    0.000000] ACPI: SSDT 000000001fffdf80 00044 (v01 BOCHS  BXPCSSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: APIC 000000001fffde90 0007A (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.000000] ACPI: HPET 000000001fffde50 00038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] (7 early reservations) ==> bootmem [0000000000 - 001fffd000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0000006000 - 0000008000]       TRAMPOLINE ==> [0000006000 - 0000008000]
[    0.000000]   #2 [0001000000 - 00013d08d8]    TEXT DATA BSS ==> [0001000000 - 00013d08d8]
[    0.000000]   #3 [0017df5000 - 001803d7b1]          RAMDISK ==> [0017df5000 - 001803d7b1]
[    0.000000]   #4 [000009bc00 - 0000100000]    BIOS reserved ==> [000009bc00 - 0000100000]
[    0.000000]   #5 [00013d1000 - 00013d1071]              BRK ==> [00013d1000 - 00013d1071]
[    0.000000]   #6 [0000008000 - 0000009000]          PGTABLE ==> [0000008000 - 0000009000]
[    0.000000] kvm-clock: cpu 0, msr 0:1322601, boot clock
[    0.000000]  [ffffea0000000000-ffffea00007fffff] PMD -> [ffff880001800000-ffff880001ffffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00100000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[2] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x0000009b
[    0.000000]     0: 0x00000100 -> 0x0001fffd
[    0.000000] On node 0 totalpages: 130968
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 104 pages reserved
[    0.000000]   DMA zone: 3835 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 1736 pages used for memmap
[    0.000000]   DMA32 zone: 125237 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0xb008
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ5 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] ACPI: IRQ10 used by override.
[    0.000000] ACPI: IRQ11 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 24
[    0.000000] Allocating PCI resources starting at 20000000 (gap: 20000000:dffc0000)
[    0.000000] Booting paravirtualized kernel on KVM
[    0.000000] NR_CPUS:6 nr_cpumask_bits:6 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 26 pages/cpu @ffff880001400000 s73816 r8192 d24488 u1048576
[    0.000000] pcpu-alloc: s73816 r8192 d24488 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 
[    0.000000] kvm-clock: cpu 0, msr 0:1411601, primary cpu clock
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129072
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32.24-201010092338-guestmp root=UUID=22a4b388-70e0-4d2a-9aa1-bd842504378a ro quiet
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] Initializing CPU#0
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Memory: 507724k/524276k available (2072k kernel code, 404k absent, 15504k reserved, 1063k data, 452k init)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:448
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] hpet clockevent registered
[    0.000000] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    0.000000] Detected 2799.842 MHz processor.
[    0.012000] Calibrating delay loop (skipped) preset value.. 5599.68 BogoMIPS (lpj=11199368)
[    0.012000] Mount-cache hash table entries: 256
[    0.012000] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[    0.012000] CPU: L2 Cache: 512K (64 bytes/line)
[    0.012000] using C1E aware idle routine
[    0.012000] Performance Events: AMD PMU driver.
[    0.012000] ... version:                0
[    0.012000] ... bit width:              48
[    0.012000] ... generic registers:      4
[    0.012000] ... value mask:             0000ffffffffffff
[    0.012000] ... max period:             00007fffffffffff
[    0.012000] ... fixed-purpose events:   0
[    0.012000] ... event mask:             000000000000000f
[    0.012000] Freeing SMP alternatives: 20k freed
[    0.012019] ACPI: Core revision 20090903
[    0.014379] Setting APIC routing to flat
[    0.015667] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.015669] CPU0: AMD Athlon(tm) II X2 240 Processor stepping 02
[    0.016000] Booting processor 1 APIC 0x1 ip 0x6000
[    0.012000] Initializing CPU#1
[    0.012000] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[    0.012000] CPU: L2 Cache: 512K (64 bytes/line)
[    0.012000] kvm-clock: cpu 1, msr 0:1511601, secondary cpu clock
[    0.025724] CPU1: AMD Athlon(tm) II X2 240 Processor stepping 02
[    0.025724] Brought up 2 CPUs
[    0.025724] Total of 2 processors activated (11199.36 BogoMIPS).
[    0.025724] x86 PAT enabled: cpu 1, old 0x0, new 0x7010600070106
[    0.028000] NET: Registered protocol family 16
[    0.028000] ACPI: bus type pci registered
[    0.028000] PCI: Using configuration type 1 for base access
[    0.028000] PCI: Using configuration type 1 for extended access
[    0.028000] mtrr: your CPUs had inconsistent variable MTRR settings
[    0.028000] mtrr: your CPUs had inconsistent MTRRdefType settings
[    0.028000] mtrr: probably your BIOS does not setup all CPUs.
[    0.028000] mtrr: corrected configuration.
[    0.040000] bio: create slab <bio-0> at 0
[    0.040000] ACPI: EC: Look up EC in DSDT
[    0.040000] ACPI: Interpreter enabled
[    0.040000] ACPI: (supports S0 S5)
[    0.040000] ACPI: Using IOAPIC for interrupt routing
[    0.064000] ACPI: PCI Root Bridge [PCI0] (0000:00)
[    0.064000] pci 0000:00:01.1: reg 20 io port: [0xc000-0xc00f]
[    0.064000] pci 0000:00:01.3: quirk: region b000-b03f claimed by PIIX4 ACPI
[    0.064000] pci 0000:00:01.3: quirk: region b100-b10f claimed by PIIX4 SMB
[    0.068000] pci 0000:00:02.0: reg 10 32bit mmio pref: [0xf0000000-0xf1ffffff]
[    0.068000] pci 0000:00:02.0: reg 14 32bit mmio: [0xf2000000-0xf2000fff]
[    0.072000] pci 0000:00:02.0: reg 30 32bit mmio pref: [0xf2010000-0xf201ffff]
[    0.072000] pci 0000:00:03.0: reg 10 io port: [0xc020-0xc03f]
[    0.072000] pci 0000:00:03.0: reg 14 32bit mmio: [0xf2020000-0xf2020fff]
[    0.072000] pci 0000:00:03.0: reg 30 32bit mmio pref: [0xf2030000-0xf203ffff]
[    0.072000] pci 0000:00:04.0: reg 10 io port: [0xc040-0xc05f]
[    0.072000] pci 0000:00:05.0: reg 10 io port: [0xc080-0xc0bf]
[    0.072000] pci 0000:00:05.0: reg 14 32bit mmio: [0xf2040000-0xf2040fff]
[    0.072000] pci 0000:00:06.0: reg 10 io port: [0xc0c0-0xc0ff]
[    0.072000] pci 0000:00:06.0: reg 14 32bit mmio: [0xf2041000-0xf2041fff]
[    0.072000] pci_bus 0000:00: on NUMA node 0
[    0.072000] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.080000] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[    0.080000] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[    0.080000] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[    0.080000] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[    0.084000] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.084000] vgaarb: loaded
[    0.084000] PCI: Using ACPI for IRQ routing
[    0.084000] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    0.088000] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[    0.096000] Switching to clocksource kvm-clock
[    0.096000] pnp: PnP ACPI init
[    0.096000] ACPI: bus type pnp registered
[    0.096000] pnp: PnP ACPI: found 7 devices
[    0.096000] ACPI: ACPI bus type pnp unregistered
[    0.096000] pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
[    0.096000] pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffffffffffff]
[    0.096000] NET: Registered protocol family 2
[    0.096000] IP route cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.096000] TCP established hash table entries: 16384 (order: 6, 262144 bytes)
[    0.096000] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.096000] TCP: Hash tables configured (established 16384 bind 16384)
[    0.096000] TCP reno registered
[    0.096000] NET: Registered protocol family 1
[    0.096000] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.096000] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    0.096000] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    0.096000] pci 0000:00:02.0: Boot video device
[    0.096000] Unpacking initramfs...
[    0.096000] Freeing initrd memory: 2337k freed
[    0.096000] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.096000] msgmni has been set to 997
[    0.096000] alg: No test for stdrng (krng)
[    0.096000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.096000] io scheduler noop registered
[    0.096000] io scheduler anticipatory registered
[    0.096000] io scheduler deadline registered
[    0.096000] io scheduler cfq registered (default)
[    0.096000] PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[    0.096000] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.096000] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.096000] mice: PS/2 mouse device common for all mice
[    0.096000] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[    0.096000] rtc0: alarms up to one day, 114 bytes nvram, hpet irqs
[    0.096000] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    0.096000] cpuidle: using governor ladder
[    0.096000] cpuidle: using governor menu
[    0.096000] TCP cubic registered
[    0.096000] NET: Registered protocol family 17
[    0.096000] rtc_cmos 00:01: setting system clock to 2010-10-10 00:15:08 UTC (1286669708)
[    0.096000] Freeing unused kernel memory: 452k freed
[    0.096000] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[    0.096000] virtio-pci 0000:00:03.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
[    0.096000] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10
[    0.096000] virtio-pci 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 10 (level, high) -> IRQ 10
[    0.096000] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[    0.096000] virtio-pci 0000:00:05.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
[    0.096000] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
[    0.096000] virtio-pci 0000:00:06.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, high) -> IRQ 11
[    0.096000] virtio-pci 0000:00:05.0: irq 24 for MSI/MSI-X
[    0.096000] virtio-pci 0000:00:05.0: irq 25 for MSI/MSI-X
[    0.096000]  vda: vda1 vda2 < vda5 >
[    0.096000] virtio-pci 0000:00:03.0: irq 26 for MSI/MSI-X
[    0.096000] virtio-pci 0000:00:03.0: irq 27 for MSI/MSI-X
[    0.096000] virtio-pci 0000:00:03.0: irq 28 for MSI/MSI-X
[    0.096000] virtio-pci 0000:00:06.0: irq 29 for MSI/MSI-X
[    0.096000] virtio-pci 0000:00:06.0: irq 30 for MSI/MSI-X
[    0.096000]  vdb: vdb1
[    0.655063] kjournald starting.  Commit interval 5 seconds
[    0.655106] EXT3-fs: mounted filesystem with writeback data mode.
[    1.009125] Clocksource tsc unstable (delta = 303360937 ns)
[    2.278086] udev: starting version 160
[    2.971618] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    2.971640] ACPI: Power Button [PWRF]
[    3.156974] processor LNXCPU:00: registered as cooling_device0
[    3.157091] processor LNXCPU:01: registered as cooling_device1
[    4.305146] Adding 409616k swap on /dev/vda5.  Priority:-1 extents:1 across:409616k 
[    4.465152] EXT3 FS on vda1, internal journal
[    4.642414] loop: module loaded
[    0.000000] Linux version 2.6.32.24-201010092338-guestmp (arjan@dev-lenny) (gcc version 4.4.5 20100728 (prerelease) (Debian 4.4.4-8) ) #1 SMP Sat Oct 9 23:42:46 UTC 2010
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32.24-201010092338-guestmp root=UUID=22a4b388-70e0-4d2a-9aa1-bd842504378a ro quiet
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
[    0.000000]  BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000001fffd000 (usable)
[    0.000000]  BIOS-e820: 000000001fffd000 - 0000000020000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: feffd00000000000 - ff00100000000000 (reserved)
[    0.000000] DMI 2.4 present.
[    0.000000] last_pfn = 0x1fffd max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: write-back
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 00E0000000 mask FFE0000000 uncachable
[    0.000000]   1 disabled
[    0.000000]   2 disabled
[    0.000000]   3 disabled
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x0, new 0x7010600070106
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] Using GB pages for direct mapping
[    0.000000] init_memory_mapping: 0000000000000000-000000001fffd000
[    0.000000]  0000000000 - 001fe00000 page 2M
[    0.000000]  001fe00000 - 001fffd000 page 4k
[    0.000000] kernel direct mapping tables up to 1fffd000 @ 8000-b000
[    0.000000] RAMDISK: 17df5000 - 1803d7b1
[    0.000000] ACPI: RSDP 00000000000fdb80 00014 (v00 BOCHS )
[    0.000000] ACPI: RSDT 000000001fffde10 00034 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACP 000000001ffffe40 00074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.000000] ACPI: DSDT 000000001fffdfd0 01E22 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
[    0.000000] ACPI: FACS 000000001ffffe00 00040
[    0.000000] ACPI: SSDT 000000001fffdf80 00044 (v01 BOCHS  BXPCSSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: APIC 000000001fffde90 0007A (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.000000] ACPI: HPET 000000001fffde50 00038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] (7 early reservations) ==> bootmem [0000000000 - 001fffd000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0000006000 - 0000008000]       TRAMPOLINE ==> [0000006000 - 0000008000]
[    0.000000]   #2 [0001000000 - 00013d08d8]    TEXT DATA BSS ==> [0001000000 - 00013d08d8]
[    0.000000]   #3 [0017df5000 - 001803d7b1]          RAMDISK ==> [0017df5000 - 001803d7b1]
[    0.000000]   #4 [000009bc00 - 0000100000]    BIOS reserved ==> [000009bc00 - 0000100000]
[    0.000000]   #5 [00013d1000 - 00013d1071]              BRK ==> [00013d1000 - 00013d1071]
[    0.000000]   #6 [0000008000 - 0000009000]          PGTABLE ==> [0000008000 - 0000009000]
[    0.000000] kvm-clock: cpu 0, msr 0:1322601, boot clock
[    0.000000]  [ffffea0000000000-ffffea00007fffff] PMD -> [ffff880001800000-ffff880001ffffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00100000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[2] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x0000009b
[    0.000000]     0: 0x00000100 -> 0x0001fffd
[    0.000000] On node 0 totalpages: 130968
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 104 pages reserved
[    0.000000]   DMA zone: 3835 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 1736 pages used for memmap
[    0.000000]   DMA32 zone: 125237 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0xb008
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ5 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] ACPI: IRQ10 used by override.
[    0.000000] ACPI: IRQ11 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 24
[    0.000000] Allocating PCI resources starting at 20000000 (gap: 20000000:dffc0000)
[    0.000000] Booting paravirtualized kernel on KVM
[    0.000000] NR_CPUS:6 nr_cpumask_bits:6 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 26 pages/cpu @ffff880001400000 s73816 r8192 d24488 u1048576
[    0.000000] pcpu-alloc: s73816 r8192 d24488 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 
[    0.000000] kvm-clock: cpu 0, msr 0:1411601, primary cpu clock
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129072
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32.24-201010092338-guestmp root=UUID=22a4b388-70e0-4d2a-9aa1-bd842504378a ro quiet
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] Initializing CPU#0
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Memory: 507724k/524276k available (2072k kernel code, 404k absent, 15504k reserved, 1063k data, 452k init)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:448
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] hpet clockevent registered
[    0.000000] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    0.000000] Detected 2800.486 MHz processor.
[    0.012000] Calibrating delay loop (skipped) preset value.. 5600.97 BogoMIPS (lpj=11201944)
[    0.012000] Mount-cache hash table entries: 256
[    0.012000] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[    0.012000] CPU: L2 Cache: 512K (64 bytes/line)
[    0.012000] using C1E aware idle routine
[    0.012000] Performance Events: AMD PMU driver.
[    0.012000] ... version:                0
[    0.012000] ... bit width:              48
[    0.012000] ... generic registers:      4
[    0.012000] ... value mask:             0000ffffffffffff
[    0.012000] ... max period:             00007fffffffffff
[    0.012000] ... fixed-purpose events:   0
[    0.012000] ... event mask:             000000000000000f
[    0.012100] Freeing SMP alternatives: 20k freed
[    0.012114] ACPI: Core revision 20090903
[    0.014445] Setting APIC routing to flat
[    0.015790] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.015793] CPU0: AMD Athlon(tm) II X2 240 Processor stepping 02
[    0.016000] Booting processor 1 APIC 0x1 ip 0x6000
[    0.012000] Initializing CPU#1
[    0.012000] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[    0.012000] CPU: L2 Cache: 512K (64 bytes/line)
[    0.012000] kvm-clock: cpu 1, msr 0:1511601, secondary cpu clock
[    0.024078] CPU1: AMD Athlon(tm) II X2 240 Processor stepping 02
[    0.024108] Brought up 2 CPUs
[    0.024110] Total of 2 processors activated (11201.94 BogoMIPS).
[    0.024411] x86 PAT enabled: cpu 1, old 0x0, new 0x7010600070106
[    0.025259] NET: Registered protocol family 16
[    0.028133] ACPI: bus type pci registered
[    0.028133] PCI: Using configuration type 1 for base access
[    0.028133] PCI: Using configuration type 1 for extended access
[    0.028188] mtrr: your CPUs had inconsistent variable MTRR settings
[    0.028188] mtrr: your CPUs had inconsistent MTRRdefType settings
[    0.028188] mtrr: probably your BIOS does not setup all CPUs.
[    0.028188] mtrr: corrected configuration.
[    0.036221] bio: create slab <bio-0> at 0
[    0.044346] ACPI: EC: Look up EC in DSDT
[    0.049855] ACPI: Interpreter enabled
[    0.049857] ACPI: (supports S0 S5)
[    0.049867] ACPI: Using IOAPIC for interrupt routing
[    0.068474] ACPI: PCI Root Bridge [PCI0] (0000:00)
[    0.072834] pci 0000:00:01.1: reg 20 io port: [0xc000-0xc00f]
[    0.073227] pci 0000:00:01.3: quirk: region b000-b03f claimed by PIIX4 ACPI
[    0.073239] pci 0000:00:01.3: quirk: region b100-b10f claimed by PIIX4 SMB
[    0.075565] pci 0000:00:02.0: reg 10 32bit mmio pref: [0xf0000000-0xf1ffffff]
[    0.075565] pci 0000:00:02.0: reg 14 32bit mmio: [0xf2000000-0xf2000fff]
[    0.075565] pci 0000:00:02.0: reg 30 32bit mmio pref: [0xf2010000-0xf201ffff]
[    0.075565] pci 0000:00:03.0: reg 10 io port: [0xc020-0xc03f]
[    0.075565] pci 0000:00:03.0: reg 14 32bit mmio: [0xf2020000-0xf2020fff]
[    0.075619] pci 0000:00:03.0: reg 30 32bit mmio pref: [0xf2030000-0xf203ffff]
[    0.080155] pci 0000:00:04.0: reg 10 io port: [0xc040-0xc05f]
[    0.080533] pci 0000:00:05.0: reg 10 io port: [0xc080-0xc0bf]
[    0.080592] pci 0000:00:05.0: reg 14 32bit mmio: [0xf2040000-0xf2040fff]
[    0.081031] pci 0000:00:06.0: reg 10 io port: [0xc0c0-0xc0ff]
[    0.081089] pci 0000:00:06.0: reg 14 32bit mmio: [0xf2041000-0xf2041fff]
[    0.081536] pci_bus 0000:00: on NUMA node 0
[    0.081604] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.092368] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[    0.092614] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[    0.092822] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[    0.093030] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[    0.093246] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.093246] vgaarb: loaded
[    0.096176] PCI: Using ACPI for IRQ routing
[    0.096631] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    0.096631] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[    0.112094] Switching to clocksource kvm-clock
[    0.112665] pnp: PnP ACPI init
[    0.112710] ACPI: bus type pnp registered
[    0.117907] pnp: PnP ACPI: found 7 devices
[    0.117914] ACPI: ACPI bus type pnp unregistered
[    0.127084] pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
[    0.127093] pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffffffffffff]
[    0.127513] NET: Registered protocol family 2
[    0.127902] IP route cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.128916] TCP established hash table entries: 16384 (order: 6, 262144 bytes)
[    0.129442] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.129976] TCP: Hash tables configured (established 16384 bind 16384)
[    0.129987] TCP reno registered
[    0.130420] NET: Registered protocol family 1
[    0.130462] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.130498] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    0.130529] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    0.130559] pci 0000:00:02.0: Boot video device
[    0.130721] Unpacking initramfs...
[    0.177652] Freeing initrd memory: 2337k freed
[    0.184652] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.185509] msgmni has been set to 997
[    0.186409] alg: No test for stdrng (krng)
[    0.186897] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.186906] io scheduler noop registered
[    0.186908] io scheduler anticipatory registered
[    0.186909] io scheduler deadline registered
[    0.187038] io scheduler cfq registered (default)
[    0.219030] PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[    0.220785] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.220803] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.221828] mice: PS/2 mouse device common for all mice
[    0.223661] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[    0.223792] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    0.224291] rtc0: alarms up to one day, 114 bytes nvram, hpet irqs
[    0.224441] cpuidle: using governor ladder
[    0.224447] cpuidle: using governor menu
[    0.226020] TCP cubic registered
[    0.226026] NET: Registered protocol family 17
[    0.228262] rtc_cmos 00:01: setting system clock to 2010-10-09 23:52:14 UTC (1286668334)
[    0.228523] Freeing unused kernel memory: 452k freed
[    0.319112] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[    0.319139] virtio-pci 0000:00:03.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
[    0.319275] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10
[    0.319290] virtio-pci 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 10 (level, high) -> IRQ 10
[    0.319440] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[    0.319443] virtio-pci 0000:00:05.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
[    0.319592] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
[    0.319595] virtio-pci 0000:00:06.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, high) -> IRQ 11
[    0.365438] virtio-pci 0000:00:03.0: irq 24 for MSI/MSI-X
[    0.365455] virtio-pci 0000:00:03.0: irq 25 for MSI/MSI-X
[    0.365468] virtio-pci 0000:00:03.0: irq 26 for MSI/MSI-X
[    0.366915] virtio-pci 0000:00:05.0: irq 27 for MSI/MSI-X
[    0.366930] virtio-pci 0000:00:05.0: irq 28 for MSI/MSI-X
[    0.367356]  vda: vda1 vda2 < vda5 >
[    0.393528] virtio-pci 0000:00:06.0: irq 29 for MSI/MSI-X
[    0.393542] virtio-pci 0000:00:06.0: irq 30 for MSI/MSI-X
[    0.394301]  vdb: vdb1
[    0.940463] kjournald starting.  Commit interval 5 seconds
[    0.940574] EXT3-fs: mounted filesystem with writeback data mode.
[    2.603464] udev: starting version 160
[    3.120632] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    3.120646] ACPI: Power Button [PWRF]
[    3.328008] processor LNXCPU:00: registered as cooling_device0
[    3.328080] processor LNXCPU:01: registered as cooling_device1
[    4.534367] Adding 409616k swap on /dev/vda5.  Priority:-1 extents:1 across:409616k 
[    4.702659] EXT3 FS on vda1, internal journal
[    4.838516] loop: module loaded
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 61ba669..a5882fb 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -797,15 +797,17 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 	if (unlikely(cpu != vcpu->cpu)) {
 		u64 tsc_this, delta;
 
-		/*
-		 * Make sure that the guest sees a monotonically
-		 * increasing TSC.
-		 */
-		rdtscll(tsc_this);
-		delta = vcpu->arch.host_tsc - tsc_this;
-		svm->vmcb->control.tsc_offset += delta;
-		if (is_nested(svm))
-			svm->nested.hsave->control.tsc_offset += delta;
+		if (check_tsc_unstable()) {
+			/*
+			 * Make sure that the guest sees a monotonically
+			 * increasing TSC.
+			 */
+			rdtscll(tsc_this);
+			delta = vcpu->arch.host_tsc - tsc_this;
+			svm->vmcb->control.tsc_offset += delta;
+			if (is_nested(svm))
+				svm->nested.hsave->control.tsc_offset += delta;
+		}
 		vcpu->cpu = cpu;
 		kvm_migrate_timers(vcpu);
 		svm->asid_generation = 0;
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 8d128be..77f119c 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -801,14 +801,16 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 	if (unlikely(cpu != vcpu->cpu)) {
 		u64 delta;
 
-		/*
-		 * Make sure that the guest sees a monotonically
-		 * increasing TSC.
-		 */
-		delta = vcpu->arch.host_tsc - native_read_tsc();
-		svm->vmcb->control.tsc_offset += delta;
-		if (is_nested(svm))
-			svm->nested.hsave->control.tsc_offset += delta;
+		if (check_tsc_unstable()) {
+			/*
+			 * Make sure that the guest sees a monotonically
+			 * increasing TSC.
+			 */
+			delta = vcpu->arch.host_tsc - native_read_tsc();
+			svm->vmcb->control.tsc_offset += delta;
+			if (is_nested(svm))
+				svm->nested.hsave->control.tsc_offset += delta;
+		}
 		vcpu->cpu = cpu;
 		kvm_migrate_timers(vcpu);
 		svm->asid_generation = 0;

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux