Re: [Qemu-devel] [RFC v2 0/6] qtest unit test framework

2011-12-04 Thread Dor Laor
On 12/01/2011 08:43 PM, Anthony Liguori wrote: This series is still pretty rough but I wanted to get an idea of what people thought about it before polishing it. The general idea is outlined in the first test. The main advantage of this type of test framework compared to something like kvm-unit

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-04 Thread Michael S. Tsirkin
On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: > Based on a git bisect, this patch breaks msi-x interrupt delivery in > the ivshmem device. > > On Mon, Nov 21, 2011 at 9:57 AM, Michael S. Tsirkin wrote: > > Only go over the table when function is masked. > > This is not really imp

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-04 Thread Michael S. Tsirkin
On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: > Based on a git bisect, this patch breaks msi-x interrupt delivery in > the ivshmem device. I think the following should fix it. Compiled-only - could you pls check? If yes let's apply to the stable branch. --> ivshmem: add missing

Re: [Qemu-devel] [PATCH 0/4] KVM: Dirty logging optimization using rmap

2011-12-04 Thread Avi Kivity
On 12/03/2011 06:37 AM, Takuya Yoshikawa wrote: > Avi Kivity wrote: > > That's true. But some applications do require low latency, and the > > current code can impose a lot of time with the mmu spinlock held. > > > > The total amount of work actually increases slightly, from O(N) to O(N > > log

Re: [Qemu-devel] [RFC][PATCH 01/16] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Michael S. Tsirkin
On Sat, Dec 03, 2011 at 12:17:26PM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > Rename msix_supported to msi_supported and control MSI and MSI-X > activation this way. That was likely to original intention for this > flag, but MSI support came after MSI-X. > > Signed-off-by: Jan Kiszka Acke

Re: [Qemu-devel] [RFC][PATCH 01/16] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Jan Kiszka
On 2011-12-04 11:42, Michael S. Tsirkin wrote: > On Sat, Dec 03, 2011 at 12:17:26PM +0100, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Rename msix_supported to msi_supported and control MSI and MSI-X >> activation this way. That was likely to original intention for this >> flag, but MSI support ca

Re: [Qemu-devel] [RFC][PATCH 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-04 Thread Avi Kivity
On 12/04/2011 12:33 AM, Jan Kiszka wrote: > Do we have a convention that every include in <> is considered system > header? Should probably be documented then (and code should be converted > gradually). It's documented in "The C Programming Language", by K&R. -- error compiling committee.c: too

Re: [Qemu-devel] [RFC][PATCH 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-04 Thread Jan Kiszka
On 2011-12-04 11:43, Avi Kivity wrote: > On 12/04/2011 12:33 AM, Jan Kiszka wrote: >> Do we have a convention that every include in <> is considered system >> header? Should probably be documented then (and code should be converted >> gradually). > > It's documented in "The C Programming Language"

Re: [Qemu-devel] Improve QEMU performance with LLVM codegen and other techniques

2011-12-04 Thread Alexander Graf
On 04.12.2011, at 07:14, 陳韋任 wrote: >>> 3. Then a trace composed of TCG blocks is sent to a LLVM translator. The >>> translator >>> generates the host binary for the trace into a LLVM code cache, and patch >>> the >> >> I don't fully understand this part. Do you disassemble the x86 blob that

Re: [Qemu-devel] sub-page-sized mmio regions and address passed to read/write fns

2011-12-04 Thread Avi Kivity
On 12/02/2011 04:49 PM, Peter Maydell wrote: > Hi; I was working on a refactoring of the ARM 11MPCore/A9MP private > peripherals and encountered something odd. Rather than having a single > large mmio region, I tried splitting into several regions, like this: > > memory_region_init(&s->containe

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-04 Thread Jan Kiszka
On 2011-12-04 11:20, Michael S. Tsirkin wrote: > On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: >> Based on a git bisect, this patch breaks msi-x interrupt delivery in >> the ivshmem device. > > I think the following should fix it. Compiled-only - > could you pls check? If yes let'

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-04 Thread Michael S. Tsirkin
On Sun, Dec 04, 2011 at 01:35:03PM +0100, Jan Kiszka wrote: > On 2011-12-04 11:20, Michael S. Tsirkin wrote: > > On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: > >> Based on a git bisect, this patch breaks msi-x interrupt delivery in > >> the ivshmem device. > > > > I think the fol

Re: [Qemu-devel] [RFC][PATCH 01/16] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Avi Kivity
On 12/03/2011 01:17 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Rename msix_supported to msi_supported and control MSI and MSI-X > activation this way. That was likely to original intention for this > flag, but MSI support came after MSI-X. 'and' is a dangerous word in a changelog entry. > > +

Re: [Qemu-devel] [RFC][PATCH 01/16] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Jan Kiszka
On 2011-12-04 14:12, Avi Kivity wrote: > On 12/03/2011 01:17 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Rename msix_supported to msi_supported and control MSI and MSI-X >> activation this way. That was likely to original intention for this >> flag, but MSI support came after MSI-X. > > 'and'

Re: [Qemu-devel] [RFC][PATCH 10/16] memory: Introduce memory_region_init_reservation

2011-12-04 Thread Avi Kivity
On 12/03/2011 01:17 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Introduce a memory region type that can reserve I/O space. Such regions > are useful for modeling I/O that is only handled outside of QEMU, i.e. > in the context of an accelerator like KVM. Any access to such a region > from QEMU is

[Qemu-devel] [PATCH 2/6] msi: Guard msi_reset with msi_present

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Signed-off-by: Jan Kiszka --- hw/msi.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index 541e4e1..612b168 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -183,6 +183,10 @@ void msi_reset(PCIDevice *dev) uint16_t flags; bool

[Qemu-devel] [PATCH 0/6] msi: Small refactoring

2011-12-04 Thread Jan Kiszka
Collection of patches to improve MSI[X] usability in device models, clean up some minor bits, and help kvm irqchip introduction. CC: Alexander Graf CC: Gerd Hoffmann CC: Isaku Yamahata Jan Kiszka (6): msi: Guard msi/msix_write_config with msi_present msi: Guard msi_reset with msi_present

[Qemu-devel] [PATCH 6/6] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9 -

[Qemu-devel] [PATCH 1/6] msi: Guard msi/msix_write_config with msi_present

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Terminate msi/msix_write_config early if support is not enabled. This allows to remove checks at the caller site if MSI is optional. Signed-off-by: Jan Kiszka --- hw/msi.c |3 ++- hw/msix.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/msi.c

[Qemu-devel] [PATCH 5/6] msi: Invoke msi/msix_write_config from PCI core

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Also this functions is better invoked by the core than by each and every device. This allows to drop the config_write callbacks from ich and intel-hda. CC: Alexander Graf CC: Gerd Hoffmann CC: Isaku Yamahata Signed-off-by: Jan Kiszka --- hw/ide/ich.c|8 -

Re: [Qemu-devel] [RFC][PATCH 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-04 Thread Avi Kivity
On 12/03/2011 01:17 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Add the basic infrastructure to active in-kernel irqchip support, inject > interrupts into these models, and maintain IRQ routes. > > Routing is optional and depends on the host arch supporting > KVM_CAP_IRQ_ROUTING. When it's not av

[Qemu-devel] [PATCH 3/6] msi: Use msi/msix_present more consistently

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Replace some open-coded msi/msix_present checks and drop redundant msix_supported tests (present implies supported). Signed-off-by: Jan Kiszka --- hw/msi.c |2 +- hw/msix.c | 13 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/msi.c b/hw/

[Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka There is no point in pushing this burden to the devices, they may rather forget to call them (like intel-hda and ahci ATM). Instead, reset functions are now called from pci_device_reset and pci_bridge_reset. They do nothing if the MSI/MSI-X is not in use. CC: Alexander Graf CC:

Re: [Qemu-devel] [RFC][PATCH 10/16] memory: Introduce memory_region_init_reservation

2011-12-04 Thread Jan Kiszka
On 2011-12-04 14:20, Avi Kivity wrote: > On 12/03/2011 01:17 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Introduce a memory region type that can reserve I/O space. Such regions >> are useful for modeling I/O that is only handled outside of QEMU, i.e. >> in the context of an accelerator like KV

Re: [Qemu-devel] [RFC][PATCH 13/16] kvm: x86: Add user space part for in-kernel APIC

2011-12-04 Thread Avi Kivity
On 12/03/2011 01:17 PM, Jan Kiszka wrote: > From: Jan Kiszka > > This introduces the alternative APIC model 'kvm-apic' which makes use of > KVM's in-kernel device model. MSI is not yet supported, so we disable > this when the in-kernel model is in use. > > > -dev = qdev_create(NULL, "apic");

Re: [Qemu-devel] [RFC][PATCH 01/16] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Avi Kivity
On 12/04/2011 03:16 PM, Jan Kiszka wrote: > On 2011-12-04 14:12, Avi Kivity wrote: > > On 12/03/2011 01:17 PM, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> Rename msix_supported to msi_supported and control MSI and MSI-X > >> activation this way. That was likely to original intention for this

Re: [Qemu-devel] [RFC][PATCH 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-04 Thread Jan Kiszka
On 2011-12-04 14:23, Avi Kivity wrote: > On 12/03/2011 01:17 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Add the basic infrastructure to active in-kernel irqchip support, inject >> interrupts into these models, and maintain IRQ routes. >> >> Routing is optional and depends on the host arch sup

Re: [Qemu-devel] [RFC][PATCH 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-04 Thread Avi Kivity
On 12/04/2011 03:27 PM, Jan Kiszka wrote: > On 2011-12-04 14:23, Avi Kivity wrote: > > On 12/03/2011 01:17 PM, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> Add the basic infrastructure to active in-kernel irqchip support, inject > >> interrupts into these models, and maintain IRQ routes. > >>

Re: [Qemu-devel] [RFC][PATCH 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-04 Thread Jan Kiszka
On 2011-12-04 14:28, Avi Kivity wrote: > On 12/04/2011 03:27 PM, Jan Kiszka wrote: >> On 2011-12-04 14:23, Avi Kivity wrote: >>> On 12/03/2011 01:17 PM, Jan Kiszka wrote: From: Jan Kiszka Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into t

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Avi Kivity
On 12/03/2011 01:17 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Introduce the alternative 'kvm-i8259' device model that exploits KVM > in-kernel acceleration. > > The PIIX3 initialization code is furthermore extended by KVM specific > IRQ route setup. Moreover, GSI injection differs in KVM mode f

Re: [Qemu-devel] [RFC][PATCH 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-04 Thread Avi Kivity
On 12/04/2011 03:30 PM, Jan Kiszka wrote: > > Well, I have to comment on something. If you don't want spelling > > corrections, leave some trailing whitespace. > > I could create a messpatch.pl... Ah, and with a --reverse flag we could go through the motions of patch review without requiring a re

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Jan Kiszka
On 2011-12-04 14:31, Avi Kivity wrote: > On 12/03/2011 01:17 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Introduce the alternative 'kvm-i8259' device model that exploits KVM >> in-kernel acceleration. >> >> The PIIX3 initialization code is furthermore extended by KVM specific >> IRQ route setu

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Avi Kivity
On 12/04/2011 03:42 PM, Jan Kiszka wrote: > On 2011-12-04 14:31, Avi Kivity wrote: > > On 12/03/2011 01:17 PM, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> Introduce the alternative 'kvm-i8259' device model that exploits KVM > >> in-kernel acceleration. > >> > >> The PIIX3 initialization code

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Jan Kiszka
On 2011-12-04 14:49, Avi Kivity wrote: > On 12/04/2011 03:42 PM, Jan Kiszka wrote: >> On 2011-12-04 14:31, Avi Kivity wrote: >>> On 12/03/2011 01:17 PM, Jan Kiszka wrote: From: Jan Kiszka Introduce the alternative 'kvm-i8259' device model that exploits KVM in-kernel acceleratio

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Avi Kivity
On 12/04/2011 03:51 PM, Jan Kiszka wrote: > > > > But the name becomes part of the save/restore ABI, so you can't. > > Nope, the vmstate names are identical. That would ruin migration > otherwise. It's just the output of info qtree & co. that changes. Oh, okay. I still think it's wrong, but now

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Jan Kiszka
On 2011-12-04 15:04, Avi Kivity wrote: > On 12/04/2011 03:51 PM, Jan Kiszka wrote: >>> >>> But the name becomes part of the save/restore ABI, so you can't. >> >> Nope, the vmstate names are identical. That would ruin migration >> otherwise. It's just the output of info qtree & co. that changes. >

Re: [Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core

2011-12-04 Thread Michael S. Tsirkin
On Sun, Dec 04, 2011 at 02:22:12PM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > There is no point in pushing this burden to the devices, they may rather > forget to call them (like intel-hda and ahci ATM). Instead, reset > functions are now called from pci_device_reset and pci_bridge_reset. >

Re: [Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core

2011-12-04 Thread Jan Kiszka
On 2011-12-04 15:24, Michael S. Tsirkin wrote: > On Sun, Dec 04, 2011 at 02:22:12PM +0100, Jan Kiszka wrote: >> From: Jan Kiszka >> >> There is no point in pushing this burden to the devices, they may rather >> forget to call them (like intel-hda and ahci ATM). Instead, reset >> functions are now

[Qemu-devel] [PATCH v2 00/16] uq/master: Introduce basic irqchip support

2011-12-04 Thread Jan Kiszka
This is v2, addressing the feedback comments provided so far, namely: - dropped #include <> conversions - do not abort() on reserved memory region accesses but only warn once - use memory_region_init_io in memory_region_init_reservation Patch 1 of this series has meanwhile been posted for direc

[Qemu-devel] [PATCH v2 03/16] apic: Stop timer on reset

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/apic.

[Qemu-devel] [PATCH v2 07/16] ioapic: Convert to memory API

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka This maintains the old imprecise access size handling. Signed-off-by: Jan Kiszka --- hw/ioapic.c | 28 +++- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 61991d7..56b1612 100644 --- a/hw/ioapic.c +++

Re: [Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core

2011-12-04 Thread Michael S. Tsirkin
On Sun, Dec 04, 2011 at 03:35:38PM +0100, Jan Kiszka wrote: > On 2011-12-04 15:24, Michael S. Tsirkin wrote: > > On Sun, Dec 04, 2011 at 02:22:12PM +0100, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> There is no point in pushing this burden to the devices, they may rather > >> forget to call

[Qemu-devel] [PATCH v2 13/16] kvm: x86: Add user space part for in-kernel APIC

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka This introduces the alternative APIC model 'kvm-apic' which makes use of KVM's in-kernel device model. MSI is not yet supported, so we disable this when the in-kernel model is in use. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/kvm/apic.c | 147 +

[Qemu-devel] [PATCH v2 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Introduce the alternative 'kvm-i8259' device model that exploits KVM in-kernel acceleration. The PIIX3 initialization code is furthermore extended by KVM specific IRQ route setup. Moreover, GSI injection differs in KVM mode from the user space model. As we can dispatch ISA-range

Re: [Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core

2011-12-04 Thread Jan Kiszka
On 2011-12-04 15:48, Michael S. Tsirkin wrote: > On Sun, Dec 04, 2011 at 03:35:38PM +0100, Jan Kiszka wrote: >> On 2011-12-04 15:24, Michael S. Tsirkin wrote: >>> On Sun, Dec 04, 2011 at 02:22:12PM +0100, Jan Kiszka wrote: From: Jan Kiszka There is no point in pushing this burden to

[Qemu-devel] [PATCH v2 10/16] memory: Introduce memory_region_init_reservation

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug, but could theoretically be triggered by guest

[Qemu-devel] [PATCH v2 12/16] kvm: x86: Establish IRQ0 override control

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka --- hw/pc.c|3 ++- kvm-all.c |5 + kvm-stu

[Qemu-devel] [PATCH v2 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka More KVM-specific devices will come, so let's start with moving the kvmclock into a dedicated folder. Signed-off-by: Jan Kiszka --- Makefile.target|4 ++-- configure |1 + hw/{kvmclock.c => kvm/clock.c} |4 ++-- hw/{kvmclock.h =

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Avi Kivity
On 12/04/2011 04:06 PM, Jan Kiszka wrote: > On 2011-12-04 15:04, Avi Kivity wrote: > > On 12/04/2011 03:51 PM, Jan Kiszka wrote: > >>> > >>> But the name becomes part of the save/restore ABI, so you can't. > >> > >> Nope, the vmstate names are identical. That would ruin migration > >> otherwise. It

[Qemu-devel] [PATCH v2 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into these models, and maintain IRQ routes. Routing is optional and depends on the host arch supporting KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as we can't route GSI

[Qemu-devel] [PATCH v2 15/16] kvm: x86: Add user space part for in-kernel IOAPIC

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka This introduces the KVM-accelerated IOAPIC model 'kvm-ioapic' and extends the IRQ routing setup by the 0->2 redirection when needed. The kvm-ioapic model has a property that allows to define its GSI base for injecting interrupts into the kernel model. This will allow to disentan

[Qemu-devel] [PATCH v2 05/16] apic: Open-code timer save/restore

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka To enable migration between accelerated and non-accelerated APIC models, we will need to handle the timer saving and restoring specially and can no longer rely on the automatics of VMSTATE_TIMER. Specifically, accelerated model will not start any QEMUTimer. This patch therefore

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Jan Kiszka
On 2011-12-04 16:12, Avi Kivity wrote: > On 12/04/2011 04:06 PM, Jan Kiszka wrote: >> On 2011-12-04 15:04, Avi Kivity wrote: >>> On 12/04/2011 03:51 PM, Jan Kiszka wrote: > > But the name becomes part of the save/restore ABI, so you can't. Nope, the vmstate names are identical. Th

[Qemu-devel] [PATCH v2 06/16] i8259: Factor out core for KVM reuse

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. In this case it is the PicState, vmstate description, a reset core and some init bits. Signed-off-by: Jan Kiszka --- Makefile.objs |2 +- hw/i8259.c | 78 +

[Qemu-devel] [PATCH v2 09/16] ioapic: Factor out core for KVM reuse

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka KVM will share the IOAPICState, the vmstate, the reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/ioapic.c | 108 - hw/ioapic_common.c |

[Qemu-devel] [PATCH v2 16/16] kvm: Arm in-kernel irqchip support

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka --- qemu-config.c |4 qemu-options.hx |5 - 2 files changed, 8 insertions(

[Qemu-devel] [PATCH v2 01/16] msi: Generalize msix_supported to msi_supported

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9 -

[Qemu-devel] [PATCH v2 04/16] apic: Factor out core for KVM reuse

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka The KVM in-kernel APIC model will reuse parts of the user space model, namely the vmstate, reset handling, IRQ coalescing tracker, some init steps and the base and tpr set/get routines. For the latter, we also prepare set callbacks as KVM will override those. Signed-off-by: Jan

[Qemu-devel] [PATCH v2 08/16] ioapic: Reject non-dword accesses to IOWIN register

2011-12-04 Thread Jan Kiszka
From: Jan Kiszka Aligns the model with the spec. Signed-off-by: Jan Kiszka --- hw/ioapic.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 56b1612..eb75766 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -208,6 +208,9 @@ ioapic_mem_re

Re: [Qemu-devel] [Bug 899143] [NEW] Raw img not recognized by Windows

2011-12-04 Thread Vincent Autefage
Ok thanks a lot :) Vincent Autefage Le 03/12/2011 19:45, Stefan Hajnoczi a écrit : > On Fri, Dec 2, 2011 at 2:45 PM, Vincent Autefage > <899...@bugs.launchpad.net> wrote: >> $ qemu-img create -f raw root.img 100GB >> $ mkntfs -F root.img >> $ qemu -name W -sdl -m 2048 -enable-kvm -localtime -k fr

Re: [Qemu-devel] [Bug 899140] Re: Problem with Linux Kernel Traffic Control

2011-12-04 Thread Vincent Autefage
The result without TC is about 120 Mbit/s. I check the bandwidth with lot of programs (not only with Iperf) and the result is also the same However, if I use the same raw image and the same TC configuration with the version 0.14.0 of QEMU or with some real physical hosts, the result with TC

[Qemu-devel] [Bug 899961] [NEW] qemu/kvm locks up when run 32bit userspace with 64bit kernel

2011-12-04 Thread Michael Tokarev
Public bug reported: Applies to both qemu and qemu-kvm 1.0, but only when kernel is 64bit and userspace is 32bit, on x86. Did not happen with previous released versions, such as 0.15. Not all guests triggers this issue - so far, only (32bit) windows 7 guest shows it, but does that quite reliable

[Qemu-devel] linux-user: interrupting syscalls

2011-12-04 Thread Peter Maydell
Disclaimer: I'm writing this email because I had a neat idea about how to solve a problem which Alex Graf discovered, but I don't have the time to actually implement it :-) Consider the following guest code, to be run under linux-user mode: ---begin--- #include #include #include #include int

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Avi Kivity
On 12/04/2011 05:19 PM, Jan Kiszka wrote: > > > > In the sense that kernel-apic is just an accelerated apic. From the > > guest point of view, there's no difference, and that should be reflected > > in the device model. > > That was my goal as well: The guest should not notice the difference, > b

[Qemu-devel] [Bug 899961] Re: qemu/kvm locks up when run 32bit userspace with 64bit kernel

2011-12-04 Thread Michael Tokarev
Actually after trying to do lots of experiments and finally a git bisection, it turned out that the issue only affects qemu-kvm, not upstream qemu. Bisection between qemu-kvm 0.15.0 and 1.0 lead to this commit: commit 145e11e840500e04a4d0a624918bb17596be19e9 Merge: ce967f6 b195043 Author: Avi Kiv

[Qemu-devel] [PATCH v2 0/6] Memory API mutators

2011-12-04 Thread Avi Kivity
This patchset introduces memory_region_set_enabled() and memory_region_set_address() to avoid the requirement on memory routers to track the internal state of the memory API (so they know whether they need to add or remove a region). Instead, they can simply copy the state of the region from the g

[Qemu-devel] [PATCH v2 4/6] memory: optimize empty transactions due to mutators

2011-12-04 Thread Avi Kivity
The mutating memory APIs can easily cause empty transactions, where the mutators don't actually change anything, or perhaps only modify disabled regions. Detect these conditions and avoid regenerating the memory topology. Signed-off-by: Avi Kivity --- memory.c |8 +++- 1 files changed,

[Qemu-devel] [PATCH v2 2/6] memory: introduce memory_region_set_address()

2011-12-04 Thread Avi Kivity
Allow changing the address of a memory region while it is in the memory hierarchy. Signed-off-by: Avi Kivity --- memory.c | 21 + memory.h | 11 +++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index d0f90ca..a080d21 100644 -

[Qemu-devel] [PATCH v2 6/6] piix_pci: adapt smram mapping to use memory mutators

2011-12-04 Thread Avi Kivity
Eliminates fake state ->smram_enabled. Signed-off-by: Avi Kivity --- hw/piix_pci.c | 20 ++-- 1 files changed, 6 insertions(+), 14 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index d183443..ac3d898 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -81,7 +81,6 @@ st

[Qemu-devel] [PATCH v2 5/6] cirrus_vga: adapt to memory mutators API

2011-12-04 Thread Avi Kivity
Simplify the code by avoiding dynamic creation and destruction of memory regions. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 50 +- 1 files changed, 17 insertions(+), 33 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index c7e3

[Qemu-devel] [Bug 899961] Re: qemu/kvm locks up when run 32bit userspace with 64bit kernel

2011-12-04 Thread Michael Tokarev
And some more info. Debugging with gdb shows this: (gdb) info threads Id Target Id Frame 2Thread 0xf6d4eb70 (LWP 28697) "qemu-system-x86" 0xf7711425 in __kernel_vsyscall () * 1Thread 0xf6f50700 (LWP 28694) "qemu-system-x86" 0xf7711425 in __kernel_vsyscall () (gdb) bt #0

[Qemu-devel] [PATCH 1/3] QEMU kvm: Syncing linux headers to 3.2.0-rc1

2011-12-04 Thread Raghavendra K T
Update the kvm kernel headers to the 3.2.0-rc1 post using scripts/update-linux-headers.sh script. Signed-off-by: Raghavendra K T --- diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h index fb3fddc..08fe69e 100644 --- a/linux-headers/asm-powerpc/kvm.h +++ b/linux-head

[Qemu-devel] [PATCH 0/3] QEMU kvm: Adding KICK_VCPU capability to i386 kvm

2011-12-04 Thread Raghavendra K T
From: Raghavendra K T Three patch series following this, extends KVM-hypervisor and Linux guest running on KVM-hypervisor to support pv-ticket spinlocks. PV ticket spinlock helps to solve Lock Holder Preemption problem discussed in http://www.amd64.org/fileadmin/user_upload/pub/LHP-commented_sli

[Qemu-devel] [PATCH 3/3] QEMU kvm/i386 : Adding KICK_VCPU capability support in i386 target.

2011-12-04 Thread Raghavendra K T
Extend the KVM Hypervisor to enable KICK_VCPU feature that allows a vcpu to kick the halted vcpu to continue with execution in PV ticket spinlock. Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Raghavendra K T --- diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5bfc21f..69bce21 10064

[Qemu-devel] [PATCH 2/3] QEMU kvm: Syncing linux headers to support KICK_VCPU capability

2011-12-04 Thread Raghavendra K T
Update the kernel header that adds a hypercall to support pv-ticketlocks. Signed-off-by: Raghavendra K T --- diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h index f2ac46a..03d3a36 100644 --- a/linux-headers/asm-x86/kvm_para.h +++ b/linux-headers/asm-x86/kvm_para.h

[Qemu-devel] [PATCH v2 3/6] memory: introduce memory_region_set_alias_offset()

2011-12-04 Thread Avi Kivity
Add an API to update an alias offset of an active alias. This can be used to simplify implementation of dynamic memory banks. Signed-off-by: Avi Kivity --- memory.c | 14 ++ memory.h | 13 - 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/memory.c b/m

[Qemu-devel] [PATCH v2 1/6] memory: introduce memory_region_set_enabled()

2011-12-04 Thread Avi Kivity
This allows users to disable a memory region without removing it from the hierarchy, simplifying the implementation of memory routers. Signed-off-by: Avi Kivity --- memory.c | 40 +--- memory.h | 17 + 2 files changed, 46 insertions(+), 11

Re: [Qemu-devel] [PATCH v2 00/18] qom: dynamic properties and composition tree (v2)

2011-12-04 Thread Anthony Liguori
On 12/03/2011 03:34 PM, Anthony Liguori wrote: On 12/03/2011 08:24 AM, Paolo Bonzini wrote: On 12/03/2011 03:40 AM, Anthony Liguori wrote: That is still true. The next step, inheritance, will pull the properties into a base class. That base class can be used elsewhere outside of the device mode

Re: [Qemu-devel] sub-page-sized mmio regions and address passed to read/write fns

2011-12-04 Thread Peter Maydell
On 4 December 2011 12:17, Avi Kivity wrote: > On 12/02/2011 04:49 PM, Peter Maydell wrote: >> However what I found is that the addresses passed to the read/write >> functions aren't what I would expect. For instance if the board >> maps the container at address 0x1e00, then a read from 0x1e000

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Blue Swirl
On Sun, Dec 4, 2011 at 16:35, Avi Kivity wrote: > On 12/04/2011 05:19 PM, Jan Kiszka wrote: >> > >> > In the sense that kernel-apic is just an accelerated apic.  From the >> > guest point of view, there's no difference, and that should be reflected >> > in the device model. >> >> That was my goal

Re: [Qemu-devel] [PATCH v2 3/6] memory: introduce memory_region_set_alias_offset()

2011-12-04 Thread Blue Swirl
On Sun, Dec 4, 2011 at 18:09, Avi Kivity wrote: > Add an API to update an alias offset of an active alias.  This can be > used to simplify implementation of dynamic memory banks. > > Signed-off-by: Avi Kivity > --- >  memory.c |   14 ++ >  memory.h |   13 - >  2 files chan

Re: [Qemu-devel] [RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-04 Thread Jan Kiszka
On 2011-12-04 22:31, Blue Swirl wrote: > On Sun, Dec 4, 2011 at 16:35, Avi Kivity wrote: >> On 12/04/2011 05:19 PM, Jan Kiszka wrote: In the sense that kernel-apic is just an accelerated apic. From the guest point of view, there's no difference, and that should be reflected in

Re: [Qemu-devel] [PATCH for v1.0 1/3] msix: track function masked in pci device state

2011-12-04 Thread Cam Macdonell
On Sun, Dec 4, 2011 at 3:20 AM, Michael S. Tsirkin wrote: > On Fri, Dec 02, 2011 at 04:34:21PM -0700, Cam Macdonell wrote: >> Based on a git bisect, this patch breaks msi-x interrupt delivery in >> the ivshmem device. > > I think the following should fix it. Compiled-only - > could you pls check?

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-04 Thread Dong Xu Wang
Ping... 2011/11/28 Dong Xu Wang > Any comment? > Thanks. > > > 2011/11/15 Dong Xu Wang > >> From: Dong Xu Wang >> >> Provide a new file format: add-cow. The usage can be found in add-cow.txt >> of >> this patch. >> >> Signed-off-by: Dong Xu Wang >> --- >> Makefile.objs |1 + >>

Re: [Qemu-devel] windows guest virtio serial and balloon driver test issues

2011-12-04 Thread Cao,Bing Bu
On 11/29/2011 08:36 PM, Vadim Rozenfeld wrote: On Tue, 2011-11-29 at 08:58 +0800, Cao,Bing Bu wrote: Hi, Rozenfeld,Thanks,got it! And do you know whether there are some sufficient test tools (such as IOmeter) to test the virtio driver performance? IoMeter is good. But you al

Re: [Qemu-devel] [KVM][Kemari]: Build error fix

2011-12-04 Thread OHMURA Kei
On 2011/12/02 21:51, Pradeep Kumar wrote: > It fixes build failure. > > I hit this error, after succsfull migration and sync. > > (qemu) qemu-system-x86_64: fill buffer failed, Interrupted system call > > qemu-system-x86_64: recv header failed > > qemu-system-x86_64: recv ack failed > > qemu_t

Re: [Qemu-devel] [BUG] [Seabios] PCI 64bit BARs on Win2008 - unable to start the device. (ACPI lacks the _DSM method)

2011-12-04 Thread Alexey Korolev
Hi Michael, Thank you for good advice, you are right. When I added new range above 4GB in _CRS the problem has gone. QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x, // Address Space Granularity

Re: [Qemu-devel] [BUG] [Seabios] PCI 64bit BARs on Win2008 - unable to start the device. (ACPI lacks the _DSM method)

2011-12-04 Thread Alexey Korolev
Hi Gerd, We have very early prototype of data acquisition device, with quite large MMIO buffer. It is an emulated device. We are running the 0.15 release. 0.15 doesn't work correctly with 64bit BARs so I've already added some hacks to Seabios to let OS to choose the memory region. Thus you se

Re: [Qemu-devel] [PATCH v4 2/3] Extract code to nbd_setup function to be used for many purposes

2011-12-04 Thread Chunyan Liu
2011/12/3 Paolo Bonzini > On 12/02/2011 04:27 PM, Chunyan Liu wrote: > >> @@ -42,6 +42,18 @@ static int verbose; >> static char *device; >> static char *srcpath; >> static char *sockpath; >> +static int is_sockpath_option; >> +static int sigterm_fd[2]; >> +static off_t dev_offset; >> +static u

Re: [Qemu-devel] Improve QEMU performance with LLVM codegen and other techniques

2011-12-04 Thread 陳韋任
> > We ask TCG to disassemble the guest binary where the trace beginning with > > _again_ to get a set of TCG blocks, then sent them to the LLVM translator. > > So you have two TCG backends? One to generate real host code and one that > goes into your LLVM generator? Ah..., I should say we as

Re: [Qemu-devel] [BUG] [Seabios] PCI 64bit BARs on Win2008 - unable to start the device. (ACPI lacks the _DSM method)

2011-12-04 Thread Michael S. Tsirkin
On Mon, Dec 05, 2011 at 05:20:32PM +1300, Alexey Korolev wrote: > Hi Michael, > > Thank you for good advice, you are right. When I added new range > above 4GB in _CRS the problem has gone. > QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, > NonCacheable, ReadWrite, >