[PATCH v2] kvm: mmu: don't do memslot overflow check

2015-04-14 Thread Wanpeng Li
As Andres pointed out: | I don't understand the value of this check here. Are we looking for a | broken memslot? Shouldn't this be a BUG_ON? Is this the place to care | about these things? npages is capped to KVM_MEM_MAX_NR_PAGES, i.e. | 2^31. A 64 bit overflow would be caused by a gigantic gfn_st

[PATCH] vhost: use kthread_run macro

2015-04-14 Thread Bandan Das
Code Cleanup, kthread_run is a convenient wrapper around kthread_create() that even wakes up the process for us. Use it and remove no longer needed temp task_struct variable. Signed-off-by: Bandan Das --- drivers/vhost/vhost.c | 12 1 file changed, 4 insertions(+), 8 deletions(-)

[GIT PULL] VFIO updates for v4.1-rc1

2015-04-14 Thread Alex Williamson
Hi Linus, The following changes since commit 06e5801b8cb3fc057d88cb4dc03c0b64b2744cda: Linux 4.0-rc4 (2015-03-15 17:38:20 -0700) are available in the git repository at: git://github.com/awilliam/linux-vfio.git tags/vfio-v4.1-rc1 for you to fetch changes up to 5a0ff17741c1785b27229a16b5ab77

[PATCH 0/2] vfio: Add signal flush and log more verbosely

2015-04-14 Thread Alex Williamson
Fix an issue where signals are not flushed causing our interruptible wait_event to go into a tight loop once a signal is received. Also add more logging throughout. We have no -EBUSY return path for a driver remove request and it's confusing to users when tasks get blocked waiting for the device

[PATCH 1/2] vfio: Flush signals on device request interruption

2015-04-14 Thread Alex Williamson
Signals don't just interrupt our wait, they remain pending such that subsequent wait_events timeout immediately. This can cause a CPU to spin with a single signal. Flush signals if we receive an interruption and also log information about the reason the task is blocked. Signed-off-by: Alex Willi

[PATCH 2/2] vfio-pci: Log device requests more verbosely

2015-04-14 Thread Alex Williamson
Log some clues indicating whether the user is receiving device request interfaces or not listening. This can help indicate why a driver unbind is blocked or explain why QEMU automatically unplugged a device from the VM. Signed-off-by: Alex Williamson --- drivers/vfio/pci/vfio_pci.c |8 +

Re: [PATCH 2/2] kvm: mmu: don't do overflow memslot check

2015-04-14 Thread Andres Lagar-Cavilla
On Mon, Apr 13, 2015 at 10:51 PM, Wanpeng Li wrote: > As Andre pointed out: (Andres) > > | I don't understand the value of this check here. Are we looking for a > | broken memslot? Shouldn't this be a BUG_ON? Is this the place to care > | about these things? npages is capped to KVM_MEM_MAX_NR_PAGE

Re: [PATCH v4 7/8] vhost: feature to set the vring endianness

2015-04-14 Thread Cornelia Huck
On Tue, 14 Apr 2015 17:13:52 +0200 Greg Kurz wrote: > On Tue, 14 Apr 2015 16:20:23 +0200 > Cornelia Huck wrote: > > > On Fri, 10 Apr 2015 12:19:16 +0200 > > Greg Kurz wrote: > > > > > +#ifdef CONFIG_VHOST_SET_ENDIAN_LEGACY > > > +static void vhost_init_is_le(struct vhost_virtqueue *vq) > > >

Re: [PATCH v4 7/8] vhost: feature to set the vring endianness

2015-04-14 Thread Greg Kurz
On Tue, 14 Apr 2015 16:20:23 +0200 Cornelia Huck wrote: > On Fri, 10 Apr 2015 12:19:16 +0200 > Greg Kurz wrote: > > > This patch brings cross-endian support to vhost when used to implement > > legacy virtio devices. Since it is a relatively rare situation, the > > feature availability is contro

Re: [PATCH v4 7/8] vhost: feature to set the vring endianness

2015-04-14 Thread Cornelia Huck
On Fri, 10 Apr 2015 12:19:16 +0200 Greg Kurz wrote: > This patch brings cross-endian support to vhost when used to implement > legacy virtio devices. Since it is a relatively rare situation, the > feature availability is controlled by a kernel config option (not set > by default). > > The vq->is

[Bug 93251] qemu-kvm guests randomly hangs after reboot command in guest

2015-04-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=93251 --- Comment #15 from Igor Mammedov --- Fixed in v4.0 commit 744961341d472db6272ed9b42319a90f5a2aa7c4 kvm: avoid page allocation failure in kvm_set_memory_region() -- You are receiving this mail because: You are watching the assignee of the b

Re: KVM call agenda for 2015-04-14

2015-04-14 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please, send any topic that you are interested in covering. > As there are no agenda, call get cancelled. Later, Juan. > > Call details: > > By popular demand, a google calendar public entry with it > > > https://www.google.com/calendar/embed?src=dG9iMXRqcXAz

Re: [PATCH v2 00/12] Remaining improvements for HV KVM

2015-04-14 Thread Paul Mackerras
On Thu, Apr 09, 2015 at 12:57:58AM +0200, Alexander Graf wrote: > On 03/28/2015 04:21 AM, Paul Mackerras wrote: > >This is the rest of my current patch queue for HV KVM on PPC. This > >series is based on Alex Graf's kvm-ppc-queue branch. The only change > >from the previous version of this series

Re: H_CLEAR_REF and H_CLEAR_MOD

2015-04-14 Thread Paul Mackerras
On Sat, Apr 11, 2015 at 12:57:54PM -0700, Nathan Whitehorn wrote: > > > On 02/18/15 15:33, Nathan Whitehorn wrote: > > > >On 02/18/15 14:00, Paul Mackerras wrote: > >>On Wed, Feb 18, 2015 at 09:34:54AM +0100, Alexander Graf wrote: > Am 18.02.2015 um 07:12 schrieb Nathan Whitehorn > : > >>

Re: [PATCH] KVM: arm: irqfd: fix value returned by kvm_irq_map_gsi

2015-04-14 Thread Christoffer Dall
On Mon, Apr 13, 2015 at 03:01:59PM +0200, Eric Auger wrote: > irqfd/arm curently does not support routing. kvm_irq_map_gsi is > supposed to return all the routing entries associated with the > provided gsi and return the number of those entries. We should > return 0 at this point. > > Signed-off-b

Re: [PATCH v2 10/10] KVM: arm64: add trace points for guest_debug debug

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:08PM +0100, Alex Bennée wrote: > This includes trace points for: > kvm_arch_setup_guest_debug > kvm_arch_clear_guest_debug > kvm_handle_guest_debug > > I've also added some generic register setting trace events so I can > watch the register values being built up

Re: [PATCH v2 4/4] KVM: x86: Clear CR2 on VCPU reset

2015-04-14 Thread Nadav Amit
Wanpeng Li wrote: > Hi Nadav, > On Thu, Apr 02, 2015 at 03:10:38AM +0300, Nadav Amit wrote: >> CR2 is not cleared as it should after reset. See Intel SDM table named >> "IA-32 >> Processor States Following Power-up, Reset, or INIT". > > How you trigger the reset instead of the "Power-up" one?

Re: [PATCH v2 09/10] KVM: arm64: trap nested debug register access

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:07PM +0100, Alex Bennée wrote: > When we are using the hardware registers for guest debug we need to deal > with the guests access to them. There is already a mechanism for dealing > with these accesses so we build on top of that. > > - mdscr_el1_bits is renamed as

Re: [PATCH v2 09/10] KVM: arm64: trap nested debug register access

2015-04-14 Thread Christoffer Dall
On Mon, Apr 13, 2015 at 08:59:21AM +0100, Alex Bennée wrote: [...] > >> + /* MDSCR_EL1 */ > >> + if (r->reg == MDSCR_EL1) { > >> + if (p->is_write) > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1) = > >> + *v

Re: [PATCH v2 08/10] KVM: arm64: guest debug, HW assisted debug support

2015-04-14 Thread Christoffer Dall
On Fri, Apr 10, 2015 at 02:25:21PM +0200, Andrew Jones wrote: [...] > > --- a/arch/arm64/kvm/sys_regs.c > > +++ b/arch/arm64/kvm/sys_regs.c > > @@ -196,16 +196,49 @@ static bool trap_dbgauthstatus_el1(struct kvm_vcpu > > *vcpu, > > * - If the dirty bit is set, save guest registers, restore hos

Re: [PATCH v2 4/4] KVM: x86: Clear CR2 on VCPU reset

2015-04-14 Thread Wanpeng Li
Hi Nadav, On Thu, Apr 02, 2015 at 03:10:38AM +0300, Nadav Amit wrote: >CR2 is not cleared as it should after reset. See Intel SDM table named "IA-32 >Processor States Following Power-up, Reset, or INIT". How you trigger the reset instead of the "Power-up" one? Regards, Wanpeng Li > >Signed-off

Re: [PATCH v2 08/10] KVM: arm64: guest debug, HW assisted debug support

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:06PM +0100, Alex Bennée wrote: > This adds support for userspace to control the HW debug registers for > guest debug. We'll only copy the $ARCH defined number across as that is > all that hyp.S will use anyway. I don't really understand what this sentence means? > I

Re: [PATCH v2 07/10] KVM: arm64: guest debug, add support for single-step

2015-04-14 Thread Christoffer Dall
Hi Alex, On Tue, Mar 31, 2015 at 04:08:05PM +0100, Alex Bennée wrote: > This adds support for single-stepping the guest. As userspace can and > will manipulate guest registers before restarting any tweaking of the > registers has to occur just before control is passed back to the guest. this sent

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: > This adds support for SW breakpoints inserted by userspace. > > We do this by trapping all BKPT exceptions in the > hypervisor (MDCR_EL2_TDE). you mean trapping all exceptions in the guest to the hypervisor? > The kvm_debug_exit_arch

Re: [PATCH v2 02/10] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-04-14 Thread Christoffer Dall
On Mon, Apr 13, 2015 at 03:51:33PM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Tue, Mar 31, 2015 at 04:08:00PM +0100, Alex Bennée wrote: > >> Currently x86, powerpc and soon arm64 use the same two architecture > >> specific bits for guest debug support for software and hardwa

Re: [PATCH v2 04/10] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl

2015-04-14 Thread Alex Bennée
David Hildenbrand writes: >> On Tue, Mar 31, 2015 at 04:08:02PM +0100, Alex Bennée wrote: >> > This commit adds a stub function to support the KVM_SET_GUEST_DEBUG >> > ioctl. Currently any operation flag will return EINVAL. Actual >> > functionality will be added with further patches. >> > >> >

RE: [v3 24/26] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-04-14 Thread Wu, Feng
> -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Tuesday, March 31, 2015 7:56 AM > To: Wu, Feng > Cc: h...@zytor.com; t...@linutronix.de; mi...@redhat.com; x...@kernel.org; > g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; > j...@8bytes.org; ale

Re: SVM: vmload/vmsave-free VM exits?

2015-04-14 Thread Valentine Sinitsyn
On 14.04.2015 12:02, Jan Kiszka wrote: What am I missing here? Nothing. As I said in the other branch of this thread, Jailhouse is not affected as it doesn't use the IST. Only KVM is because Linux - in host mode - requires it for the cases Avi mentioned. Then what I am missing is correct discus

Re: SVM: vmload/vmsave-free VM exits?

2015-04-14 Thread Jan Kiszka
On 2015-04-14 08:39, Valentine Sinitsyn wrote: > Hi all, > > On 13.04.2015 22:41, Avi Kivity wrote: >> On 04/13/2015 08:35 PM, Jan Kiszka wrote: >>> On 2015-04-13 19:29, Avi Kivity wrote: On 04/13/2015 10:01 AM, Jan Kiszka wrote: > On 2015-04-07 07:43, Jan Kiszka wrote: >> On 2015-04-