Is there any consumer of virtio-balloon now?

2014-03-20 Thread Kai Huang
Hi, I see the virtio-balloon is designed for memory auto balloon between KVM host and guest, but from latest linux kernel mainline code, looks currently there's no consumer actually using it? Would you let me know who is the consumer if there's any? Thanks, -Kai -- To unsubscribe from this list:

Re: [PATCH v7 06/11] pvqspinlock, x86: Allow unfair queue spinlock in a KVM guest

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 23:29, H. Peter Anvin ha scritto: > No! Please do what I asked you to do. You are not handling Hyper-V or > VMWare. Just use X86_FEATURE_HYPERVISOR and it will cover all > hypervisors that actually follow Intel's guidelines. And for those that don't, we should turn on X86_FEATUR

Re: [PATCH v4 01/10] hw/mips/cputimer: Don't start periodic timer in KVM mode

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 10:57, James Hogan ha scritto: > On 19/03/14 16:29, Paolo Bonzini wrote: >> Il 14/03/2014 13:47, James Hogan ha scritto: >>> From: Sanjay Lal >>> >>> Compare/Count timer interrupts are handled in-kernel for KVM, so don't >>> bother starting it in QEMU. >>> >>> Signed-off-by: Sanjay L

Re: [PATCH v7 06/11] pvqspinlock, x86: Allow unfair queue spinlock in a KVM guest

2014-03-20 Thread H. Peter Anvin
On 03/20/2014 03:01 PM, Paolo Bonzini wrote: > > No! Please do what I asked you to do. You are not handling Hyper-V or > VMWare. Just use X86_FEATURE_HYPERVISOR and it will cover all > hypervisors that actually follow Intel's guidelines. > And for those that don't, we should turn on X86_FEATU

Re: [PATCH v3] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Thomas Graf
On 03/20/2014 05:02 PM, Zoltan Kiss wrote: --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -464,7 +464,9 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, } nla->nla_len = nla_attr_size(skb->len); - skb_zerocopy(user_skb, s

Re: [PATCH 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 21:24, Alex Williamson ha scritto: > > +void kvm_ioapic_inject_all(struct kvm_ioapic *ioapic, unsigned long irr) > +{ nit, kvm_ioapic_state.irr is a u32 Yes, but for_each_set_bit requires unsigned long. > + u32 idx; > + > + rtc_irq_eoi_tracking_reset(ioapic); > + for_each_se

Re: [PATCH 3/4] KVM: ioapic: extract body of kvm_ioapic_set_irq

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 21:25, Alex Williamson ha scritto: I might choose to keep the "irq_level" variable name in the new functions since dealing with both "edge" and "level" variables is a bit confusing. Good point. Will rename for v2. Paolo -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH v7 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM

2014-03-20 Thread Paolo Bonzini
Il 19/03/2014 21:14, Waiman Long ha scritto: This patch adds the necessary KVM specific code to allow KVM to support the sleeping and CPU kicking operations needed by the queue spinlock PV code. The remaining problem of this patch is that you cannot get the generically optimal configuration: q

Re: [PATCH v7 06/11] pvqspinlock, x86: Allow unfair queue spinlock in a KVM guest

2014-03-20 Thread Paolo Bonzini
Il 19/03/2014 21:14, Waiman Long ha scritto: This patch adds a KVM init function to activate the unfair queue spinlock in a KVM guest when the PARAVIRT_UNFAIR_LOCKS kernel config option is selected. Signed-off-by: Waiman Long --- arch/x86/kernel/kvm.c | 17 + 1 files changed,

Re: [PATCH] target-i386: Remove unused data from local array

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 22:30, Stefan Weil ha scritto: Signed-off-by: Stefan Weil --- This patch is based on a previous patch for the same file, see http://patchwork.ozlabs.org/patch/330708/. Regards Stefan W. target-i386/kvm.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t

[PATCH] target-i386: Remove unused data from local array

2014-03-20 Thread Stefan Weil
Signed-off-by: Stefan Weil --- This patch is based on a previous patch for the same file, see http://patchwork.ozlabs.org/patch/330708/. Regards Stefan W. target-i386/kvm.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 4389

Re: [PATCH v3] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread David Miller
From: Zoltan Kiss Date: Thu, 20 Mar 2014 16:02:34 + > skb_zerocopy can copy elements of the frags array between skbs, but it doesn't > orphan them. Also, it doesn't handle errors, so this patch takes care of that > as well, and modify the callers accordingly. skb_tx_error() is also added to >

Re: [PATCH 3/3] KVM: nVMX: check for null vmcs12 when L1 does invept

2014-03-20 Thread Bandan Das
Paolo Bonzini writes: > Il 20/03/2014 04:28, Bandan Das ha scritto: >> Some L1 hypervisors such as Xen seem to be calling invept after >> vmclear or before vmptrld on L2. In this case, proceed with >> falling through and syncing roots as a case where >> context wide invalidation can't be supporte

Re: [PATCH 3/3] KVM: nVMX: check for null vmcs12 when L1 does invept

2014-03-20 Thread Bandan Das
Jan Kiszka writes: > On 2014-03-20 04:28, Bandan Das wrote: >> Some L1 hypervisors such as Xen seem to be calling invept after >> vmclear or before vmptrld on L2. In this case, proceed with >> falling through and syncing roots as a case where >> context wide invalidation can't be supported > > Ca

Re: [PATCH 2/3] KVM: nVMX: Ack and write vector info to intr_info if L1 asks us to

2014-03-20 Thread Bandan Das
Jan Kiszka writes: > Commit description is missing. > > On 2014-03-20 04:28, Bandan Das wrote: >> Signed-off-by: Bandan Das >> --- >> arch/x86/kvm/irq.c | 1 + >> arch/x86/kvm/vmx.c | 17 + >> 2 files changed, 18 insertions(+) >> >> diff --git a/arch/x86/kvm/irq.c b/arch/x86/k

Re: [PATCH 1/3] KVM: nVMX: Advertise support for interrupt acknowledgement

2014-03-20 Thread Bandan Das
Jan Kiszka writes: > On 2014-03-20 04:28, Bandan Das wrote: >> Some Type 1 hypervisors such as XEN won't enable VMX without it present >> >> Signed-off-by: Bandan Das >> --- >> arch/x86/kvm/vmx.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/arch/x86/kvm/vmx.c

Re: [PATCH 2/4] KVM: ioapic: clear IRR for edge-triggered interrupts at delivery

2014-03-20 Thread Alex Williamson
On Tue, 2014-03-18 at 15:54 +0100, Paolo Bonzini wrote: > This ensures that IRR bits are set in the KVM_GET_IRQCHIP result only if > the interrupt is still sitting in the IOAPIC. After the next patches, it > avoids spurious reinjection of the interrupt when KVM_SET_IRQCHIP is > called. > > Signed

Re: [PATCH 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP

2014-03-20 Thread Alex Williamson
On Tue, 2014-03-18 at 15:54 +0100, Paolo Bonzini wrote: > After the previous patches, an interrupt whose bit is set in the IRR > register will never be in the LAPIC's IRR and has never been injected > on the migration source. So inject it on the destination. > > This fixes migration of Windows gu

Re: [PATCH 3/4] KVM: ioapic: extract body of kvm_ioapic_set_irq

2014-03-20 Thread Alex Williamson
On Tue, 2014-03-18 at 15:54 +0100, Paolo Bonzini wrote: > We will reuse it to process a nonzero IRR that is passed to KVM_SET_IRQCHIP. > > Signed-off-by: Paolo Bonzini > --- > virt/kvm/ioapic.c | 63 > ++- > 1 file changed, 39 insertions(+), 2

Re: [PATCH 1/4] KVM: ioapic: merge ioapic_deliver into ioapic_service

2014-03-20 Thread Alex Williamson
On Tue, 2014-03-18 at 15:54 +0100, Paolo Bonzini wrote: > Commonize the handling of masking, which was absent for kvm_ioapic_set_irq. > Setting remote_irr does not need a separate function either, and merging > the two functions avoids confusion. > > Signed-off-by: Paolo Bonzini > --- > virt/kvm

Re: Demand paging for VM on KVM

2014-03-20 Thread Grigory Makarevich
- Resending to kvm@, as the previous attempt bounced off. Andrea, Paolo, Thanks a lot for the comments. I like the idea of userfaultfd a lot. For my prototype I had to solve a problem of accessing to the ondemand page from the paths where exiting is not safe (emulator is one example). I have s

Re: Demand paging for VM on KVM

2014-03-20 Thread Andrea Arcangeli
Hi, On Thu, Mar 20, 2014 at 02:18:50PM +0100, Paolo Bonzini wrote: > Il 20/03/2014 00:27, Grigory Makarevich ha scritto: > > Hi All, > > > > I have been exploring different ways to implement on-demand paging for > > VMs running in KVM. > > > > The core of the idea is to introduce an additional exi

Outreach Program for Women application deadline extended

2014-03-20 Thread Stefan Hajnoczi
Good news! The deadline for Outreach Program for Women applications to work on QEMU, KVM, or libvirt for 12 weeks this summer has been extended to March 31st 19:00 UTC: https://wiki.gnome.org/OutreachProgramForWomen/2014/MayAugust#Participating_Organizations Outreach Program for Women was started

[PATCH v3] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the callers so they will signal the failed delivery towards the c

Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Zoltan Kiss
On 20/03/14 12:33, Thomas Graf wrote: On 03/20/2014 01:16 PM, Thomas Graf wrote: On 03/19/2014 10:07 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Sign

Re: Demand paging for VM on KVM

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 00:27, Grigory Makarevich ha scritto: Hi All, I have been exploring different ways to implement on-demand paging for VMs running in KVM. The core of the idea is to introduce an additional exit KVM_EXIT_MEMORY_NOT_PRESENT to inform VMM's user space to process access to "not yet pr

Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Thomas Graf
On 03/19/2014 10:07 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss Acked-by: Thomas Graf --- + if (unlikely(skb_orp

Re: [PATCH v4 00/10] KVM Support for MIPS32 Processors

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 11:00, James Hogan ha scritto: > Just a few comments. With what version of the kernel can this be tested? KVM support was added in v3.10, including defconfigs and a CONFIG_KVM_GUEST to ensure the kernel is linked to the different address. Yes, but you still need support for CP0_

Re: [PATCH 3/3] KVM: nVMX: check for null vmcs12 when L1 does invept

2014-03-20 Thread Paolo Bonzini
Il 20/03/2014 04:28, Bandan Das ha scritto: Some L1 hypervisors such as Xen seem to be calling invept after vmclear or before vmptrld on L2. In this case, proceed with falling through and syncing roots as a case where context wide invalidation can't be supported Signed-off-by: Bandan Das --- a

Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Thomas Graf
On 03/20/2014 01:16 PM, Thomas Graf wrote: On 03/19/2014 10:07 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss Acked-by: Tho

Re: [PATCH v4 01/10] hw/mips/cputimer: Don't start periodic timer in KVM mode

2014-03-20 Thread James Hogan
On 19/03/14 16:29, Paolo Bonzini wrote: > Il 14/03/2014 13:47, James Hogan ha scritto: >> From: Sanjay Lal >> >> Compare/Count timer interrupts are handled in-kernel for KVM, so don't >> bother starting it in QEMU. >> >> Signed-off-by: Sanjay Lal >> Signed-off-by: James Hogan >> Reviewed-by: Aur

Re: [PATCH v4 00/10] KVM Support for MIPS32 Processors

2014-03-20 Thread James Hogan
On 19/03/14 16:39, Paolo Bonzini wrote: > Il 14/03/2014 13:47, James Hogan ha scritto: >> This patchset is based on Sanjay Lal's V1 patchset from 2nd March 2013: >> https://patchwork.kernel.org/project/kvm/list/?submitter=51991&state=*&q=qemu-devel >> >> >> I think I've addressed all the V1 feedbac

Re: [PATCH v4 08/10] hw/mips: malta: Add KVM support

2014-03-20 Thread James Hogan
On 19/03/14 16:39, Paolo Bonzini wrote: > Il 14/03/2014 13:47, James Hogan ha scritto: >> int prom_index = 0; >> +uint64_t (*xlate_to_phys) (void *opaque, uint64_t addr); >> +uint64_t (*xlate_to_kseg0) (void *opaque, uint64_t addr); >> + >> >> #ifdef TARGET_WORDS_BIGENDIAN >> big

Re: [PATCH v4 04/10] target-mips: get_physical_address: Add KVM awareness

2014-03-20 Thread James Hogan
On 19/03/14 16:33, Paolo Bonzini wrote: > Il 14/03/2014 13:47, James Hogan ha scritto: >> +if (kvm_enabled()) { >> +/* KVM T&E adds guest kernel segments in useg */ >> +if (real_address >= KVM_KSEG0_BASE) { >> +if (real_address < KVM_KSEG2_BASE) { >> +

Re: [PATCH 3/3] KVM: nVMX: check for null vmcs12 when L1 does invept

2014-03-20 Thread Jan Kiszka
On 2014-03-20 04:28, Bandan Das wrote: > Some L1 hypervisors such as Xen seem to be calling invept after > vmclear or before vmptrld on L2. In this case, proceed with > falling through and syncing roots as a case where > context wide invalidation can't be supported Can we also base this behaviour

Re: [PATCH 2/3] KVM: nVMX: Ack and write vector info to intr_info if L1 asks us to

2014-03-20 Thread Jan Kiszka
Commit description is missing. On 2014-03-20 04:28, Bandan Das wrote: > Signed-off-by: Bandan Das > --- > arch/x86/kvm/irq.c | 1 + > arch/x86/kvm/vmx.c | 17 + > 2 files changed, 18 insertions(+) > > diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c > index 484bc87..bd0da43

Re: [PATCH 1/3] KVM: nVMX: Advertise support for interrupt acknowledgement

2014-03-20 Thread Jan Kiszka
On 2014-03-20 04:28, Bandan Das wrote: > Some Type 1 hypervisors such as XEN won't enable VMX without it present > > Signed-off-by: Bandan Das > --- > arch/x86/kvm/vmx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 39