Arthur Chunqi Li | 19 Jun 2013 17:00
Picon

[PATCH 1/2] kvm-unit-tests: Add a func to run instruction in emulator

Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.

Signed-off-by: Arthur Chunqi Li <yzt356 <at> gmail.com>
---
 x86/emulator.c |  110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)
 mode change 100644 => 100755 x86/emulator.c

diff --git a/x86/emulator.c b/x86/emulator.c
old mode 100644
new mode 100755
index 96576e5..48d45c8
--- a/x86/emulator.c
+++ b/x86/emulator.c
 <at>  <at>  -11,6 +11,15  <at>  <at>  int fails, tests;

 static int exceptions;

+struct regs {
+	u64 rax, rbx, rcx, rdx;
+	u64 rsi, rdi, rsp, rbp;
+	u64 r8, r9, r10, r11;
+	u64 r12, r13, r14, r15;
+	u64 rip, rflags;
+};
+struct regs inregs, outregs, save;
+
(Continue reading)

bugzilla-daemon | 19 Jun 2013 07:40

[Bug 59891] New: Unrecoverable Kernel Panic, in Virtio Net in memcpy(), Complete system lockup.

https://bugzilla.kernel.org/show_bug.cgi?id=59891

           Summary: Unrecoverable Kernel Panic, in Virtio Net in memcpy(),
                    Complete system lockup.
           Product: Virtualization
           Version: unspecified
    Kernel Version: 3.9+
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: blocking
          Priority: P1
         Component: kvm
        AssignedTo: virtualization_kvm <at> kernel-bugs.osdl.org
        ReportedBy: matthewgrant5 <at> gmail.com
                CC: matthewgrant5 <at> gmail.com
        Regression: Yes

On AMD processor, under heavy network load and ATI GPU use, System will
completely lock up when a VM is receiving? a packet.

This happens in memcpy()

Get:

Kernel Panic - not syncing: Fatal exception in interrupt.

Can't seem to get anything on a serial port, or with kexec kernel core dumps.

(Continue reading)

pedro pinto | 18 Jun 2013 20:35
Picon

Unreliable QueryPerformanceCounter on Windows 2008 RC2 guest

Hi there,

I am using a Ubuntu 12.04 x64 host to run a Windows 2008 RC2 guest and
I have noticed very puzzling behaviour inside the guest when invoking
QueryPerformanceCounter. Specifically the program below will
periodically show a 43 second offset between loop iterations despite
the fact that  loop is roughly running once per second (printing out
the guest system clock confirms this). The same thing happens on a
Windows 7 guest. The 43 second number is remarkably stable across
hosts and guests.

#include "stdafx.h"
#include "windows.h"
#include <iostream>

int main(int argc, char ** argv)
{

   LARGE_INTEGER qpcnt;
   QueryPerformanceCounter(&qpcnt);
   auto then = qpcnt.QuadPart;

   while (true) {
      LARGE_INTEGER qpfreq;
      QueryPerformanceFrequency(&qpfreq);
      auto freq = qpfreq.QuadPart;

      QueryPerformanceCounter(&qpcnt);
      auto now = qpcnt.QuadPart;
      auto delta_seconds = (now - then) / freq;
(Continue reading)

Andreas Färber | 18 Jun 2013 18:36
Picon

Re: [PATCH qom-cpu v2 01/29] kvm: Change kvm_cpu_synchronize_state() argument to CPUState

Am 17.06.2013 18:15, schrieb Paolo Bonzini:
> Il 16/06/2013 17:57, Andreas Färber ha scritto:
>> It no longer relies on CPUArchState since 20d695a.
>>
>> Reviewed-by: liguang <lig.fnst <at> cn.fujitsu.com>
>> Signed-off-by: Andreas Färber <afaerber <at> suse.de>
>> ---
>>  hw/ppc/spapr_rtas.c  |  2 +-
>>  include/sysemu/kvm.h |  4 ++--
>>  kvm-all.c            |  4 +---
>>  kvm-stub.c           |  2 +-
>>  target-i386/kvm.c    | 10 +++++-----
>>  5 files changed, 10 insertions(+), 12 deletions(-)
[...]
> 
> Acked-by: Paolo Bonzini <pbonzini <at> redhat.com>

Thanks, applied to qom-cpu:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu

Andreas

--

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

SYSTEM ADMIN HELPDESK | 18 Jun 2013 10:57
Picon
Favicon

FINAL WARNING!!!


Dear Account User,

       Your mailbox has exceeded the limit of 30 GB, which is as set by
your manager, you are currently at 30.9GB, very soon you will not
be able to create new e-mail to send or receive again until you
validate your mailbox.To re-validate your mailbox, click on the
link below and follow the instruction for your upgrade.

=======> http://systemadminhelpdesk00.yolasite.com/contact-us.php

Sincerely,
Web administrator.
&#169; 2013. All Rights Reserved.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Cure | 17 Jun 2013 12:00
Picon
Favicon

access PCI card trouble from VM guest

		Hello,

	I want to access this PCI card from one VM :

10:00.0 Serial controller: Moxa Technologies Co Ltd CP-132EL (2-port
RS-422/485 Smart PCI Express Serial Board)

	This card is not handle by driver on the host kernel.

	When I start the VM with this command (generated vy libvirt) :

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/
QEMU_AUDIO_DRV=none /usr/bin/kvm -name huahine -S -machine
pc-i440fx-1.5,accel=kvm,usb=off -cpu
SandyBridge,+pdpe1gb,+osxsave,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme,hv_relaxed
-m 4096 -smp 2,sockets=2,cores=1,threads=1 -uuid
efaa3133-eb5a-e9c3-5120-d6dd5e4551ca -no-user-config -nodefaults
-chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/huahine.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime
-no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive
file=/dev/drbd2,if=none,id=drive-scsi0-0-0-0,format=raw,cache=none
-device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
-drive
file=/Iso/virtio-win.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw
-device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
tap,fd=23,id=hostnet0 -device
(Continue reading)

Marcelo Tosatti | 14 Jun 2013 23:30
Picon
Favicon

[kvm-unit-test PATCH] kvmclock: serialize RDTSC


Serialize RDTSC so its executed inside kvmclock_read 
section.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=922285

Signed-off-by: Marcelo Tosatti <mtosatti <at> redhat.com>

diff --git a/x86/kvmclock.c b/x86/kvmclock.c
index 0624da3..5b831c5 100644
--- a/x86/kvmclock.c
+++ b/x86/kvmclock.c
 <at>  <at>  -177,10 +177,10  <at>  <at>  cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)

 	do {
 		version = pvclock_get_time_values(&shadow, src);
-		barrier();
+		mb();
 		offset = pvclock_get_nsec_offset(&shadow);
 		ret = shadow.system_timestamp + offset;
-		barrier();
+		mb();
 	} while (version != src->version);

 	if ((valid_flags & PVCLOCK_RAW_CYCLE_BIT) ||
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Zhanghaoyu (A | 14 Jun 2013 09:36
Favicon

[PATCH] KVM: x86: remove vcpu's CPL check in host invoked vcpu's xcr set process

__kvm_set_xcr function does the CPL check when set xcr. __kvm_set_xcr is called in two flows,
one is invoked by guest, call stack shown as below,
handle_xsetbv(or xsetbv_interception)
  kvm_set_xcr
    __kvm_set_xcr
the other one is invoked by host(QEMU), call stack shown as below,
kvm_arch_vcpu_ioctl
  kvm_vcpu_ioctl_x86_set_xcrs
    __kvm_set_xcr

The former does need the CPL check, but the latter does not.

Signed-off-by: Zhang Haoyu <haoyu.zhang <at> huawei.com>
---
 arch/x86/kvm/x86.c                            |    5 +-
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 094b5d9..16ff44e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
 <at>  <at>  -582,8 +582,6  <at>  <at>  int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr)
 		 if (index != XCR_XFEATURE_ENABLED_MASK)
 		 		 return 1;
 		 xcr0 = xcr;
-		 if (kvm_x86_ops->get_cpl(vcpu) != 0)
-		 		 return 1;
 		 if (!(xcr0 & XSTATE_FP))
 		 		 return 1;
 		 if ((xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE))
(Continue reading)

yongcheng.wu | 14 Jun 2013 04:51
Picon

Re: Re: KVM MMU: why write-protect for the pages containing PML4/PDPT/PDT (page directory) of the guest?

I got it ,  thank you for your help.

2013/6/13 Paolo Bonzini <pbonzini <at> redhat.com>

    Il 12/06/2013 23:28, yongcheng.wu <at> i-soft.com.cn ha scritto:
    > I have a problem for shadow page table. why is write-protect for the
    > pages containing PML4/PDPT/PDT (page directory) of the guest? In
    > other words, need to synchronize the change of the page directory of
    > the guest?

    Shadow page tables are the combination of both the host and guest page
    tables into a single translation.  So they need to be updated every time
    the host or the guest change the page tables.  Updates for the host page
    tables are tracked with MMU notifiers; updates for the guest page tables
    are tracked with write protection.

    Paolo
    --
    To unsubscribe from this list: send the line "unsubscribe kvm" in
    the body of a message to majordomo <at> vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Mario Smarduch | 13 Jun 2013 17:19
Favicon

[PATCH 2/2] armv7 initial device passthrough support

Updated Device Passthrough Patch.
- optimized IRQ->CPU->vCPU binding, irq is installed once
- added dynamic IRQ affinity on schedule in
- added documentation and few other coding recommendations.

Per earlier discussion VFIO is our target but we like
something earlier to work with to tackle performance
latency issue (some ARM related) for device passthrough 
while we migrate towards VFIO.

- Mario

Signed-off-by: Mario Smarduch <mario.smarduch <at> huawei.com>
---
 arch/arm/include/asm/kvm_host.h |   31 +++++
 arch/arm/include/asm/kvm_vgic.h |   10 ++
 arch/arm/kvm/Makefile           |    1 +
 arch/arm/kvm/arm.c              |   80 +++++++++++++
 arch/arm/kvm/assign-dev.c       |  248 +++++++++++++++++++++++++++++++++++++++
 arch/arm/kvm/vgic.c             |  134 +++++++++++++++++++++
 include/linux/irqchip/arm-gic.h |    1 +
 include/uapi/linux/kvm.h        |   33 ++++++
 8 files changed, 538 insertions(+)
 create mode 100644 arch/arm/kvm/assign-dev.c

diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 57cb786..c85c3a0 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
 <at>  <at>  -67,6 +67,10  <at>  <at>  struct kvm_arch {
(Continue reading)

Arthur Chunqi Li | 13 Jun 2013 17:16
Picon

[PATCH 1/2] kvm-unit-tests: Add a func to run instruction in emulator

Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.

Signed-off-by: Arthur Chunqi Li <yzt356 <at> gmail.com>
---
 x86/emulator.c |  132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)

diff --git a/x86/emulator.c b/x86/emulator.c
index 96576e5..4981bfb 100644
--- a/x86/emulator.c
+++ b/x86/emulator.c
 <at>  <at>  -11,6 +11,16  <at>  <at>  int fails, tests;

 static int exceptions;

+struct regs {
+	u64 rax, rbx, rcx, rdx;
+	u64 rsi, rdi, rsp, rbp;
+	u64 r8, r9, r10, r11;
+	u64 r12, r13, r14, r15;
+	u64 rip, rflags;
+};
+static struct regs inregs, outregs;
+extern struct regs save;
+
 void report(const char *name, int result)
 {
(Continue reading)


Gmane