Re: [PATCH] kvm: Fix kvmclock initialization on !CONFIG_KVM_GUEST

2012-08-17 Thread OGAWA Hirofumi
Marcelo Tosatti writes: >> Yes, it was an another option to fix this. As note, the wrong percpu >> usage (use it before initialization) is still true even if merged >> KVM_CLOCK. > > Its fine, i believe, because there is a percpu area for the "boot > processor" (see __per_cpu_offset at arch/x86/k

Re: guest MAC leaking into world, packets don't return

2012-08-17 Thread Matthew Patton
gah, I hate it when I miss an already filed bug. https://bugzilla.redhat.com/show_bug.cgi?id=623199 However the problem has apparently not be fixed for good. Even though the above is marked resolved. A regression? Or another wrinkle that was missed? -- To unsubscribe from this list: send the

Re: [regression] virtio net locks up

2012-08-17 Thread Bernd Schubert
On 08/12/2012 01:45 PM, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2012 at 08:08:31PM +0200, Bernd Schubert wrote: >> On 07/30/2012 07:33 PM, Bernd Schubert wrote: >>> Hello Stefan, >>> >>> Stefan Hajnoczi gmail.com> writes: On Wed, Jan 11, 2012 at 4:18 PM, Bernd Schubert itwm.fra

guest MAC leaking into world, packets don't return

2012-08-17 Thread Matthew Patton
My quick search thru the archives didn't turn up a match. I didn't see anything obvious in bugzilla.redhat.com either. Hopefully my search-foo was sufficient to not offend. In the interst of keeping this short, I have a longer writeup with various 'virsh' output over at http://www.linux-kvm

Re: [PATCH 29/38] KVM: PPC: Book3S: PR: Rework irq disabling

2012-08-17 Thread Benjamin Herrenschmidt
> > +/* Please call after prepare_to_enter. This function puts the lazy ee state > + back to normal mode, without actually enabling interrupts. */ > +static inline void kvmppc_lazy_ee_enable(void) > +{ > +#ifdef CONFIG_PPC64 > + /* Only need to enable IRQs by hard enabling them after this *

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-08-17 Thread Benjamin Herrenschmidt
On Fri, 2012-08-17 at 15:39 -0300, Marcelo Tosatti wrote: > On Fri, Aug 17, 2012 at 05:06:18PM +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2012-08-15 at 14:59 -0300, Marcelo Tosatti wrote: > > > > > > The guest should not expect memory accesses to an address > > > to behave sanely while chang

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-08-17 Thread Marcelo Tosatti
On Fri, Aug 17, 2012 at 05:06:18PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-08-15 at 14:59 -0300, Marcelo Tosatti wrote: > > > > The guest should not expect memory accesses to an address > > to behave sanely while changing a BAR anyway. > > > > Yes, compatibility for change of GPA base

Re: [PATCH] kvm: Fix kvmclock initialization on !CONFIG_KVM_GUEST

2012-08-17 Thread Marcelo Tosatti
On Fri, Aug 17, 2012 at 09:10:42AM +0900, OGAWA Hirofumi wrote: > Marcelo Tosatti writes: > > > On Wed, Aug 15, 2012 at 11:05:57PM +0900, OGAWA Hirofumi wrote: > >> > >> If !CONFIG_KVM_GUEST, kvm_smp_prepare_boot_cpu() is not defined. So, > >> kvm_register_clock("primary cpu clock") in kvm_smp_p

Re: [PATCH v3] KVM: x86 emulator: access GPRs on demand

2012-08-17 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 05:54:49PM +0300, Avi Kivity wrote: > Instead of populating the the entire register file, read in registers > as they are accessed, and write back only the modified ones. This > saves a VMREAD and VMWRITE on Intel (for rsp, since it is not usually > used during emulation),

[Bug 30402] Debian 4 fails to boot in KVM

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=30402 Alan changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-08-17 Thread Jan Kiszka
On 2012-08-17 16:41, Jan Kiszka wrote: > On 2012-08-17 16:36, Jan Kiszka wrote: >> On 2012-08-17 15:11, Jan Kiszka wrote: >>> On 2012-08-06 17:11, Stefan Hajnoczi wrote: On Thu, Jun 28, 2012 at 2:05 PM, Peter Lieven wrote: > i debugged my initial problem further and found out that the pro

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-08-17 Thread Jan Kiszka
On 2012-08-17 16:36, Jan Kiszka wrote: > On 2012-08-17 15:11, Jan Kiszka wrote: >> On 2012-08-06 17:11, Stefan Hajnoczi wrote: >>> On Thu, Jun 28, 2012 at 2:05 PM, Peter Lieven wrote: i debugged my initial problem further and found out that the problem happens to be that the m

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-08-17 Thread Jan Kiszka
On 2012-08-17 15:11, Jan Kiszka wrote: > On 2012-08-06 17:11, Stefan Hajnoczi wrote: >> On Thu, Jun 28, 2012 at 2:05 PM, Peter Lieven wrote: >>> i debugged my initial problem further and found out that the problem happens >>> to be that >>> the main thread is stuck in pause_all_vcpus() on reset or

Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-08-17 Thread Jan Kiszka
On 2012-08-06 17:11, Stefan Hajnoczi wrote: > On Thu, Jun 28, 2012 at 2:05 PM, Peter Lieven wrote: >> i debugged my initial problem further and found out that the problem happens >> to be that >> the main thread is stuck in pause_all_vcpus() on reset or quit commands in >> the monitor >> if one cp

Re: [PULL 3.6 0/3] ppc patch queue 2012-08-16 for 3.6

2012-08-17 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 02:16:50PM +0200, Alexander Graf wrote: > Hi Avi, > > This is my patch queue for ppc patches that should go into 3.6. Please pull. > > * Fix memset in e500_tlb > * Fix icache flush when mapping executable pages > * Fix wrong branch in book3s hv code > > Alex > >

Re: Windows slow boot: contractor wanted

2012-08-17 Thread Robert Vineyard
Richard, Not sure if you've tried this, but I noticed massive performance gains (easily booting 2-3 times as fast) by converting from RAW disk images to direct-mapped raw partitions and making sure that IOMMU support was enabled in the BIOS and in the kernel at boot time. The obvious downside

[Bug 46101] > qemu-kvm-1.1.1-r1 - USB activkey doesn't work anymore

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=46101 --- Comment #2 from Alessandro Surace 2012-08-17 12:47:27 --- Clear this is not a kernel problem. I thought this was the right place for userspace tool bug. The problem started from qemu-kvm-1.1.1 version. I will open a bug on launchpad.

Re: Windows slow boot: contractor wanted

2012-08-17 Thread Richard Davies
Hi Avi, Thanks to you and several others for offering help. We will work with Avi at first, but are grateful for all the other offers of help. We have a number of other qemu-related projects which we'd be interested in getting done, and will get in touch with these names (and anyone else who comes

[Bug 46101] > qemu-kvm-1.1.1-r1 - USB activkey doesn't work anymore

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=46101 Michael Tokarev changed: What|Removed |Added CC||m...@tls.msk.ru --- Comment #1 from

[Bug 46101] > qemu-kvm-1.1.1-r1 - USB activkey doesn't work anymore

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=46101 Alessandro Surace changed: What|Removed |Added Platform|All |x86-64 -- Configure bugmail: htt

[Bug 46101] > qemu-kvm-1.1.1-r1 - USB activkey doesn't work anymore

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=46101 Alessandro Surace changed: What|Removed |Added Kernel Version||3.2.1-gentoo-r2 -- Configure bug

[Bug 46101] New: > qemu-kvm-1.1.1-r1 - USB activkey doesn't work anymore

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=46101 Summary: > qemu-kvm-1.1.1-r1 - USB activkey doesn't work anymore Product: Virtualization Version: unspecified Platform: All OS/Version: Linux Tree: Mainline

[Bug 30042] page allocation failure when using jumbo frames with kvm guests

2012-08-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=30042 Alan changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: [PATCH v3 2/7] memory: Flush coalesced MMIO on selected region access

2012-08-17 Thread Jan Kiszka
On 2012-07-10 12:41, Jan Kiszka wrote: > On 2012-07-02 11:07, Avi Kivity wrote: >> On 06/29/2012 07:37 PM, Jan Kiszka wrote: >>> Instead of flushing pending coalesced MMIO requests on every vmexit, >>> this provides a mechanism to selectively flush when memory regions >>> related to the coalesced o

Re: [PATCH 1/7] powerpc/kvm: Fix updates of vcpu->cpu on HV KVM

2012-08-17 Thread Paul Mackerras
On Fri, Aug 17, 2012 at 06:38:03PM +1000, Benjamin Herrenschmidt wrote: > This patch removes the powerpc "generic" updates of vcpu->cpu in > load and put, and moves them to the various backends. > > The reason is that "HV" KVM does its own sauce with that field > and the generic updates might corr

Re: [PATCH 2/7] powerpc/kvm: Remove bogus update of thread IDs in HV KVM

2012-08-17 Thread Paul Mackerras
On Fri, Aug 17, 2012 at 06:38:29PM +1000, Benjamin Herrenschmidt wrote: > When making a vcpu non-runnable we incorrectly changed the > thread IDs of all other threads on the core, just remove that > code. > > Signed-off-by: Benjamin Herrenschmidt Acked-by: Paul Mackerras -- To unsubscribe from

Re: [PATCH V2] kvm tools: Add initial virtio-scsi support

2012-08-17 Thread Pekka Enberg
On Fri, Aug 17, 2012 at 12:26 PM, Asias He wrote: > This patch brings virito-scsi support to kvm tool. > > With the introduce of tcm_vhost (vhost-scsi) > >tcm_vhost: Initial merge for vhost level target fabric driver > > we can implement virito-scsi by simply having vhost-scsi to handle the >

[PATCH V2] kvm tools: Add initial virtio-scsi support

2012-08-17 Thread Asias He
This patch brings virito-scsi support to kvm tool. With the introduce of tcm_vhost (vhost-scsi) tcm_vhost: Initial merge for vhost level target fabric driver we can implement virito-scsi by simply having vhost-scsi to handle the SCSI command. Howto use: 1) Setup the tcm_vhost target through

[PATCH 5/7] powerpc/kvm/xics: Switch ICP to use atomic updates

2012-08-17 Thread Benjamin Herrenschmidt
This changes the implementation of the ICP (presentation controller which is attached to each CPU) to operate based on an atomic update mechanism rather than mutexes. This is done to make it possible to implement large portions of it to work in "real mode" (ie. MMU off) in order to speed things up

[PATCH 2/7] powerpc/kvm: Remove bogus update of thread IDs in HV KVM

2012-08-17 Thread Benjamin Herrenschmidt
When making a vcpu non-runnable we incorrectly changed the thread IDs of all other threads on the core, just remove that code. Signed-off-by: Benjamin Herrenschmidt --- This is a bug fix and thus should probably be merged ASAP arch/powerpc/kvm/book3s_hv.c |6 -- 1 file changed, 6 deleti

Fwd: [libvirt-users] vm pxe fail

2012-08-17 Thread Alex Jia
- Forwarded Message - From: "Andrew Holway" To: "Alex Jia" Cc: kvm@vger.kernel.org Sent: Friday, August 17, 2012 4:24:33 PM Subject: Re: [libvirt-users] vm pxe fail Hello, On Aug 17, 2012, at 4:34 AM, Alex Jia wrote: > Hi Andrew, > I can't confirm a root reason based on your informatio

[PATCH 4/7] powerpc/kvm/xics: Add kernel emulation for the XICS interrupt controller

2012-08-17 Thread Benjamin Herrenschmidt
This is an initial variant of the in-kernel XICS emulation for both HV and PR KVM running in PAPR mode. This is based on an initial implementation by Michael Ellerman reworked by myself. It supports up to 4095 "BUID" (blocks of interrupts) of up to 4096 interrupts each. Signed-off-by: Benjamin

[PATCH 3/7] powerpc/kvm: Add infrastructure to implement kernel-side RTAS calls

2012-08-17 Thread Benjamin Herrenschmidt
For pseries machine emulation, in order to move the interrupt controller code to the kernel, we need to intercept some RTAS calls in the kernel itself Signed-off-by: Michael Ellerman Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/hvcall.h |3 + arch/powerpc/include/asm

[PATCH 7/7] powerpc/kvm/xics: Add support for real mode ICP

2012-08-17 Thread Benjamin Herrenschmidt
This adds an implementation of the XICS hypercalls in real mode for HV KVM which allows us to avoid exiting the guest MMU context on all threads for a variety of operations such as fetching a pending interrupt, EOI of messages, IPIs, ... Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kvm

[PATCH 6/7] powerpc/kvm: Speed up wakeups of CPUs on HV KVM

2012-08-17 Thread Benjamin Herrenschmidt
Currently, we wake up a CPUs by sending a host IPI with smp_send_reschedule() to thread 0 of that core, which will take all threads out of the guest, and cause them to re-evalutate their interrupt status on the way back in. This adds a mechanism to differenciate real host IPIs and IPIs sent by KVM

[PATCH 1/7] powerpc/kvm: Fix updates of vcpu->cpu on HV KVM

2012-08-17 Thread Benjamin Herrenschmidt
This patch removes the powerpc "generic" updates of vcpu->cpu in load and put, and moves them to the various backends. The reason is that "HV" KVM does its own sauce with that field and the generic updates might corrupt it. The field contains the CPU# of the -first- HW CPU of the core always for a

Re: [libvirt-users] vm pxe fail

2012-08-17 Thread Andrew Holway
Hello, On Aug 17, 2012, at 4:34 AM, Alex Jia wrote: > Hi Andrew, > I can't confirm a root reason based on your information, perhaps you may > try to find a reason by yourself via the following docs: > > http://wiki.libvirt.org/page/PXE_boot_%28or_dhcp%29_on_guest_failed > (Troubleshooting) > h

Re: [Qemu-devel] x86, nops settings result in kernel crash

2012-08-17 Thread Borislav Petkov
On Fri, Aug 17, 2012 at 03:43:56AM -0400, Tomas Racek wrote: > Well, I've added some debug statements to the code: > > void __init arch_init_ideal_nops(void) > { > switch (boot_cpu_data.x86_vendor) { > case X86_VENDOR_INTEL: > /* > * Due to a decode

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-08-17 Thread Benjamin Herrenschmidt
On Wed, 2012-08-15 at 14:59 -0300, Marcelo Tosatti wrote: > > The guest should not expect memory accesses to an address > to behave sanely while changing a BAR anyway. > > Yes, compatibility for change of GPA base can be done in the > kernel. I can look into it next week if nobody has done so at

[PATCH v2 01/20] pci-assign: Only clean up registered IO resources

2012-08-17 Thread Jan Kiszka
If we fail before or inside assigned_dev_register_regions, we so far unconditionally unregistered IO resources, triggering an assertion in the memory layer. Non-null u.r_baseport tells us if the region has been registered. Signed-off-by: Jan Kiszka --- hw/device-assignment.c | 10 ++ 1

[PATCH v2 02/20] pci-assign: Factor out kvm_device_pci_assign/deassign

2012-08-17 Thread Jan Kiszka
In contrast to the old wrappers, the new ones only take the required parameters instead of a preinitialized kvm_assigned_pci_dev structure. We also move the dev_id generation into kvm_device_pci_assign and store the result in the AssignedDevice structure. It will serve as handle for all upcoming kv

[PATCH v2 05/20] pci-assign: Factor out kvm_device_intx_assign

2012-08-17 Thread Jan Kiszka
Avoid passing kvm_assigned_irq on INTx assignment and separate this function from (to-be-refactored) MSI/MSI-X assignment. Signed-off-by: Jan Kiszka --- hw/device-assignment.c | 16 ++-- target-i386/kvm.c | 25 + target-i386/kvm_i386.h |2 ++ 3 fi

[PATCH v2 06/20] qemu-kvm: Move kvm_device_intx_set_mask service

2012-08-17 Thread Jan Kiszka
Move kvm_device_intx_set_mask prototype and implementation to their upstream positions. Signed-off-by: Jan Kiszka --- qemu-kvm.c |9 - qemu-kvm.h |2 -- target-i386/kvm.c |9 + target-i386/kvm_i386.h |1 + 4 files changed, 10 insertion

[PATCH v2 04/20] pci-assign: Refactor interrupt deassignment

2012-08-17 Thread Jan Kiszka
Introduce three new KVM services, kvm_device_intx/msi/msix_deassign, to release assigned interrupts. These no longer require to pass pre-initialized kvm_assigned_irq structures but only request required parameters. To trace which type of interrupt is currently assigned, use a new enum AssignedIRQT

[PATCH v2 07/20] qemu-kvm: Clear unused IOCTL fields in kvm_device_intx_set_mask

2012-08-17 Thread Jan Kiszka
Helps valgrind, doesn't cost much (compared to the associated PCI config space write). Align variable naming to other helpers at this chance. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target-i386/kvm.c b/targe

[PATCH v2 14/20] qemu-kvm: Kill qemu-kvm.[ch]

2012-08-17 Thread Jan Kiszka
Hurray! Signed-off-by: Jan Kiszka --- hw/device-assignment.c |1 - kvm-all.c |3 --- kvm.h |7 --- qemu-kvm.c | 37 - qemu-kvm.h | 37 - 5 files chang

[PATCH v2 12/20] pci-assign: Rework MSI-X route setup

2012-08-17 Thread Jan Kiszka
Use kvm_irqchip_add_msi_route and introduce kvm_irqchip_update_msi_route to set up the required IRQ routes for MSI-X injections. This removes the last direct interaction with the IRQ routing API of the KVM kernel so that we can remove/unexport related services. Signed-off-by: Jan Kiszka --- hw/d

[PATCH v2 15/20] pci-assign: Drop configure switches

2012-08-17 Thread Jan Kiszka
There are no other dependencies of device assignment except for CONFIG_KVM and an x86 target. So there is also no point in controlling this feature via configure. Signed-off-by: Jan Kiszka --- configure | 11 --- hw/i386/Makefile.objs |2 +- 2 files changed, 1 insertion

[PATCH v2 16/20] pci-assign: Move and rename source file

2012-08-17 Thread Jan Kiszka
Move device-assignment.c into hw/kvm, calling it pci-assign.c now, just like its device name. Signed-off-by: Jan Kiszka --- hw/i386/Makefile.objs|3 --- hw/kvm/Makefile.objs |2 +- hw/{device-assignment.c => kvm/pci-assign.c} | 10 +--

[PATCH v2 19/20] pci-assign: Drop unused or write-only variables

2012-08-17 Thread Jan Kiszka
Remove remainders of previous refactorings. Signed-off-by: Jan Kiszka --- hw/kvm/pci-assign.c |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 29a4671..4f5daf3 100644 --- a/hw/kvm/pci-assign.c +++ b/hw/kvm/pci-assign

[PATCH v2 17/20] pci-assign: Fix coding style issues

2012-08-17 Thread Jan Kiszka
No functional changes. Signed-off-by: Jan Kiszka --- hw/kvm/pci-assign.c | 181 +- 1 files changed, 105 insertions(+), 76 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 3611539..cfd859e 100644 --- a/hw/kvm/pci-assign.c

[PATCH v2 20/20] pci-assign: Gracefully handle missing in-kernel irqchip support

2012-08-17 Thread Jan Kiszka
Inform the user properly when trying to register an IRQ-using device without in-kernel irqchip enabled. Signed-off-by: Jan Kiszka --- hw/kvm/pci-assign.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 4