Re: [PATCH] KVM: Fix warning in emulator_cmpxchg_emulated

2011-12-08 Thread Jan Kiszka
On 2011-12-08 07:17, Sasha Levin wrote: Make sure 'exchanged' is initialized. Fixes the following warning: arch/x86/kvm/x86.c: In function 'emulator_cmpxchg_emulated': arch/x86/kvm/x86.c:3794:7: warning: 'exchanged' may be used uninitialized in this function Signed-off-by: Sasha Levin

Re: [PATCH] KVM: Fix warning in emulator_cmpxchg_emulated

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 09:04 +0100, Jan Kiszka wrote: On 2011-12-08 07:17, Sasha Levin wrote: Make sure 'exchanged' is initialized. Fixes the following warning: arch/x86/kvm/x86.c: In function 'emulator_cmpxchg_emulated': arch/x86/kvm/x86.c:3794:7: warning: 'exchanged' may be used

[PATCH] virt-test: Add a class NumaNode

2011-12-08 Thread Amos Kong
Dynamically checking hardware, use a dict to record the pin status, pin process to single cpu by 'taskset' command. Guest memory pining is already implemented in framework. process pining needs to be done in the testcases. Example: | numa_node = -1 # last node | p =

[patch 07/12] [PATCH] kvm-s390-ucontrol: interface to inject faults on a vcpu page table

2011-12-08 Thread Carsten Otte
This patch allows the user to fault in pages on a virtual cpus address space for user controlled virtual machines. Typically this is superfluous because userspace can just create a mapping and let the kernel's page fault logic take are of it. There is one exception: SIE won't start if the lowcore

[patch 00/12] Ucontrol patchset V2

2011-12-08 Thread Carsten Otte
Hi Avi, Hi Marcelo, I think I've integrated all feedback from last round. The race between KVM_S390_ENABLE_UCONTROL and creation of vcpus has been resolved by adding a parameter to KVM_CREATE_VM. The default KVM_VM_REGULAR (==0) is backward compatible to KVM_CREATE_VM without parameters, and

[patch 11/12] [PATCH] kvm-s390-ucontrol: announce capability for user controlled vms

2011-12-08 Thread Carsten Otte
This patch announces a new capability KVM_CAP_S390_UCONTROL that indicates that kvm can now support virtual machines that are controlled by userspace. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4

[patch 02/12] [PATCH] kvm-s390-ucontrol: per vcpu address spaces

2011-12-08 Thread Carsten Otte
This patch introduces two ioctls for virtual cpus, that are only valid for kernel virtual machines that are controlled by userspace. Each virtual cpu has its individual address space in this mode of operation, and each address space is backed by the gmap implementation just like the address space

[patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-08 Thread Carsten Otte
This patch introduces an interface to access the guest visible storage keys. It supports three operations that model the behavior that SSKE/ISKE/RRBE instructions would have if they were issued by the guest. These instructions are all documented in the z architecture principles of operation book.

[patch 03/12] [PATCH] kvm-s390-ucontrol: export page faults to user

2011-12-08 Thread Carsten Otte
This patch introduces a new exit reason in the kvm_run structure named KVM_EXIT_UCONTROL. This exit indicates, that a virtual cpu has regognized a fault on the host page table. The idea is that userspace can handle this fault by mapping memory at the fault location into the cpu's address space and

[patch 08/12] [PATCH] kvm-s390-ucontrol: disable sca

2011-12-08 Thread Carsten Otte
This patch makes sure user controlled virtual machines do not use a system control area (sca). This is needed in order to create virtual machines with more cpus than the size of the sca [64]. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Carsten Otte
This patch introduces a new config option for user controlled kernel virtual machines. It introduces an optional parameter to KVM_CREATE_VM in order to create a user controlled virtual machine. The parameter is passed to kvm_arch_init_vm for all architectures. Valid values for the new parameter

[patch 09/12] [PATCH] kvm-s390: fix assumption for KVM_MAX_VCPUS

2011-12-08 Thread Carsten Otte
This patch fixes definition of the idle_mask and the local_int array in kvm_s390_float_interrupt. Previous definition had 64 cpus max hardcoded instead of using KVM_MAX_VCPUS. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/include/asm/kvm_host.h

[patch 06/12] [PATCH] kvm-s390-ucontrol: disable in-kernel irq stack

2011-12-08 Thread Carsten Otte
This patch disables the in-kernel interrupt stack for KVM virtual machines that are controlled by user. Userspace has to take care of handling interrupts on its own. Signed-off-by: Carsten Otte co...@de.ibm.com --- Index: linux-2.5-cecsim/arch/s390/kvm/kvm-s390.c

[patch 04/12] [PATCH] kvm-s390-ucontrol: export SIE control block to user

2011-12-08 Thread Carsten Otte
This patch exports the s390 SIE hardware control block to userspace via the mapping of the vcpu file descriptor. In order to do so, a new arch callback named kvm_arch_vcpu_fault is introduced for all architectures. It allows to map architecture specific pages. Signed-off-by: Carsten Otte

[patch 05/12] [PATCH] kvm-s390-ucontrol: disable in-kernel handling of SIE intercepts

2011-12-08 Thread Carsten Otte
This patch disables in-kernel handling of SIE intercepts for user controlled virtual machines. All intercepts are passed to userspace via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be handled in-kernel for regular KVM guests. Signed-off-by: Carsten Otte co...@de.ibm.com ---

[patch 12/12] [PATCH] kvm-s390: Fix return code for unknown ioctl numbers

2011-12-08 Thread Carsten Otte
This patch fixes the return code of kvm_arch_vcpu_ioctl in case of an unkown ioctl number. Signed-off-by: Carsten Otte co...@de.ibm.com --- --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 10:12 +0100, Carsten Otte wrote: plain text document attachment (enable-ucontrol.patch) This patch introduces a new config option for user controlled kernel virtual machines. It introduces an optional parameter to KVM_CREATE_VM in order to create a user controlled virtual

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Carsten Otte
On 08.12.2011 10:25, Sasha Levin wrote: Why is it s390 specific? why isn't it KVM_VM_UCONTROL which is currently only implemented on s390? Good point. Maybe the subject line for the patch should be fixed along with that ;-) -- To unsubscribe from this list: send the line unsubscribe kvm in

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-08 Thread Avi Kivity
On 12/07/2011 06:46 PM, Raghavendra K T wrote: On 12/07/2011 08:22 PM, Avi Kivity wrote: On 12/07/2011 03:39 PM, Marcelo Tosatti wrote: Also I think we can keep the kicked flag in vcpu-requests, no need for new storage. Was going to suggest it but it violates the currently organized

Re: [PATCH 1/1 V6] qemu-kvm: fix improper nmi emulation

2011-12-08 Thread Jan Kiszka
On 2011-12-07 11:29, Avi Kivity wrote: On 10/17/2011 06:00 PM, Lai Jiangshan wrote: From: Lai Jiangshan la...@cn.fujitsu.com Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button event triggers

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Avi Kivity
On 12/08/2011 11:25 AM, Sasha Levin wrote: On Thu, 2011-12-08 at 10:12 +0100, Carsten Otte wrote: plain text document attachment (enable-ucontrol.patch) This patch introduces a new config option for user controlled kernel virtual machines. It introduces an optional parameter to

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 11:45 +0200, Avi Kivity wrote: On 12/08/2011 11:25 AM, Sasha Levin wrote: On Thu, 2011-12-08 at 10:12 +0100, Carsten Otte wrote: plain text document attachment (enable-ucontrol.patch) This patch introduces a new config option for user controlled kernel virtual

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Avi Kivity
On 12/08/2011 11:53 AM, Sasha Levin wrote: On Thu, 2011-12-08 at 11:45 +0200, Avi Kivity wrote: On 12/08/2011 11:25 AM, Sasha Levin wrote: On Thu, 2011-12-08 at 10:12 +0100, Carsten Otte wrote: plain text document attachment (enable-ucontrol.patch) This patch introduces a new config

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-08 Thread Jason Wang
On 12/08/2011 01:02 AM, Ben Hutchings wrote: On Wed, 2011-12-07 at 19:31 +0800, Jason Wang wrote: On 12/07/2011 03:30 PM, Rusty Russell wrote: On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wangjasow...@redhat.com wrote: multiple queue virtio-net: flow steering through host/guest cooperation

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Alexander Graf
On 08.12.2011, at 10:59, Avi Kivity a...@redhat.com wrote: On 12/08/2011 11:53 AM, Sasha Levin wrote: On Thu, 2011-12-08 at 11:45 +0200, Avi Kivity wrote: On 12/08/2011 11:25 AM, Sasha Levin wrote: On Thu, 2011-12-08 at 10:12 +0100, Carsten Otte wrote: plain text document attachment

Re: [PATCH 1/1 V6] qemu-kvm: fix improper nmi emulation

2011-12-08 Thread Jan Kiszka
On 2011-12-08 10:42, Jan Kiszka wrote: On 2011-12-07 11:29, Avi Kivity wrote: On 10/17/2011 06:00 PM, Lai Jiangshan wrote: From: Lai Jiangshan la...@cn.fujitsu.com Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real

[PATCH 0/11] RFC: PCI using capabilitities

2011-12-08 Thread Rusty Russell
Here's the patch series I ended up with. I haven't coded up the QEMU side yet, so no idea if the new driver works. Questions: (1) Do we win from separating ISR, NOTIFY and COMMON? (2) I used a u8 bar; should I use a bir and pack it instead? BIR seems a little obscure (noone else in the

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-08 Thread Rusty Russell
On Wed, 7 Dec 2011 17:48:17 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Dec 07, 2011 at 04:02:45PM +0200, Sasha Levin wrote: On Sun, 2011-12-04 at 20:23 +0200, Sasha Levin wrote: [snip] Rusty, Michael, does the below looks a reasonable optimization for you? OK overall

Re: [PATCH 0/11] RFC: PCI using capabilitities

2011-12-08 Thread Sasha Levin
Rusty, I can't find the actual patches, could you verify that they were indeed sent? On Thu, 2011-12-08 at 20:52 +1030, Rusty Russell wrote: Here's the patch series I ended up with. I haven't coded up the QEMU side yet, so no idea if the new driver works. Questions: (1) Do we win from

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 20:14 +1030, Rusty Russell wrote: On Wed, 7 Dec 2011 17:48:17 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Dec 07, 2011 at 04:02:45PM +0200, Sasha Levin wrote: On Sun, 2011-12-04 at 20:23 +0200, Sasha Levin wrote: [snip] Rusty, Michael, does

[RFC 1/11] virtio: use u32, not bitmap for struct virtio_device's features

2011-12-08 Thread Rusty Russell
It seemed like a good idea, but it's actually a pain when we get more than 32 feature bits. Just change it to a u32 for now. --- drivers/char/virtio_console.c |2 +- drivers/lguest/lguest_device.c |2 +- drivers/s390/kvm/kvm_virtio.c |2 +- drivers/virtio/virtio.c| 10

Re: [PATCH 0/5 V5] Avoid soft lockup message when KVM is stopped by host

2011-12-08 Thread Amit Shah
On (Mon) 05 Dec 2011 [15:18:59], Eric B Munson wrote: When a guest kernel is stopped by the host hypervisor it can look like a soft lockup to the guest kernel. This false warning can mask later soft lockup warnings which may be real. This patch series adds a method for a host hypervisor to

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Carsten Otte
On 08.12.2011 11:18, Alexander Graf wrote: If you really have to do this, please 1) make it s390 only. I don't even want to have to see this uglyness in other archs It pretty much is. The only interference is a) checking the machine type in arch_init_vm now that I've introduced that

[PATCH v4 11/15] kvm: x86: Establish IRQ0 override control

2011-12-08 Thread Jan Kiszka
KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/pc.c|3 ++- kvm-all.c |5 +

[PATCH v4 02/15] kvm: Move kvmclock into hw/kvm folder

2011-12-08 Thread Jan Kiszka
More KVM-specific devices will come, so let's start with moving the kvmclock into a dedicated folder. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target|4 ++-- configure |1 + hw/{kvmclock.c = kvm/clock.c} |4 ++--

[PATCH v4 03/15] apic: Stop timer on reset

2011-12-08 Thread Jan Kiszka
All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH v4 09/15] memory: Introduce memory_region_init_reservation

2011-12-08 Thread Jan Kiszka
Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug, but could theoretically be triggered by guest code (DMA to

[PATCH v4 01/15] msi: Generalize msix_supported to msi_supported

2011-12-08 Thread Jan Kiszka
Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9

[PATCH v4 06/15] apic: Open-code timer save/restore

2011-12-08 Thread Jan Kiszka
To enable migration between accelerated and non-accelerated APIC models, we will need to handle the timer saving and restoring specially and can no longer rely on the automatics of VMSTATE_TIMER. Specifically, accelerated model will not start any QEMUTimer. This patch therefore factors out the

[PATCH v4 07/15] i8259: Introduce backend/frontend infrastructure for KVM reuse

2011-12-08 Thread Jan Kiszka
Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. Again, we create a PIC backend infrastructure and provide hooks for init, reset, and vmload/save. This also introduces a common helper to instantiate a single i8259 chip from the cascade- creating i8259_init

[PATCH v4 15/15] kvm: Arm in-kernel irqchip support

2011-12-08 Thread Jan Kiszka
Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-config.c |4 qemu-options.hx |5 - 2 files changed, 8

[PATCH v4 04/15] apic: Inject external NMI events via LINT1

2011-12-08 Thread Jan Kiszka
On real hardware, NMI button events are injected via the LINT1 line of the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that should not receive them. Change the APIC emulation code to reflect this. Based on

[PATCH v4 12/15] kvm: x86: Add user space part for in-kernel APIC

2011-12-08 Thread Jan Kiszka
This introduces the alternative APIC backend which makes use of KVM's in-kernel device model. External NMI injection via LINT1 is emulated by checking the current state of the in-kernel APIC, only injecting a NMI into the VCPU if LINT1 is unmasked and configured to DM_NMI. MSI is not yet

[PATCH v4 08/15] ioapic: Introduce backend/frontend infrastructure for KVM reuse

2011-12-08 Thread Jan Kiszka
Split up the IOAPIC analogously to APIC and i8259. KVM will share the device description, reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target |2 +- hw/ioapic.c | 130

[PATCH v4 10/15] kvm: Introduce core services for in-kernel irqchip support

2011-12-08 Thread Jan Kiszka
Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into these models, and maintain IRQ routes. Routing is optional and depends on the host arch supporting KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as we can't route GSI0 to IOAPIC pin 2.

[PATCH v4 14/15] kvm: x86: Add user space part for in-kernel IOAPIC

2011-12-08 Thread Jan Kiszka
This introduces the KVM-accelerated IOAPIC backend and extends the IRQ routing setup by the 0-2 redirection when needed. The IOAPIC gains a KVM-specific property that allows to define the GSI base for injecting interrupts into the kernel model. This will allow to disentangle PIC and IOAPIC pins

[PATCH v4 13/15] kvm: x86: Add user space part for in-kernel i8259

2011-12-08 Thread Jan Kiszka
Introduce the alternative i8259 backend that exploits KVM in-kernel acceleration. The PIIX3 initialization code is furthermore extended by KVM specific IRQ route setup. GSI injection differs in KVM mode from the user space model. As we can dispatch ISA-range IRQs to both IOAPIC and PIC inside the

[PATCH v4 00/15] uq/master: Introduce basic irqchip support

2011-12-08 Thread Jan Kiszka
Changes in v4: - rebased of current uq/master - fixed stupid bugs that broke bisectability and user space irqchip mode - integrated NMI-over-LINT1 injection logic CC: Lai Jiangshan la...@cn.fujitsu.com Jan Kiszka (15): msi: Generalize msix_supported to msi_supported kvm: Move kvmclock into

[PATCH v4 05/15] apic: Introduce backend/frontend infrastructure for KVM reuse

2011-12-08 Thread Jan Kiszka
The KVM in-kernel APIC model will reuse parts of the user space model while providing the same frontend view to guest and most management interfaces. Introduce an APIC backend concept to encapsulate those parts that will tell user space and KVM model apart. The backend offers callback hooks for

Re: [patch 01/12] [PATCH] kvm-s390: ioctl to switch to user controlled virtual machines

2011-12-08 Thread Alexander Graf
On 12/08/2011 12:48 PM, Carsten Otte wrote: On 08.12.2011 11:18, Alexander Graf wrote: If you really have to do this, please 1) make it s390 only. I don't even want to have to see this uglyness in other archs It pretty much is. The only interference is a) checking the machine type in

Re: [PATCH] qemu-kvm: Move make-release to scripts/qemu-kvm

2011-12-08 Thread Jan Kiszka
On 2011-12-07 11:49, Avi Kivity wrote: On 12/06/2011 04:34 PM, Jan Kiszka wrote: Save the qemu-kvm release helper before deleting the kvm directory. Thanks, applied. Anything else useful remaining in /kvm? Otherwise I would release my dinosaur extinction patch. Are we clear on vgabios?

Re: [PATCH 0/5 V5] Avoid soft lockup message when KVM is stopped by host

2011-12-08 Thread Eric B Munson
On Wed, 07 Dec 2011, Avi Kivity wrote: On 12/05/2011 10:18 PM, Eric B Munson wrote: Changes from V4: Rename KVM_GUEST_PAUSED to KVMCLOCK_GUEST_PAUSED Add description of KVMCLOCK_GUEST_PAUSED ioctl to api.txt Changes from V3: Include CC's on patch 3 Drop clear flag ioctl and have

Re: [PATCH 02/10] nEPT: MMU context for nested EPT

2011-12-08 Thread Nadav Har'El
On Mon, Nov 14, 2011, Avi Kivity wrote about Re: [PATCH 02/10] nEPT: MMU context for nested EPT: +#if PTTYPE == EPT +real_gfn = mmu-translate_gpa(vcpu, gfn_to_gpa(table_gfn), + EPT_WRITABLE_MASK); +#else

Re: [PATCH 2/5 V5] Add functions to check if the host has stopped the vm

2011-12-08 Thread Eric B Munson
On Wed, 07 Dec 2011, Avi Kivity wrote: On 12/05/2011 10:19 PM, Eric B Munson wrote: When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. +bool

Re: [PATCH 3/5 V5] Add ioctl for KVMCLOCK_GUEST_STOPPED

2011-12-08 Thread Eric B Munson
On Wed, 07 Dec 2011, Avi Kivity wrote: On 12/05/2011 10:19 PM, Eric B Munson wrote: Now that we have a flag that will tell the guest it was suspended, create an interface for that communication using a KVM ioctl. @@ -3295,6 +3295,10 @@ long kvm_arch_vcpu_ioctl(struct file *filp,

Re: [PATCH 4/5 V5] Add generic stubs for kvm stop check functions

2011-12-08 Thread Eric B Munson
On Wed, 07 Dec 2011, Avi Kivity wrote: On 12/05/2011 10:19 PM, Eric B Munson wrote: diff --git a/include/asm-generic/kvm_para.h b/include/asm-generic/kvm_para.h new file mode 100644 index 000..177e1eb --- /dev/null +++ b/include/asm-generic/kvm_para.h @@ -0,0 +1,14 @@

Re: [PATCH] kvm tools: Allow the user to pass a FD to use as a TAP device

2011-12-08 Thread Osier Yang
On 2011年12月08日 01:24, Pekka Enberg wrote: On Wed, 7 Dec 2011, Daniel P. Berrange wrote: On Wed, Dec 07, 2011 at 06:28:12PM +0200, Pekka Enberg wrote: On Wed, Dec 7, 2011 at 11:37 AM, Sasha Levin levinsasha...@gmail.com wrote: This allows users to pass a pre-configured fd to use for the

Re: [PATCH 0/11] RFC: PCI using capabilitities

2011-12-08 Thread Sasha Levin
On Thu, 2011-12-08 at 20:52 +1030, Rusty Russell wrote: Here's the patch series I ended up with. I haven't coded up the QEMU side yet, so no idea if the new driver works. Questions: (1) Do we win from separating ISR, NOTIFY and COMMON? (2) I used a u8 bar; should I use a bir and pack it

[PATCH][kvm-autotest] Adds cpuflags test and subtest interface.

2011-12-08 Thread Jiří Župka
This patch add tests for testing cpu flags in qemu: a) interface cpu flags tests 1) qemu -cpu ?model 2)dump 3)cpuid b) guest run cpu flags tests 1) Test boot cpu model. 2) Test boot cpu model and additiona/nonstandard model flags. 3) Test boot fail with host

Re: [PATCH 0/2] qemu-io tests: More fine grained control of qemu paths

2011-12-08 Thread Christoph Hellwig
Thanks a lot Lucas, I've applied the patches. And sorry for the delay, I'm pretty busy at the moment. -- 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: [PATCH v4 12/15] kvm: x86: Add user space part for in-kernel APIC

2011-12-08 Thread Blue Swirl
On Thu, Dec 8, 2011 at 11:52, Jan Kiszka jan.kis...@siemens.com wrote: This introduces the alternative APIC backend which makes use of KVM's in-kernel device model. External NMI injection via LINT1 is emulated by checking the current state of the in-kernel APIC, only injecting a NMI into the

[PATCH 1/4 V6] Add flag to indicate that a vm was stopped by the host

2011-12-08 Thread Eric B Munson
This flag will be used to check if the vm was stopped by the host when a soft lockup was detected. The host will set the flag when it stops the guest. On resume, the guest will check this flag if a soft lockup is detected and skip issuing the warning. Signed-off-by: Eric B Munson

[PATCH 4/4] Add check for suspended vm in softlockup detector

2011-12-08 Thread Eric B Munson
A suspended VM can cause spurious soft lockup warnings. To avoid these, the watchdog now checks if the kernel knows it was stopped by the host and skips the warning if so. When the watchdog is reset successfully, clear the guest paused flag. Signed-off-by: Eric B Munson emun...@mgebm.net Cc:

[PATCH 3/4] Add ioctl for KVMCLOCK_GUEST_STOPPED

2011-12-08 Thread Eric B Munson
Now that we have a flag that will tell the guest it was suspended, create an interface for that communication using a KVM ioctl. Signed-off-by: Eric B Munson emun...@mgebm.net Cc: mi...@redhat.com Cc: h...@zytor.com Cc: a...@arndb.de Cc: ry...@linux.vnet.ibm.com Cc: aligu...@us.ibm.com Cc:

[PATCH 2/4] Add functions to check if the host has stopped the vm

2011-12-08 Thread Eric B Munson
When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. Signed-off-by: Eric B Munson emun...@mgebm.net Cc: mi...@redhat.com Cc: h...@zytor.com Cc: a...@arndb.de Cc:

[PATCH 0/4 V6] Avoid soft lockup message when KVM is stopped by host

2011-12-08 Thread Eric B Munson
Changes from V5: Collapse generic check_and_clear_guest_stopped into patch 2 Include check_and_clear_guest_stopped defintion to ia64, s390, and powerpc Change check_and_clear_guest_stopped to use __get_cpu_var instead of taking the cpuid arg. Protect check_and_clear_guest_stopped declaration with

Re: [PATCH v4 00/15] uq/master: Introduce basic irqchip support

2011-12-08 Thread Blue Swirl
On Thu, Dec 8, 2011 at 11:52, Jan Kiszka jan.kis...@siemens.com wrote: Changes in v4: - rebased of current uq/master - fixed stupid bugs that broke bisectability and user space irqchip mode - integrated NMI-over-LINT1 injection logic I had comments to one patch, others look fine. Overall,

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-08 Thread Sridhar Samudrala
On 12/7/2011 3:02 AM, Jason Wang wrote: On 12/06/2011 11:42 PM, Sridhar Samudrala wrote: On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason

[PATCH] virt-test: Add a class NumaNode v2

2011-12-08 Thread Lucas Meneghel Rodrigues
From: Amos Kong ak...@redhat.com Dynamically checking hardware, use a dict to record the pin status, pin process to single cpu by 'taskset' command. Guest memory pining is already implemented in framework. process pining needs to be done in the testcases. Example: | numa_node = -1 # last node

[PATCH V2] kvm: make vcpu life cycle separated from kvm instance

2011-12-08 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction taken when its refcnt is zero, and then vcpu MUST and CAN be destroyed before kvm's destroy. Signed-off-by: Liu Ping Fan

[PATCH V2 00/23] kvm tools: Prepare kvmtool for another architecture

2011-12-08 Thread Matt Evans
Hi, This patch series rearranges and tidies various parts of kvmtool to pave the way for the addition of support for another architecture -- SPAPR PPC64. A second patch series will follow to present the PPC64 support. Building on the separation of x86-specific code into tools/kvm/x86, this

[PATCH V2 01/23] kvm tools: Only build/init i8042 on x86

2011-12-08 Thread Matt Evans
Not every architecture has an i8042 kbd controller, so only use this when building for x86. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile |2 +- tools/kvm/builtin-run.c |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/kvm/Makefile

[PATCH V2 03/23] kvm tools: Re-arrange Makefile to heed CFLAGS before checking for optional libs

2011-12-08 Thread Matt Evans
The checks for optional libraries build code to perform the tests, so should respect certain CFLAGS -- in particular, -m64 so we check for 64bit libraries if they're required. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile | 86

[PATCH V2 02/23] kvm tools: Add Makefile parameter for kernel include path

2011-12-08 Thread Matt Evans
This patch adds an 'I' parameter to override the default kernel include path of '../../include'. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index

[PATCH V2 04/23] kvm tools: Get correct 64-bit types on PPC64 and link appropriately

2011-12-08 Thread Matt Evans
kvmtool's types.h includes asm/types.h, which by default on PPC64 brings in int-l64.h; define __SANE_USERSPACE_TYPES__ to get LL64 types. This patch also adds CFLAGS to the final link, so that any -m64 is obeyed when linking, too. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/Makefile

[PATCH V2 05/23] kvm tools: Add arch-specific KVM_RUN exit handling via kvm_cpu__handle_exit()

2011-12-08 Thread Matt Evans
This patch creates a new function in x86/kvm-cpu.c, kvm_cpu__handle_exit(), in which arch-specific exit reasons can be handled outside of the common runloop. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/include/kvm/kvm-cpu.h |2 ++ tools/kvm/kvm-cpu.c | 10 --

[PATCH V2 06/23] kvm tools: Don't die if KVM_CAP_NR_VCPUS isn't available

2011-12-08 Thread Matt Evans
We die() if we can't read KVM_CAP_NR_VCPUS, but the API docs suggest to assume the value 4 in this case. This is pertinent to PPC KVM, which currently does not support this CAP. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/kvm.c |6 +- 1 files changed, 5 insertions(+), 1

[PATCH V2 07/23] kvm tools: Fix KVM_RUN exit code check

2011-12-08 Thread Matt Evans
kvm_cpu__run() currently die()s if KVM_RUN returns non-zero. Some architectures may return positive values in non-error cases, whereas real errors are always negative return values. Check for those instead. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/kvm-cpu.c |2 +- 1 files

[PATCH V2 08/23] kvm tools: Add kvm__arch_periodic_poll()

2011-12-08 Thread Matt Evans
Currently, the SIGALRM handler calls device poll functions (for serial, virtio console) directly. Which devices are present and which require polling is a system-specific decision, so create a new function called from common code move the x86-specific poll calls into it. Signed-off-by: Matt

[PATCH V2 09/23] kvm tools: Move arch-specific cmdline init into kvm__arch_set_cmdline()

2011-12-08 Thread Matt Evans
Different systems will want different base kernel commandlines, e.g. non-x86 systems probably don't need noapic, i8042.* etc., so set the commandline up in arch-specific code. Then, if the resulting commandline is empty, don't strcat a space onto the front. Signed-off-by: Matt Evans

[PATCH V2 10/23] kvm tools: Add CONSOLE_HV term type and allow it to be selected

2011-12-08 Thread Matt Evans
This patch paves the way for adding a hypervisor console, useful on systems that support one out of the box yet don't have either serial port or virtio console support (e.g. kernels expecting POWER SPAPR). Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/builtin-run.c |8 ++--

[PATCH V2 11/23] kvm tools: Fix term_getc(), term_getc_iov() endian bugs

2011-12-08 Thread Matt Evans
term_getc()'s int c has one byte written into it (at its lowest address) by read_in_full(). This is expected to be the least significant byte, but that isn't the case on BE! Use correct type, unsigned char. A similar issue exists in term_getc_iov(), which needs to write a char to the iov rather

[PATCH V2 12/23] kvm tools: Allow initrd_check() to match a cpio

2011-12-08 Thread Matt Evans
cpios are valid as initrds too, so allow them through the check. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/kvm.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 0bbe9ba..d26e3d7 100644 --- a/tools/kvm/kvm.c +++

[PATCH V2 13/23] kvm tools: Allow load_flat_binary() to load an initrd alongside

2011-12-08 Thread Matt Evans
This patch passes the initrd fd and commandline to load_flat_binary(), which may be used to load both the kernel an initrd (stashing or inserting the commandline as appropriate) in the same way that load_bzimage() does. This is especially useful when load_bzimage() is unused for a particular

[PATCH V2 14/23] kvm tools: Initialise PCI before devices start getting registered with PCI

2011-12-08 Thread Matt Evans
Re-arrange pci__init() in builtin-run such that it comes before devices are initialised. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/builtin-run.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index

[PATCH V2 15/23] kvm tools: Perform CPU and firmware setup after devices are added

2011-12-08 Thread Matt Evans
Currently some devices (in this case kbd, fb, vesa) are initialised after CPU/firmware setup. On some platforms (e.g. PPC) kvm__arch_setup_firmware() may be making a device tree. Any devices added after this point will be missed! Tiny refactor of builtin-run.c, moving timer start, firmware

[PATCH V2 16/23] kvm tools: Init IRQs after determining nrcpus

2011-12-08 Thread Matt Evans
IRQ init may involve per-CPU setup/allocation of resources, so make sure kvm-nrcpus is initialised before calling irq__init(). Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/builtin-run.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c

[PATCH V2 17/23] kvm tools: Add ability to map guest RAM from hugetlbfs

2011-12-08 Thread Matt Evans
Add a --hugetlbfs commandline option to give a path to hugetlbfs-map guest memory (down in kvm__arch_init()). For x86, guest memory is a normal ANON mmap() if this option is not provided, otherwise a hugetlbfs mmap. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/builtin-run.c |

[PATCH V2 18/23] kvm tools: Move PCI_MAX_DEVICES to pci.h

2011-12-08 Thread Matt Evans
Other pieces of kvmtool may be interested in PCI_MAX_DEVICES. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/include/kvm/pci.h |1 + tools/kvm/pci.c |1 - 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/include/kvm/pci.h

[PATCH V2 19/23] kvm tools: Endian-sanitise pci.h and PCI device setup

2011-12-08 Thread Matt Evans
vesa, pci-shmem and virtio-pci devices need to set up config space with little-endian conversions (as config space is LE). The pci_config_address bitfield also needs to be reversed when building on BE systems. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/hw/pci-shmem.c | 23

[PATCH V2 20/23] kvm tools: Correctly set virtio-pci bar_size and remove hardwired address

2011-12-08 Thread Matt Evans
The BAR addresses are set up fine, but missed the bar_size[] array which is now updated correspondingly. Use PCI_IO_SIZE instead of '0x100'. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/virtio/pci.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH V2 21/23] kvm tools: Add pci__config_{rd,wr}(), pci__find_dev()

2011-12-08 Thread Matt Evans
This allows config space access in a more natural manner than clunky x86 IO ports, and is useful for other architectures. Internally, the x86 IO port access uses these new config space interfaces. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/include/kvm/pci.h |9 +-

[PATCH V2 22/23] kvm tools: Arch-specific define for PCI MMIO allocation area

2011-12-08 Thread Matt Evans
pci_get_io_space_block() used to grab addresses from KVM_32BIT_GAP_START + 0x100, which is x86-specific. Create a new define, KVM_PCI_MMIO_AREA, to specify a bus address these allocations can come from. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/pci.c |

[PATCH V2 23/23] kvm tools: Create arch-specific kvm_cpu__emulate_{mm}io()

2011-12-08 Thread Matt Evans
Different architectures will deal with MMIO exits differently. For example, KVM_EXIT_IO is x86-specific, and I/O cycles are often synthesised by steering into windows in PCI bridges on other architectures. This patch calls arch-specific kvm_cpu__emulate_io() and kvm_cpu__emulate_mmio() from the

Re: [libvirt] [PATCH] kvm tools: Introduce an ENV variable for the state dir

2011-12-08 Thread Osier Yang
On 2011年12月06日 22:39, Daniel P. Berrange wrote: On Fri, Nov 11, 2011 at 07:57:00PM +0800, Osier Yang wrote: Which is named as KVMTOOL_STATE_DIR, so that the user can configure the path of state directly as he wants. --- tools/kvm/main.c |7 ++- 1 files changed, 6 insertions(+), 1

Re: [libvirt] [PATCH 5/7] kvmtool: Add new domain type

2011-12-08 Thread Osier Yang
On 2011年12月06日 22:46, Daniel P. Berrange wrote: On Fri, Nov 11, 2011 at 07:57:04PM +0800, Osier Yang wrote: It's named as kvmtool. --- src/conf/domain_conf.c |4 +++- src/conf/domain_conf.h |1 + 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCH 7/7] kvmtool: Implementation for kvm tool driver

2011-12-08 Thread Osier Yang
On 2011年12月06日 22:55, Daniel P. Berrange wrote: On Fri, Nov 11, 2011 at 07:57:06PM +0800, Osier Yang wrote: Basically, the drivers is implemented by using kvm tool binary currently, (see ./kvm help for more info). Current implementation supports define/undefine, start/destroy/, suspend/resume,

Re: [PATCH V2 17/23] kvm tools: Add ability to map guest RAM from hugetlbfs

2011-12-08 Thread Sasha Levin
On Fri, 2011-12-09 at 17:55 +1100, Matt Evans wrote: Add a --hugetlbfs commandline option to give a path to hugetlbfs-map guest memory (down in kvm__arch_init()). For x86, guest memory is a normal ANON mmap() if this option is not provided, otherwise a hugetlbfs mmap. Signed-off-by: Matt

Re: [PATCH v4 00/15] uq/master: Introduce basic irqchip support

2011-12-08 Thread Jan Kiszka
On 2011-12-08 22:25, Blue Swirl wrote: On Thu, Dec 8, 2011 at 11:52, Jan Kiszka jan.kis...@siemens.com wrote: Changes in v4: - rebased of current uq/master - fixed stupid bugs that broke bisectability and user space irqchip mode - integrated NMI-over-LINT1 injection logic I had comments to

Re: [PATCH v4 12/15] kvm: x86: Add user space part for in-kernel APIC

2011-12-08 Thread Jan Kiszka
On 2011-12-08 22:16, Blue Swirl wrote: On Thu, Dec 8, 2011 at 11:52, Jan Kiszka jan.kis...@siemens.com wrote: This introduces the alternative APIC backend which makes use of KVM's in-kernel device model. External NMI injection via LINT1 is emulated by checking the current state of the

  1   2   >