Re: [PATCH 2/5] VIRT: Support runtime irq_bypass consumer

2015-12-16 Thread Alex Williamson
On Thu, 2015-12-03 at 10:22 -0800, Yunhong Jiang wrote: > Extend the irq_bypass manager to support runtime consumers. A runtime > irq_bypass consumer can handle interrupt when an interrupt triggered. A > runtime consumer has it's handle_irq() function set and passing a > irq_context for the irq

Re: [PATCH 3/5] VFIO: Support threaded interrupt handling on VFIO

2015-12-16 Thread Alex Williamson
On Thu, 2015-12-03 at 10:22 -0800, Yunhong Jiang wrote: > For VFIO device with MSI interrupt type, it's possible to handle the > interrupt on hard interrupt context without invoking the interrupt > thread. Handling the interrupt on hard interrupt context reduce the > interrupt latency. > >

Re: [RFC PATCH 2/3] vfio-pci: Allow to mmap sub-page MMIO BARs if all MMIO BARs are page aligned

2015-12-16 Thread Alex Williamson
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap > sub-page(size < PAGE_SIZE) MMIO BARs because these BARs' mmio page > may be shared with other BARs. > > But we should allow to mmap these sub-page MMIO BARs if all MMIO BARs > are page

Re: [PATCH 0/5] Threaded MSI interrupt for VFIO PCI device

2015-12-16 Thread Paolo Bonzini
Alex, can you take a look at the extension to the irq bypass interface in patch 2? I'm not sure I understand what is the case where you have multiple consumers for the same token. Paolo On 03/12/2015 19:22, Yunhong Jiang wrote: > When assigning a VFIO device to a KVM guest with low latency

Re: [RFC PATCH 3/3] vfio-pci: Allow to mmap MSI-X table if EEH is supported

2015-12-16 Thread Alex Williamson
On Fri, 2015-12-11 at 16:53 +0800, Yongji Xie wrote: > Current vfio-pci implementation disallows to mmap MSI-X table in > case that user get to touch this directly. > > However, EEH mechanism could ensure that a given pci device > can only shoot the MSIs assigned for its PE and guest kernel also

Re: [PATCH v7 19/19] KVM: ARM64: Add a new kvm ARM PMU device

2015-12-16 Thread Christoffer Dall
On Wed, Dec 16, 2015 at 04:06:49PM +0800, Shannon Zhao wrote: > Hi, > > On 2015/12/16 15:31, Shannon Zhao wrote: > >> > But in this case, you're returning an error if it is *not* > >> > initialized. > >> > I understand that in that case you cannot return an interrupt > >> >

Re: [PATCH] arm64: KVM: debug: Remove spurious inline attributes

2015-12-16 Thread Christoffer Dall
On Wed, Dec 16, 2015 at 03:49:23PM +, Marc Zyngier wrote: > The debug trapping code is pretty heavy on the "inline" attribute, > but most functions are actually referenced in the sysreg tables, > making the inlining imposible. > > Removing the useless inline qualifier seems the right thing to

Re: kvmclock doesn't work, help?

2015-12-16 Thread Andy Lutomirski
On Tue, Dec 15, 2015 at 12:42 AM, Paolo Bonzini wrote: > > > On 14/12/2015 23:31, Andy Lutomirski wrote: >> > RAW TSC NTP corrected TSC >> > t0 10 10 >> > t1 20 19.99 >> > t2 30

[PATCH 3.19.y-ckt 056/128] MIPS: KVM: Fix CACHE immediate offset sign extension

2015-12-16 Thread Kamal Mostafa
3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit c5c2a3b998f1ff5a586f9d37e154070b8d550d17 upstream. The immediate field of the CACHE instruction is signed, so ensure that it gets sign

Re: [GIT PULL 0/4] KVM: s390 features and fixes for 4.5 (kvm/next)

2015-12-16 Thread Paolo Bonzini
On 15/12/2015 20:23, Christian Borntraeger wrote: > Paolo, > > here is the 2nd part of the s390 queue for 4.5 > > The following changes since commit 460146348518a1c4e810d01baf81847f8c6a1c73: > > Merge tag 'kvm-s390-next-4.5-1' of >

[PATCH] KVM: PPC: fix ONE_REG AltiVec support

2015-12-16 Thread Greg Kurz
The get and set operations got exchanged by mistake when moving the code from book3s.c to powerpc.c. Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 Signed-off-by: Greg Kurz --- It's been there for over a year but I guess we want that in 4.4, even if doesn't break the

Re: KVM with PCI forwarding really slow after 4.1

2015-12-16 Thread Michael Büsch
On Tue, 1 Dec 2015 18:47:51 +0100 Paolo Bonzini wrote: > On 01/12/2015 18:09, Michael Büsch wrote: > > I use "-device pci-assign,host=00:1a.0" to forward a USB host chip > > to a Win7 32 bit inside of qemu/kvm. That used to work pretty well, > > but it broke horribly

Re: kvmclock doesn't work, help?

2015-12-16 Thread Andy Lutomirski
On Wed, Dec 16, 2015 at 9:48 AM, Andy Lutomirski wrote: > On Tue, Dec 15, 2015 at 12:42 AM, Paolo Bonzini wrote: >> >> >> On 14/12/2015 23:31, Andy Lutomirski wrote: >>> > RAW TSC NTP corrected TSC >>> > t0 10

Re: [PATCH v2 0/3] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-12-16 Thread Denis V. Lunev
On 12/08/2015 07:36 PM, Andrey Smetanin wrote: The test checks Hyper-V SynIC timers functionality. The test runs on every vCPU and performs start/stop of periodic/one-shot timers (with period=1ms) and checks validity of received expiration messages in appropriate ISR's. Changes v2: * Share

[PATCH] KVM: PPC: fix ONE_REG AltiVec support

2015-12-16 Thread Greg Kurz
The get and set operations got exchanged by mistake when moving the code from book3s.c to powerpc.c. Fixes: 3840edc8033ad5b86deee309c1c321ca54257452 Signed-off-by: Greg Kurz --- It's been there for over a year but I guess we want that in 4.4, even if doesn't break the

Re: KVM with PCI forwarding really slow after 4.1

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 18:55, Michael Büsch wrote: >>> On 01/12/2015 18:09, Michael Büsch wrote: > I use "-device pci-assign,host=00:1a.0" to forward a USB > host chip to a Win7 32 bit inside of qemu/kvm. That used to > work pretty well, but it broke horribly somewhere after > 4.1. With

[PATCH 3.19.y-ckt 057/128] MIPS: KVM: Uninit VCPU in vcpu_create error path

2015-12-16 Thread Kamal Mostafa
3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit 585bb8f9a5e592f2ce7abbe5ed3112d5438d2754 upstream. If either of the memory allocations in kvm_arch_vcpu_create() fail, the vcpu which has

[PATCH 3.19.y-ckt 055/128] MIPS: KVM: Fix ASID restoration logic

2015-12-16 Thread Kamal Mostafa
3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit 002374f371bd02df864cce1fe85d90dc5b292837 upstream. ASID restoration on guest resume should determine the guest execution mode based on the

[PATCH 3/5] target-i386: kvm: Simplify MSR array construction

2015-12-16 Thread Eduardo Habkost
Add a helper function that appends new entries to the MSR buffer and checks for the buffer size limit. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 262 ++ 1 file changed, 125 insertions(+), 137 deletions(-)

[PATCH 4/5] target-i386: kvm: Simplify MSR setting functions

2015-12-16 Thread Eduardo Habkost
Simplify kvm_put_tscdeadline_msr() and kvm_put_msr_feature_control() using kvm_msr_buf and the kvm_msr_entry_add() helper. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git

[PATCH 5/5] target-i386: kvm: Eliminate kvm_msr_entry_set()

2015-12-16 Thread Eduardo Habkost
Inline the function inside kvm_msr_entry_add(). Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 3550866..b328392 100644 --- a/target-i386/kvm.c

[PATCH 2/5] target-i386: kvm: Increase MSR_BUF_SIZE

2015-12-16 Thread Eduardo Habkost
We are dangerously close to the array limits in kvm_put_msrs() and kvm_get_msrs(): with the default mcg_cap configuration, we can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap to be changed, we can write up to 236 MSRs. Use 4096 bytes for the buffer, that can hold 255

Re: [PATCH 0/5] Threaded MSI interrupt for VFIO PCI device

2015-12-16 Thread Alex Williamson
On Wed, 2015-12-16 at 18:56 +0100, Paolo Bonzini wrote: > Alex, > > can you take a look at the extension to the irq bypass interface in > patch 2?  I'm not sure I understand what is the case where you have > multiple consumers for the same token. The consumers would be, for instance, Intel PI +

Re: [Question] Switching VCPU CPL from the hypervisor ?

2015-12-16 Thread Paolo Bonzini
On 15/12/2015 18:02, Hebbal Yacine wrote: > What I want to do is: when a controlled process is in user mode, i > change its cpl to 0, force it to execute a code that is injected in the > VM, set back its cpl to 3 and let it run like if nothing happened Could you inject an SMI and place your

Re: [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping

2015-12-16 Thread Paolo Bonzini
On 14/12/2015 18:01, Andrey Smetanin wrote: > hostguest > start periodic stimer > start periodic timer > timer expires after 15ms > send expiration message into guest > restart periodic timer > doing something > timer expires

[PATCH 0/5] target-i386: kvm: Increase MSR entry array limits, check for array overrun

2015-12-16 Thread Eduardo Habkost
We are dangerously close to the array limits in kvm_put_msrs() and kvm_get_msrs(): with the default mcg_cap configuration, we can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap to be changed, we can write up to 236 MSRs[1]. This series changes the code to allocate a buffer once per

[PATCH 1/5] target-i386: kvm: Allocate kvm_msrs struct once per VCPU

2015-12-16 Thread Eduardo Habkost
Instead of using 2400 bytes in the stack for 150 MSR entries in kvm_get_msrs() and kvm_put_msrs(), allocate a buffer once for each VCPU. Signed-off-by: Eduardo Habkost --- target-i386/cpu-qom.h | 4 target-i386/kvm.c | 37 +++-- 2

[PATCH 01/16] MIPS: KVM: Trivial whitespace and style fixes

2015-12-16 Thread James Hogan
A bunch of misc whitespace and style fixes within arch/mips/kvm/. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: linux-m...@linux-mips.org ---

Re: [PATCH 0/5] Threaded MSI interrupt for VFIO PCI device

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 20:15, Alex Williamson wrote: > The consumers would be, for instance, Intel PI + the threaded handler > added in this series. These run independently, the PI bypass simply > makes the interrupt disappear from the host when it catches it, but if > the vCPU isn't running in the

Re: [PATCH 0/5] target-i386: kvm: Increase MSR entry array limits, check for array overrun

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 20:06, Eduardo Habkost wrote: > We are dangerously close to the array limits in kvm_put_msrs() > and kvm_get_msrs(): with the default mcg_cap configuration, we > can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap > to be changed, we can write up to 236 MSRs[1]. > >

[PATCH 02/16] MIPS: KVM: Drop some unused definitions from kvm_host.h

2015-12-16 Thread James Hogan
Some definitions in the MIPS asm/kvm_host.h are completely unused, so lets drop them. MS_TO_NS is no longer used since commit e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation"). The others don't appear ever to have been used. Signed-off-by: James Hogan Cc:

[PATCH 00/16] MIPS: KVM: Misc trivial cleanups

2015-12-16 Thread James Hogan
This patchset contains a bunch of miscellaneous cleanups (which are mostly trivial) for MIPS KVM & MIPS headers, such as: - Style/whitespace fixes - General cleanup and removal of dead code. - Moving/refactoring of general MIPS definitions out of arch/mips/kvm/ and into arch/mips/include/asm/ so

[PATCH 11/16] MIPS: Break down cacheops.h definitions

2015-12-16 Thread James Hogan
Most of the cache op codes defined in cacheops.h are split into a 2-bit cache identifier, and a 3-bit cache op code which does largely the same thing semantically regardless of the cache identifier. To allow the use of these definitions by KVM for decoding cache ops, break the definitions down

[PATCH 16/16] MAINTAINERS: Add KVM for MIPS entry

2015-12-16 Thread James Hogan
I've pretty much been maintaining KVM for MIPS for a while now. Lets make it more official (and make sure I get Cc'd on relevant patches). Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov

[PATCH 15/16] MIPS: KVM: Consistent use of uint*_t in MMIO handling

2015-12-16 Thread James Hogan
Make consistent use of uint8_t in MMIO handling code. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: kvm@vger.kernel.org ---

[PATCH 12/16] MIPS: KVM: Use cacheops.h definitions

2015-12-16 Thread James Hogan
Drop the custom cache operation code definitions used by KVM for emulating guest CACHE instructions, and switch to use the existing definitions in . Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: Ralf Baechle

[PATCH 13/16] MIPS: Move KVM specific opcodes into asm/inst.h

2015-12-16 Thread James Hogan
The header arch/mips/kvm/opcode.h defines a few extra opcodes which aren't in arch/mips/include/uapi/asm/inst.h. There's nothing KVM specific about them, so lets move them into inst.h where they belong and delete the header. Note that mfmcz_op is renamed to mfmc0_op to match the instruction set

[PATCH 06/16] MIPS: KVM: Refactor added offsetof()s

2015-12-16 Thread James Hogan
When calculating the offsets into the commpage for dynamically translated mtc0/mfc0 guest instructions, multiple offsetof()s are added together to find the offset of the specific register in the mips_coproc, within the commpage. Simplify each of these cases to a single offsetof() to find the

[PATCH 07/16] MIPS: KVM: Make kvm_mips_{init,exit}() static

2015-12-16 Thread James Hogan
The module init and exit functions have no need to be global, so make them static. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc:

[PATCH 05/16] MIPS: KVM: Convert EXPORT_SYMBOL to _GPL

2015-12-16 Thread James Hogan
Export symbols only to GPL modules to match other KVM symbols in virt/kvm/ and arch/*/kvm/. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc:

[PATCH 10/16] MIPS: Use EXCCODE_ constants with set_except_vector()

2015-12-16 Thread James Hogan
The first argument to set_except_vector is the ExcCode, which we now have definitions for. Lets make use of them. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: linux-m...@linux-mips.org --- arch/mips/kernel/cpu-bugs64.c | 8 +++

[PATCH 09/16] MIPS: Update trap codes

2015-12-16 Thread James Hogan
Add a few missing trap codes, and drop a couple of unused definitions for virtual coherency that aren't in the latest architecture revisions. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: linux-m...@linux-mips.org ---

[PATCH 14/16] MIPS: KVM: Add missing newline to kvm_err()

2015-12-16 Thread James Hogan
Add missing newline to end of kvm_err string when guest PMAP couldn't be allocated. Signed-off-by: James Hogan Cc: Gleb Natapov Cc: Paolo Bonzini Cc: Ralf Baechle Cc: kvm@vger.kernel.org Cc:

[PATCH 08/16] MIPS: Move Cause.ExcCode trap codes to mipsregs.h

2015-12-16 Thread James Hogan
Move the Cause.ExcCode trap code definitions from kvm_host.h to mipsregs.h, since they describe architectural bits rather than KVM specific constants, and change the prefix from T_ to EXCCODE_. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo

[PATCH 04/16] MIPS: KVM: Drop unused kvm_mips_host_tlb_inv_index()

2015-12-16 Thread James Hogan
The function kvm_mips_host_tlb_inv_index() is unused, so drop it completely. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Gleb Natapov Cc: Paolo Bonzini Cc: linux-m...@linux-mips.org Cc: kvm@vger.kernel.org

[PATCH 03/16] MIPS: Move definition of DC bit to mipsregs.h

2015-12-16 Thread James Hogan
The CAUSEB_DC and CAUSEF_DC definitions used by KVM are defined in asm/kvm_host.h, but all the other Cause register field definitions are found in asm/mipsregs.h. Lets reunite the DC bit definitions with its friends in mipsregs.h. Signed-off-by: James Hogan Cc: Ralf

Re: [PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-16 Thread Xiao Guangrong
On 12/17/2015 10:44 AM, Kai Huang wrote: On 12/16/2015 04:39 PM, Xiao Guangrong wrote: On 12/16/2015 03:51 PM, Kai Huang wrote: On 12/15/2015 05:10 PM, Xiao Guangrong wrote: On 12/15/2015 03:52 PM, Kai Huang wrote: static bool __mmu_gfn_lpage_is_disallowed(gfn_t gfn, int level,

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Aravinda Prasad
On Thursday 17 December 2015 08:02 AM, David Gibson wrote: > On Wed, Dec 16, 2015 at 11:26:12AM +0530, Aravinda Prasad wrote: >> This patch modifies KVM to cause a guest exit with >> KVM_EXIT_NMI instead of immediately delivering a 0x200 >> interrupt to guest upon machine check exception in >>

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Aravinda Prasad
On Thursday 17 December 2015 08:02 AM, David Gibson wrote: > On Wed, Dec 16, 2015 at 11:26:12AM +0530, Aravinda Prasad wrote: >> This patch modifies KVM to cause a guest exit with >> KVM_EXIT_NMI instead of immediately delivering a 0x200 >> interrupt to guest upon machine check exception in >>

Re: [PATCH v7 19/19] KVM: ARM64: Add a new kvm ARM PMU device

2015-12-16 Thread Shannon Zhao
On 2015/12/17 4:33, Christoffer Dall wrote: > On Wed, Dec 16, 2015 at 04:06:49PM +0800, Shannon Zhao wrote: >> Hi, >> >> On 2015/12/16 15:31, Shannon Zhao wrote: > But in this case, you're returning an error if it is *not* > initialized. > I understand that in that case

[3.13.y-ckt stable] Patch "MIPS: KVM: Uninit VCPU in vcpu_create error path" has been added to staging queue

2015-12-16 Thread Kamal Mostafa
This is a note to let you know that I have just added a patch titled MIPS: KVM: Uninit VCPU in vcpu_create error path to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue

[3.13.y-ckt stable] Patch "MIPS: KVM: Fix CACHE immediate offset sign extension" has been added to staging queue

2015-12-16 Thread Kamal Mostafa
This is a note to let you know that I have just added a patch titled MIPS: KVM: Fix CACHE immediate offset sign extension to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree which can be found at:

[3.13.y-ckt stable] Patch "MIPS: KVM: Fix ASID restoration logic" has been added to staging queue

2015-12-16 Thread Kamal Mostafa
This is a note to let you know that I have just added a patch titled MIPS: KVM: Fix ASID restoration logic to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue This patch

Re: [PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-16 Thread Kai Huang
On 12/16/2015 04:39 PM, Xiao Guangrong wrote: On 12/16/2015 03:51 PM, Kai Huang wrote: On 12/15/2015 05:10 PM, Xiao Guangrong wrote: On 12/15/2015 03:52 PM, Kai Huang wrote: static bool __mmu_gfn_lpage_is_disallowed(gfn_t gfn, int level, @@ -2140,12 +2150,18 @@ static struct

[PATCH 3.13.y-ckt 20/78] MIPS: KVM: Fix CACHE immediate offset sign extension

2015-12-16 Thread Kamal Mostafa
3.13.11-ckt32 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit c5c2a3b998f1ff5a586f9d37e154070b8d550d17 upstream. The immediate field of the CACHE instruction is signed, so ensure that it gets sign

[PATCH 3.13.y-ckt 19/78] MIPS: KVM: Fix ASID restoration logic

2015-12-16 Thread Kamal Mostafa
3.13.11-ckt32 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit 002374f371bd02df864cce1fe85d90dc5b292837 upstream. ASID restoration on guest resume should determine the guest execution mode based on

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread David Gibson
On Wed, Dec 16, 2015 at 11:26:12AM +0530, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread David Gibson
On Wed, Dec 16, 2015 at 11:26:12AM +0530, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Kai Huang
On 12/16/2015 04:48 PM, Xiao Guangrong wrote: On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not

[PATCH 3.13.y-ckt 21/78] MIPS: KVM: Uninit VCPU in vcpu_create error path

2015-12-16 Thread Kamal Mostafa
3.13.11-ckt32 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit 585bb8f9a5e592f2ce7abbe5ed3112d5438d2754 upstream. If either of the memory allocations in kvm_arch_vcpu_create() fail, the vcpu which has

Re: [PATCH] vhost: move is_le setup to the backend

2015-12-16 Thread Greg Kurz
On Thu, 12 Nov 2015 15:28:19 +0100 Greg Kurz wrote: > On Thu, 12 Nov 2015 15:46:30 +0200 > "Michael S. Tsirkin" wrote: > > > On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > > > The vq->is_le field is used to fix endianness when accessing

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Aravinda Prasad
On Wednesday 16 December 2015 03:10 PM, Thomas Huth wrote: > On 16/12/15 06:56, Aravinda Prasad wrote: >> This patch modifies KVM to cause a guest exit with >> KVM_EXIT_NMI instead of immediately delivering a 0x200 >> interrupt to guest upon machine check exception in >> guest address. Exiting

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Aravinda Prasad
On Wednesday 16 December 2015 03:10 PM, Thomas Huth wrote: > On 16/12/15 06:56, Aravinda Prasad wrote: >> This patch modifies KVM to cause a guest exit with >> KVM_EXIT_NMI instead of immediately delivering a 0x200 >> interrupt to guest upon machine check exception in >> guest address. Exiting

[PATCH] arm64: KVM: debug: Remove spurious inline attributes

2015-12-16 Thread Marc Zyngier
The debug trapping code is pretty heavy on the "inline" attribute, but most functions are actually referenced in the sysreg tables, making the inlining imposible. Removing the useless inline qualifier seems the right thing to do, having verified that the output code is similar. Cc: Alex Bennée

Re: [PATCH v7 19/19] KVM: ARM64: Add a new kvm ARM PMU device

2015-12-16 Thread Shannon Zhao
On 2015/12/16 17:04, Marc Zyngier wrote: > On 16/12/15 08:06, Shannon Zhao wrote: >> > Hi, >> > >> > On 2015/12/16 15:31, Shannon Zhao wrote: > But in this case, you're returning an error if it is *not* > initialized. > I understand that in

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Thomas Huth
On 16/12/15 06:56, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log and deliver machine

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Thomas Huth
On 16/12/15 06:56, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log and deliver machine

Re: [PATCH 06/11] KVM: MMU: let page fault handler be aware tracked page

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 03:31 PM, Kai Huang wrote: On 12/15/2015 05:03 PM, Xiao Guangrong wrote: On 12/15/2015 04:11 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: The page fault caused by write access on the write tracked page can not be fixed, it always need to be

Re: [PATCH 08/11] KVM: MMU: use page track for non-leaf shadow pages

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 03:51 PM, Kai Huang wrote: On 12/15/2015 05:10 PM, Xiao Guangrong wrote: On 12/15/2015 03:52 PM, Kai Huang wrote: static bool __mmu_gfn_lpage_is_disallowed(gfn_t gfn, int level, @@ -2140,12 +2150,18 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn

Re: [PATCH v7 19/19] KVM: ARM64: Add a new kvm ARM PMU device

2015-12-16 Thread Marc Zyngier
On 16/12/15 08:06, Shannon Zhao wrote: > Hi, > > On 2015/12/16 15:31, Shannon Zhao wrote: But in this case, you're returning an error if it is *not* initialized. I understand that in that case you cannot return an interrupt number (-1 would be weird), but

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Kai Huang
On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow

Re: [PATCH v7 19/19] KVM: ARM64: Add a new kvm ARM PMU device

2015-12-16 Thread Shannon Zhao
Hi, On 2015/12/16 15:31, Shannon Zhao wrote: >> > But in this case, you're returning an error if it is *not* >> > initialized. >> > I understand that in that case you cannot return an interrupt number >> > (-1 >> > would be weird), but returning -EBUSY feels even more