[Bug 45931] New: Nested Virt: VMX can't be initialized in L1 Xen (Xen on KVM)

2012-08-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=45931 Summary: Nested Virt: VMX can't be initialized in L1 Xen (Xen on KVM) Product: Virtualization Version: unspecified Kernel Version: 3.6-RC1 Platform: All OS/Version: Linux

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Jan Kiszka
On 2012-08-13 21:31, Anthony Liguori wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2012-08-13 15:58, Avi Kivity wrote: On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this forward! Hopefully this will finally kill off qemu-kvm.git for good. No, it won't. vfio

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-06 19:05, Peter Maydell wrote: Move the init of the irqchip_inject_ioctl field of KVMState out of kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq() can be used even when no irqchip is created (for architectures that support async interrupt notification even without an

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-06 19:05, Peter Maydell wrote: Move the init of the irqchip_inject_ioctl field of KVMState out of kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq() can be used even when no irqchip is created (for architectures that support async interrupt notification even without an

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Peter Maydell
On 14 August 2012 08:33, Jan Kiszka jan.kis...@web.de wrote: Either you move both or none. OK. KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the current standard that other archs should pick up. Can it be

Re: [PATCH uq/master] kvm: i8254: Finish time conversion fix

2012-08-14 Thread Jan Kiszka
On 2012-08-13 20:40, Michael Tokarev wrote: On 13.08.2012 22:18, Jan Kiszka wrote: 0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 09:40, Peter Maydell wrote: On 14 August 2012 08:33, Jan Kiszka jan.kis...@web.de wrote: Either you move both or none. OK. KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the current standard that

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Gleb Natapov
On Mon, Aug 13, 2012 at 05:24:52PM -0300, Marcelo Tosatti wrote: On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked when the guest runs

Re: [PATCH] configure: Add --disable-kvm-options

2012-08-14 Thread Jan Kiszka
On 2012-08-14 00:49, Cole Robinson wrote: In Fedora, our qemu package is based on qemu-kvm, and we go to convoluted lengths to provide a qemu-kvm binary with KVM on by default, but all qemu-system-* with KVM off by default (using ./configure --disable-kvm) For qemu-system*, what we really

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Peter Maydell
On 14 August 2012 08:42, Jan Kiszka jan.kis...@web.de wrote: On 2012-08-14 09:40, Peter Maydell wrote: On 14 August 2012 08:33, Jan Kiszka jan.kis...@web.de wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 09:52, Peter Maydell wrote: On 14 August 2012 08:42, Jan Kiszka jan.kis...@web.de wrote: On 2012-08-14 09:40, Peter Maydell wrote: On 14 August 2012 08:33, Jan Kiszka jan.kis...@web.de wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback

[PATCH uq/master 1/2] kvm: i8254: Cache kernel clock offset in KVMPITState

2012-08-14 Thread Jan Kiszka
To prepare the final fix for clock calibration issues with the in-kernel PIT, we want to cache the offset between vmclock and the clock used by the in-kernel PIT. So far, we only need to update it when the VM state changes between running and stopped because we only read the in-kernel PIT state

[PATCH uq/master 2/2] kvm: i8254: Finish time conversion fix

2012-08-14 Thread Jan Kiszka
0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high counter values. Fix this by applying the

Re: [PATCH repost] kvm: drop parameter validation

2012-08-14 Thread Michael S. Tsirkin
On Tue, Aug 14, 2012 at 07:06:08AM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 05:59:32PM -0300, Marcelo Tosatti wrote: On Mon, Aug 13, 2012 at 05:30:53PM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 01:43:58PM +0300, Michael S. Tsirkin wrote: We validate irq pin number when

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 09:09:43PM -0600, Alex Williamson wrote: On Tue, 2012-08-14 at 02:00 +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 04:41:05PM -0600, Alex Williamson wrote: On Tue, 2012-08-14 at 01:06 +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 03:34:01PM

Re: [PATCH] kvm tools: Fix segfault on lkvm run

2012-08-14 Thread Paul Neumann
--- Asias He asias.he...@gmail.com schrieb am Di, 14.8.2012: Paul, On Tue, Aug 14, 2012 at 1:11 AM, Paul Neumann paul1...@yahoo.de wrote: The errors from kvm_cmd_run_init() are not handled properly as they are returned as positive values. Signed-off-by: Paul Neumann

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

2012-08-14 Thread Stefan Hajnoczi
On Tue, Aug 14, 2012 at 09:52:55AM +0800, Asias He wrote: On Mon, Aug 13, 2012 at 3:24 PM, Pekka Enberg penb...@kernel.org wrote: On Thu, Aug 9, 2012 at 3:51 AM, Asias He asias.he...@gmail.com wrote: This patch brings virito-scsi support to kvm tool. With the introduce of tcm_vhost

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Stefan Hajnoczi
On Tue, Jul 31, 2012 at 11:18:15PM -0600, Alex Williamson wrote: This adds the core of the QEMU VFIO-based PCI device assignment driver. To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, and CONFIG_VFIO_PCI in your host Linux kernel config. Load the vfio-pci module. To

Re: [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-14 Thread Sebastian Ott
On Tue, 7 Aug 2012, Cornelia Huck wrote: +/** + * ccw_device_get_schid - obtain a subchannel id + * @cdev: device to obtain the id for + * @schid: where to fill in the values + */ +void ccw_device_get_schid(struct ccw_device *cdev, struct subchannel_id *schid) +{ + *schid =

Re: [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Daniel P. Berrange
On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for

Re: [PATCH] kvm: disable stealtime via reboot notifier to avoid mem corruption

2012-08-14 Thread Florian Westphal
Marcelo Tosatti mtosa...@redhat.com wrote: On Fri, Aug 10, 2012 at 12:36:22PM +0200, Florian Westphal wrote: --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c @@ -191,7 +191,6 @@ static void kvm_crash_shutdown(struct pt_regs *regs) static void kvm_shutdown(void) {

Re: How KVM sync guest page table with corresponding shadow page table?

2012-08-14 Thread Xiao Guangrong
On 08/14/2012 11:54 AM, 陳韋任 (Wei-Ren Chen) wrote: Hi all, If guest modify its guest page table entry, KVM should trap that event, emulate what guest trying to do, and sync with the corresponding shadow page table entry. Is my understanding correct? If so, does KVM use something like

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 01:52:13AM +0300, Michael S. Tsirkin wrote: Using the EOI as a trigger to de-assert and potentially re-assert may be a hack, but it's about as close as we can come to following the behavior of hardware. It's actually quite similar to an apic re-sampling inputs

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 01:10:15PM +0300, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 01:52:13AM +0300, Michael S. Tsirkin wrote: Using the EOI as a trigger to de-assert and potentially re-assert may be a hack, but it's about as close as we can come to following the behavior of hardware.

Re: [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-14 Thread Cornelia Huck
On Tue, 14 Aug 2012 10:52:09 +0200 (CEST) Sebastian Ott seb...@linux.vnet.ibm.com wrote: On Tue, 7 Aug 2012, Cornelia Huck wrote: +/** + * ccw_device_get_schid - obtain a subchannel id + * @cdev: device to obtain the id for + * @schid: where to fill in the values + */ +void

Re: [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Jan Kiszka
On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose

Re: [PATCH 2/4] s390: Add a mechanism to get the subchannel id.

2012-08-14 Thread Sebastian Ott
On Tue, 14 Aug 2012, Cornelia Huck wrote: Sebastian Ott seb...@linux.vnet.ibm.com wrote: On Tue, 7 Aug 2012, Cornelia Huck wrote: +/** + * ccw_device_get_schid - obtain a subchannel id + * @cdev: device to obtain the id for + * @schid: where to fill in the values + */ +void

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Avi Kivity
On 08/14/2012 10:33 AM, Jan Kiszka wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the current standard that other archs should pick up. KVM_IRQ_LINE_STATUS may not make sense on all architectures. I don't

Re: [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-14 Thread Cornelia Huck
On Tue, 14 Aug 2012 09:40:01 +0930 Rusty Russell ru...@rustcorp.com.au wrote: On Mon, 13 Aug 2012 10:56:38 +0200, Cornelia Huck cornelia.h...@de.ibm.com wrote: On Wed, 08 Aug 2012 13:52:57 +0930 Rusty Russell ru...@rustcorp.com.au wrote: On Tue, 7 Aug 2012 16:52:47 +0200, Cornelia

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 13:01, Avi Kivity wrote: On 08/14/2012 10:33 AM, Jan Kiszka wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the current standard that other archs should pick up. KVM_IRQ_LINE_STATUS may not

[PATCH uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Jan Kiszka
We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash. Reported-by: Markus Armbruster arm...@redhat.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic_common.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git

Re: [Qemu-devel] [PATCH uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Markus Armbruster
Jan Kiszka jan.kis...@siemens.com writes: We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash. Let's put a reproducer in the commit message, if it's not too much trouble. Here's mine: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0

[PATCH v2 uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Jan Kiszka
We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster arm...@redhat.com Signed-off-by: Jan Kiszka

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Avi Kivity
On 08/12/2012 12:33 PM, Michael S. Tsirkin wrote: Michael, would the interface be more acceptable to you if we added separate ioctls to allocate and free some representation of an irq source ID, gsi pair? For instance, an ioctl might return an idr entry for an irq source ID/gsi object which

[Bug 23082] -tip: Cannot shutdown VM unregister_netdevice: waiting for vnet0 to become free. Usage count = 1

2012-08-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=23082 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Peter Maydell
On 14 August 2012 09:09, Jan Kiszka jan.kis...@web.de wrote: On 2012-08-14 09:52, Peter Maydell wrote: Well, you appear to know what this variant ioctl does and why it's better than KVM_IRQ_LINE, whereas I don't. I just want to deliver an interrupt, KVM_IRQ_LINE lets me deliver an interrupt,

[Bug 23692] KVM PCI Passthrough

2012-08-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=23692 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 15:10, Peter Maydell wrote: On 14 August 2012 09:09, Jan Kiszka jan.kis...@web.de wrote: On 2012-08-14 09:52, Peter Maydell wrote: Well, you appear to know what this variant ioctl does and why it's better than KVM_IRQ_LINE, whereas I don't. I just want to deliver an interrupt,

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Avi Kivity
On 08/14/2012 02:05 PM, Jan Kiszka wrote: On 2012-08-14 13:01, Avi Kivity wrote: On 08/14/2012 10:33 AM, Jan Kiszka wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the current standard that other archs should

Re: [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-14 Thread Jan Kiszka
On 2012-08-14 15:14, Avi Kivity wrote: On 08/14/2012 02:05 PM, Jan Kiszka wrote: On 2012-08-14 13:01, Avi Kivity wrote: On 08/14/2012 10:33 AM, Jan Kiszka wrote: KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e injection with feedback to allow lost-tick compensation) is the

kvm device assignment and MSI-X masking

2012-08-14 Thread Jan Kiszka
Hi Alex, you once wrote this comment in device-assignment.c, msix_mmio_write: if (!msix_masked(orig) msix_masked(entry)) { /* * Vector masked, disable it * * XXX It's not clear if we can or should actually attempt * to mask or disable the

Re: KVM call agenda for Tuesday, August 14

2012-08-14 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please send in any agenda items you are interested in covering. no agenda topics - no call. Happy hacking, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 08:12 +0100, Stefan Hajnoczi wrote: On Tue, Jul 31, 2012 at 11:18:15PM -0600, Alex Williamson wrote: This adds the core of the QEMU VFIO-based PCI device assignment driver. To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, and CONFIG_VFIO_PCI in

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Avi Kivity
On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva indicators The test case can be found at:

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-05 16:03, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:00:37PM +0300, Avi Kivity wrote: On 08/05/2012 04:48 PM, Gleb Natapov wrote: During guest boot up, some of these jump keys will change, no? Does this mean a stop_machine() or equivalent? I'm worried about real-time

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 04:00:54PM +0200, Jan Kiszka wrote: On 2012-08-05 16:03, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:00:37PM +0300, Avi Kivity wrote: On 08/05/2012 04:48 PM, Gleb Natapov wrote: During guest boot up, some of these jump keys will change, no? Does this mean a

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Avi Kivity
On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling the guest pmu. But disabling jump labels for real-time kernels may be acceptable too. We can probably to it at run time by forcing the slow path at all times. Yes, it is possible to add module option

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: Hi Alex, you once wrote this comment in device-assignment.c, msix_mmio_write: if (!msix_masked(orig) msix_masked(entry)) { /* * Vector masked, disable it * * XXX It's not clear if we can or

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:04, Avi Kivity wrote: On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling the guest pmu. But disabling jump labels for real-time kernels may be acceptable too. We can probably to it at run time by forcing the slow path at all times.

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 05:04:16PM +0300, Avi Kivity wrote: On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling the guest pmu. But disabling jump labels for real-time kernels may be acceptable too. We can probably to it at run time by forcing the

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 04:05:54PM +0200, Jan Kiszka wrote: On 2012-08-14 16:04, Avi Kivity wrote: On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling the guest pmu. But disabling jump labels for real-time kernels may be acceptable too. We can

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:05, Alex Williamson wrote: On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: Hi Alex, you once wrote this comment in device-assignment.c, msix_mmio_write: if (!msix_masked(orig) msix_masked(entry)) { /* * Vector masked, disable it *

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:07, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 05:04:16PM +0300, Avi Kivity wrote: On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling the guest pmu. But disabling jump labels for real-time kernels may be acceptable too. We can

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:03, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 04:00:54PM +0200, Jan Kiszka wrote: On 2012-08-05 16:03, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:00:37PM +0300, Avi Kivity wrote: On 08/05/2012 04:48 PM, Gleb Natapov wrote: During guest boot up, some of these jump

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 16:10 +0200, Jan Kiszka wrote: On 2012-08-14 16:05, Alex Williamson wrote: On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: Hi Alex, you once wrote this comment in device-assignment.c, msix_mmio_write: if (!msix_masked(orig) msix_masked(entry)) {

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 04:20:06PM +0200, Jan Kiszka wrote: On 2012-08-14 16:03, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 04:00:54PM +0200, Jan Kiszka wrote: On 2012-08-05 16:03, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:00:37PM +0300, Avi Kivity wrote: On 08/05/2012 04:48 PM,

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 04:13:17PM +0200, Jan Kiszka wrote: On 2012-08-14 16:07, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 05:04:16PM +0300, Avi Kivity wrote: On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling the guest pmu. But disabling jump

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Michael S. Tsirkin
On Tue, Aug 14, 2012 at 03:35:54PM +0300, Avi Kivity wrote: On 08/12/2012 12:33 PM, Michael S. Tsirkin wrote: Michael, would the interface be more acceptable to you if we added separate ioctls to allocate and free some representation of an irq source ID, gsi pair? For instance, an ioctl

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Avi Kivity
On 08/13/2012 10:31 PM, Anthony Liguori wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2012-08-13 15:58, Avi Kivity wrote: On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this forward! Hopefully this will finally kill off qemu-kvm.git for good. No, it won't.

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Cole Robinson
On 08/13/2012 03:31 PM, Anthony Liguori wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2012-08-13 15:58, Avi Kivity wrote: On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this forward! Hopefully this will finally kill off qemu-kvm.git for good. No, it won't. vfio

Re: [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Yan Vugenfirer
On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is panicked when the guest runs on xen. But we

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:37, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 04:20:06PM +0200, Jan Kiszka wrote: On 2012-08-14 16:03, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 04:00:54PM +0200, Jan Kiszka wrote: On 2012-08-05 16:03, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:00:37PM +0300, Avi

Re: [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:55, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: We can know the guest is

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:53, Cole Robinson wrote: On 08/13/2012 03:31 PM, Anthony Liguori wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2012-08-13 15:58, Avi Kivity wrote: On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this forward! Hopefully this will finally kill off

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:44, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 04:13:17PM +0200, Jan Kiszka wrote: On 2012-08-14 16:07, Gleb Natapov wrote: On Tue, Aug 14, 2012 at 05:04:16PM +0300, Avi Kivity wrote: On 08/14/2012 05:00 PM, Jan Kiszka wrote: The host can prevent this by leaving disabling

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Jan Kiszka
On 2012-08-14 16:31, Alex Williamson wrote: On Tue, 2012-08-14 at 16:10 +0200, Jan Kiszka wrote: On 2012-08-14 16:05, Alex Williamson wrote: On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: Hi Alex, you once wrote this comment in device-assignment.c, msix_mmio_write: if

Re: [PATCH RESEND] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 09:06:51AM +0900, Takuya Yoshikawa wrote: On Mon, 13 Aug 2012 19:15:23 -0300 Marcelo Tosatti mtosa...@redhat.com wrote: On Fri, Aug 10, 2012 at 05:16:12PM +0900, Takuya Yoshikawa wrote: The following commit changed mmu_shrink() so that it would skip VMs whose

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Cole Robinson
On 08/14/2012 11:04 AM, Jan Kiszka wrote: On 2012-08-14 16:53, Cole Robinson wrote: On 08/13/2012 03:31 PM, Anthony Liguori wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2012-08-13 15:58, Avi Kivity wrote: On 08/13/2012 04:27 PM, Anthony Liguori wrote: Thanks for pushing this

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 17:15 +0200, Jan Kiszka wrote: On 2012-08-14 16:31, Alex Williamson wrote: On Tue, 2012-08-14 at 16:10 +0200, Jan Kiszka wrote: On 2012-08-14 16:05, Alex Williamson wrote: On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: Hi Alex, you once wrote this comment

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote:

Re: [PATCH] kvm: disable stealtime via reboot notifier to avoid mem corruption

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 11:15:06AM +0200, Florian Westphal wrote: Marcelo Tosatti mtosa...@redhat.com wrote: On Fri, Aug 10, 2012 at 12:36:22PM +0200, Florian Westphal wrote: --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c @@ -191,7 +191,6 @@ static void

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:47:48AM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 05:24:52PM -0300, Marcelo Tosatti wrote: On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Jan Kiszka
On 2012-08-14 17:34, Alex Williamson wrote: On Tue, 2012-08-14 at 17:15 +0200, Jan Kiszka wrote: On 2012-08-14 16:31, Alex Williamson wrote: On Tue, 2012-08-14 at 16:10 +0200, Jan Kiszka wrote: On 2012-08-14 16:05, Alex Williamson wrote: On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote:

Re: [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote:

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Gleb Natapov
On Tue, Aug 14, 2012 at 12:29:38PM -0300, Marcelo Tosatti wrote: On Tue, Aug 14, 2012 at 10:47:48AM +0300, Gleb Natapov wrote: On Mon, Aug 13, 2012 at 05:24:52PM -0300, Marcelo Tosatti wrote: On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: On 08/13/2012 12:21 PM, Marcelo

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:00:33PM +0300, Avi Kivity wrote: On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: Changelog: - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page - introduce KVM_HVA_ERR_BAD and optimize error hva

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Avi Kivity
On 08/01/2012 08:18 AM, Alex Williamson wrote: This adds the core of the QEMU VFIO-based PCI device assignment driver. To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, and CONFIG_VFIO_PCI in your host Linux kernel config. Load the vfio-pci module. To assign device

[PATCHv2] kvm: drop parameter validation

2012-08-14 Thread Michael S. Tsirkin
We validate irq pin number when routing is setup, so code handling illegal irq # in pic and ioapic on each injection is never called. Drop it, replace with BUG_ON to catch out of bounds access bugs. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v1: add BUG_ON at

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Avi Kivity
On 08/14/2012 05:58 PM, Jan Kiszka wrote: And regarding how common they are: Do standard OSes trigger any jump-label optimized switch during at least their boot-up? I thought so. In that case, if you co-locate RT and standard OSes on a shared host, you would have a conflict. Yes, during

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 18:21, Avi Kivity wrote: On 08/14/2012 05:58 PM, Jan Kiszka wrote: And regarding how common they are: Do standard OSes trigger any jump-label optimized switch during at least their boot-up? I thought so. In that case, if you co-locate RT and standard OSes on a shared host, you

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Avi Kivity
On 08/14/2012 07:38 PM, Jan Kiszka wrote: On 2012-08-14 18:21, Avi Kivity wrote: On 08/14/2012 05:58 PM, Jan Kiszka wrote: And regarding how common they are: Do standard OSes trigger any jump-label optimized switch during at least their boot-up? I thought so. In that case, if you co-locate

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-14 Thread Jan Kiszka
On 2012-08-14 19:00, Avi Kivity wrote: On 08/14/2012 07:38 PM, Jan Kiszka wrote: On 2012-08-14 18:21, Avi Kivity wrote: On 08/14/2012 05:58 PM, Jan Kiszka wrote: And regarding how common they are: Do standard OSes trigger any jump-label optimized switch during at least their boot-up? I

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 18:53 +0300, Avi Kivity wrote: On 08/01/2012 08:18 AM, Alex Williamson wrote: This adds the core of the QEMU VFIO-based PCI device assignment driver. To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, and CONFIG_VFIO_PCI in your host Linux kernel

Re: [PATCH v2 3/4] vfio: vfio-pci device assignment driver

2012-08-14 Thread Jan Kiszka
Just some comments, didn't look at all details. On 2012-08-02 21:17, Alex Williamson wrote: + +static int vfio_msix_vector_use(PCIDevice *pdev, +unsigned int vector, MSIMessage msg) +{ +VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev); +int ret,

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Anthony Liguori
Marcelo Tosatti mtosa...@redhat.com writes: On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: On Wed, Aug 08,

Re: [PATCH v2 uq/master] kvmvapic: Disable if there is insufficient memory

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 01:43:12PM +0200, Jan Kiszka wrote: We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped)

Re: [PATCH uq/master 1/2] kvm: i8254: Cache kernel clock offset in KVMPITState

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:24:03AM +0200, Jan Kiszka wrote: To prepare the final fix for clock calibration issues with the in-kernel PIT, we want to cache the offset between vmclock and the clock used by the in-kernel PIT. So far, we only need to update it when the VM state changes between

Re: [PATCH v2 3/4] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 19:40 +0200, Jan Kiszka wrote: Just some comments, didn't look at all details. Thanks! I'll send out a v3 soon. I think that the off-by-one in strncat doesn't exist though, so would appreciate if you could double check. Individual comments below... On 2012-08-02 21:17,

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anthony Liguori wrote: Marcelo Tosatti mtosa...@redhat.com writes: On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14 10:56, Daniel P. Berrange wrote: On Mon, Aug

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Anthony Liguori
Marcelo Tosatti mtosa...@redhat.com writes: On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anthony Liguori wrote: Marcelo Tosatti mtosa...@redhat.com writes: On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: On 2012-08-14

Re: [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-14 Thread Anthony Liguori
Cornelia Huck cornelia.h...@de.ibm.com writes: Add a driver for kvm guests that matches virtual ccw devices provided by the host as virtio bridge devices. These virtio-ccw devices use a special set of channel commands in order to perform virtio functions. Signed-off-by: Cornelia Huck

Re: [GIT PULL] VFIO update for 3.6-rc1

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-07 at 13:05 -0600, Alex Williamson wrote: Hi Linus, The following changes since commit 42a579a0f960081cd16fc945036e4780c3ad3202: Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2012-08-05

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Peter Maydell
On 14 August 2012 19:53, Anthony Liguori anth...@codemonkey.ws wrote: Forget about !x86 platforms. They have their own way to do this sort of thing. Think of this feature like a status LED on a motherboard. These are very common and usually controlled by IO ports. Please don't forget !x86

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 21:17 +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 08:06:17PM +0200, Jan Kiszka wrote: On 2012-08-13 20:03, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 02:06:10PM +0200, Jan Kiszka wrote: On 2012-08-13 10:35, Nicholas A. Bellinger wrote: From:

Re: [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI-cmd_vqs[0] definition

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 12:02 +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 08:35:17AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch fixes bug in the definition of VirtIOSCSI-cmd_vqs[0], where the return of virtio_add_queue() in

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 11:53 +0300, Michael S. Tsirkin wrote: On Mon, Aug 13, 2012 at 08:35:14AM +, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi

[PATCH v3 0/4] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Alex Williamson
v3: - Incorporate feedback from Anthony, Avi, and Jan (Thank you!) I've also added a new tag to my github tree, so those who have already reviewed can check the delta by comparing: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-1.2 tags/vfio-pci-for-qemu-1.2-v2

[PATCH v3 1/4] Update kernel header script to include vfio

2012-08-14 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 9d2a4bc..270d32b 100755 ---

[PATCH v3 2/4] Update Linux kernel headers

2012-08-14 Thread Alex Williamson
Based on Linux as of ddf343f6. Note that vfio.h isn't yet an installed header at this commit, but is fixed by trivial update to include/linux/Kbuild. Signed-off-by: Alex Williamson alex.william...@redhat.com --- linux-headers/asm-s390/kvm.h |2 linux-headers/asm-s390/kvm_para.h |

Re: [PATCH v2 3/4] vfio: vfio-pci device assignment driver

2012-08-14 Thread Jan Kiszka
On 2012-08-14 21:09, Alex Williamson wrote: +static void vfio_map_bar(VFIODevice *vdev, int nr) +{ +VFIOBAR *bar = vdev-bars[nr]; +unsigned size = bar-size; +char name[64]; +uint32_t pci_bar; +uint8_t type; +int ret; + +/* Skip both unimplemented BARs and the

  1   2   3   >