Re: [PATCH uq/master] kvm: Clean up irqfd API

2012-09-10 Thread Jan Kiszka
On 2012-09-09 16:01, Avi Kivity wrote: On 08/20/2012 11:55 AM, Jan Kiszka wrote: No need to expose the fd-based interface, everyone will already be fine with the more handy EventNotifier variant. Rename the latter to clarify that we are still talking about irqfds here. Thanks, applied

Re: [ANNOUNCE] qemu-kvm-1.2.0

2012-09-10 Thread Jan Kiszka
On 2012-09-10 11:53, Avi Kivity wrote: qemu-kvm-1.2.0 is now available. This release is based on the upstream qemu 1.2.0, plus kvm-specific enhancements. Please see the original QEMU 1.2.0 release announcement [1] for details. To be more precise about the kvm-specific enhancements: The only

Re: [PULL] KVM updates

2012-09-10 Thread Jan Kiszka
(though some work remains). Christian Borntraeger (1): qemu: Use valgrind annotations to mark kvm guest memory as defined Jan Kiszka (5): kvm: Clean up irqfd API kvm: Introduce kvm_irqchip_update_msi_route

Re: [PATCH v6 11/12] KVM: introduce readonly memslot

2012-09-09 Thread Jan Kiszka
On 2012-09-09 15:42, Avi Kivity wrote: On 09/07/2012 02:14 PM, Jan Kiszka wrote: $ grep __KVM_HAVE include/linux/kvm.h | wc -l 20 Yes, mistakes of the past. As your suggestion, userspace will always use the CAP even if the CAP is not really supported. We do not need care the overload

Re: [RFC v2 PATCH 00/21] KVM: x86: CPU isolation and direct interrupts delivery to guests

2012-09-07 Thread Jan Kiszka
On 2012-09-06 13:27, Tomoki Sekiyama wrote: This RFC patch series provides facility to dedicate CPUs to KVM guests and enable the guests to handle interrupts from passed-through PCI devices directly (without VM exit and relay by the host). With this feature, we can improve throughput and

Re: [PATCH 2/3] update kvm related the head file from kernel

2012-09-07 Thread Jan Kiszka
On 2012-09-07 10:26, Liu Sheng wrote: updated the head file from kernel for readonly memory feature. Signed-off-by: Liu Sheng liush...@linux.vnet.ibm.com --- linux-headers/asm-x86/kvm.h |1 + linux-headers/linux/kvm.h | 16 +--- 2 files changed, 14 insertions(+), 3

Re: [PATCH 3/3] support readonly memory feature in qemu

2012-09-07 Thread Jan Kiszka
On 2012-09-07 10:26, Liu Sheng wrote: as readonly memory is support in kvm, this patch supports this feature in qemu, mainly pluging the memory region with KVM_MEM_READONLY flag to kvm. this can be tested by a kernel module from the author of kvm readonly memory slot: static int

Re: [PATCH 2/3] update kvm related the head file from kernel

2012-09-07 Thread Jan Kiszka
On 2012-09-07 11:39, Xiao Guangrong wrote: Hi Jan, Thanks for your review. On 09/07/2012 04:49 PM, Jan Kiszka wrote: +#ifdef __KVM_HAVE_READONLY_MEM + __u8 write_readonly_mem; +#endif } mmio; /* KVM_EXIT_HYPERCALL */ struct

Re: [PATCH v6 11/12] KVM: introduce readonly memslot

2012-09-07 Thread Jan Kiszka
On 2012-08-21 05:02, Xiao Guangrong wrote: In current code, if we map a readonly memory space from host to guest and the page is not currently mapped in the host, we will get a fault pfn and async is not allowed, then the vm will crash We introduce readonly memory region to map ROM/ROMD to

Re: [PATCH v6 11/12] KVM: introduce readonly memslot

2012-09-07 Thread Jan Kiszka
On 2012-09-07 12:47, Xiao Guangrong wrote: On 09/07/2012 06:23 PM, Jan Kiszka wrote: On 2012-08-21 05:02, Xiao Guangrong wrote: In current code, if we map a readonly memory space from host to guest and the page is not currently mapped in the host, we will get a fault pfn and async

[PATCH] KVM: Improve wording of KVM_SET_USER_MEMORY_REGION documentation

2012-09-07 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Documentation/virtual/kvm/api.txt | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index b91bfd4..36befa7 100644

Re: [PATCH v3 4/4] kvm: i386: Add classic PCI device assignment

2012-09-06 Thread Jan Kiszka
On 2012-08-30 20:30, Jan Kiszka wrote: This adds PCI device assignment for i386 targets using the classic KVM interfaces. This version is 100% identical to what is being maintained in qemu-kvm for several years and is supported by libvirt as well. It is expected to remain relevant for another

Re: [PATCH v3 4/4] kvm: i386: Add classic PCI device assignment

2012-09-06 Thread Jan Kiszka
On 2012-09-06 18:06, Andreas Färber wrote: Am 06.09.2012 10:44, schrieb Jan Kiszka: On 2012-08-30 20:30, Jan Kiszka wrote: This adds PCI device assignment for i386 targets using the classic KVM interfaces. This version is 100% identical to what is being maintained in qemu-kvm for several

Re: KVM call agenda for Tuesday, September 4th

2012-09-03 Thread Jan Kiszka
On 2012-09-03 13:48, Avi Kivity wrote: On 09/03/2012 09:44 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. - protecting MemoryRegion::opaque during dispatch I'm guessing Ping won't make it due to timezone problems. Jan, if you will not

Re: SDM Updates available

2012-08-30 Thread Jan Kiszka
On 2012-08-31 06:52, Nakajima, Jun wrote: It includes the new VT features for interrupt/APIC virtualization that I mentioned at XenSummit and Linux Plumbers Conference. http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html Cool features ahead :),

Re: [PATCH v2 4/4] kvm: i386: Add classic PCI device assignment

2012-08-29 Thread Jan Kiszka
On 2012-08-28 23:49, Michael S. Tsirkin wrote: On Tue, Aug 28, 2012 at 01:02:26PM +0200, Jan Kiszka wrote: This adds PCI device assignment for i386 targets using the classic KVM interfaces. This version is 100% identical to what is being maintained in qemu-kvm for several years

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-08-29 Thread Jan Kiszka
On 2012-08-28 23:26, Peter Maydell wrote: On 27 August 2012 13:15, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-08-27 14:07, Andreas Färber wrote: Am I correct to understand we compile this only for i386 / x86_64? This is correct. Did we ever make a decision about whether architecture

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-08-29 Thread Jan Kiszka
On 2012-08-29 10:49, Peter Maydell wrote: On 29 August 2012 09:47, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-08-28 23:26, Peter Maydell wrote: Since this is arch-specific we should probably give the resulting device a more specific name than pci-assign, which implies that it is (a) ok

[PATCH for qemu-kvm-1.2] pci-assign: Use proper pin number for INTx-to-IRQ routing

2012-08-29 Thread Jan Kiszka
Broken by commit e21f28b497. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/pci-assign.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 9cce02c..fea05b4 100644 --- a/hw/kvm/pci-assign.c +++ b/hw/kvm/pci

Re: [PATCH for-1.2 0/2] migrate PV EOI MSR

2012-08-27 Thread Jan Kiszka
On 2012-08-26 17:59, Michael S. Tsirkin wrote: It turns out PV EOI gets disabled after migration - until next guest reset. This is because we are missing code to actually migrate it. This patch fixes it up: it does not do anything useful without kvm irqchip but applies cleanly to qemu.git as

Re: [PATCH for-1.2 1/2] linux-headers: update asm/kvm_para.h to 3.6

2012-08-27 Thread Jan Kiszka
On 2012-08-26 17:59, Michael S. Tsirkin wrote: Update asm-x96/kvm_para.h to version present in Linux 3.6. Nope, we have update-linux-headers.sh for this. Just run it again 3.6-rcX, grab the result, and mention the source (release version or kvm.git hash). Jan This is needed for the new PV EOI

[PATCH 0/4] uq/master: Add classic PCI device assignment

2012-08-27 Thread Jan Kiszka
is approaching. It's been a long journey, but once this is merged, I think we can close the qemu-kvm chapter. I already did so, all work is based on QEMU now. Jan Kiszka (4): kvm: Introduce kvm_irqchip_update_msi_route kvm: Introduce kvm_has_intx_set_mask kvm: i386: Add services required for PCI

[PATCH 2/4] kvm: Introduce kvm_has_intx_set_mask

2012-08-27 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com Will be used by PCI device assignment code. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |8 kvm.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index fd9d9b4..84d4f7f

[PATCH 1/4] kvm: Introduce kvm_irqchip_update_msi_route

2012-08-27 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com This service allows to update an MSI route without releasing/reacquiring the associated VIRQ. Will be used by PCI device assignment, later on likely also by virtio/vhost and VFIO. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c | 42

[PATCH 3/4] kvm: i386: Add services required for PCI device assignment

2012-08-27 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com These helpers abstract the interaction of upcoming pci-assign with the KVM kernel services. Put them under i386 only as other archs will implement device pass-through via VFIO and not this classic interface. Signed-off-by: Jan Kiszka jan.kis...@siemens.com

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-08-27 Thread Jan Kiszka
On 2012-08-27 14:07, Andreas Färber wrote: Hi, Am 27.08.2012 08:28, schrieb Jan Kiszka: From: Jan Kiszka jan.kis...@siemens.com This adds PCI device assignment for i386 targets using the classic KVM interfaces. This version is 100% identical to what is being maintained in qemu-kvm

Re: [Qemu-devel] [PATCHv2 1/4] linux-headers: update to 3.6-rc3

2012-08-27 Thread Jan Kiszka
On 2012-08-27 14:42, Peter Maydell wrote: On 27 August 2012 13:20, Michael S. Tsirkin m...@redhat.com wrote: Update linux-headers to version present in Linux 3.6-rc3. Header asm-x96_64/kvm_para.h update is needed for the new PV EOI feature. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [Qemu-devel] [PATCHv2 1/4] linux-headers: update to 3.6-rc3

2012-08-27 Thread Jan Kiszka
On 2012-08-27 16:53, Michael S. Tsirkin wrote: On Mon, Aug 27, 2012 at 02:48:57PM +0200, Jan Kiszka wrote: On 2012-08-27 14:42, Peter Maydell wrote: On 27 August 2012 13:20, Michael S. Tsirkin m...@redhat.com wrote: Update linux-headers to version present in Linux 3.6-rc3. Header asm-x96_64

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-08-27 Thread Jan Kiszka
Hi Blue, thanks for the review. I addressed most of them, the others a commented below. On 2012-08-27 20:56, Blue Swirl wrote: +typedef struct AssignedDevice { +PCIDevice dev; +PCIHostDeviceAddress host; +uint32_t dev_id; +uint32_t features; +int intpin; +

Re: [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-24 Thread Jan Kiszka
On 2012-08-24 08:05, Wen Congyang wrote: At 08/23/2012 06:51 PM, Jan Kiszka Wrote: On 2012-08-23 04:32, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport

Re: [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-24 Thread Jan Kiszka
On 2012-08-24 08:33, Wen Congyang wrote: At 08/24/2012 02:21 PM, Jan Kiszka Wrote: On 2012-08-24 08:05, Wen Congyang wrote: At 08/23/2012 06:51 PM, Jan Kiszka Wrote: On 2012-08-23 04:32, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port

[PATCH uq/master] kvm: Rename irqchip_inject_ioctl to irq_set_ioctl

2012-08-24 Thread Jan Kiszka
This variable is no longer bound to irqchip, and the IOCTL sets the IRQ level, does not directly inject it. No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kvm-all.c b/kvm

Re: [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-23 Thread Jan Kiszka
On 2012-08-23 04:32, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked event according to panicked_action's

[PATCH v3 uq/master 6/6] kvm: Stop flushing coalesced MMIO on vmexit

2012-08-23 Thread Jan Kiszka
The memory subsystem will now take care of flushing whenever affected regions are accessed or the memory mapping changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index e0244b6

[PATCH v3 uq/master 4/6] memory: Flush coalesced MMIO on mapping and state changes

2012-08-23 Thread Jan Kiszka
Flush pending coalesced MMIO before performing mapping or state changes that could affect the event orderings or route the buffered requests to a wrong region. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- memory.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[PATCH v3 uq/master 1/6] memory: Flush coalesced MMIO on selected region access

2012-08-23 Thread Jan Kiszka
, by calling memory_region_set_flush_coalesced. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- memory.c | 24 memory.h | 26 ++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index 643871b..835eb86 100644

[PATCH v3 uq/master 2/6] memory: Use transaction_begin/commit also for single-step operations

2012-08-23 Thread Jan Kiszka
disabled or unregistered regions. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- memory.c | 40 +--- 1 files changed, 25 insertions(+), 15 deletions(-) diff --git a/memory.c b/memory.c index 835eb86..58583cf 100644 --- a/memory.c +++ b/memory.c @@ -1076,8

[PATCH v3 uq/master 3/6] memory: Fold memory_region_update_topology into memory_region_transaction_commit

2012-08-23 Thread Jan Kiszka
Simplify the code as we are using now only a subset of the original features of memory_region_update_topology. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- memory.c | 39 +++ 1 files changed, 11 insertions(+), 28 deletions(-) diff --git a/memory.c b

[PATCH v3 uq/master 0/6] kvm: Get coalesced MMIO flushing out of the hot-path

2012-08-23 Thread Jan Kiszka
region state changes. Jan Kiszka (6): memory: Flush coalesced MMIO on selected region access memory: Use transaction_begin/commit also for single-step operations memory: Fold memory_region_update_topology into memory_region_transaction_commit memory: Flush coalesced MMIO on mapping and state

[PATCH v3 uq/master 5/6] VGA: Flush coalesced MMIO on related MMIO/PIO accesses

2012-08-23 Thread Jan Kiszka
In preparation of stopping to flush coalesced MMIO unconditionally on vmexits, mark VGA MMIO and PIO regions as synchronous /wrt coalesced MMIO and flush the buffer explicitly on PIO accesses that do not use generic memory regions yet. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw

Re: qemu-kvm 1.1.1 hangs using 100% CPU when using ES1370 emulation

2012-08-23 Thread Jan Kiszka
[likely not kvm related, CC'ing the appropriate community] On 2012-08-23 18:16, Mike Gerber wrote: Hi, I'm using a KVM guest to stream audio using darkice to an icecast2 server on the same guest. The guest uses an emulated ES1370 sound card to capture the host's audio input (ASUS Xonar

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

2012-08-21 Thread Jan Kiszka
On 2012-08-19 11:42, Avi Kivity wrote: On 08/17/2012 06:04 PM, Jan Kiszka wrote: Can anyone imagine that such a barrier may actually be required? If it is currently possible that env-stop is evaluated before we called into sigtimedwait in qemu_kvm_eat_signals, then we could actually eat

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

2012-08-21 Thread Jan Kiszka
On 2012-08-15 13:08, 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 v10 08/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-08-21 Thread Jan Kiszka
On 2012-08-16 17:29, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines that can be either raised or lowered on the VCPU - the IRQ and FIQ

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

2012-08-21 Thread Jan Kiszka
On 2012-08-21 10:25, Peter Maydell wrote: On 21 August 2012 09:19, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-08-15 13:08, 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

[PATCH uq/master] kvm: Clean up irqfd API

2012-08-20 Thread Jan Kiszka
No need to expose the fd-based interface, everyone will already be fine with the more handy EventNotifier variant. Rename the latter to clarify that we are still talking about irqfds here. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Alex, please update your vfio patch accordingly. hw

[PATCH v2 00/20] pci-assign: Refactor for upstream merge

2012-08-17 Thread Jan Kiszka
style) to bring things in shape. Note that patch 1 is a simple bug fix that should likely be applied for qemu-kvm-1.2 independently. Changes in v2: - rebased over qemu-kvm next - consistently clear unused IOCTL fields via structure initialization Jan Kiszka (20): pci-assign: Only clean up

[PATCH v2 03/20] pci-assign: Rename assign_irq to assign_intx

2012-08-17 Thread Jan Kiszka
The previous name may incorrectly suggest that this function assigns all types of IRQs though it's only dealing with legacy interrupts. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v2 08/20] pci-assign: Rework MSI assignment

2012-08-17 Thread Jan Kiszka
Introduce kvm_device_msi_assign and use upstream's kvm_irqchip_add_msi_route/kvm_irqchip_release_virq to provide MSI support for assigned devices. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 54 +-- target-i386/kvm.c

[PATCH v2 09/20] pci-assign: Factor out kvm_device_msix_supported

2012-08-17 Thread Jan Kiszka
Encapsulate the ugly check if MSI-X assignment is supported in a separate helper function. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |5 + target-i386/kvm.c |7 +++ target-i386/kvm_i386.h |1 + 3 files changed, 9 insertions(+), 4

[PATCH v2 11/20] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-17 Thread Jan Kiszka
The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |8 qemu-kvm.h |4 target-i386

[PATCH v2 10/20] pci-assign: Replace kvm_assign_set_msix_nr with kvm_device_msix_init_vectors

2012-08-17 Thread Jan Kiszka
The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |5 - qemu-kvm.h |1 - target-i386/kvm.c

[PATCH v2 13/20] pci-assign: Factor out kvm_device_msix_assign

2012-08-17 Thread Jan Kiszka
Avoid passing kvm_assigned_irq on MSI-X assignment. Drop kvm_assign_irq as it's now no longer used. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |9 + qemu-kvm.c | 27 --- qemu-kvm.h | 11

[PATCH v2 18/20] pci-assign: Replace exit() with hw_error()

2012-08-17 Thread Jan Kiszka
This is more appropriate and allows central handling. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/pci-assign.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index cfd859e..29a4671 100644 --- a/hw/kvm

[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 jan.kis...@siemens.com --- hw/kvm/pci-assign.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw

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

2012-08-17 Thread Jan Kiszka
No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- 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

[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 jan.kis...@siemens.com --- 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

[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 jan.kis...@siemens.com --- hw/i386/Makefile.objs|3 --- hw/kvm/Makefile.objs |2 +- hw/{device-assignment.c = kvm/pci

[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 jan.kis...@siemens.com --- configure | 11 --- hw/i386/Makefile.objs |2 +- 2

[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 jan.kis

[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 jan.kis...@siemens.com --- target-i386/kvm.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git

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

2012-08-17 Thread Jan Kiszka
AssignedIRQType instead of KVM constants. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 80 ++- qemu-kvm.c |5 --- qemu-kvm.h | 11 -- target-i386/kvm.c | 29 + target-i386

[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 jan.kis...@siemens.com --- qemu-kvm.c |9 - qemu-kvm.h |2 -- target-i386/kvm.c |9 + target-i386/kvm_i386.h |1 + 4

[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 jan.kis...@siemens.com --- hw/device-assignment.c | 16 ++-- target-i386/kvm.c | 25 + target-i386

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

2012-08-17 Thread Jan Kiszka
kvm_device_* functions. While refactoring these services, start moving KVM services where they should finally end up in upstream QEMU: in the i386-specific KVM layer. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 46

[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 jan.kis...@siemens.com --- hw/device

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 one

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 p...@dlhnet.de 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

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 p...@dlhnet.de 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

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 p...@dlhnet.de wrote: i debugged my initial problem further and found out that the problem happens to be that the main

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 p...@dlhnet.de wrote: i debugged my initial problem further and found out

[PATCH 14/19] pci-assign: Drop configure switches

2012-08-16 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 jan.kis...@siemens.com --- configure | 11 --- hw/i386/Makefile.objs |2 +- 2

[PATCH 08/19] pci-assign: Factor out kvm_device_msix_supported

2012-08-16 Thread Jan Kiszka
Encapsulate the ugly check if MSI-X assignment is supported in a separate helper function. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |5 + target-i386/kvm.c |7 +++ target-i386/kvm_i386.h |1 + 3 files changed, 9 insertions(+), 4

[PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Jan Kiszka
The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |8 qemu-kvm.h |4 target-i386

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

2012-08-16 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 jan.kis...@siemens.com --- hw/device-assignment.c | 16 ++-- target-i386/kvm.c | 24 target-i386

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

2012-08-16 Thread Jan Kiszka
AssignedIRQType instead of KVM constants. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 80 ++- qemu-kvm.c |5 --- qemu-kvm.h | 11 -- target-i386/kvm.c | 29 + target-i386

[PATCH 16/19] pci-assign: Fix coding style issues

2012-08-16 Thread Jan Kiszka
No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- 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

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

2012-08-16 Thread Jan Kiszka
kvm_device_* functions. While refactoring these services, start moving KVM services where they should finally end up in upstream QEMU: in the i386-specific KVM layer. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 46

[PATCH 17/19] pci-assign: Replace exit() with hw_error()

2012-08-16 Thread Jan Kiszka
This is more appropriate and allows central handling. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/pci-assign.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index cfd859e..29a4671 100644 --- a/hw/kvm

[PATCH 11/19] pci-assign: Rework MSI-X route setup

2012-08-16 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 jan.kis

[PATCH 07/19] pci-assign: Rework MSI assignment

2012-08-16 Thread Jan Kiszka
Introduce kvm_device_msi_assign and use upstream's kvm_irqchip_add_msi_route/kvm_irqchip_release_virq to provide MSI support for assigned devices. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 54 +-- target-i386/kvm.c

[PATCH 09/19] pci-assign: Replace kvm_assign_set_msix_nr with kvm_device_msix_init_vectors

2012-08-16 Thread Jan Kiszka
The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |5 - qemu-kvm.h |1 - target-i386/kvm.c

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

2012-08-16 Thread Jan Kiszka
Move kvm_device_intx_set_mask prototype and implementation to their upstream positions. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm.c |9 - qemu-kvm.h |2 -- target-i386/kvm.c |9 + target-i386/kvm_i386.h |1 + 4

[PATCH 12/19] pci-assign: Factor out kvm_device_msix_assign

2012-08-16 Thread Jan Kiszka
Avoid passing kvm_assigned_irq on MSI-X assignment. Drop kvm_assign_irq as it's now no longer used. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |9 + qemu-kvm.c | 27 --- qemu-kvm.h | 11

[PATCH 13/19] qemu-kvm: Kill qemu-kvm.[ch]

2012-08-16 Thread Jan Kiszka
Hurray! Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |1 - kvm-all.c |3 --- kvm.h |7 --- qemu-kvm.c | 37 - qemu-kvm.h | 37

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

2012-08-16 Thread Jan Kiszka
Remove remainders of previous refactorings. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- 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

[PATCH 03/19] pci-assign: Rename assign_irq to assign_intx

2012-08-16 Thread Jan Kiszka
The previous name may incorrectly suggest that this function assigns all types of IRQs though it's only dealing with legacy interrupts. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 15/19] pci-assign: Move and rename source file

2012-08-16 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 jan.kis...@siemens.com --- hw/i386/Makefile.objs|3 --- hw/kvm/Makefile.objs |2 +- hw/{device-assignment.c = kvm/pci

[PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Jan Kiszka
/95528 [2] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/95522 Jan Kiszka (19): pci-assign: Only clean up registered IO resources pci-assign: Factor out kvm_device_pci_assign/deassign pci-assign: Rename assign_irq to assign_intx pci-assign: Refactor interrupt deassignment pci

Re: [PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Jan Kiszka
On 2012-08-16 16:34, Avi Kivity wrote: On 08/16/2012 04:54 PM, Jan Kiszka wrote: With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them into QEMU. Once the series

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Jan Kiszka
On 2012-08-16 18:21, Alex Williamson wrote: On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Jan Kiszka
On 2012-08-16 18:30, Jan Kiszka wrote: On 2012-08-16 18:21, Alex Williamson wrote: On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis

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 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

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 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
while the VM is running. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/i8254.c | 38 -- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/hw/kvm/i8254.c b/hw/kvm/i8254.c index c5d3711..c235d80 100644 --- a/hw/kvm/i8254.c +++ b/hw/kvm

<    5   6   7   8   9   10   11   12   13   14   >