Re: [PATCH 2/3] pci init: fail qemu if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Ken CC
broken thread, please ignore. On Tue, Aug 24, 2010 at 02:33:51PM +0800, Ken CC wrote: > assert(devfn < PCIBUS_MAX_DEVICES) > > Signed-off-by: Ken CC > --- > hw/pci.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c > index 02019a1..1e804da 10064

[PATCH 3/3] Check pci slot number in parse_pci_devfn

2010-08-23 Thread Ken CC
Define MAX_PCI_SLOTS as 0x1f, if pci addr provided from command line is bigger than 0x1f, return error -EINVAL. 0x1f << 3 | 7 == 255 (PCIBUS_MAX_DEVICES - 1) Signed-off-by: Ken CC --- hw/qdev-properties.c |2 ++ hw/qdev.h|3 +++ 2 files changed, 5 insertions(+), 0 deletions(

[PATCH 2/3] pci init: fail qemu if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Ken CC
assert(devfn < PCIBUS_MAX_DEVICES) Signed-off-by: Ken CC --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 02019a1..1e804da 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -747,6 +747,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *

[PATCH 3/3] Check pci slot number in parse_pci_devfn

2010-08-23 Thread Ken CC
Define MAX_PCI_SLOTS as 0x1f, if pci addr provided from command line is bigger than 0x1f, return error -EINVAL. 0x1f << 3 | 7 == 255 (PCIBUS_MAX_DEVICES - 1) Signed-off-by: Ken CC --- hw/qdev-properties.c |2 ++ hw/qdev.h|3 +++ 2 files changed, 5 insertions(+), 0 deletions(

[PATCH 2/3] pci init: fail qemu if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Ken CC
assert(devfn < PCIBUS_MAX_DEVICES) Signed-off-by: Ken CC --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 02019a1..1e804da 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -747,6 +747,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *

[PATCH 1/3] PCI: define max devices number on PCIBus as PCIBUS_MAX_DEVICES in pci.h

2010-08-23 Thread Ken CC
Signed-off-by: Ken CC --- hw/pci.c |2 +- hw/pci.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 70dbace..02019a1 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -47,7 +47,7 @@ struct PCIBus { pci_hotplug_fn hotplug; DeviceState *hotplug_

Re: KVM timekeeping and TSC virtualization

2010-08-23 Thread Zachary Amsden
On 08/23/2010 05:04 PM, David S. Ahern wrote: On 08/23/10 19:44, Zachary Amsden wrote: I have also looked at time keeping and performance of getimeofday on a certain proprietary hypervisor. KVM lags severely here and workloads dependent on timestamps are dramatically impacted. Evaluations a

Re: WARNING: at arch/x86/kernel/apic/apic.c:1238 setup_local_APIC+0x169/0x24b()

2010-08-23 Thread Tharindu Rukshan Bamunuarachchi
cat /proc/cpuinfo thari...@tintin:~> cat /proc/cpuinfo processor    : 0 vendor_id    : GenuineIntel cpu family    : 6 model        : 15 model name    : Intel(R) Core(TM)2 CPU T7200  @ 2.00GHz stepping    : 6 cpu MHz        : 1000.000 cache size    : 4096 KB physical id    : 0

Re: KVM timekeeping and TSC virtualization

2010-08-23 Thread David S. Ahern
On 08/23/10 19:44, Zachary Amsden wrote: >> I have also looked at time keeping and performance of getimeofday on a >> certain proprietary hypervisor. KVM lags severely here and workloads >> dependent on timestamps are dramatically impacted. Evaluations and >> decisions are made today based on cur

[PATCH v3] Add realmode test for jcxz instruction

2010-08-23 Thread Wei Yongjun
Signed-off-by: Wei Yongjun --- v2 -> v3: rebased --- x86/realmode.c | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 8c771fc..a833829 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1242,6

[PATCH -kvm] kvm: fix regression from rework KVM mmu_shrink() code

2010-08-23 Thread Xiaotian Feng
Latest kvm mmu_shrink code rework makes kernel changes kvm->arch.n_used_mmu_pages/ kvm->arch.n_max_mmu_pages at kvm_mmu_free_page/kvm_mmu_alloc_page, which is called by kvm_mmu_commit_zap_page. So the kvm->arch.n_used_mmu_pages or kvm_mmu_available_pages(vcpu->kvm) is unchanged after kvm_mmu_pre

Re: [PATCH] test: Add realmode test for 2 op imul instruction (0x0f 0xaf)

2010-08-23 Thread Mohammed Gamal
On Tue, Aug 24, 2010 at 2:33 AM, Marcelo Tosatti wrote: > On Wed, Aug 18, 2010 at 08:41:37PM +0300, Mohammed Gamal wrote: >> Signed-off-by: Mohammed Gamal >> --- >>  x86/realmode.c |   26 ++ >>  1 files changed, 26 insertions(+), 0 deletions(-) > > Please rebase. > > The

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-23 Thread Marcelo Tosatti
On Mon, Aug 23, 2010 at 07:11:11PM +0800, Xiaotian Feng wrote: > On Mon, Aug 23, 2010 at 6:27 PM, Avi Kivity wrote: > >  On 08/23/2010 01:22 PM, Avi Kivity wrote: > >> > >> > >> I see a lot of soft lockups with this patchset: > > > > This is running the emulator.flat test case, with shadow paging.

Re: [PATCH v2] Add realmode test for jcxz instruction

2010-08-23 Thread Marcelo Tosatti
On Fri, Aug 20, 2010 at 08:52:56AM +0800, Wei Yongjun wrote: > Signed-off-by: Wei Yongjun > --- > x86/realmode.c | 62 > > 1 files changed, 62 insertions(+), 0 deletions(-) Please rebase. -- To unsubscribe from this list: send the line

Re: [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Isaku Yamahata
On Tue, Aug 24, 2010 at 09:43:25AM +0800, Ken CC wrote: > On Mon, Aug 23, 2010 at 06:56:56PM +0900, Isaku Yamahata wrote: > > > > How did you trigger the bug? > > I suppose parse_pci_devfn() in qdev-properties should check the error. > > Although I'm not objecting this patch itself, it's caller's

Re: KVM timekeeping and TSC virtualization

2010-08-23 Thread Zachary Amsden
On 08/21/2010 03:32 PM, David S. Ahern wrote: On 08/20/10 17:24, Zachary Amsden wrote: On 08/20/2010 03:26 AM, David S. Ahern wrote: On 08/20/10 02:07, Zachary Amsden wrote: This patch set implements full TSC virtualization, with both trapping and passthrough modes, and int

Re: [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Ken CC
On Mon, Aug 23, 2010 at 06:56:56PM +0900, Isaku Yamahata wrote: > > How did you trigger the bug? > I suppose parse_pci_devfn() in qdev-properties should check the error. > Although I'm not objecting this patch itself, it's caller's bug. > Just assert(devfn < PCIBUS_MAX_DEVICES)? > assign pci add

Re: [KVM timekeeping 33/35] Indicate reliable TSC in kvmclock

2010-08-23 Thread Zachary Amsden
On 08/20/2010 07:45 AM, Glauber Costa wrote: On Thu, Aug 19, 2010 at 10:07:47PM -1000, Zachary Amsden wrote: When no platform bugs have been detected, no TSC warps have been detected, and the hardware guarantees to us TSC does not change rate or stop with P-state or C-state changes, we can c

Re: [KVM timekeeping 12/35] Robust TSC compensation

2010-08-23 Thread Zachary Amsden
On 08/20/2010 07:40 AM, Glauber Costa wrote: On Thu, Aug 19, 2010 at 10:07:26PM -1000, Zachary Amsden wrote: Make the match of TSC find TSC writes that are close to each other instead of perfectly identical; this allows the compensator to also work in migration / suspend scenarios. Signed-o

Re: [KVM timekeeping 11/35] Add helper functions for time computation

2010-08-23 Thread Zachary Amsden
On 08/20/2010 07:34 AM, Glauber Costa wrote: On Thu, Aug 19, 2010 at 10:07:25PM -1000, Zachary Amsden wrote: Add a helper function to compute the kernel time and convert nanoseconds back to CPU specific cycles. Note that these must not be called in preemptible context, as that would mean th

Re: [KVM timekeeping 08/35] Warn about unstable TSC

2010-08-23 Thread Zachary Amsden
On 08/20/2010 07:28 AM, Glauber Costa wrote: On Thu, Aug 19, 2010 at 10:07:22PM -1000, Zachary Amsden wrote: If creating an SMP guest with unstable host TSC, issue a warning Signed-off-by: Zachary Amsden Ok, I am not sure I agree 100 % this is needed. I believe we should try to commu

Re: [KVM timekeeping 05/35] Move TSC reset out of vmcb_init

2010-08-23 Thread Zachary Amsden
On 08/20/2010 07:08 AM, Glauber Costa wrote: On Thu, Aug 19, 2010 at 10:07:19PM -1000, Zachary Amsden wrote: 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 ze

Re: [KVM timekeeping 03/35] Move TSC offset writes to common code

2010-08-23 Thread Zachary Amsden
On 08/20/2010 07:06 AM, Glauber Costa wrote: On Thu, Aug 19, 2010 at 10:07:17PM -1000, Zachary Amsden wrote: Also, ensure that the storing of the offset and the reading of the TSC are never preempted by taking a spinlock. While the lock is overkill now, it is useful later in this patch seri

KM call agend for August 24

2010-08-23 Thread Juan Quintela
Please send in any agenda items you are interested in covering. thanks, Juan -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: WARNING: at arch/x86/kernel/apic/apic.c:1238 setup_local_APIC+0x169/0x24b()

2010-08-23 Thread Marcelo Tosatti
On Tue, Aug 17, 2010 at 07:09:36PM +0100, Tharindu Rukshan Bamunuarachchi wrote: > hi, > > I got following message after booting 2.6.35 on KVM. > Should I report this to QEMU user list ? Any clue on debugging ? > > However VM works fine even with message. > > cheers > tharindu Please provide ho

Re: [PATCH v3] KVM: x86 emulator: add LDS/LES/LFS/LGS/LSS instruction emulation

2010-08-23 Thread Marcelo Tosatti
On Mon, Aug 23, 2010 at 02:56:54PM +0800, Wei Yongjun wrote: > Add LDS/LES/LFS/LGS/LSS instruction emulation. > (opcode 0xc4, 0xc5, 0x0f 0xb2, 0x0f 0xb4~0xb5) > > Signed-off-by: Wei Yongjun > --- > v2 -> v3: no changes, just porting to today's git tree > --- > arch/x86/kvm/emulate.c | 50 +

Re: [PATCH] Add realmode test for LDS/LES/LFS/LGS/LSS instruction

2010-08-23 Thread Marcelo Tosatti
On Mon, Aug 23, 2010 at 02:47:26PM +0800, Wei Yongjun wrote: > Signed-off-by: Wei Yongjun > --- > x86/realmode.c | 59 > > 1 files changed, 59 insertions(+), 0 deletions(-) Applied, thanks. -- To unsubscribe from this list: send the li

Re: [PATCH] test: Add realmode test for 2 op imul instruction (0x0f 0xaf)

2010-08-23 Thread Marcelo Tosatti
On Wed, Aug 18, 2010 at 08:41:37PM +0300, Mohammed Gamal wrote: > Signed-off-by: Mohammed Gamal > --- > x86/realmode.c | 26 ++ > 1 files changed, 26 insertions(+), 0 deletions(-) Please rebase. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the b

KVM call agenda for August 24

2010-08-23 Thread Chris Wright
Please send in any agenda items you are interested in covering. thanks, -chris -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 2/2] S390: Add virtio hotplug add support

2010-08-23 Thread Alexander Graf
The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest. Keep in mind that this needs a patch for qemu to actually leverage the functionality. Signed-off-by: Alexander Graf --- dri

[PATCH 1/2] S390: take a full byte as ext_param indicator

2010-08-23 Thread Alexander Graf
Currenty the ext_param field only distinguishes between "config change" and "vring interrupt". We can do a lot more with it though, so let's enable a full byte of possible values and constants to #defines while at it. Signed-off-by: Alexander Graf --- drivers/s390/kvm/kvm_virtio.c | 22 +++

Re: [PATCH 4/4] NUMA: realize NUMA memory pinning

2010-08-23 Thread Anthony Liguori
On 08/23/2010 04:16 PM, Andre Przywara wrote: Anthony Liguori wrote: On 08/23/2010 01:59 PM, Marcelo Tosatti wrote: On Wed, Aug 11, 2010 at 03:52:18PM +0200, Andre Przywara wrote: According to the user-provided assignment bind the respective part of the guest's memory to the given host node. T

Re: [PATCH 4/4] NUMA: realize NUMA memory pinning

2010-08-23 Thread Andre Przywara
Anthony Liguori wrote: On 08/23/2010 01:59 PM, Marcelo Tosatti wrote: On Wed, Aug 11, 2010 at 03:52:18PM +0200, Andre Przywara wrote: According to the user-provided assignment bind the respective part of the guest's memory to the given host node. This uses Linux' mbind syscall (which is wra

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-23 Thread Tim Pepper
On Mon, Aug 23, 2010 at 4:28 AM, Avi Kivity wrote: >  On 08/23/2010 02:11 PM, Xiaotian Feng wrote: >> >> On Mon, Aug 23, 2010 at 6:27 PM, Avi Kivity  wrote: >>> >>>  On 08/23/2010 01:22 PM, Avi Kivity wrote: I see a lot of soft lockups with this patchset: >>> >>> This is running the emul

Re: [PATCH 4/4] NUMA: realize NUMA memory pinning

2010-08-23 Thread Anthony Liguori
On 08/23/2010 01:59 PM, Marcelo Tosatti wrote: On Wed, Aug 11, 2010 at 03:52:18PM +0200, Andre Przywara wrote: According to the user-provided assignment bind the respective part of the guest's memory to the given host node. This uses Linux' mbind syscall (which is wrapped only in libnuma) to

Re: Having trouble with ballooning

2010-08-23 Thread Marcelo Tosatti
On Thu, Aug 05, 2010 at 01:41:16PM +0200, Moritz Duge wrote: > Hi, > I had some trouble while using the ballooning feature of KVM (using > Ubuntu 10.04 with standard software versions). > > > The first scenario: > 1. Having a guest started by this command: qemu -enable-kvm -m 768 > -balloon virti

Re: [PATCH 4/4] NUMA: realize NUMA memory pinning

2010-08-23 Thread Marcelo Tosatti
On Wed, Aug 11, 2010 at 03:52:18PM +0200, Andre Przywara wrote: > According to the user-provided assignment bind the respective part > of the guest's memory to the given host node. This uses Linux' > mbind syscall (which is wrapped only in libnuma) to realize the > pinning right after the allocatio

Re: [PATCH v5 04/12] Provide special async page fault handler when async PF capability is detected

2010-08-23 Thread Avi Kivity
On 08/23/2010 06:52 PM, Rik van Riel wrote: On 08/23/2010 11:48 AM, Avi Kivity wrote: Do you need to match cpu here as well? Or is token globally unique? Perhaps we should make it locally unique to remove a requirement from the host to synchronize? I haven't seen how you generate it yet. If

Re: [PATCH v5 03/12] Add async PF initialization to PV guest.

2010-08-23 Thread Avi Kivity
On 08/23/2010 07:08 PM, Christoph Lameter wrote: On Mon, 23 Aug 2010, Gleb Natapov wrote: The guest will have to align this on a 64 byte boundary, should this be marked __aligned(64) here? I do __aligned(64) when I declare variable of that type: static DEFINE_PER_CPU(struct kvm_vcpu_pv_apf_

Re: [PATCH v5 08/12] Inject asynchronous page fault into a guest if page is swapped out.

2010-08-23 Thread Avi Kivity
On 07/19/2010 06:30 PM, Gleb Natapov wrote: If guest access swapped out memory do not swap it in from vcpu thread context. Setup slow work to do swapping and send async page fault to a guest. Allow async page fault injection only when guest is in user mode since otherwise guest may be in non-sl

kernel warning with qemu/kvm 0.12.3

2010-08-23 Thread Tharindu Rukshan Bamunuarachchi
Dear All, I got following message when i try to start kvm with latest kernel. I am using QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3) on openSUSE 11.3 (2.6.34-12-desktop) computer. should I report this to kernel x86 list ? Is this specific to qemu h/w emulation ? [    0.168000] Setting A

Re: [PATCH v5 03/12] Add async PF initialization to PV guest.

2010-08-23 Thread Christoph Lameter
On Mon, 23 Aug 2010, Gleb Natapov wrote: > > The guest will have to align this on a 64 byte boundary, should this > > be marked __aligned(64) here? > > > I do __aligned(64) when I declare variable of that type: > > static DEFINE_PER_CPU(struct kvm_vcpu_pv_apf_data, apf_reason) __aligned(64); 64 b

Re: [PATCH v5 03/12] Add async PF initialization to PV guest.

2010-08-23 Thread Gleb Natapov
On Mon, Aug 23, 2010 at 11:08:06AM -0500, Christoph Lameter wrote: > On Mon, 23 Aug 2010, Gleb Natapov wrote: > > > > The guest will have to align this on a 64 byte boundary, should this > > > be marked __aligned(64) here? > > > > > I do __aligned(64) when I declare variable of that type: > > > >

Re: [qemu-kvm PATCH 0/3] small qemu-kvm cleanups

2010-08-23 Thread Cam Macdonell
On Mon, Aug 23, 2010 at 12:49 AM, Avi Kivity wrote: >  On 08/23/2010 09:45 AM, Paolo Bonzini wrote: >> >> On 08/17/2010 01:29 PM, Avi Kivity wrote: >>> >>> On 08/12/2010 06:29 PM, Paolo Bonzini wrote: Nothing earth shattering. :) Paolo Bonzini (3): move kvm_set_irqfd to kv

Re: [PATCH v5 07/12] Maintain memslot version number

2010-08-23 Thread Avi Kivity
On 07/19/2010 06:30 PM, Gleb Natapov wrote: Code that depends on particular memslot layout can track changes and adjust to new layout. diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index c13cc48..c74ffc0 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@

Re: [PATCH v5 04/12] Provide special async page fault handler when async PF capability is detected

2010-08-23 Thread Rik van Riel
On 08/23/2010 11:48 AM, Avi Kivity wrote: Do you need to match cpu here as well? Or is token globally unique? Perhaps we should make it locally unique to remove a requirement from the host to synchronize? I haven't seen how you generate it yet. If a task goes to sleep on one VCPU, but that VC

Re: [PATCH v5 06/12] Add get_user_pages() variant that fails if major fault is required.

2010-08-23 Thread Avi Kivity
On 07/19/2010 06:30 PM, Gleb Natapov wrote: This patch add get_user_pages() variant that only succeeds if getting a reference to a page doesn't require major fault. Andrew, can this go in through kvm.git? Reviewed-by: Rik van Riel Signed-off-by: Gleb Natapov --- fs/ncpfs/mmap.c|2

Re: [PATCH v5 04/12] Provide special async page fault handler when async PF capability is detected

2010-08-23 Thread Avi Kivity
On 07/19/2010 06:30 PM, Gleb Natapov wrote: When async PF capability is detected hook up special page fault handler that will handle async page fault events and bypass other page faults to regular page fault handler. Acked-by: Rik van Riel Signed-off-by: Gleb Natapov --- arch/x86/include/asm/

Re: [PATCH v5 03/12] Add async PF initialization to PV guest.

2010-08-23 Thread Gleb Natapov
On Mon, Aug 23, 2010 at 06:26:58PM +0300, Avi Kivity wrote: > On 07/19/2010 06:30 PM, Gleb Natapov wrote: > >Enable async PF in a guest if async PF capability is discovered. > > > >Signed-off-by: Gleb Natapov > >--- > > arch/x86/include/asm/kvm_para.h |5 +++ > > arch/x86/kernel/kvm.c

Re: [PATCH v5 02/12] Add PV MSR to enable asynchronous page faults delivery.

2010-08-23 Thread Gleb Natapov
On Mon, Aug 23, 2010 at 06:22:02PM +0300, Avi Kivity wrote: > On 07/19/2010 06:30 PM, Gleb Natapov wrote: > >Guess enables async PF vcpu functionality using this MSR. > > > > > > > >+static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data) > >+{ > >+u64 gpa = data& ~0x3f; > >+in

Re: [PATCH v5 03/12] Add async PF initialization to PV guest.

2010-08-23 Thread Avi Kivity
On 07/19/2010 06:30 PM, Gleb Natapov wrote: Enable async PF in a guest if async PF capability is discovered. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_para.h |5 +++ arch/x86/kernel/kvm.c | 68 +++ 2 files changed, 73 insert

Re: [PATCH v5 02/12] Add PV MSR to enable asynchronous page faults delivery.

2010-08-23 Thread Avi Kivity
On 07/19/2010 06:30 PM, Gleb Natapov wrote: Guess enables async PF vcpu functionality using this MSR. +static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data) +{ + u64 gpa = data& ~0x3f; + int offset = offset_in_page(gpa); + unsigned long addr; + + /* Bits

Re: [PATCH 0/8] Simplify byte/word opcode pair decode

2010-08-23 Thread Avi Kivity
On 08/23/2010 05:04 PM, Paolo Bonzini wrote: On 08/23/2010 03:48 PM, Avi Kivity wrote: On 08/23/2010 04:29 PM, Paolo Bonzini wrote: On 08/23/2010 01:06 PM, Avi Kivity wrote: Many x86 instructions come in pairs - byte and word variants where bit 0 of the opcode determines operand size. Use th

Re: [PATCH 0/8] Simplify byte/word opcode pair decode

2010-08-23 Thread Paolo Bonzini
On 08/23/2010 03:48 PM, Avi Kivity wrote: On 08/23/2010 04:29 PM, Paolo Bonzini wrote: On 08/23/2010 01:06 PM, Avi Kivity wrote: Many x86 instructions come in pairs - byte and word variants where bit 0 of the opcode determines operand size. Use this to simplify the decode tables. Many actuall

Re: [PATCH 7/8] KVM: x86 emulator: simplify instruction decode flags for opcodes E0-FF

2010-08-23 Thread Gleb Natapov
On Mon, Aug 23, 2010 at 04:46:01PM +0300, Avi Kivity wrote: > On 08/23/2010 04:33 PM, Gleb Natapov wrote: > >On Mon, Aug 23, 2010 at 02:06:16PM +0300, Avi Kivity wrote: > >>Use the new byte/word dual opcode decode. > >> > >>Signed-off-by: Avi Kivity > >>--- > >> arch/x86/kvm/emulate.c |6 ++--

Re: [PATCH 0/8] Simplify byte/word opcode pair decode

2010-08-23 Thread Avi Kivity
On 08/23/2010 04:29 PM, Paolo Bonzini wrote: On 08/23/2010 01:06 PM, Avi Kivity wrote: Many x86 instructions come in pairs - byte and word variants where bit 0 of the opcode determines operand size. Use this to simplify the decode tables. Many actually come in quadruples, bit 0 is the size a

Re: [PATCH 7/8] KVM: x86 emulator: simplify instruction decode flags for opcodes E0-FF

2010-08-23 Thread Avi Kivity
On 08/23/2010 04:33 PM, Gleb Natapov wrote: On Mon, Aug 23, 2010 at 02:06:16PM +0300, Avi Kivity wrote: Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/e

Re: [KVM-autotest] virtio_console test

2010-08-23 Thread Amit Shah
On (Mon) Aug 23 2010 [15:20:17], Lukáš Doktor wrote: > Hi Amit, > > Dne 23.8.2010 09:53, Amit Shah napsal(a): > >On (Fri) Aug 20 2010 [16:12:51], Lukáš Doktor wrote: > >>Dne 20.8.2010 15:40, Lukas Doktor napsal(a): > >>>Hi, > >>> > >>>This patch adds new test for virtio_console. It supports booth,

Re: [PATCH 7/8] KVM: x86 emulator: simplify instruction decode flags for opcodes E0-FF

2010-08-23 Thread Gleb Natapov
On Mon, Aug 23, 2010 at 02:06:16PM +0300, Avi Kivity wrote: > Use the new byte/word dual opcode decode. > > Signed-off-by: Avi Kivity > --- > arch/x86/kvm/emulate.c |6 ++ > 1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c

Re: [PATCH 0/8] Simplify byte/word opcode pair decode

2010-08-23 Thread Paolo Bonzini
On 08/23/2010 01:06 PM, Avi Kivity wrote: Many x86 instructions come in pairs - byte and word variants where bit 0 of the opcode determines operand size. Use this to simplify the decode tables. Many actually come in quadruples, bit 0 is the size and bit 1 says which of ModRM and REG is the de

Re: [KVM-autotest] virtio_console test

2010-08-23 Thread Lukáš Doktor
Hi Amit, Dne 23.8.2010 09:53, Amit Shah napsal(a): On (Fri) Aug 20 2010 [16:12:51], Lukáš Doktor wrote: Dne 20.8.2010 15:40, Lukas Doktor napsal(a): Hi, This patch adds new test for virtio_console. It supports booth, serialport and console, virtio_console types and it contains three tests: 1

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-23 Thread Avi Kivity
On 08/23/2010 02:11 PM, Xiaotian Feng wrote: On Mon, Aug 23, 2010 at 6:27 PM, Avi Kivity wrote: On 08/23/2010 01:22 PM, Avi Kivity wrote: I see a lot of soft lockups with this patchset: This is running the emulator.flat test case, with shadow paging. This test triggers a lot (millions) o

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-23 Thread Xiaotian Feng
On Mon, Aug 23, 2010 at 6:27 PM, Avi Kivity wrote: >  On 08/23/2010 01:22 PM, Avi Kivity wrote: >> >> >> I see a lot of soft lockups with this patchset: > > This is running the emulator.flat test case, with shadow paging.  This test > triggers a lot (millions) of mmu mode switches. > Does followi

[PATCH 2/8] KVM: x86 emulator: simplify ALU block (opcodes 00-3F) decode flags

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 40 1 files changed, 16 insertions(+), 24 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 152654e..79a5f81 100644 --- a/arc

[PATCH 6/8] KVM: x86 emulator: simplify instruction decode flags for opcodes C0-DF

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6888502..c61f73d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/

[PATCH 5/8] KVM: x86 emulator: simplify instruction decode flags for opcodes A0-AF

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 1c174e4..6888502 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/k

[PATCH 8/8] KVM: x86 emulator: simplify instruction decode flags for opcodes 0F 00-FF

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6cb5663..808934c 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm

[PATCH 7/8] KVM: x86 emulator: simplify instruction decode flags for opcodes E0-FF

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c61f73d..6cb5663 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/k

[PATCH 3/8] KVM: x86 emulator: simplify string instruction decode flags

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 79a5f81..2a480ce 100644 --- a/arch/x86/kvm/emulate.c +++ b/arc

[PATCH 0/8] Simplify byte/word opcode pair decode

2010-08-23 Thread Avi Kivity
Many x86 instructions come in pairs - byte and word variants where bit 0 of the opcode determines operand size. Use this to simplify the decode tables. Avi Kivity (8): KVM: x86 emulator: support byte/word opcode pairs KVM: x86 emulator: simplify ALU block (opcodes 00-3F) decode flags KVM: x

[PATCH 4/8] KVM: x86 emulator: simplify instruction decode flags for opcodes 80-8F

2010-08-23 Thread Avi Kivity
Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 2a480ce..1c174e4 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/

[PATCH 1/8] KVM: x86 emulator: support byte/word opcode pairs

2010-08-23 Thread Avi Kivity
Many x86 instructions come in byte and word variants distinguished with bit 0 of the opcode. Add macros to aid in defining them. Signed-off-by: Avi Kivity --- arch/x86/kvm/emulate.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/k

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-23 Thread Avi Kivity
On 08/23/2010 01:22 PM, Avi Kivity wrote: I see a lot of soft lockups with this patchset: This is running the emulator.flat test case, with shadow paging. This test triggers a lot (millions) of mmu mode switches. -- error compiling committee.c: too many arguments to function -- To unsub

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-23 Thread Avi Kivity
On 08/20/2010 04:10 AM, Tim Pepper wrote: The following series is the four patches Dave Hansen had queued for test as mentioned last week in the thread: "[PATCH] kvm: make mmu_shrink() fit shrinker's requirement" Last week just before leaving for vacation Dave had noted in that thread that th

Re: [Qemu-devel] [PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-23 Thread Isaku Yamahata
How did you trigger the bug? I suppose parse_pci_devfn() in qdev-properties should check the error. Although I'm not objecting this patch itself, it's caller's bug. Just assert(devfn < PCIBUS_MAX_DEVICES)? On Mon, Aug 23, 2010 at 01:56:31PM +0800, Ken CC wrote: > > Check before trying subindexin

Re: [BUG?] can not writeback more then 8 bytes memory

2010-08-23 Thread Avi Kivity
On 08/23/2010 11:55 AM, Wei Yongjun wrote: > > If test with realmode.flat, fix to writeback() does not need, > because the size we need to writeback is 2 + 4 in realmode.flat. > I tested used the following patch. It will fail in 64-bit mode though. We can goto cannot_emulate, though it's a bit n

Re: [BUG?] can not writeback more then 8 bytes memory

2010-08-23 Thread Wei Yongjun
> On 08/20/2010 12:12 PM, Wei Yongjun wrote: > >> Hi all: >> >> I have the following patch to SIDT emulation instruction, but it >> does not work because we can not writeback more then 8 bytes >> memory, the SIDT under PROTO64 is 10 bytes. >> >> I change the code to write twice, first time wr

[PATCH v2 17/17] KVM-test: Add subtest of testing offload by ethtool

2010-08-23 Thread Amos Kong
The latest case contains TX/RX/SG/TSO/GSO/GRO/LRO test. RTL8139 NIC doesn't support TSO, LRO, it's too old, so drop offload test from rtl8139. LRO, GRO are only supported by latest kernel, virtio nic doesn't support receive offloading function. Initialize the callbacks first and execute all the sub

[PATCH v2 16/17] Vlan: Replace extra_params '-snapshot' with image_snapshot

2010-08-23 Thread Amos Kong
Framework could not totalise default extra_params and extra_params_vm1 in the following condition, it's difficult to realise when parsing config file or calling get_sub_dict*(). extra_params += ' str1' - case: extra_params_vm1 += " str2" Signed-off-by: Amos Kong --- 0 files changed, 0 insertion

[PATCH v2 15/17] KVM-test: Improve vlan subtest

2010-08-23 Thread Amos Kong
This is an enhancement of existed vlan test. Rename the vlan_tag.py to vlan.py, it is more reasonable. . Setup arp from "/proc/sys/net/ipv4/conf/all/arp_ignore" . Multiple vlans exist simultaneously . Test ping between same and different vlans . Test by TCP data transfer, floop ping between same vl

[PATCH v2 14/17] Add support of check if remote port free

2010-08-23 Thread Amos Kong
Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index b019fc5..a24585b 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -789,7 +789,7 @@ def scp_from_remote(h

[PATCH v2 13/17] KVM-test: Add a subtest of netperf

2010-08-23 Thread Amos Kong
Add network load by netperf, server is launched on guest, execute netperf client with different protocols on host. if all clients execute successfully, case will be pass. Test result will be record into result.txt. Now this case only tests with "TCP_RR TCP_CRR UDP_RR TCP_STREAM TCP_MAERTS TCP_SENDF

[PATCH v2 12/17] KVM-test: Add a subtest of changing mac address

2010-08-23 Thread Amos Kong
Mainly test steps: 1. get a new mac from pool, and the old mac addr of guest. 2. execute the mac_change.sh in guest. 3. relogin to guest and query the interfaces info by `ifconfig` Signed-off-by: Cao, Chen Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git

[PATCH v2 11/17] KVM-test: Add a subtest of pxe

2010-08-23 Thread Amos Kong
This case just snoop tftp packet through tcpdump, it depends on public dhcp server, better to test it through dnsmasq. FIXME: Use dnsmasq for pxe test Signed-off-by: Jason Wang Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests/px

[PATCH v2 10/17] KVM-test: Add a subtest of multicast

2010-08-23 Thread Amos Kong
Use 'ping' to test send/recive multicat packets. Flood ping test is also added. Limit guest network as 'bridge' mode, because multicast packets could not be transmitted to guest when using 'user' network. Add join_mcast.py for joining machine into multicast groups. Changes from v1: - Just flush th

[PATCH v2 09/17] KVM-test: Add a subtest of nic promisc

2010-08-23 Thread Amos Kong
This test mainly covers TCP sent from host to guest and from guest to host with repeatedly turn on/off NIC promiscuous mode. Changes from v1: - Don't abruptly fail the whole test if we get a failure for a single size Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-)

[PATCH v2 08/17] KVM-test: Add a subtest of load/unload nic driver

2010-08-23 Thread Amos Kong
Repeatedly load/unload nic driver, try to transfer file between guest and host by threads at the same time, and check the md5sum. Changes from v1: - Use a new method to get nic driver name - Use utils.hash_file() to get md5sum Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 del

[PATCH v2 07/17] KVM-test: Add basic file transfer test

2010-08-23 Thread Amos Kong
This test is the basic test of transfering file between host and guest. Try to transfer a large file from host to guest, and transfer it back to host, then compare the files by diff command. The default file size is 4000M, scp timeout is 1000s. It means if the average speed is less than 4M/s, this

[PATCH v2 06/17] KVM-test: Add a subtest jumbo

2010-08-23 Thread Amos Kong
According to different nic model set different MTU for it. And ping from guest to host, to see whether tested size can be received by host. Changes from v1: - Make standard of lost ratio can be configured Signed-off-by: Jason Wang Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+),

[PATCH v2 05/17] KVM-test: Add a new subtest ping

2010-08-23 Thread Amos Kong
This test use ping to check the virtual nics, it contains two kinds of test: 1. Packet loss ratio test, ping the guest with different size of packets. 2. Stress test, flood ping guest then use ordinary ping to test the network. We could not raise an error when flood ping failed, it's too strict. B

[PATCH v2 04/17] KVM Test: Add a common ping module for network related tests

2010-08-23 Thread Amos Kong
The kvm_net_utils.py is a just a place that wraps common network related commands which is used to do the network-related tests. Use -1 as the packet ratio for loss analysis. Use quiet mode when doing the flood ping. Changes from v1: - Use None to indicate that the session should be local in raw_p

[PATCH v2 03/17] KVM Test: Add a function get_interface_name() to kvm_test_utils.py

2010-08-23 Thread Amos Kong
The function get_interface_name is used to get the interface name of linux guest through the macaddress of specified macaddress. Signed-off-by: Jason Wang Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tes

[PATCH v2 02/17] Add a get_ifname function

2010-08-23 Thread Amos Kong
It's more clear to use 'nic_mode + nic_index + vnc_port' than 'tap0', It's also unique for one guest. Signed-off-by: Amos Kong --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 6812c98..e4f216c 100755 --- a/client/tes

[PATCH v2 01/17] KVM-test: Add a new macaddress pool algorithm

2010-08-23 Thread Amos Kong
Old method uses the addresses in the config files which could lead serious problem when multiple tests running in different hosts. This patch adds a new macaddress pool algorithm, it generates the mac prefix based on mac address of the host, and fix it to correspond to IEEE802. When user have set t

[PATCH v2 00/17] Patchset of network related subtests

2010-08-23 Thread Amos Kong
This patchset contains 11 network related subtests, welcome more suggestions about correctness, design and enhancement. This is the version 2, thanks your comments. --- Amos Kong (17): KVM-test: Add a new macaddress pool algorithm Add a get_ifname function KVM Test: Add a functi

[PATCH] KVM: MMU: fix missing percpu counter destroy

2010-08-23 Thread Wei Yongjun
commit ad05c88266b4cce1c820928ce8a0fb7690912ba1 (KVM: create aggregate kvm_total_used_mmu_pages value) introduce percpu counter kvm_total_used_mmu_pages but never destroy it, this may cause oops when rmmod & modprobe. Signed-off-by: Wei Yongjun --- arch/x86/kvm/mmu.c |5 - 1 files change

Re: [KVM-autotest] virtio_console test

2010-08-23 Thread Amit Shah
On (Fri) Aug 20 2010 [16:12:51], Lukáš Doktor wrote: > Dne 20.8.2010 15:40, Lukas Doktor napsal(a): > >Hi, > > > >This patch adds new test for virtio_console. It supports booth, serialport > >and console, virtio_console types and it contains three tests: > >1) smoke > >2) loopback > >3) perf This

[PATCH] KVM: x86 emulator: simplify BSF/BSR instruction emulation

2010-08-23 Thread Wei Yongjun
Since emulate_2op() changed to use register for destination, we can now simplify BSF/BSR instruction to use it. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c | 30 -- 1 files changed, 8 insertions(+), 22 deletions(-) diff --git a/arch/x86/kvm/emulate.c