Re: [PATCH v9 3/3] x86, apicv: add virtual interrupt delivery support

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 03:26:08PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

Re: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: +static void vmx_enable_virtual_x2apic_mode(struct kvm_vcpu *vcpu) +{ + u32 exec_control; + int msr; + struct vcpu_vmx *vmx = to_vmx(vcpu); + + if (!cpu_has_vmx_virtualize_x2apic_mode()) + return; + +

RE: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: +static void vmx_enable_virtual_x2apic_mode(struct kvm_vcpu *vcpu) +{ +u32 exec_control; +int msr; +struct vcpu_vmx *vmx = to_vmx(vcpu); + +if

RE: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need to enable virtualized x2apic mode. Currently, we only enable it when guest is really using x2apic. Also, clear MSR

Re: [PATCH 01/12] tap: multiqueue support

2013-01-10 Thread Stefan Hajnoczi
On Wed, Jan 09, 2013 at 11:25:24PM +0800, Jason Wang wrote: On 01/09/2013 05:56 PM, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: diff --git a/qapi-schema.json b/qapi-schema.json index 5dfa052..583eb7c 100644 --- a/qapi-schema.json +++

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-10 Thread Paolo Bonzini
Il 08/01/2013 01:12, Rusty Russell ha scritto: Unfortunately, that cannot work because not all architectures support chained scatterlists. WHAT? I can't figure out what an arch needs to do to support this? It needs to use the iterator functions in its DMA driver. But we don't care

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Stefan Hajnoczi
On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:52PM +0800, Jason Wang wrote: Perf Numbers: Two Intel Xeon 5620 with direct

Re: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 08:32:06AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need to enable virtualized x2apic mode. Currently, we

Re: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 08:31:51AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: +static void vmx_enable_virtual_x2apic_mode(struct kvm_vcpu *vcpu) +{ + u32 exec_control; + int msr; + struct vcpu_vmx *vmx =

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-10 Thread Wanlong Gao
On 01/10/2013 03:16 PM, Jason Wang wrote: On Thursday, January 10, 2013 02:49:14 PM Wanlong Gao wrote: On 01/10/2013 02:43 PM, Jason Wang wrote: On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: On 01/09/2013 06:01 PM, Wanlong Gao wrote: On 01/09/2013 05:30 PM, Jason Wang wrote:

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Jason Wang
On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:52PM +0800, Jason Wang wrote: Perf

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-10 Thread Jason Wang
On 01/10/2013 05:06 PM, Wanlong Gao wrote: On 01/10/2013 03:16 PM, Jason Wang wrote: On Thursday, January 10, 2013 02:49:14 PM Wanlong Gao wrote: On 01/10/2013 02:43 PM, Jason Wang wrote: On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: On 01/09/2013 06:01 PM, Wanlong Gao wrote:

Re: [okeanos-dev] Re: KVM versions, machine types and failed migrations

2013-01-10 Thread Daniel P. Berrange
On Wed, Jan 09, 2013 at 03:27:53PM +0200, Vangelis Koukis wrote: On Wed, Jan 09, 2013 at 01:10:45pm +, Daniel P. Berrange wrote: When doing migration, the fundamental requirement is that the guest OS visible machine ABI must not change. Thus there are three key things to take care of

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Peter Maydell
On 9 January 2013 22:30, Alexander Graf ag...@suse.de wrote: In fact, in this particular case one could merge all of the patches except for the particular ioctl implementation and just give the respective addresses default values until there is an API to set them, similar to how we did things

Re: [PATCH 01/12] tap: multiqueue support

2013-01-10 Thread Stefan Hajnoczi
On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: Mainly suggestions to make the code easier to understand, but see the comment about the 1:1 queue/NetClientState model for a general issue with this approach. Recently, linux support multiqueue tap which could let userspace call

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Alexander Graf
Am 10.01.2013 um 11:17 schrieb Peter Maydell peter.mayd...@linaro.org: On 9 January 2013 22:30, Alexander Graf ag...@suse.de wrote: In fact, in this particular case one could merge all of the patches except for the particular ioctl implementation and just give the respective addresses

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Alexander Graf
On 09.01.2013, at 23:34, Alexander Graf wrote: On 09.01.2013, at 23:26, Christoffer Dall wrote: On Wed, Jan 9, 2013 at 5:10 PM, Scott Wood scottw...@freescale.com wrote: On 01/09/2013 03:37:20 PM, Alexander Graf wrote: Am 09.01.2013 um 22:15 schrieb Scott Wood

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 12:15:55PM +0100, Alexander Graf wrote: On 09.01.2013, at 23:34, Alexander Graf wrote: On 09.01.2013, at 23:26, Christoffer Dall wrote: On Wed, Jan 9, 2013 at 5:10 PM, Scott Wood scottw...@freescale.com wrote: On 01/09/2013 03:37:20 PM, Alexander Graf

Re: [RFC PATCH 0/9] KVM: PPC: In-kernel PAPR interrupt controller emulation

2013-01-10 Thread Alexander Graf
On 10.01.2013, at 06:09, Paul Mackerras wrote: On Sat, Dec 15, 2012 at 01:06:13PM +1100, Benjamin Herrenschmidt wrote: On Sat, 2012-12-15 at 01:46 +0100, Alexander Graf wrote: On 05.11.2012, at 04:18, Paul Mackerras wrote: This series implements in-kernel emulation of the XICS interrupt

Re: [RFC 02/12] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-10 Thread Michael S. Tsirkin
On Wed, Jan 09, 2013 at 04:53:42PM -0200, Eduardo Habkost wrote: This is a cleanup that tries to solve two small issues: - We don't need a separate kvm_pv_eoi_features variable just to keep a constant calculated at compile-time, and this style would require adding a separate variable

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Stefan Hajnoczi
On Thu, Jan 10, 2013 at 05:34:14PM +0800, Jason Wang wrote: On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: On Fri,

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marc Zyngier
On Thu, 10 Jan 2013 10:17:09 +, Peter Maydell peter.mayd...@linaro.org wrote: On 9 January 2013 22:30, Alexander Graf ag...@suse.de wrote: In fact, in this particular case one could merge all of the patches except for the particular ioctl implementation and just give the respective

RE: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 08:32:06AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need to enable

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Alexander Graf
On 10.01.2013, at 12:53, Marc Zyngier wrote: On Thu, 10 Jan 2013 10:17:09 +, Peter Maydell peter.mayd...@linaro.org wrote: On 9 January 2013 22:30, Alexander Graf ag...@suse.de wrote: In fact, in this particular case one could merge all of the patches except for the particular ioctl

RE: [PATCH v9 3/3] x86, apicv: add virtual interrupt delivery support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:08PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness

Re: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 11:54:21AM +, Zhang, Yang Z wrote: The right logic should be: When register virtualization enabled, read all apic msr(except apic id reg and tmcct which have the hook) not cause vmexit and only write TPR not cause vmexit. When vid enabled, write to TPR, EOI

RE: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 11:54:21AM +, Zhang, Yang Z wrote: The right logic should be: When register virtualization enabled, read all apic msr(except apic id reg and tmcct which have the hook) not cause vmexit and only write TPR not cause vmexit. When

Re: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 12:22:51PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 11:54:21AM +, Zhang, Yang Z wrote: The right logic should be: When register virtualization enabled, read all apic msr(except apic id reg and tmcct which have the

[PULL 0/8] ppc patch queue 2013-01-10

2013-01-10 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: - Book3S: enable potential sPAPR guest emulation on PR KVM on pHyp - BookE: EPR (External Proxy Register) support Alex The following changes since commit

[PATCH 6/8] KVM: PPC: BookE: Emulate mfspr on EPR

2013-01-10 Thread Alexander Graf
The EPR register is potentially valid for PR KVM as well, so we need to emulate accesses to it. It's only defined for reading, so only handle the mfspr case. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke_emulate.c |3 +++ 1 files changed, 3 insertions(+), 0

[PATCH 8/8] KVM: PPC: BookE: Add EPR ONE_REG sync

2013-01-10 Thread Alexander Graf
We need to be able to read and write the contents of the EPR register from user space. This patch implements that logic through the ONE_REG API and declares its (never implemented) SREGS counterpart as deprecated. Signed-off-by: Alexander Graf ag...@suse.de --- Documentation/virtual/kvm/api.txt

[PATCH 7/8] KVM: PPC: BookE: Implement EPR exit

2013-01-10 Thread Alexander Graf
The External Proxy Facility in FSL BookE chips allows the interrupt controller to automatically acknowledge an interrupt as soon as a core gets its pending external interrupt delivered. Today, user space implements the interrupt controller, so we need to check on it during such a cycle. This

[PATCH 4/8] KVM: PPC: Fix mfspr/mtspr MMUCFG emulation

2013-01-10 Thread Alexander Graf
From: Mihai Caraman mihai.cara...@freescale.com On mfspr/mtspr emulation path Book3E's MMUCFG SPR with value 1015 clashes with G4's MSSSR0 SPR. Move MSSSR0 emulation from generic part to Books3S. MSSSR0 also clashes with Book3S's DABRX SPR. DABRX was not explicitly handled so Book3S execution

[PATCH 5/8] KVM: PPC: BookE: Allow irq deliveries to inject requests

2013-01-10 Thread Alexander Graf
When injecting an interrupt into guest context, we usually don't need to check for requests anymore. At least not until today. With the introduction of EPR, we will have to create a request when the guest has successfully accepted an external interrupt though. So we need to prepare the interrupt

[PATCH 3/8] KVM: PPC: Book3S: PR: Enable alternative instruction for SC 1

2013-01-10 Thread Alexander Graf
When running on top of pHyp, the hypercall instruction sc 1 goes straight into pHyp without trapping in supervisor mode. So if we want to support PAPR guest in this configuration we need to add a second way of accessing PAPR hypercalls, preferably with the exact same semantics except for the

[PATCH 2/8] KVM: PPC: Only WARN on invalid emulation

2013-01-10 Thread Alexander Graf
When we hit an emulation result that we didn't expect, that is an error, but it's nothing that warrants a BUG(), because it can be guest triggered. So instead, let's only WARN() the user that this happened. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |3 ++- 1

[PATCH 1/8] KVM: PPC: Fix SREGS documentation reference

2013-01-10 Thread Alexander Graf
From: Mihai Caraman mihai.cara...@freescale.com Reflect the uapi folder change in SREGS API documentation. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Reviewed-by: Amos Kong kongjian...@gmail.com Signed-off-by: Alexander Graf ag...@suse.de --- Documentation/virtual/kvm/api.txt |

Re: [PATCH] emulator: simple ALU tests

2013-01-10 Thread Marcelo Tosatti
On Fri, Jan 04, 2013 at 04:17:04PM +0200, Avi Kivity wrote: Signed-off-by: Avi Kivity avi.kiv...@gmail.com --- x86/emulator.c | 26 ++ 1 file changed, 26 insertions(+) Applied, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH 0/2] KVM: s390: Bugfixes for virtio-ccw.

2013-01-10 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 03:51:50PM +0100, Cornelia Huck wrote: Hi, Christian discovered some problems with regard to serialization in the virtio-ccw guest driver. Per-device data structures might contain data obtained by channel programs issued later on, leading to confusing behaviour. We

Re: [PATCH 01/12] tap: multiqueue support

2013-01-10 Thread Jason Wang
On 01/10/2013 06:28 PM, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: Mainly suggestions to make the code easier to understand, but see the comment about the 1:1 queue/NetClientState model for a general issue with this approach. Ok, thanks for the

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Jason Wang
On 01/10/2013 07:49 PM, Stefan Hajnoczi wrote: On Thu, Jan 10, 2013 at 05:34:14PM +0800, Jason Wang wrote: On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at

[RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread akong
From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. Amos Kong (2): move virtnet_send_command() above

[RFC PATCH 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-10 Thread akong
From: Amos Kong ak...@redhat.com We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Signed-off-by: Amos Kong ak...@redhat.com --- drivers/net/virtio_net.c | 89 1 file changed, 44 insertions(+),

[RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread akong
From: Amos Kong ak...@redhat.com Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for

Re: [RFC PATCH 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Maybe what you need is just a forward declaration. Signed-off-by: Amos Kong ak...@redhat.com ---

[RFC PATCH] virtio-net: introduce a new macaddr control

2013-01-10 Thread akong
From: Amos Kong ak...@redhat.com In virtio-net guest driver, currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address in one time. VIRTIO_NET_F_CTRL_MAC_ADDR is

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address in one time.

Re: [RFC PATCH 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-10 Thread Michael S. Tsirkin
On Thu, Jan 10, 2013 at 10:51:52PM +0800, Jason Wang wrote: On 01/10/2013 10:45 PM, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Maybe what you need is just a forward

Re: [RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread Amos Kong
On Thu, Jan 10, 2013 at 10:45:39PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. I

Re: [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Michael S. Tsirkin
On Thu, Jan 10, 2013 at 10:45:41PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address

Re: [RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread Michael S. Tsirkin
On Thu, Jan 10, 2013 at 10:45:39PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time.

[PATCH v2 0/2] KVM/ARM implementation of PSCI

2013-01-10 Thread Marc Zyngier
This is an implementation of the Power State Coordination Interface, as described there (registration required): http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0022a/index.html It allows CPUs to be powered on, off, suspended or migrated. This series is only concerned with

[PATCH v2 1/2] ARM: KVM: move one-time init to its own function

2013-01-10 Thread Marc Zyngier
As more code to be run only once per vcpu is expected, move the VGIC init code into a separate function. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm/include/asm/kvm_host.h | 3 +++ arch/arm/kvm/arm.c | 33 +++-- 2 files changed, 26

[PATCH v2 2/2] ARM: KVM: Power State Coordination Interface implementation

2013-01-10 Thread Marc Zyngier
Implement the PSCI specification (ARM DEN 0022A) to control virtual CPUs being powered on or off. PSCI/KVM is detected using the KVM_CAP_ARM_PSCI capability. A virtual CPU can now be initialized in a powered off state, using the KVM_ARM_VCPU_POWER_OFF feature flag. The guest can use either SMC

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example, some cases are nested-write-protect - if the page

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example, some cases are nested-write-protect - if the page

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Gleb Natapov
On Thu, Jan 10, 2013 at 03:30:36PM -0200, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error

KVM/arm64 updates

2013-01-10 Thread Marc Zyngier
Guys, I've updated the branches for KVM/arm64, renaming them all to keep the interested parties on their toes. We now have: - kvm-arm/psci: kvm-arm-master + the KVM/PSCI implementation - kvm-arm/pre-arm64: the above + the cleanup branch - arm64/soc-armv8-model: Catalin Marinas' arm64 branch -

Re: [PATCH 0/7 -v2] KVM: Alleviate mmu_lock hold time when we start dirty logging

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 07:42:38PM +0900, Takuya Yoshikawa wrote: Changelog v1-v2: The condition in patch 1 was changed like this: npages (mem-flags KVM_MEM_LOG_DIRTY_PAGES) This patch set makes kvm_mmu_slot_remove_write_access() rmap based and adds conditional rescheduling to it.

Re: [PATCH v3 0/7] Streamline arithmetic instruction emulation

2013-01-10 Thread Marcelo Tosatti
On Fri, Jan 04, 2013 at 04:18:47PM +0200, Avi Kivity wrote: The current arithmetic instruction emulation is fairly clumsy: after decode, each instruction gets a switch (size), and for every size we fetch the operands, prepare flags, emulate the instruction, then store back the flags and

Re: [kvmarm] [PATCH v2 0/2] KVM/ARM implementation of PSCI

2013-01-10 Thread Christoffer Dall
On Thu, Jan 10, 2013 at 11:06 AM, Marc Zyngier marc.zyng...@arm.com wrote: This is an implementation of the Power State Coordination Interface, as described there (registration required): http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0022a/index.html It allows CPUs to be

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Xiao Guangrong
On 01/11/2013 01:26 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example,

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Xiao Guangrong
On 01/11/2013 01:30 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example,

Re: [RFC PATCH 0/9] KVM: PPC: In-kernel PAPR interrupt controller emulation

2013-01-10 Thread Scott Wood
On 01/10/2013 05:42:16 AM, Alexander Graf wrote: Other instantiation attributes we don't know that early on should be settable between the time frame of vm creation and first execution. An example for this are device addresses. Check out the threads KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

Proper taming of oom-killer with kvm

2013-01-10 Thread Andrey Korolyov
Hi, I have recently run in the following issue: under certain conditions, if emulator process have exceeded its own memory limit in the cgroup and oom shot it, /proc entry may stay long indefinitely. There are two possible side-effects - at first, if one will try to read cmdline from such entry,

Re: [PATCH] KVM: trace: Fix exit decoding.

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 01:00:01PM +0100, Cornelia Huck wrote: trace_kvm_userspace_exit has been missing the KVM_EXIT_WATCHDOG exit. CC: Bharat Bhushan r65...@freescale.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/trace/events/kvm.h | 2 +- 1 file changed, 1

Re: [RFC/PATCH 1/1] s390/kvm: Fix BUG in include/linux/kvm_host.h:745

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 04:23:10PM +0100, Christian Borntraeger wrote: commit b080935c8638e08134629d0a9ebdf35669bec14d kvm: Directly account vtime to system on guest switch also removed the irq_disable/enable around kvm guest switch, which is correct in itself. Unfortunately, there is a

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 02:05:33AM +0800, Xiao Guangrong wrote: On 01/11/2013 01:26 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Xiao Guangrong
On 01/11/2013 03:48 AM, Marcelo Tosatti wrote: On Fri, Jan 11, 2013 at 02:05:33AM +0800, Xiao Guangrong wrote: On 01/11/2013 01:26 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed

Re: [PULL 0/2] vfio-pci: Fixes for 1.4 stable

2013-01-10 Thread Anthony Liguori
Pulled, thanks. Regards, Anthony Liguori -- 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 v9 1/3] x86, apicv: add APICv register virtualization support

2013-01-10 Thread Marcelo Tosatti
On Thu, Jan 10, 2013 at 03:26:06PM +0800, Yang Zhang wrote: - APIC read doesn't cause VM-Exit - APIC write becomes trap-like Signed-off-by: Kevin Tian kevin.t...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/include/asm/vmx.h |2 ++ arch/x86/kvm/lapic.c

Re: [PATCH v9 3/3] x86, apicv: add virtual interrupt delivery support

2013-01-10 Thread Marcelo Tosatti
Hi, Getting into good shape. On Thu, Jan 10, 2013 at 03:26:08PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marcelo Tosatti
On Wed, Jan 09, 2013 at 10:37:20PM +0100, Alexander Graf wrote: We can start to introduce (and fix ARM) with a generic ioctl in the MPIC patches then. The ioctl is already generic, except for its name. It's making a few wrong assumptions: * maximum size of value is u64

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marcelo Tosatti
On Wed, Jan 09, 2013 at 03:15:43PM -0600, Scott Wood wrote: On 01/09/2013 02:12:16 PM, Alexander Graf wrote: On 09.01.2013, at 20:50, Scott Wood wrote: On 01/09/2013 10:48:47 AM, Alexander Graf wrote: On 09.01.2013, at 17:26, Christoffer Dall wrote: Renames the KVM_SET_DEVICE_ADDRESS

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Scott Wood
On 01/10/2013 04:28:01 PM, Marcelo Tosatti wrote: On Wed, Jan 09, 2013 at 10:37:20PM +0100, Alexander Graf wrote: We can start to introduce (and fix ARM) with a generic ioctl in the MPIC patches then. The ioctl is already generic, except for its name. It's making a few wrong

Re: [Qemu-devel] [PATCH qom-cpu 3/7] target-i386: Disable kvm_mmu by default

2013-01-10 Thread Andreas Färber
Am 07.01.2013 19:20, schrieb Eduardo Habkost: KVM_CAP_PV_MMU capability reporting was removed from the kernel since v2.6.33 (see commit a68a6a7282373), and was completely removed from the kernel since v3.3 (see commit fb92045843). It doesn't make sense to keep it enabled by default, as it

Re: [Qemu-devel] [PATCH qom-cpu 6/7] target-i386/cpu.c: Add feature name array for ext4_features

2013-01-10 Thread Andreas Färber
Am 07.01.2013 19:20, schrieb Eduardo Habkost: Feature names were taken from the X86_FEATURE_* constants in the Linux kernel code. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: Gleb Natapov g...@redhat.com --- target-i386/cpu.c | 17 + 1 file changed, 17

Re: [Qemu-devel] [RFC 01/12] kvm: add KVM_FEATURE_CLOCKSOURCE_STABLE_BIT fake #define

2013-01-10 Thread Igor Mammedov
On Wed, 9 Jan 2013 16:53:41 -0200 Eduardo Habkost ehabk...@redhat.com wrote: Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: kvm@vger.kernel.org Cc: Michael S. Tsirkin m...@redhat.com Cc: Gleb Natapov g...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com ---

Re: [RFC 07/12] target-i386/cpu: Introduce apic_id_for_cpu() function

2013-01-10 Thread Igor Mammedov
On Wed, 9 Jan 2013 16:53:47 -0200 Eduardo Habkost ehabk...@redhat.com wrote: This function will be used by both the CPU initialization code and the fw_cfg table initialization code. Later this function will be updated to generate APIC IDs according to the CPU topology. Signed-off-by:

Re: [RFC 12/12] pc: Generate APIC IDs according to CPU topology

2013-01-10 Thread Igor Mammedov
On Wed, 9 Jan 2013 16:53:52 -0200 Eduardo Habkost ehabk...@redhat.com wrote: This keeps compatibility on machine-types pc-1.2 and older, and prints a warning in case the requested configuration won't get the correct topology. I couldn't think of a better way to warn about broken topology

Re: [RFC 12/12] pc: Generate APIC IDs according to CPU topology

2013-01-10 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 12:36:35AM +0100, Igor Mammedov wrote: [...] diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 33787dc..f34192c 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -23,6 +23,8 @@ #include cpu.h #include sysemu/kvm.h +#include sysemu/cpus.h

Re: [RFC 07/12] target-i386/cpu: Introduce apic_id_for_cpu() function

2013-01-10 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 12:31:23AM +0100, Igor Mammedov wrote: On Wed, 9 Jan 2013 16:53:47 -0200 Eduardo Habkost ehabk...@redhat.com wrote: This function will be used by both the CPU initialization code and the fw_cfg table initialization code. Later this function will be updated to

Re: [RFC 02/12] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-10 Thread Igor Mammedov
On Wed, 9 Jan 2013 16:53:42 -0200 Eduardo Habkost ehabk...@redhat.com wrote: This is a cleanup that tries to solve two small issues: - We don't need a separate kvm_pv_eoi_features variable just to keep a constant calculated at compile-time, and this style would require adding a

Re: [RFC 07/12] target-i386/cpu: Introduce apic_id_for_cpu() function

2013-01-10 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 12:31:23AM +0100, Igor Mammedov wrote: On Wed, 9 Jan 2013 16:53:47 -0200 Eduardo Habkost ehabk...@redhat.com wrote: This function will be used by both the CPU initialization code and the fw_cfg table initialization code. Later this function will be updated to

Re: [RFC 02/12] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-10 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 12:07:40AM +0100, Igor Mammedov wrote: [...] @@ -1343,13 +1337,15 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features) unsigned int i; char *featurestr; /* Single 'key=value string being parsed */ /* Features to be added

Re: [Qemu-devel] [RFC 01/12] kvm: add KVM_FEATURE_CLOCKSOURCE_STABLE_BIT fake #define

2013-01-10 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 12:15:16AM +0100, Igor Mammedov wrote: [...] diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 6bdd513..22acf91 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -36,6 +36,7 @@ #define KVM_FEATURE_ASYNC_PF 0 #define

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marcelo Tosatti
On Thu, Jan 10, 2013 at 04:40:12PM -0600, Scott Wood wrote: On 01/10/2013 04:28:01 PM, Marcelo Tosatti wrote: On Wed, Jan 09, 2013 at 10:37:20PM +0100, Alexander Graf wrote: We can start to introduce (and fix ARM) with a generic ioctl in the MPIC patches then. The ioctl is

Re: [Qemu-devel] [PATCH qom-cpu 0/7] disable kvm_mmu + -cpu enforce fixes (v3)

2013-01-10 Thread Andreas Färber
Am 07.01.2013 19:20, schrieb Eduardo Habkost: Eduardo Habkost (7): kvm: Add fake KVM constants to avoid #ifdefs on KVM-specific code [...] target-i386: Disable kvm_mmu by default target-i386/cpu: Introduce FeatureWord typedefs target-i386: kvm_check_features_against_host(): Use

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Scott Wood
On 01/10/2013 06:35:02 PM, Marcelo Tosatti wrote: On Thu, Jan 10, 2013 at 04:40:12PM -0600, Scott Wood wrote: On 01/10/2013 04:28:01 PM, Marcelo Tosatti wrote: Or just have KVM_SET_PPC_DEVICE_ADDRESS. Is there a downside to that? Besides the above, and my original complaint that it

RE: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 08:32:06AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 03:26:07PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need to enable

Re: [RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Jan 10, 2013 at 10:45:39PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq

Re: [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: +if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { +/* Set MAC address by writing config space */ vdev-config-set(vdev, offsetof(struct virtio_net_config, mac), dev-dev_addr, dev-addr_len);

Re: [PATCH KVM v2 2/4] KVM: additional i8254 output fixes

2013-01-10 Thread Matthew Ogilvie
On Tue, Jan 08, 2013 at 09:41:36AM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 06:35:47PM -0600, mmogi...@miniinfo.net wrote: On Mon, 7 Jan 2013 14:04:03 +0200, Gleb Natapov g...@redhat.com wrote: On Wed, Dec 26, 2012 at 10:39:54PM -0700, Matthew Ogilvie wrote: Make git_get_out()

Re: [PATCH KVM v2 1/4] KVM: fix i8254 IRQ0 to be normally high

2013-01-10 Thread Matthew Ogilvie
On Tue, Jan 08, 2013 at 09:31:19AM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 06:17:22PM -0600, mmogi...@miniinfo.net wrote: On Mon, 7 Jan 2013 11:39:18 +0200, Gleb Natapov g...@redhat.com wrote: On Wed, Dec 26, 2012 at 10:39:53PM -0700, Matthew Ogilvie wrote: Reading the spec, it

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Christoffer Dall
On 10/01/2013, at 20.10, Scott Wood scottw...@freescale.com wrote: On 01/10/2013 06:35:02 PM, Marcelo Tosatti wrote: On Thu, Jan 10, 2013 at 04:40:12PM -0600, Scott Wood wrote: On 01/10/2013 04:28:01 PM, Marcelo Tosatti wrote: Or just have KVM_SET_PPC_DEVICE_ADDRESS. Is there a downside

RE: [PATCH v9 2/3] x86, apicv: add virtual x2apic support

2013-01-10 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 12:22:51PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-10: On Thu, Jan 10, 2013 at 11:54:21AM +, Zhang, Yang Z wrote: The right logic should be: When register virtualization enabled, read all apic msr(except apic id

Re: [RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread Michael S. Tsirkin
On Fri, Jan 11, 2013 at 12:53:07PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Thu, Jan 10, 2013 at 10:45:39PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an

Re: [RFC PATCH 0/9] KVM: PPC: In-kernel PAPR interrupt controller emulation

2013-01-10 Thread Alexander Graf
On 10.01.2013, at 06:09, Paul Mackerras wrote: On Sat, Dec 15, 2012 at 01:06:13PM +1100, Benjamin Herrenschmidt wrote: On Sat, 2012-12-15 at 01:46 +0100, Alexander Graf wrote: On 05.11.2012, at 04:18, Paul Mackerras wrote: This series implements in-kernel emulation of the XICS interrupt

[PULL 0/8] ppc patch queue 2013-01-10

2013-01-10 Thread Alexander Graf
Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time: - Book3S: enable potential sPAPR guest emulation on PR KVM on pHyp - BookE: EPR (External Proxy Register) support Alex The following changes since commit

[PATCH 7/8] KVM: PPC: BookE: Implement EPR exit

2013-01-10 Thread Alexander Graf
The External Proxy Facility in FSL BookE chips allows the interrupt controller to automatically acknowledge an interrupt as soon as a core gets its pending external interrupt delivered. Today, user space implements the interrupt controller, so we need to check on it during such a cycle. This

  1   2   >