[GIT PULL] KVM/ARM Changes for 3.10

2013-04-28 Thread Christoffer Dall
Hi Marcelo and Gleb, These are the changes for KVM/ARM for 3.10. The patches depend on the cleanup branch, which you've already merged. Main thing is the reworking of Hyp idmaps, which is now handled by KVM instead of arm/mm and includes several nasty bug fixes from Marc in the progress. Thanks

Re: [PATCH v2] virtio-net: fill only rx queues which are being used

2013-04-28 Thread Rusty Russell
Sasha Levin writes: > Due to MQ support we may allocate a whole bunch of rx queues but > never use them. With this patch we'll safe the space used by > the receive buffers until they are actually in use: Thanks, applied! Cheers, Rusty. > > sh-4.2# free -h > total used f

Re: [PATCH] kvm tools: virtio-net mergable rx buffers

2013-04-28 Thread Sasha Levin
On 04/28/2013 08:44 PM, Rusty Russell wrote: > "Michael S. Tsirkin" writes: >> > On Wed, Apr 24, 2013 at 09:51:57AM +0300, Pekka Enberg wrote: >>> >> Hi, >>> >> >>> >> On 04/23/2013 12:35 PM, Eric Northup wrote: > >> >> Do you care about guests with drivers that don't negotiate > >> >> VI

Re: [PATCH] kvm tools: virtio-net mergable rx buffers

2013-04-28 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Apr 24, 2013 at 09:51:57AM +0300, Pekka Enberg wrote: >> Hi, >> >> On 04/23/2013 12:35 PM, Eric Northup wrote: >> >> Do you care about guests with drivers that don't negotiate >> >> VIRTIO_NET_F_MRG_RXBUF? >> >> On Wed, Apr 24, 2013 at 5:51 AM, Sasha Levin

Re: suggesting wording fixes for virtio-spec 0.9.5

2013-04-28 Thread Rusty Russell
Laszlo Ersek writes: > On 04/23/13 06:05, Rusty Russell wrote: >> Laszlo Ersek writes: >>> Hi, >>> >>> (I'm not subscribed to either list,) >>> >>> using the word "descriptor" is misleading in the following sections: >> >> Yes, I like the use of 'descriptor chains'. This is a definite >> improv

[PATCH] KVM: x86: Account for failing enable_irq_window for NMI window request

2013-04-28 Thread Jan Kiszka
From: Jan Kiszka With VMX, enable_irq_window can now return -EBUSY, in which case an immediate exit shall be requested before entering the guest. Account for this also in enable_nmi_window which uses enable_irq_window in absence of vnmi support, e.g. Signed-off-by: Jan Kiszka --- arch/x86/incl

Booting physically installed Windows while in Arch (AHCI support in OVMF?)

2013-04-28 Thread Evert Heylen
Hi all, My situation is the following: My PC (x64) has an UEFI capable motherboard (ASRock Z77). On my hard drive (which is GPT formatted ofc), I have Windows 7 installed on /dev/sda3 and Arch Linux on /dev/sda2. I can boot both OS'es. However, I would like to boot Windows while in Arch, using KVM.

Re: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run

2013-04-28 Thread Jan Kiszka
On 2013-04-28 18:20, Ren, Yongjie wrote: >> -Original Message- >> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] >> On Behalf Of Gleb Natapov >> Sent: Sunday, April 28, 2013 10:34 PM >> To: Ren, Yongjie >> Cc: Jan Kiszka; Marcelo Tosatti; kvm; Nakajima, Jun >> Subject: R

RE: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run

2013-04-28 Thread Ren, Yongjie
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Gleb Natapov > Sent: Sunday, April 28, 2013 10:34 PM > To: Ren, Yongjie > Cc: Jan Kiszka; Marcelo Tosatti; kvm; Nakajima, Jun > Subject: Re: [PATCH] KVM: nVMX: Skip PF interception check

Re: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run

2013-04-28 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 02:30:38PM +, Ren, Yongjie wrote: > > -Original Message- > > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > > On Behalf Of Jan Kiszka > > Sent: Sunday, April 28, 2013 3:25 PM > > To: Gleb Natapov; Marcelo Tosatti > > Cc: kvm; Nakajima, Jun;

RE: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run

2013-04-28 Thread Ren, Yongjie
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] > On Behalf Of Jan Kiszka > Sent: Sunday, April 28, 2013 3:25 PM > To: Gleb Natapov; Marcelo Tosatti > Cc: kvm; Nakajima, Jun; Ren, Yongjie > Subject: [PATCH] KVM: nVMX: Skip PF interception check when

Re: [PATCH v6 1/2] vhost: Allow device specific fields per vq

2013-04-28 Thread Michael S. Tsirkin
On Sat, Apr 27, 2013 at 11:16:48AM +0800, Asias He wrote: > This is useful for any device who wants device specific fields per vq. > For example, tcm_vhost wants a per vq field to track requests which are > in flight on the vq. Also, on top of this we can add patches to move > things like ubufs fro

Re: [PATCH] tcm_vhost: Add vhost_scsi as an alias for tcm_vhost

2013-04-28 Thread Michael S. Tsirkin
On Sat, Apr 27, 2013 at 11:42:09AM +0800, Asias He wrote: > Signed-off-by: Asias He Makes sense. Acked-by: Michael S. Tsirkin In fact, how about we turn this around, and rename tcm_vhost.c to scsi.c and module to vhost_scsi, make tcm_vhost an alias? > --- > drivers/vhost/tcm_vhost.c | 1 + >

Re: [PATCH v6 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-28 Thread Michael S. Tsirkin
On Sun, Apr 28, 2013 at 06:55:20PM +0800, Asias He wrote: > On Sun, Apr 28, 2013 at 12:27:15PM +0300, Michael S. Tsirkin wrote: > > On Sun, Apr 28, 2013 at 04:52:08PM +0800, Asias He wrote: > > > On Sun, Apr 28, 2013 at 11:24:00AM +0300, Michael S. Tsirkin wrote: > > > > On Sun, Apr 28, 2013 at 03:

Re: [PATCH v5 0/8] In-kernel XICS interrupt controller emulation

2013-04-28 Thread Paul Mackerras
On Sun, Apr 28, 2013 at 11:50:49AM +0200, Alexander Graf wrote: > > On 27.04.2013, at 10:36, Paul Mackerras wrote: > > > On Fri, Apr 26, 2013 at 04:30:37PM +0200, Alexander Graf wrote: > >> Very nice patch set. I've applie 1-7 of it to kvm-ppc-queue. So they will > >> hopefully make it to 3.10.

[PATCH v2] KVM: x86: Remove support for reporting coalesced APIC IRQs

2013-04-28 Thread Jan Kiszka
From: Jan Kiszka Since the arrival of posted interrupt support we can no longer guarantee that coalesced IRQs are always reported to the IRQ source. Moreover, accumulated APIC timer events could cause a busy loop when a VCPU should rather be halted. The consensus is to remove coalesced tracking f

Re: [PATCH] KVM: x86: Remove support for reporting coalesced APIC IRQs

2013-04-28 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 01:27:00PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Since the arrival of posted interrupt support we can no longer guarantee > that coalesced IRQs are always reported to the IRQ source. Moreover, > accumulated APIC timer events could cause a busy loop when a VCPU sh

[PATCH] KVM: x86: Remove support for reporting coalesced APIC IRQs

2013-04-28 Thread Jan Kiszka
From: Jan Kiszka Since the arrival of posted interrupt support we can no longer guarantee that coalesced IRQs are always reported to the IRQ source. Moreover, accumulated APIC timer events could cause a busy loop when a VCPU should rather be halted. The consensus is to remove coalesced tracking f

Re: [PATCH v6 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-28 Thread Asias He
On Sun, Apr 28, 2013 at 12:27:15PM +0300, Michael S. Tsirkin wrote: > On Sun, Apr 28, 2013 at 04:52:08PM +0800, Asias He wrote: > > On Sun, Apr 28, 2013 at 11:24:00AM +0300, Michael S. Tsirkin wrote: > > > On Sun, Apr 28, 2013 at 03:48:23PM +0800, Asias He wrote: > > > > On Sat, Apr 27, 2013 at 10:

Re: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run

2013-04-28 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 09:24:41AM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > While a nested run is pending, vmx_queue_exception is only called to > requeue exceptions that were previously picked up via > vmx_cancel_injection. Therefore, we must not check for PF interception > by L1, possibl

Re: [PATCH -next] ia64, metag: Do not export min_low_pfn in arch-specific code

2013-04-28 Thread James Hogan
On 27 April 2013 19:20, Geert Uytterhoeven wrote: > As of commit 787dcbe6984b3638e94f60d807dcb51bb8a07211 ("MIPS: Export > symbols used by KVM/MIPS module"), min_low_pfn is already exported by > the generic mm/bootmem.c, causing: > > WARNING: vmlinux: 'min_low_pfn' exported twice. Previous export

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-04-28 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 12:20:12PM +0200, Jan Kiszka wrote: > On 2013-04-28 12:19, Gleb Natapov wrote: > > On Sun, Apr 28, 2013 at 12:15:05PM +0200, Jan Kiszka wrote: > >> On 2013-03-17 09:47, Gleb Natapov wrote: > >>> On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote: > From: Jan Kis

Re: [PATCH] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state

2013-04-28 Thread Jan Kiszka
On 2013-02-23 22:35, Jan Kiszka wrote: > From: Jan Kiszka > > Likely a typo, but a fatal one as kvm_set_cr0 performs checks on the > state transition that may prevent loading L1's cr0. > > Signed-off-by: Jan Kiszka > --- > arch/x86/kvm/vmx.c |2 +- > 1 files changed, 1 insertions(+), 1 del

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-04-28 Thread Jan Kiszka
On 2013-04-28 12:19, Gleb Natapov wrote: > On Sun, Apr 28, 2013 at 12:15:05PM +0200, Jan Kiszka wrote: >> On 2013-03-17 09:47, Gleb Natapov wrote: >>> On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote: From: Jan Kiszka If the guest didn't take the last APIC timer interrupt

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-04-28 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 12:15:05PM +0200, Jan Kiszka wrote: > On 2013-03-17 09:47, Gleb Natapov wrote: > > On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> If the guest didn't take the last APIC timer interrupt yet and generates > >> another one on top, e

Re: [PATCH] KVM: x86: Increase the "hard" max VCPU limit

2013-04-28 Thread Gleb Natapov
On Sat, Apr 27, 2013 at 06:31:04PM -0700, Chegu Vinod wrote: > KVM guests today use 8bit APIC ids allowing for 256 ID's. Reserving one > ID for Broadcast interrupts should leave 255 ID's. In case of KVM there > is no need for reserving another ID for IO-APIC so the hard max limit for > VCPUS can be

Re: [PATCH] KVM: x86: Avoid busy loops over uninjectable pending APIC timers

2013-04-28 Thread Jan Kiszka
On 2013-03-17 09:47, Gleb Natapov wrote: > On Sat, Mar 16, 2013 at 09:49:07PM +0100, Jan Kiszka wrote: >> From: Jan Kiszka >> >> If the guest didn't take the last APIC timer interrupt yet and generates >> another one on top, e.g. via periodic mode, we do not block the VCPU >> even if the guest sta

Re: [PATCH] kvm: Allow build-time configuration of KVM device assignment

2013-04-28 Thread Gleb Natapov
On Tue, Apr 16, 2013 at 01:49:18PM -0600, Alex Williamson wrote: > We hope to at some point deprecate KVM legacy device assignment in > favor of VFIO-based assignment. Towards that end, allow legacy > device assignment to be deconfigured. > > Signed-off-by: Alex Williamson Applied, thanks. > --

Re: [PULL 00/42] ppc patch queue 2013-04-26 for 3.10

2013-04-28 Thread Gleb Natapov
On Fri, Apr 26, 2013 at 08:29:55PM +0200, Alexander Graf wrote: > Hi Marcelo / Gleb, > > This is my current patch queue for ppc. Please pull into next for 3.10. > > Highlights this time are: > > - BookE: in-kernel MPIC emulation with irqfd support > - Book3S: in-kernel XICS emulation (incom

Re: [Bug 53611] New: nVMX: Add nested EPT

2013-04-28 Thread Jan Kiszka
On 2013-04-26 18:07, Nakajima, Jun wrote: > On Thu, Apr 25, 2013 at 11:26 PM, Jan Kiszka wrote: > >> That's great but - as Gleb already said - unfortunately not yet usable. >> I'd like to rebase my fixes and enhancements (unrestricted guest mode >> specifically) on top these days, and also run so

Re: [PATCH v5 0/8] In-kernel XICS interrupt controller emulation

2013-04-28 Thread Alexander Graf
On 27.04.2013, at 10:36, Paul Mackerras wrote: > On Fri, Apr 26, 2013 at 04:30:37PM +0200, Alexander Graf wrote: >> Very nice patch set. I've applie 1-7 of it to kvm-ppc-queue. So they will >> hopefully make it to 3.10. >> >> Please check for 8/8 whether >> >> a) You want to have a released k

Re: [PATCH 34/42] kvm: destroy emulated devices on VM exit

2013-04-28 Thread Alexander Graf
On 28.04.2013, at 07:43, Gleb Natapov wrote: > On Fri, Apr 26, 2013 at 08:30:29PM +0200, Alexander Graf wrote: >> From: Scott Wood >> >> The hassle of getting refcounting right was greater than the hassle >> of keeping a list of devices to destroy on VM exit. >> >> Signed-off-by: Scott Wood >

Re: [PATCH 16/42] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS

2013-04-28 Thread Alexander Graf
On 28.04.2013, at 07:41, Gleb Natapov wrote: > On Fri, Apr 26, 2013 at 08:30:11PM +0200, Alexander Graf wrote: >> The concept of routing interrupt lines to an irqchip is nothing >> that is IOAPIC specific. Every irqchip has a maximum number of pins >> that can be linked to irq lines. >> >> So le

Re: [PATCH] kvm, svm: Fix typo in printk message

2013-04-28 Thread Gleb Natapov
On Fri, Apr 26, 2013 at 12:22:01AM +0200, Borislav Petkov wrote: > From: Borislav Petkov > > It is "exit_int_info". It is actually EXITINTINFO in the official docs > but we don't like screaming docs. > > Signed-off-by: Borislav Petkov Applied, thanks. > --- > arch/x86/kvm/svm.c | 2 +- > 1 fi

Re: [PATCH 11/11] nEPT: Provide the correct exit qualification upon EPT

2013-04-28 Thread Jan Kiszka
On 2013-04-27 08:42, Xu, Xinhao wrote: > From 2df72c1e8e3b167a6008ab11e2a68d734c68e425 Mon Sep 17 00:00:00 2001 > From: Xinhao Xu > Date: Sat, 27 Apr 2013 05:45:49 +0800 > Subject: [PATCH] nEPT: Check EPT misconfiguration while walking addr & move > pte > check code to vmx.c Please fix up the s

Re: [PATCH v6 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-28 Thread Michael S. Tsirkin
On Sun, Apr 28, 2013 at 04:52:08PM +0800, Asias He wrote: > On Sun, Apr 28, 2013 at 11:24:00AM +0300, Michael S. Tsirkin wrote: > > On Sun, Apr 28, 2013 at 03:48:23PM +0800, Asias He wrote: > > > On Sat, Apr 27, 2013 at 10:40:41PM +0300, Michael S. Tsirkin wrote: > > > > On Sat, Apr 27, 2013 at 11:

Re: [PATCH 07/11] nEPT: Advertise EPT to L1

2013-04-28 Thread Jan Kiszka
On 2013-04-26 08:43, Jun Nakajima wrote: > Advertise the support of EPT to the L1 guest, through the appropriate MSR. > > This is the last patch of the basic Nested EPT feature, so as to allow > bisection through this patch series: The guest will not see EPT support until > this last patch, and wi

Re: [PATCH v6 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-28 Thread Asias He
On Sun, Apr 28, 2013 at 11:24:00AM +0300, Michael S. Tsirkin wrote: > On Sun, Apr 28, 2013 at 03:48:23PM +0800, Asias He wrote: > > On Sat, Apr 27, 2013 at 10:40:41PM +0300, Michael S. Tsirkin wrote: > > > On Sat, Apr 27, 2013 at 11:16:49AM +0800, Asias He wrote: > > > > Unlike tcm_vhost_evt reques

[PATCH] KVM: x86: Rework request for immediate exit

2013-04-28 Thread Jan Kiszka
From: Jan Kiszka The VMX implementation of enable_irq_window raised KVM_REQ_IMMEDIATE_EXIT after we checked it in vcpu_enter_guest. This caused infinite loops on vmentry. Fix it by letting enable_irq_window signal the need for an immediate exit via its return value and drop KVM_REQ_IMMEDIATE_EXIT

Re: [PATCH] KVM: x86: Check KVM_REQ_IMMEDIATE_EXIT after enable_irq_window

2013-04-28 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 09:23:58AM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > The VMX implementation of enable_irq_window will raise > KVM_REQ_IMMEDIATE_EXIT if an interrupt window shall be opened during > nested vmrun. We have to transfer this request into the local variable > to avoid loop

Re: [PATCH v6 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-28 Thread Michael S. Tsirkin
On Sun, Apr 28, 2013 at 03:48:23PM +0800, Asias He wrote: > On Sat, Apr 27, 2013 at 10:40:41PM +0300, Michael S. Tsirkin wrote: > > On Sat, Apr 27, 2013 at 11:16:49AM +0800, Asias He wrote: > > > Unlike tcm_vhost_evt requests, tcm_vhost_cmd requests are passed to the > > > target core system, we ca

Re: [PATCH v6 2/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-04-28 Thread Asias He
On Sat, Apr 27, 2013 at 10:40:41PM +0300, Michael S. Tsirkin wrote: > On Sat, Apr 27, 2013 at 11:16:49AM +0800, Asias He wrote: > > Unlike tcm_vhost_evt requests, tcm_vhost_cmd requests are passed to the > > target core system, we can not make sure all the pending requests will > > be finished by f

[PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run

2013-04-28 Thread Jan Kiszka
From: Jan Kiszka While a nested run is pending, vmx_queue_exception is only called to requeue exceptions that were previously picked up via vmx_cancel_injection. Therefore, we must not check for PF interception by L1, possibly causing a bogus nested vmexit. Signed-off-by: Jan Kiszka --- This a

[PATCH] KVM: x86: Check KVM_REQ_IMMEDIATE_EXIT after enable_irq_window

2013-04-28 Thread Jan Kiszka
From: Jan Kiszka The VMX implementation of enable_irq_window will raise KVM_REQ_IMMEDIATE_EXIT if an interrupt window shall be opened during nested vmrun. We have to transfer this request into the local variable to avoid looping over a continuously re-asserted request on vmentry. This issue only