Re: [RFC/T/D][PATCH 2/2] Linux/Guest cooperative unmapped page cache control

2010-06-17 Thread Balbir Singh
* Avi Kivity a...@redhat.com [2010-06-16 14:39:02]: We're talking about an environment which we're always trying to optimize. Imagine that we're always trying to consolidate guests on to smaller numbers of hosts. We're effectively in a state where we _always_ want new guests. If this

[PATCH] qemu: kvm: Fix cpu_is_bsp() compilation warning

2010-06-17 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- Applied to uq/master. target-i386/kvm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 9efb3e7..5a088a7 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -25,6

Re: [PATCH 3/6] KVM: MMU: introduce gfn_to_page_atomic() and gfn_to_pfn_atomic()

2010-06-17 Thread Xiao Guangrong
Avi Kivity wrote: On 06/15/2010 05:46 AM, Xiao Guangrong wrote: Introduce gfn_to_page_atomic() and gfn_to_pfn_atomic(), those functions is fast path and can used in atomic context, the later patch will use those @@ -942,6 +942,41 @@ unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn)

[PATCH 1/4] qemu: kvm: Extend kvm_arch_get_supported_cpuid() to support index

2010-06-17 Thread Sheng Yang
Would use it later for XSAVE related CPUID. Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm.h |2 +- target-i386/kvm.c | 19 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/kvm.h b/kvm.h index a28e7aa..7975e87 100644 --- a/kvm.h +++

[PATCH v4 0/4] XSAVE enabling in QEmu

2010-06-17 Thread Sheng Yang
Notice the first three patches applied to uq/master branch of qemu-kvm, the last one applied to qemu-kvm master branch. And the last one would only apply after the first three merged in master branch. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH 2/4] qemu: Enable XSAVE related CPUID

2010-06-17 Thread Sheng Yang
We can support it in KVM now. The 0xd leaf is queried from KVM. Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpuid.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 99d1f44..ab6536b

[PATCH 4/4] qemu-kvm: Enable XSAVE live migration support

2010-06-17 Thread Sheng Yang
Based on upstream xsave related fields. Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm-x86.c | 95 +++- qemu-kvm.c | 24 ++ qemu-kvm.h | 28 3 files changed, 146 insertions(+), 1

[PATCH 3/4] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpu.h |5 ++ target-i386/kvm.c | 134 + target-i386/machine.c | 20 +++ 3 files changed, 159 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.h

Re: [PATCH v3] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: On Thursday 17 June 2010 00:05:44 Marcelo Tosatti wrote: On Wed, Jun 16, 2010 at 05:48:46PM +0200, Jan Kiszka wrote: Marcelo Tosatti wrote: On Fri, Jun 11, 2010 at 12:36:49PM +0800, Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm-x86.c

Re: [PATCH 5/6] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-06-17 Thread Xiao Guangrong
Avi Kivity wrote: +if (*spte != shadow_trap_nonpresent_pte) +continue; + +gfn = sp-gfn + (i ((sp-role.level - 1) * PT64_LEVEL_BITS)); Avi, Thanks for your comment. Can calculate outside the loop and use +=. It's nice, will do it in the next

Re: [PATCH 6/6] KVM: MMU: trace pte prefetch

2010-06-17 Thread Xiao Guangrong
Avi Kivity wrote: @@ -2066,11 +2071,16 @@ static void direct_pte_prefetch(struct kvm_vcpu *vcpu, u64 *sptep) pfn = gfn_to_pfn_atomic(vcpu-kvm, gfn); if (is_error_pfn(pfn)) { kvm_release_pfn_clean(pfn); +trace_pte_prefetch(true,

Re: [PATCH 3/4] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpu.h |5 ++ target-i386/kvm.c | 134 + target-i386/machine.c | 20 +++ 3 files changed, 159 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 4/4] qemu-kvm: Enable XSAVE live migration support

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: Based on upstream xsave related fields. Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm-x86.c | 95 +++- qemu-kvm.c | 24 ++ qemu-kvm.h | 28 3 files changed,

Re: [PATCH 0/6] KVM: MMU: support pte prefetch when intercepted guest #PF

2010-06-17 Thread Xiao Guangrong
Avi Kivity wrote: On 06/15/2010 05:46 AM, Xiao Guangrong wrote: Hi Avi, Marcelo, This patchset support pte prefetch when intercepted guest #PF, the aim is to reduce guest #PF which can be intercepted by VMM. If we meet any failure in the prefetch path, we will exit it and not try other

Re: [PATCH 03/17] Unify vendor TSC logic

2010-06-17 Thread Jason Wang
Glauber Costa wrote: On Wed, Jun 16, 2010 at 04:10:10PM +0800, Jason Wang wrote: Zachary Amsden wrote: void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { + kvm_x86_ops-vcpu_load(vcpu, cpu); if (unlikely(vcpu-cpu != cpu)) { + /* Make sure TSC doesn't go

Re: [PATCH 0/6] KVM: MMU: support pte prefetch when intercepted guest #PF

2010-06-17 Thread Avi Kivity
On 06/17/2010 10:49 AM, Xiao Guangrong wrote: Avi Kivity wrote: On 06/15/2010 05:46 AM, Xiao Guangrong wrote: Hi Avi, Marcelo, This patchset support pte prefetch when intercepted guest #PF, the aim is to reduce guest #PF which can be intercepted by VMM. If we meet any failure in

Re: [PATCH 5/6] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-06-17 Thread Avi Kivity
On 06/17/2010 10:25 AM, Xiao Guangrong wrote: Can this in fact work for level != PT_PAGE_TABLE_LEVEL? We might start at PT_PAGE_DIRECTORY_LEVEL but get 4k pages while iterating. Ah, i forgot it. We can't assume that the host also support huge page for next gfn, as Marcelo's

Re: [PATCH 03/17] Unify vendor TSC logic

2010-06-17 Thread Jason Wang
Zachary Amsden wrote: On 06/15/2010 10:10 PM, Jason Wang wrote: Zachary Amsden wrote: Move the TSC control logic from the vendor backends into x86.c by adding adjust_tsc_offset to x86 ops. Now all TSC decisions can be done in one place. Also, rename some variable in the VCPU

Re: [PATCH] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-17 Thread Avi Kivity
On 06/17/2010 08:32 AM, Jason Wang wrote: Signed-off-by: Jason Wangjasow...@redhat.com --- Documentation/kvm/mmu.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 8cb42b9..5d3343f 100644 ---

Re: [PATCH] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-17 Thread Jason Wang
Avi Kivity wrote: On 06/17/2010 08:32 AM, Jason Wang wrote: Signed-off-by: Jason Wangjasow...@redhat.com --- Documentation/kvm/mmu.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index

Re: [RFC][PATCH 4/9] create aggregate kvm_total_used_mmu_pages value

2010-06-17 Thread Avi Kivity
On 06/16/2010 07:55 PM, Dave Hansen wrote: On Wed, 2010-06-16 at 11:48 +0300, Avi Kivity wrote: +static inline void kvm_mod_used_mmu_pages(struct kvm *kvm, int nr) +{ + kvm-arch.n_used_mmu_pages += nr; + kvm_total_used_mmu_pages += nr; Needs an atomic operation, since

[PATCH 3/4] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpu.h |7 ++- target-i386/kvm.c | 139 - target-i386/machine.c | 20 +++ 3 files changed, 163 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.h

Re: [RFC][PATCH 9/9] make kvm mmu shrinker more aggressive

2010-06-17 Thread Avi Kivity
On 06/16/2010 06:25 PM, Dave Hansen wrote: If mmu_shrink() has already done a significant amount of scanning, the use of 'nr_to_scan' inside shrink_kvm_mmu() will also ensure that we do not over-reclaim when we have already done a lot of work in this call. In the end, this patch defines a

Re: [RFC][PATCH 0/9] rework KVM mmu_shrink() code

2010-06-17 Thread Avi Kivity
On 06/16/2010 06:03 PM, Dave Hansen wrote: On Wed, 2010-06-16 at 11:38 +0300, Avi Kivity wrote: On 06/15/2010 04:55 PM, Dave Hansen wrote: These seem to boot and run fine. I'm running about 40 VMs at once, while doing echo 3 /proc/sys/vm/drop_caches, and killing/restarting VMs

[PATCH v2] KVM: Fix typos in Documentation/kvm/mmu.txt

2010-06-17 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- Documentation/kvm/mmu.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 8cb42b9..142cc51 100644 --- a/Documentation/kvm/mmu.txt +++

Re: [RFC][PATCH 4/9] create aggregate kvm_total_used_mmu_pages value

2010-06-17 Thread Avi Kivity
On 06/16/2010 06:06 PM, Dave Hansen wrote: +static inline void kvm_mod_used_mmu_pages(struct kvm *kvm, int nr) +{ + kvm-arch.n_used_mmu_pages += nr; + kvm_total_used_mmu_pages += nr; Needs an atomic operation, since there's no global lock here. To avoid bouncing this

Re: [PATCH 4/4] qemu-kvm: Enable XSAVE live migration support

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: On Thursday 17 June 2010 15:41:43 Jan Kiszka wrote: Sheng Yang wrote: Based on upstream xsave related fields. Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm-x86.c | 95 +++- qemu-kvm.c | 24

Re: [PATCH] VT-d: fix PCI device detach from virtual machine

2010-06-17 Thread David Woodhouse
On Thu, 2010-06-17 at 11:35 +0800, Weidong Han wrote: David Woodhouse wrote: So why do we bother setting up a context in the IOMMU for the device itself, when no DMA will ever appear to come from this device? And if the device is behind PCI Express-to-PCI/PCI-X bridge, the source-id

Re: [PATCH 14/24] Prepare vmcs02 from vmcs01 and vmcs12

2010-06-17 Thread Gleb Natapov
On Sun, Jun 13, 2010 at 03:29:44PM +0300, Nadav Har'El wrote: This patch contains code to prepare the VMCS which can be used to actually run the L2 guest, vmcs02. prepare_vmcs02 appropriately merges the information in shadow_vmcs that L1 built for L2 (vmcs12), and that in the VMCS that we

Re: [PATCH 17/17] Add timekeeping documentation

2010-06-17 Thread Andi Kleen
Zachary Amsden zams...@redhat.com writes: I think listing all the obscure bits in the PIT was an attempt to weed out the weak and weary readers early, right? +this as well. Several hardware limitations make the problem worse - if it is +not possible to write the full 32-bits of the TSC, it

Re: [PATCH 3/4] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpu.h |7 ++- target-i386/kvm.c | 139 - target-i386/machine.c | 20 +++ 3 files changed, 163 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 5/6] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-06-17 Thread Xiao Guangrong
Avi Kivity wrote: On 06/17/2010 10:25 AM, Xiao Guangrong wrote: Can this in fact work for level != PT_PAGE_TABLE_LEVEL? We might start at PT_PAGE_DIRECTORY_LEVEL but get 4k pages while iterating. Ah, i forgot it. We can't assume that the host also support huge page for next gfn,

Re: [PATCH] VT-d: fix PCI device detach from virtual machine

2010-06-17 Thread Weidong Han
David Woodhouse wrote: On Thu, 2010-06-17 at 11:35 +0800, Weidong Han wrote: David Woodhouse wrote: So why do we bother setting up a context in the IOMMU for the device itself, when no DMA will ever appear to come from this device? And if the device is behind PCI

Re: [PATCH 5/6] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-06-17 Thread Avi Kivity
On 06/17/2010 12:04 PM, Xiao Guangrong wrote: So we can change the fault path to always fault 16 ptes, aligned on 16 pte boundary, with the needed pte called with specualtive=false. Avi, i not understand it clearly, Could you please explain it? :-( Right now if the fault is in

Re: [PATCH 5/6] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-06-17 Thread Xiao Guangrong
Avi Kivity wrote: On 06/17/2010 12:04 PM, Xiao Guangrong wrote: So we can change the fault path to always fault 16 ptes, aligned on 16 pte boundary, with the needed pte called with specualtive=false. Avi, i not understand it clearly, Could you please explain it? :-( Right

[PATCH] KVM: x86 emulator: fix group3 instruction decoding

2010-06-17 Thread Wei Yongjun
Group 3 instruction with ModRM reg field as 001 is defined as test instruction under AMD arch, and emulate_grp3() is ready for emulate it, so fix the decoding. static inline int emulate_grp3(...) { ... switch (c-modrm_reg) { case 0 ... 1: /* test */

[PATCH 3/4] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm-all.c | 21 +++ kvm.h |2 + target-i386/cpu.h |7 ++- target-i386/kvm.c | 139 - target-i386/machine.c | 20 +++ 5 files changed, 186

[PATCH] qemu-kvm: Replace kvm_set/get_fpu() with upstream version.

2010-06-17 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- Would send out XSAVE patch after the upstream ones have been merged, since the patch would be affected by the merge. qemu-kvm-x86.c| 23 ++- qemu-kvm.c| 10 -- qemu-kvm.h| 30

Re: [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device()

2010-06-17 Thread Sheng Yang
On Saturday 12 June 2010 19:21:42 Sheng Yang wrote: Commit a99c47a2 intel-iommu: errors with smaller iommu widths replace the dmar_domain-pgd with the first entry of page table when iommu's supported width is smaller than dmar_domain's. But it use physical address directly for new

Re: [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device()

2010-06-17 Thread David Woodhouse
On Thu, 2010-06-17 at 18:10 +0800, Sheng Yang wrote: BTW: I think this need to be queued for 2.6.35-rc as well. I sent Linus the pull request yesterday. -- David WoodhouseOpen Source Technology Centre david.woodho...@intel.com Intel

Re: [PATCH 16/24] Implement VMLAUNCH and VMRESUME

2010-06-17 Thread Gleb Natapov
On Sun, Jun 13, 2010 at 03:30:46PM +0300, Nadav Har'El wrote: Implement the VMLAUNCH and VMRESUME instructions, allowing a guest hypervisor to run its own guests. Signed-off-by: Nadav Har'El n...@il.ibm.com --- --- .before/arch/x86/kvm/vmx.c2010-06-13 15:01:29.0 +0300 +++

Re: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-17 Thread Herbert Xu
On Sat, Jun 12, 2010 at 05:31:10PM +0800, Xin, Xiaohui wrote: 1) Modify driver from netdev_alloc_skb() to alloc user pages if dev is zero-copyed. If the driver support PS mode, then modify alloc_page() too. Well if you were doing this then the driver won't be generating skbs at all. So

Re: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-17 Thread Herbert Xu
On Sun, Jun 13, 2010 at 04:58:36PM +0800, Xin, Xiaohui wrote: Herbert, In this way, I think we should create 3 functions at least in drivers to allocate rx buffer, to receive the rx buffers, and to clean the rx buffers. We can also have another way here. We can provide a function to only

Re: [PATCH 22/24] Correct handling of idt vectoring info

2010-06-17 Thread Gleb Natapov
On Sun, Jun 13, 2010 at 03:33:50PM +0300, Nadav Har'El wrote: This patch adds correct handling of IDT_VECTORING_INFO_FIELD for the nested case. When a guest exits while handling an interrupt or exception, we get this information in IDT_VECTORING_INFO_FIELD in the VMCS. When L2 exits to L1,

Re: [PATCH] KVM: x86 emulator: fix group3 instruction decoding

2010-06-17 Thread Avi Kivity
On 06/17/2010 12:33 PM, Wei Yongjun wrote: Group 3 instruction with ModRM reg field as 001 is defined as test instruction under AMD arch, and emulate_grp3() is ready for emulate it, so fix the decoding. Strange but true. Did you encounter any situation which actually needed this, or did

Re: [PATCH 3/4] qemu: kvm: Enable XSAVE live migration support

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm-all.c | 21 +++ kvm.h |2 + target-i386/cpu.h |7 ++- target-i386/kvm.c | 139 - target-i386/machine.c | 20

Re: [PATCH] qemu-kvm: Replace kvm_set/get_fpu() with upstream version.

2010-06-17 Thread Jan Kiszka
Sheng Yang wrote: Signed-off-by: Sheng Yang sh...@linux.intel.com --- Would send out XSAVE patch after the upstream ones have been merged, since the patch would be affected by the merge. qemu-kvm-x86.c| 23 ++- qemu-kvm.c| 10 -- qemu-kvm.h

Re: [PATCH 2/3] Monitor command 'info trace'

2010-06-17 Thread Stefan Hajnoczi
On Wed, Jun 16, 2010 at 06:12:06PM +0530, Prerna Saxena wrote: diff --git a/simpletrace.c b/simpletrace.c index 2fec4d3..239ae3f 100644 --- a/simpletrace.c +++ b/simpletrace.c @@ -62,3 +62,16 @@ void trace4(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long void

Re: [PATCH 3/3] Toggle tracepoint state

2010-06-17 Thread Stefan Hajnoczi
On Wed, Jun 16, 2010 at 06:14:35PM +0530, Prerna Saxena wrote: This patch adds support for dynamically enabling/disabling of tracepoints. This is done by internally maintaining each tracepoint's state, and permitting logging of data from a tracepoint only if it is in an 'active' state.

Re: [PATCH] ceph/rbd block driver for qemu-kvm (v3)

2010-06-17 Thread Christian Brunner
Hi Simone, sorry for the late reply. I've been on vacation for a week. Thanks for sending the patch. At first sight your patch looks good. I'll do some testing by the weekend. Kevin also sent me a note about the missing aio support, but I didn't have the time to implement it yet. Now it seems,

Re: [PATCH] device-assignment: be more selective in interrupt disabling

2010-06-17 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: An 82576 physical function assigned to a Windows 7 guest currently doesn't work because the driver seems to gratuitiously disable MSI and MSIX interrupts. When it does this, we blindly deassign the current interrupt setup, leaving the

Re: [PATCH 03/17] Unify vendor TSC logic

2010-06-17 Thread Zachary Amsden
On 06/16/2010 10:15 PM, Jason Wang wrote: Zachary Amsden wrote: On 06/15/2010 10:10 PM, Jason Wang wrote: Zachary Amsden wrote: Move the TSC control logic from the vendor backends into x86.c by adding adjust_tsc_offset to x86 ops. Now all TSC decisions can be done in one

Re: [Autotest] [KVM-AUTOTEST PATCH v2 1/3] KVM test: add kvm_monitor.py, an interface to QEMU monitors

2010-06-17 Thread Lucas Meneghel Rodrigues
On Mon, 2010-06-14 at 19:54 +0300, Michael Goldish wrote: This module should replace vm.send_monitor_cmd(). Instead of connecting to the monitor each time a command is issued, this module maintains a continuous connection to the monitor. It disconnects when a test terminates and reconnects

Re: [PATCH 17/17] Add timekeeping documentation

2010-06-17 Thread Zachary Amsden
On 06/16/2010 10:55 PM, Andi Kleen wrote: Zachary Amsdenzams...@redhat.com writes: I think listing all the obscure bits in the PIT was an attempt to weed out the weak and weary readers early, right? Very perceptive of you ;) +this as well. Several hardware limitations make the

kvm-s390: Dont exit SIE on SIGP sense running

2010-06-17 Thread Christian Borntraeger
Avi, Marcello, Newer (guest) kernels use sigp sense running in their spinlock implementation to check if the other cpu is running before yielding the processor. This revealed some wrong guest settings, causing unnecessary exits for every sigp sense running. Signed-off-by: Christian Borntraeger

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

2010-06-17 Thread Tom Lyon
On Sunday 13 June 2010 03:23:39 am Michael S. Tsirkin wrote: On Fri, Jun 11, 2010 at 03:15:53PM -0700, Tom Lyon wrote: [ bunch of stuff about MSI-X checking and IOMMUs and config registers...] OK, here's the thing. The IOMMU API today does not do squat about dealing with interrupts.

Re: RFC qdev path semantics

2010-06-17 Thread Alex Williamson
I'm a little bit lost at how to implement something to print these semantics, but a couple comments below... On Wed, 2010-06-16 at 11:46 +0200, Markus Armbruster wrote: A number of changes to qdev paths have been proposed in various threads. It's becoming harder to keep track of them, so let me

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

2010-06-17 Thread Michael S. Tsirkin
On Thu, Jun 17, 2010 at 02:14:00PM -0700, Tom Lyon wrote: On Sunday 13 June 2010 03:23:39 am Michael S. Tsirkin wrote: On Fri, Jun 11, 2010 at 03:15:53PM -0700, Tom Lyon wrote: [ bunch of stuff about MSI-X checking and IOMMUs and config registers...] OK, here's the thing. The IOMMU

Re: RFC qdev path semantics

2010-06-17 Thread Paul Brook
### Paul proposes to require all buses to define bus addresses. Make one up if necessary. That seems arbitrary and prone to breakage. How do we handle a subtle change in device instantiation order and still allow migration? If by code change or command line ordering my frobnitz

Re: [Qemu-devel] [RFC PATCH 1/5] qdev: Create qdev_get_dev_path()

2010-06-17 Thread Alex Williamson
On Wed, 2010-06-16 at 10:23 +0200, Markus Armbruster wrote: Alex Williamson alex.william...@redhat.com writes: On Tue, 2010-06-15 at 12:28 +0100, Paul Brook wrote: Alex proposed to disambiguate by adding identified properties of the immediate parent bus and device to the path

Re: RFC qdev path semantics

2010-06-17 Thread Alex Williamson
On Thu, 2010-06-17 at 23:01 +0100, Paul Brook wrote: ### Paul proposes to require all buses to define bus addresses. Make one up if necessary. That seems arbitrary and prone to breakage. How do we handle a subtle change in device instantiation order and still allow migration?

[KVM-AUTOTEST PATCH 01/18] KVM test: kvm_preprocessing.py: allow modifying VM params without restarting

2010-06-17 Thread Michael Goldish
Currently a VM's params are changed before the test only if it's restarted. This patch allows VM params to be changed when it isn't restarted. This is useful for params that can have an effect without a restart, such as main_monitor: monitors can be switched between tests without restarting, so

[KVM-AUTOTEST PATCH 02/18] KVM test: kvm.py: suppress exceptions during postprocessing if the test fails

2010-06-17 Thread Michael Goldish
We don't want an exception during postprocessing to mask the exception that caused the failure. Also, move abort-on-error handling from kvm_preprocessing.py to kvm.py, and modify some debug messages. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py |

[KVM-AUTOTEST PATCH 03/18] KVM test: kvm_monitor.py: add convenience method get_event()

2010-06-17 Thread Michael Goldish
get_event() looks for and returns a single event matching the given name, or None if none is found. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git

[KVM-AUTOTEST PATCH 07/18] KVM test: kvm_preprocessing.py: simplify pre/post_command error handling

2010-06-17 Thread Michael Goldish
Currently the error message appears twice: both in a logging.warn() statement and in an exception. Also the error.TestError raised adds unnecessary text to the exception message, which is informative enough as it is. Signed-off-by: Michael Goldish mgold...@redhat.com ---

[KVM-AUTOTEST PATCH 09/18] KVM test: kvm_utils.py: add a primitive logging mechanism for kvm_subprocess

2010-06-17 Thread Michael Goldish
Add log_line() which logs a single line to a given file. The file's path is given relative to a certain base dir. Add set_log_dir() which sets the base dir. This is useful for logging the output of kvm_subprocess. kvm_subprocess can take a callback function, which it calls with each line of

[KVM-AUTOTEST PATCH 11/18] KVM test: restructure remote_login() and remote_scp()

2010-06-17 Thread Michael Goldish
- Add _remote_login() and _remote_scp() which, instead of taking a command line, take an existing session and operate on it. This is useful for logging into existing always-open sessions, such as serial console sessions. - Merge ssh/telnet/netcat into remote_login(). Signed-off-by: Michael

[KVM-AUTOTEST PATCH 05/18] KVM test: check for RESET QMP events in the system_reset test

2010-06-17 Thread Michael Goldish
If the VM has QMP monitors and no such events are found, fail. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_test_utils.py

[KVM-AUTOTEST PATCH 10/18] KVM test: add the auto_close option to all kvm_subprocess classes

2010-06-17 Thread Michael Goldish
Allow all kvm_subprocess classes (kvm_spawn, kvm_tail, kvm_expect, kvm_shell_session) to close automatically if auto_close is given and True. By default auto_close if False for all classes except kvm_shell_session, for which it is True by default. Signed-off-by: Michael Goldish

[KVM-AUTOTEST PATCH 12/18] KVM test: send username in remote_login()

2010-06-17 Thread Michael Goldish
In order to let the serial console work, we must let the remote_login() send the username when met the username prompt. This patch fails the progress if if it met the username prompt twice. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com ---

[KVM-AUTOTEST PATCH 14/18] KVM test: kvm_vm.py: redirect the serial console to a unix socket

2010-06-17 Thread Michael Goldish
Based on Jason Wang's patch. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py

[KVM-AUTOTEST PATCH 17/18] KVM test: kvm_subprocess.py: don't sanitize text before passing it to callbacks

2010-06-17 Thread Michael Goldish
Converting the text to utf-8 seems to cause trouble when converting back (e.g. when writing to files). The logging system seems to be fine with unsanitized text, so let's not sanitize it. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py |6 ++ 1

[KVM-AUTOTEST PATCH 18/18] KVM test: log output of all shell sessions and SCP transfers

2010-06-17 Thread Michael Goldish
Use kvm_utils.log_line() to log the output of all shell sessions and SCP transfers. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 33 ++--- client/tests/kvm/kvm_vm.py| 15 --- 2 files changed, 38

Re: [PATCH] KVM: x86 emulator: fix group3 instruction decoding

2010-06-17 Thread Wei Yongjun
On 06/17/2010 12:33 PM, Wei Yongjun wrote: Group 3 instruction with ModRM reg field as 001 is defined as test instruction under AMD arch, and emulate_grp3() is ready for emulate it, so fix the decoding. Strange but true. Did you encounter any situation which actually needed this,