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

2012-08-13 Thread Jan Kiszka
On 2012-08-13 10:35, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This is required to get past the following assert with: > > commit 1523ed9e1d46b0b54540049d491475ccac7e6421 > Author: Jan Kiszka > Date: Thu May 17 10:32:39 2012 -0300 > > virtio

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-13 Thread Jan Kiszka
On 2012-08-12 11:24, Michael Tokarev wrote: > On 12.08.2012 12:10, Gleb Natapov wrote: > [] >> Any chance to bisect it? > > The bisecion leads to this commit: > > commit 17ee47418e65b1593defb30edbab33ccd47fc1f8 > Merge: 13b0496 5d17c0d > Author: Jan Kiszka >

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-13 Thread Jan Kiszka
On 2012-08-13 15:16, Michael Tokarev wrote: > On 13.08.2012 17:07, Jan Kiszka wrote: > [] >>> The bisecion leads to this commit: >>> >>> commit 17ee47418e65b1593defb30edbab33ccd47fc1f8 >>> Merge: 13b0496 5d17c0d >>> Author: Jan Kiszka >>&

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

2012-08-13 Thread Jan Kiszka
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 requires a 3.6 kernel, which we cannot assume anyone > has. We'll need the origina

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

2012-08-13 Thread Jan Kiszka
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: Nicholas Bellinger >>> >>> This is required to get past the f

[Qemu-devel] [PATCH uq/master] kvm: i8254: Finish time conversion fix

2012-08-13 Thread Jan Kiszka
offset also on kvm_pit_put. For this purpose, we cache the clock offset in KVMPITState, only updating it on VM state changes or when we write the state while the VM is stopped. Signed-off-by: Jan Kiszka --- hw/kvm/i8254.c | 52 ++-- 1 files changed

Re: [Qemu-devel] [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 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: [Qemu-devel] [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

Re: [Qemu-devel] [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

Re: [Qemu-devel] [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

Re: [Qemu-devel] [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 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

Re: [Qemu-devel] [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 wrote: >> On 2012-08-14 09:40, Peter Maydell wrote: >>> On 14 August 2012 08:33, Jan Kiszka wrote: >>>> KVM_IRQ_LINE is old-style, deprecated, KVM_IRQ_LINE_STATUS (i.e >>>>

[Qemu-devel] [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 --- 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/i8254.c @@ -35,7

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

2012-08-14 Thread Jan Kiszka
offset also on kvm_pit_put. Now we also need to update the offset when we write the state while the VM is stopped as it keeps on changing in that state. Signed-off-by: Jan Kiszka --- hw/kvm/i8254.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/kvm/i8254.c

Re: [Qemu-devel] [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. >>> >>> An

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Jan Kiszka
On 2012-08-14 12:20, Avi Kivity wrote: > On 08/14/2012 11:44 AM, Markus Armbruster wrote: >> >> Next error: >> >> $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 >> -monitor stdio -m 640k >> [...] >> Program received signal SIGSEGV, Segmentation fault. >> [...] >>

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Jan Kiszka
On 2012-08-14 12:51, Avi Kivity wrote: > On 08/14/2012 01:44 PM, Jan Kiszka wrote: >> On 2012-08-14 12:20, Avi Kivity wrote: >>> On 08/14/2012 11:44 AM, Markus Armbruster wrote: >>>> >>>> Next error: >>>> >>>> $ gdb --args

Re: [Qemu-devel] [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 u

[Qemu-devel] [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 Signed-off-by: Jan Kiszka --- hw/apic_common.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/apic_common.c b/hw/apic_common.c

Re: [Qemu-devel] [PATCH] audio: Make pcspk card selectable again

2012-08-14 Thread Jan Kiszka
On 2012-07-20 09:17, Jan Kiszka wrote: > From: Jan Kiszka > > Since we moved pcspk into hwlib, CONFIG_PCSPK is no longer defined per > target. Therefore, statically built soundhw array in arch_init.c stopped > including this card. > > Work around this by re-adding

[Qemu-devel] [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 Signed-off-by: Jan Kiszka --- hw

Re: [Qemu-devel] [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 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

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-14 Thread Jan Kiszka
On 2012-08-14 15:16, Avi Kivity wrote: > On 08/14/2012 02:01 PM, Jan Kiszka wrote: > >>>> We can also easily automatically disable it when there is insufficient >>>> (<1MB) memory. Will post a patch. >>> >>> Would be nicer if it auto-disabl

Re: [Qemu-devel] [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 >&

Re: [Qemu-devel] [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 +08

Re: [Qemu-devel] [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 writes: >> >>> On 2012-08-13 15:58, Avi Kivity wrote: >>>> On 08/13/2012 04:27 PM, Anthony Liguori wrote: >>>> >>>>> Thanks

Re: [Qemu-devel] [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 r

Re: [Qemu-devel] [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

[Qemu-devel] [RESEND][PATCH for 1.2] audio: Make pcspk card selectable again

2012-08-16 Thread Jan Kiszka
. Signed-off-by: Jan Kiszka --- configure |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/configure b/configure index be292fe..672da59 100755 --- a/configure +++ b/configure @@ -3902,6 +3902,11 @@ if test "$target_bsd_user" = "yes" ; then ech

Re: [Qemu-devel] [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 &

[Qemu-devel] [RESEND][PATCH for 1.2] i82378: Remove bogus MMIO coalescing

2012-08-17 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- hw/i82378.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/i82378.c b/hw/i82378.c index 9b11d90..2123c14 100644 --- a/hw/i82378.c +++ b/hw/i82378.c @@ -225,7 +225,6 @@ static int pci_i82378_init(PCIDevice *dev) pci_register_bar(dev

Re: [Qemu-devel] [RESEND][PATCH for 1.2] i82378: Remove bogus MMIO coalescing

2012-08-17 Thread Jan Kiszka
On 2012-08-17 13:13, Michael Tokarev wrote: > On 17.08.2012 14:56, Jan Kiszka wrote: >> This MMIO area is an entry gate to legacy PC ISA devices, addressed via >> PIO over there. Quite a few of the PIO ports have side effects on access >> like starting/stopping timers

Re: [Qemu-devel] qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

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

Re: [Qemu-devel] [PATCH for 1.2] console: Fix warning from clang (and potential crash)

2012-08-17 Thread Jan Kiszka
if (active_console->cursor_timer) { > +if (active_console && active_console->cursor_timer) { > qemu_del_timer(active_console->cursor_timer); > } > active_console = s; > The only path that could trigger this is console_select() in

Re: [Qemu-devel] qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

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

Re: [Qemu-devel] qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

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

Re: [Qemu-devel] qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop

2012-08-17 Thread Jan Kiszka
On 2012-08-17 16:41, Jan Kiszka wrote: > On 2012-08-17 16:36, Jan Kiszka wrote: >> On 2012-08-17 15:11, Jan Kiszka wrote: >>> On 2012-08-06 17:11, Stefan Hajnoczi wrote: >>>> On Thu, Jun 28, 2012 at 2:05 PM, Peter Lieven wrote: >>>>> i debugged my i

[Qemu-devel] [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 --- Alex, please update your vfio patch accordingly. hw/virtio-pci.c |4

[Qemu-devel] [PATCH] Drop redundant resume_all_vcpus from main

2012-08-20 Thread Jan Kiszka
VCPUs are either resumed directly via vm_start, after the incoming migration is done, or when a continue command is issued. We don't need the explicit resume before entering main_loop. Signed-off-by: Jan Kiszka --- I was adding nesting support to pause/resume_all_vcpus, and that stumbled

Re: [Qemu-devel] 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 >>>> sig

Re: [Qemu-devel] [PATCH] Drop redundant resume_all_vcpus from main

2012-08-21 Thread Jan Kiszka
On 2012-08-21 09:01, Paolo Bonzini wrote: > Il 20/08/2012 20:11, Jan Kiszka ha scritto: >> VCPUs are either resumed directly via vm_start, after the incoming >> migration is done, or when a continue command is issued. We don't need >> the explicit resume before entering m

Re: [Qemu-devel] [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

Re: [Qemu-devel] [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 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(

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread Jan Kiszka
On 2012-08-22 07:57, David Gibson wrote: > On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: >> >> On 22.08.2012, at 06:59, David Gibson wrote: >> >>> cpu_physical_memory_write_rom(), despite the name, can also be used to >>> write images into RAM - and will often be used that way if

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-22 Thread Jan Kiszka
On 2012-08-22 08:47, Jan Kiszka wrote: > On 2012-08-22 07:57, David Gibson wrote: >> On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: >>> >>> On 22.08.2012, at 06:59, David Gibson wrote: >>> >>>> cpu_physical_memory_write_rom(),

Re: [Qemu-devel] [PATCH] Correct computation of bytes per pixel from bits per pixel

2012-08-22 Thread Jan Kiszka
Can you use this free space to provide a scenario where the missing round-up caused a problem? On 2012-08-21 23:32, BALATON Zoltan wrote: > > Signed-off-by: BALATON Zoltan > --- > console.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/console.c b/console.c >

Re: [Qemu-devel] [PATCH] vmware_vga: Cleanup and allow simple drivers to work without the fifo

2012-08-22 Thread Jan Kiszka
On 2012-08-21 23:33, BALATON Zoltan wrote: > > Detailed changes: Removing info available elsewhere from vmsvga_state. > Fix mixup between depth and bits per pixel. Return a value for FB_SIZE > even before enabled (according to the documentation, drivers should > read this value before enabling the

Re: [Qemu-devel] ivshmem assertion failure with EventNotifier

2012-08-22 Thread Jan Kiszka
On 2012-08-22 06:29, Cam Macdonell wrote: > Hi Paolo, > > I've noticed an assertion error when sending interrupts via ivshmem. > I bisected to this patch. > > commit 563027cc0c94aa4846c18f9d665a4c90f8c42ba8 > Author: Paolo Bonzini > Date: Thu Jul 5 17:16:25 2012 +0200 > > ivshmem: use Eve

Re: [Qemu-devel] setting up breakpoints - kernel debugging help wit gdb in qemu-kvm

2012-08-22 Thread Jan Kiszka
On 2012-08-22 01:53, Onkar wrote: > I am running a linux guest like this - which I wish to debug - > but the breakpoint gets set but I am not able to stop the guest > execution at the set breakpoint - it just hangs after I do continue. > Can you please provide me some clues - > > # ./qemu-syst

Re: [Qemu-devel] Bug in option parsing

2012-08-22 Thread Jan Kiszka
On 2012-08-22 17:05, Martin Kletzander wrote: > Hi everybody, > > while coding the support for Jason's dump-guest-core option I realized > there is (probably) a problem with the way QEMU parses additional > machine options ('dump-guest-core', 'kvm_shadow_mem' etc.). Running QEMU > with option to -

Re: [Qemu-devel] [PATCH] vmware_vga: Cleanup and allow simple drivers to work without the fifo

2012-08-22 Thread Jan Kiszka
On 2012-08-22 12:19, BALATON Zoltan wrote: > On Wed, 22 Aug 2012, Jan Kiszka wrote: >> This is a rather big patch. I strongly suspect you can break it up into >> smaller pieces that address separate aspects one-by-one. Also, it is >> definitely to heavy for "qemu-trivi

Re: [Qemu-devel] [PATCH v2] console: Correct computation of bytes per pixel from bits per pixel

2012-08-22 Thread Jan Kiszka
On 2012-08-22 17:19, BALATON Zoltan wrote: > Division with round up is the correct way to compute this even if the > only case where division with round down gives incorrect result is > probably 15 bpp. This case was explicitely patched up in one of these > functions but was unhandled in the other.

Re: [Qemu-devel] Bug in option parsing

2012-08-22 Thread Jan Kiszka
On 2012-08-22 17:58, Martin Kletzander wrote: > On 08/22/2012 05:15 PM, Jan Kiszka wrote: >> On 2012-08-22 17:05, Martin Kletzander wrote: >>> Hi everybody, >>> >>> while coding the support for Jason's dump-guest-core option I realized >>> ther

Re: [Qemu-devel] [PATCH v2] console: Correct computation of bytes per pixel from bits per pixel

2012-08-22 Thread Jan Kiszka
On 2012-08-22 18:29, Stefan Weil wrote: > Am 22.08.2012 17:32, schrieb Jan Kiszka: >> On 2012-08-22 17:19, BALATON Zoltan wrote: >>> Division with round up is the correct way to compute this even if the >>> only case where division with round down gives incorrect re

Re: [Qemu-devel] [PATCH v2] console: Correct computation of bytes per pixel from bits per pixel

2012-08-22 Thread Jan Kiszka
On 2012-08-22 18:44, Jan Kiszka wrote: > On 2012-08-22 18:29, Stefan Weil wrote: >> Am 22.08.2012 17:32, schrieb Jan Kiszka: >>> On 2012-08-22 17:19, BALATON Zoltan wrote: >>>> Division with round up is the correct way to compute this even if the >>>> only

Re: [Qemu-devel] [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

[Qemu-devel] [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 --- memory.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c

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

2012-08-23 Thread Jan Kiszka
r relevant 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 m

[Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler

2012-08-23 Thread Jan Kiszka
No need for this indirection via qemu_notify_event. On Unix, we already catch SIGALRM via signalfd (or its emulation) and run the handler synchronously. Under Win32, handlers run in separate threads. So we just need to grab the global lock around the handler execution. Signed-off-by: Jan Kiszka

[Qemu-devel] [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 --- 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 +1076,9 @@ void

[Qemu-devel] [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 --- kvm-all.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index e0244b6..432b84f 100644 --- a

[Qemu-devel] [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 --- 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 --- a/memory.c +++ b

[Qemu-devel] [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 --- hw/cirrus_vga.c |7

[Qemu-devel] [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 --- memory.c | 39 +++ 1 files changed, 11 insertions(+), 28 deletions(-) diff --git a/memory.c b/memory.c index

Re: [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler

2012-08-23 Thread Jan Kiszka
On 2012-08-23 13:39, Paolo Bonzini wrote: > Il 23/08/2012 13:23, Jan Kiszka ha scritto: >> No need for this indirection via qemu_notify_event. On Unix, we already >> catch SIGALRM via signalfd (or its emulation) and run the handler >> synchronously. Under Win32, handlers ru

Re: [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler

2012-08-23 Thread Jan Kiszka
On 2012-08-23 14:24, Paolo Bonzini wrote: > Il 23/08/2012 14:10, Jan Kiszka ha scritto: >>> Can you expand on this? >> >> Well, this patch removes an indirection from timer event deliveries. So >> it reduces overhead, though only noticeable if you have high-rate time

Re: [Qemu-devel] 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 Xon

Re: [Qemu-devel] [PATCH V5 2/8] hw/acpi_piix4.c: replace register_ioport*

2012-08-23 Thread Jan Kiszka
On 2012-08-22 14:27, Julien Grall wrote: > This patch replaces all register_ioport* with the new memory API. It permits > to use the new Memory stuff like listener. > > Signed-off-by: Julien Grall > --- > hw/acpi_piix4.c | 160 ++ > 1 files ch

Re: [Qemu-devel] [PATCH V5 0/8] memory: unifiy ioport registration

2012-08-23 Thread Jan Kiszka
On 2012-08-22 14:27, Julien Grall wrote: > This is the fifth version of patch series about ioport registration. > The fourth version was sent few months ago > (https://lists.gnu.org/archive/html/qemu-devel/2012-04/msg01396.html). > > Some part of QEMU still use register_ioport* functions to regist

Re: [Qemu-devel] [RFC][PATCH] qemu-timer: Run timers in alarm timer handler

2012-08-23 Thread Jan Kiszka
On 2012-08-23 15:11, Paolo Bonzini wrote: >>> So, in order to remove the qemu_notify_event completely, what about not >>> using signals anymore for timers? You could just tweak the select >>> timeout and drop all the -clock madness. Zero syscalls, practically no >>> overhead. If this is not prec

Re: [Qemu-devel] [PATCH v2 6/6] i8259: add -no-spurious-interrupt-hack option

2012-08-23 Thread Jan Kiszka
On 2012-08-23 08:24, Matthew Ogilvie wrote: > This patch provides a way to optionally suppress spurious interrupts, > as a workaround for systems described below: > > Some old operating systems do not handle spurious interrupts well, > and qemu tends to generate them significantly more often than

Re: [Qemu-devel] [PATCH v2 0/6] Running Microport UNIX (ca 1987)

2012-08-23 Thread Jan Kiszka
On 2012-08-24 05:58, malc wrote: > On Thu, 23 Aug 2012, Matthew Ogilvie wrote: > >> After applying this version 2 of this patch series, I can >> successfully run "Micoport UNIX System V/386, v 2.1" (ca 1987) >> under qemu. (although not if I try to enable KVM) >> >> Version 1 of this series was p

Re: [Qemu-devel] MSI-X bug with ivshmem since msix_reset moved to PCI

2012-08-23 Thread Jan Kiszka
On 2012-08-24 01:13, Cam Macdonell wrote: > Hi Jan, > > I've bisected a bug in which MSI interrupts are not being delivered to > the following patch, where msix_reset was moved in tot he PCI core. > > commit cbd2d4342b3d42ab33baa99f5b7a23491b5692f2 > Author: Jan Kiszk

[Qemu-devel] [PATCH v2][for 1.2?] msix: Drop tracking of used vectors

2012-08-23 Thread Jan Kiszka
From: Jan Kiszka This optimization was once used in qemu-kvm to keep KVM route usage low. But now we solved that problem via lazy updates. It also tried to handle the case of vectors shared between different sources of the same device. However, this never really worked and will have to be

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

2012-08-23 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

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

2012-08-23 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_

Re: [Qemu-devel] MSI-X bug with ivshmem since msix_reset moved to PCI

2012-08-24 Thread Jan Kiszka
On 2012-08-24 10:11, Michael S. Tsirkin wrote: > On Fri, Aug 24, 2012 at 07:59:06AM +0200, Jan Kiszka wrote: >> On 2012-08-24 01:13, Cam Macdonell wrote: >>> Hi Jan, >>> >>> I've bisected a bug in which MSI interrupts are not being delivered to >>&g

Re: [Qemu-devel] [PATCH v2 6/6] i8259: add -no-spurious-interrupt-hack option

2012-08-24 Thread Jan Kiszka
On 2012-08-24 10:05, Matthew Ogilvie wrote: > On Fri, Aug 24, 2012 at 07:40:36AM +0200, Jan Kiszka wrote: >> On 2012-08-23 08:24, Matthew Ogilvie wrote: >>> This patch provides a way to optionally suppress spurious interrupts, > > [snip] > >>> I'm no

Re: [Qemu-devel] [PATCH v2][for 1.2?] msix: Drop tracking of used vectors

2012-08-24 Thread Jan Kiszka
On 2012-08-24 10:20, Michael S. Tsirkin wrote: > On Fri, Aug 24, 2012 at 08:19:50AM +0200, Jan Kiszka wrote: >> From: Jan Kiszka >> >> This optimization was once used in qemu-kvm to keep KVM route usage low. >> But now we solved that problem via lazy updates. It also

Re: [Qemu-devel] [PATCH v2][for 1.2?] msix: Drop tracking of used vectors

2012-08-24 Thread Jan Kiszka
On 2012-08-24 10:21, Jan Kiszka wrote: > On 2012-08-24 10:20, Michael S. Tsirkin wrote: >> On Fri, Aug 24, 2012 at 08:19:50AM +0200, Jan Kiszka wrote: >>> From: Jan Kiszka >>> >>> This optimization was once used in qemu-kvm to keep KVM route usage low. >>

Re: [Qemu-devel] MSI-X bug with ivshmem since msix_reset moved to PCI

2012-08-24 Thread Jan Kiszka
On 2012-08-24 10:36, Michael S. Tsirkin wrote: > On Fri, Aug 24, 2012 at 10:15:33AM +0200, Jan Kiszka wrote: >> On 2012-08-24 10:11, Michael S. Tsirkin wrote: >>> On Fri, Aug 24, 2012 at 07:59:06AM +0200, Jan Kiszka wrote: >>>> On 2012-08-24 01:13, Cam

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] console: Correct computation of bytes per pixel from bits per pixel

2012-08-24 Thread Jan Kiszka
On 2012-08-24 13:20, Stefan Hajnoczi wrote: > On Wed, Aug 22, 2012 at 06:44:08PM +0200, Jan Kiszka wrote: >> On 2012-08-22 18:29, Stefan Weil wrote: >>> Am 22.08.2012 17:32, schrieb Jan Kiszka: >>>> On 2012-08-22 17:19, BALATON Zoltan wrote: >>>>>

[Qemu-devel] [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 --- kvm-all.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index d1924db

Re: [Qemu-devel] [PATCH v2 0/6] Running Microport UNIX (ca 1987)

2012-08-24 Thread Jan Kiszka
On 2012-08-24 14:02, malc wrote: > On Fri, 24 Aug 2012, Jan Kiszka wrote: > >> On 2012-08-24 05:58, malc wrote: >>> On Thu, 23 Aug 2012, Matthew Ogilvie wrote: >>> >>>> After applying this version 2 of this patch series, I can >>>> success

Re: [Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: replace register_ioport*

2012-08-24 Thread Jan Kiszka
On 2012-08-22 14:27, Julien Grall wrote: > This patch replaces all register_ioport* with portio_*. It permits to > use the new Memory stuff like listener. > > Signed-off-by: Julien Grall > --- > hw/cirrus_vga.c | 42 -- > 1 files changed, 24 insertions(+

Re: [Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: replace register_ioport*

2012-08-24 Thread Jan Kiszka
On 2012-08-24 16:49, Julien Grall wrote: > On 08/24/2012 02:44 PM, Jan Kiszka wrote: >> On 2012-08-22 14:27, Julien Grall wrote: >> >>> This patch replaces all register_ioport* with portio_*. It permits to >>> use the new Memory stuff like listener. &g

Re: [Qemu-devel] [PATCH V5 8/8] smb: replace_register_ioport*

2012-08-24 Thread Jan Kiszka
On 2012-08-22 14:27, Julien Grall wrote: > This patch fix smb_ioport_* to be compliant with read/write memory callback. > Moreover it replaces all register_ioport* which use theses functions by > the new Memory API. > > Signed-off-by: Julien Grall > --- > hw/pm_smbus.c |7 --- > hw/pm_sm

[Qemu-devel] [PATCH for 1.2] memory: Fix copy&paste mistake in memory_region_iorange_write

2012-08-26 Thread Jan Kiszka
From: Jan Kiszka The last argument of find_portio is "write", so this must be true here. Signed-off-by: Jan Kiszka --- We were likely lucky so far and didn't hit this - it would have caused an assertion. However, there are also rarely used devices... memory.c |2 +- 1 f

Re: [Qemu-devel] [PATCH V5 2/8] hw/acpi_piix4.c: replace register_ioport*

2012-08-26 Thread Jan Kiszka
On 2012-08-22 14:27, Julien Grall wrote: > This patch replaces all register_ioport* with the new memory API. It permits > to use the new Memory stuff like listener. > > Signed-off-by: Julien Grall > --- > hw/acpi_piix4.c | 160 ++ > 1 files ch

Re: [Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: replace register_ioport*

2012-08-26 Thread Jan Kiszka
On 2012-08-22 14:27, Julien Grall wrote: > This patch replaces all register_ioport* with portio_*. It permits to > use the new Memory stuff like listener. > > Signed-off-by: Julien Grall > --- > hw/cirrus_vga.c | 42 -- > 1 files changed, 24 insertions(+

Re: [Qemu-devel] [PATCH V5 2/8] hw/acpi_piix4.c: replace register_ioport*

2012-08-26 Thread Jan Kiszka
On 2012-08-26 11:10, Jan Kiszka wrote: > On 2012-08-22 14:27, Julien Grall wrote: >> This patch replaces all register_ioport* with the new memory API. It permits >> to use the new Memory stuff like listener. >> >> Signed-off-by: Julien Grall >&g

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

2012-08-26 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

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

2012-08-26 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 EO

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

2012-08-26 Thread Jan Kiszka
IO 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 requir

[Qemu-devel] [PATCH 2/4] kvm: Introduce kvm_has_intx_set_mask

2012-08-26 Thread Jan Kiszka
From: Jan Kiszka Will be used by PCI device assignment code. Signed-off-by: Jan Kiszka --- 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 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -88,6

[Qemu-devel] [PATCH 1/4] kvm: Introduce kvm_irqchip_update_msi_route

2012-08-26 Thread Jan Kiszka
From: Jan Kiszka 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 --- kvm-all.c | 42 ++ kvm.h

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

2012-08-26 Thread Jan Kiszka
From: Jan Kiszka 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 --- target-i386/kvm.c | 141

Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem

2012-08-27 Thread Jan Kiszka
On 2012-08-27 09:01, Paolo Bonzini wrote: > Il 25/08/2012 09:42, liu ping fan ha scritto: I don't see why MMIO dispatch should hold the IDEBus ref rather than the PCIIDEState. >> When transfer memory_region_init_io() 3rd para from void* opaque to >> Object* obj, the obj : opaq

Re: [Qemu-devel] [PATCH 10/10] qdev: fix create in place obj's life cycle problem

2012-08-27 Thread Jan Kiszka
On 2012-08-27 10:17, liu ping fan wrote: > On Mon, Aug 27, 2012 at 3:47 PM, Jan Kiszka wrote: >> On 2012-08-27 09:01, Paolo Bonzini wrote: >>> Il 25/08/2012 09:42, liu ping fan ha scritto: >>>>>> >>>>>> I don't see why MMIO dispatch sh

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 >> >> This adds PCI device assignment for i386 targets using the classic KVM >> interfaces. This version is 100% identical to what is being main

  1   2   3   4   5   6   7   8   9   10   >