[Qemu-devel] [Bug 1191326] Re: QNX 4 doesn't boot on qemu >= 1.3

2013-08-23 Thread JQu
with qemu 1.6 is even worse - qemu crash every time when QNX detects hard disk -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1191326 Title: QNX 4 doesn't boot on qemu >= 1.3 Status in QEMU: New

Re: [Qemu-devel] [PATCH v2 0/3] Disassembly with external objdump

2013-08-23 Thread Edgar E. Iglesias
On Fri, Aug 16, 2013 at 11:29:44PM -0700, Richard Henderson wrote: > V2 adds the --adjust-vma idea from Max Filippov. Thanks Richard, I've applied this Cheers, Edgar > > > r~ > > > Richard Henderson (3): > disas: Implement fallback to dump object code as hex > disas: Add disas-objdump.p

[Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Paolo Bonzini
From: Wei Yang get_real_device() has 5 parameters with the last 4 is contained in the first structure. This patch removes the last 4 parameters and directly use them from the first parameter. Acked-by: Alex Williamson Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini --- hw/i386/kvm/pci-

[Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti maxcpus, which specifies the maximum number of hotpluggable CPUs, should not exceed KVM's vcpu limit. Signed-off-by: Marcelo Tosatti [Reword message. - Paolo] Signed-off-by: Paolo Bonzini --- kvm-all.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kvm-all.c

[Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io

2013-08-23 Thread Paolo Bonzini
From: Jan Kiszka Now that cpu_in/out is just a wrapper around address_space_rw, we can also call the latter directly. As host endianness == guest endianness, there is no need for the memory access helpers st*_p/ld*_p as well. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- kvm-all.

[Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support

2013-08-23 Thread Paolo Bonzini
From: Vincenzo Maffione Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as "resamplefd". See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for more details. When th

[Qemu-devel] [PULL 8/9] kvm: i386: fix LAPIC TSC deadline timer save/restore

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti The configuration of the timer represented by MSR_IA32_TSCDEADLINE depends on: - APIC LVT Timer register. - TSC value. Change the order to respect the dependency. Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini --- target-i386/kvm.c | 29 +++

[Qemu-devel] [PULL v2 0/9] KVM changes for 2013-08-23

2013-08-23 Thread Paolo Bonzini
Anthony, now sending v2 for real. The following changes since commit f03d07d4683b2e8325a7cb60b4e14b977b1a869c: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-23 10:57:23 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qem

[Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled

2013-08-23 Thread Paolo Bonzini
From: Liu Jinsong This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623 IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs or kvm_get_msrs. Signed-off-by: Liu Jinsong Signed-off-by

[Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-23 Thread Paolo Bonzini
From: Arthur Chunqi Li The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li Signed-off-by: Gleb Natapov --- target-i386/cpu.h | 2 ++ targ

[Qemu-devel] [PULL 3/9] kvm: migrate vPMU state

2013-08-23 Thread Paolo Bonzini
Reviewed-by: Gleb Natapov Signed-off-by: Paolo Bonzini --- target-i386/cpu.h | 23 + target-i386/kvm.c | 93 --- target-i386/machine.c | 44 3 files changed, 155 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h

2013-08-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target-i386/cpu.h | 192 +++--- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3a52f94..af4c0f7 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -

Re: [Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23

2013-08-23 Thread Paolo Bonzini
Il 24/08/2013 05:49, Paolo Bonzini ha scritto: > Anthony, > > The following changes since commit f03d07d4683b2e8325a7cb60b4e14b977b1a869c: > > Merge remote-tracking branch 'quintela/migration.next' into staging > (2013-07-23 10:57:23 -0500) > > are available in the git repository at: > > g

[Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti maxcpus, which specifies the maximum number of hotpluggable CPUs, should not exceed KVM's vcpu limit. Signed-off-by: Marcelo Tosatti [Reword message. - Paolo] Signed-off-by: Paolo Bonzini --- kvm-all.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kvm-all.c

[Qemu-devel] [PULL 8/9] kvm: i386: fix LAPIC TSC deadline timer save/restore

2013-08-23 Thread Paolo Bonzini
From: Marcelo Tosatti The configuration of the timer represented by MSR_IA32_TSCDEADLINE depends on: - APIC LVT Timer register. - TSC value. Change the order to respect the dependency. Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini --- target-i386/kvm.c | 29 +++

[Qemu-devel] [PULL 3/9] kvm: migrate vPMU state

2013-08-23 Thread Paolo Bonzini
Reviewed-by: Gleb Natapov Signed-off-by: Paolo Bonzini --- target-i386/cpu.h | 23 + target-i386/kvm.c | 93 --- target-i386/machine.c | 44 3 files changed, 155 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Paolo Bonzini
get_real_device() has 5 parameters with the last 4 is contained in the first structure. This patch removes the last 4 parameters and directly use them from the first parameter. Acked-by: Alex Williamson Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini --- hw/i386/kvm/pci-assign.c | 9

[Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h

2013-08-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target-i386/cpu.h | 192 +++--- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3a52f94..af4c0f7 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -

[Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support

2013-08-23 Thread Paolo Bonzini
From: Vincenzo Maffione Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as "resamplefd". See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for more details. When th

[Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io

2013-08-23 Thread Paolo Bonzini
From: Jan Kiszka Now that cpu_in/out is just a wrapper around address_space_rw, we can also call the latter directly. As host endianness == guest endianness, there is no need for the memory access helpers st*_p/ld*_p as well. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- kvm-all.

[Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled

2013-08-23 Thread Paolo Bonzini
From: Liu Jinsong This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623 IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs or kvm_get_msrs. Signed-off-by: Liu Jinsong Signed-off-by

[Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-23 Thread Paolo Bonzini
From: Arthur Chunqi Li The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li Signed-off-by: Gleb Natapov --- target-i386/cpu.h | 2 ++ targ

[Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23

2013-08-23 Thread Paolo Bonzini
Anthony, The following changes since commit f03d07d4683b2e8325a7cb60b4e14b977b1a869c: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-23 10:57:23 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for yo

Re: [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()

2013-08-23 Thread Wei Yang
Paolo, Sorry, maybe I am not familiar with the patch format in qemu-dev. I didn't see the From: Wei Yang in this one neither. On Fri, Aug 23, 2013 at 11:39:53AM +0200, Paolo Bonzini wrote: >get_real_device() has 5 parameters with the last 4 is contained in the first >structure. > >This patch rem

[Qemu-devel] [PATCH 05/16] pci: Pass size to pci_bus_new_inplace()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Signed-off-by: Andreas Färber --- hw/pci-host/prep.c | 2 +- hw/pci-host/versatile.c | 2 +- hw/pci/pci.c| 2 +- include/hw/pci/pci.h| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/prep.c b/hw/pci-host

[Qemu-devel] [PATCH 10/16] virtio-ccw: Pass size to virtio_ccw_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Signed-off-by: Andreas Färber --- hw/s390x/virtio-ccw.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index e3b207f..36cbf42 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio

[Qemu-devel] [PATCH 16/16] qdev-monitor: Avoid aborting on out-of-memory in qdev_device_add()

2013-08-23 Thread Andreas Färber
Use g_try_malloc0() and object_initialize() instead of object_new() to try letting large hot-add attempts fail without killing a running guest. This requires obtaining the allocation size with type_get_instance_size(). Aborts can still occur whenever devices use object_new() to create child device

[Qemu-devel] [PATCH 13/16] qom: Pass available size to object_initialize()

2013-08-23 Thread Andreas Färber
This is to avoid objects initializing beyond allocated memory. Inspired-by: Peter Maydell Signed-off-by: Andreas Färber --- hw/core/qdev.c | 2 +- hw/dma/xilinx_axidma.c | 6 -- hw/intc/xics.c | 2 +- hw/misc/macio/macio.c | 13 +++-- hw/net/xilin

[Qemu-devel] [PATCH 14/16] qom: Introduce type_get_instance_size()

2013-08-23 Thread Andreas Färber
Helper to obtain the instance_size for a type. Signed-off-by: Andreas Färber --- include/qom/object.h | 8 qom/object.c | 7 +++ 2 files changed, 15 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 1a7b71a..96b9ab4 100644 --- a/include/qom/object

[Qemu-devel] [PATCH 15/16] qdev-monitor: Clean up qdev_device_add() variable naming

2013-08-23 Thread Andreas Färber
Avoid confusion between object and object class. Tidy DeviceClass variable while at it. Signed-off-by: Andreas Färber --- qdev-monitor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index 410cdcb..51bfec0 100644 ---

[Qemu-devel] [PATCH 12/16] qdev: Pass size to qbus_create_inplace()

2013-08-23 Thread Andreas Färber
To be passed to object_initialize(). Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is void*, so drop some superfluous (BusState *) casts or direct parent field usages. Signed-off-by: Andreas Färber --- hw/audio/intel-hda.c | 2 +- hw/char/ipack.c | 2

[Qemu-devel] [PATCH 11/16] virtio-mmio: Pass size to virtio_mmio_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_initialize(). Signed-off-by: Andreas Färber --- hw/virtio/virtio-mmio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 4bd2953..692979e 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/v

[Qemu-devel] [PATCH 09/16] s390-virtio-bus: Pass size to virtio_s390_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Signed-off-by: Andreas Färber --- hw/s390x/s390-virtio-bus.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index e46b8c8..579adbc 100644 --- a/hw/s390x/s390-virtio-bus.c +

[Qemu-devel] [PATCH 07/16] usb: Pass size to usb_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Use DEVICE() cast to avoid a direct parent field access. Signed-off-by: Andreas Färber --- hw/usb/bus.c | 3 ++- hw/usb/hcd-ehci.c | 2 +- hw/usb/hcd-musb.c | 2 +- hw/usb/hcd-ohci.c | 2 +- hw/usb/hcd-uhci.c | 2 +- hw/usb/hcd-xhci.c | 2 +- include/

[Qemu-devel] [PATCH 04/16] ide: Pass size to ide_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Signed-off-by: Andreas Färber --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/internal.h | 3 ++- hw/ide/isa.c | 2 +- hw/ide/macio.c| 2 +- hw/ide/mmio.c | 2 +- hw/ide/piix.c | 2 +- hw/ide/qdev.c | 3 ++- hw/ide/via.c

[Qemu-devel] [PATCH 02/16] intel-hda: Pass size to hda_codec_bus_init()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Signed-off-by: Andreas Färber --- hw/audio/intel-hda.c | 4 ++-- hw/audio/intel-hda.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 32e44ad..9c2fa88 100644 --- a/hw/audio/intel-hda.c

[Qemu-devel] [PATCH 00/16] qom: Assert sufficient object instance size

2013-08-23 Thread Andreas Färber
Hello, Peter remarked that object_initialize() on a GICState struct field would not check whether the TypeInfo::instance_size for its typename argument exceeds the length of the field we're initializing. This series therefore updates all callers to explicitly pass the size available for the object

[Qemu-devel] [PATCH 01/16] qom: Fix object_initialize_with_type() argument name in documentation

2013-08-23 Thread Andreas Färber
@obj -> @data. Signed-off-by: Andreas Färber --- include/qom/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qom/object.h b/include/qom/object.h index 48109de..c463ced 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -585,7 +585,7 @@ Object *ob

[Qemu-devel] [PATCH 08/16] virtio-pci: Pass size to virtio_pci_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Signed-off-by: Andreas Färber --- hw/virtio/virtio-pci.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 9052484..313723f 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/v

[Qemu-devel] [PATCH 06/16] scsi: Pass size to scsi_bus_new()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Use DEVICE() casts instead of direct parent field access. Signed-off-by: Andreas Färber --- hw/scsi/esp-pci.c | 2 +- hw/scsi/esp.c | 2 +- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/megasas.c | 3 ++- hw/scsi/scsi-bus.c | 4 ++-- hw/scs

[Qemu-devel] [PATCH 03/16] ipack: Pass size to ipack_bus_new_inplace()

2013-08-23 Thread Andreas Färber
To be passed to qbus_create_inplace(). Simplify DEVICE() cast to avoid parent field access. Signed-off-by: Andreas Färber --- hw/char/ipack.c | 3 ++- hw/char/ipack.h | 3 ++- hw/char/tpci200.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/char/ipack.c b/hw/char/

[Qemu-devel] qemu-user + networking issues / segfaults

2013-08-23 Thread Christof Schulze
Hello qemu-devel list, This is my first post to this list and I am not sure whether this actually is the correct Mailinglist. I recently compiled qemu-1.6.0 on an arm platform for the purpose of running the binary only otrdecoder-software which is available for a 64bit linux only. I pursued the f

Re: [Qemu-devel] [PATCH 4/5] hw: arm_gic: Support setting/getting binary point reg

2013-08-23 Thread Andreas Färber
"arm_gic:" is sufficient, "hw/arm_gic:" if you see the need. Am 23.08.2013 22:10, schrieb Christoffer Dall: > Add a binary_point field to the gic emulation structure and support > setting/getting this register now when we have it. We don't actually > support interrupt grouping yet, oh well. > >

Re: [Qemu-devel] [PATCH v2] target-i386: Fix segment cache dump

2013-08-23 Thread Eric Blake
On 08/23/2013 03:39 PM, Tobias Markus wrote: > Alternatively, for readability: > +cpu_fprintf(f, (sc->flags & DESC_B_MASK || env->hflags & > HF_LMA_MASK) > +? "DS " : "DS16"); > The upper line would be 82 characters long. I'm not sure how strictly line > w

Re: [Qemu-devel] [PATCH v2] target-i386: Fix segment cache dump

2013-08-23 Thread Tobias Markus
On 08/23/2013 10:01 PM, Richard Henderson wrote: > On 08/23/2013 12:09 PM, Tobias Markus wrote: >> When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default >> operation size bit (D/B bit) is not set for Long Mode Data Segments since >> there are only Data Segments in Long Mode and n

[Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs.

2013-08-23 Thread Mike Day
Add RCU-enabled variants on the existing bsd DQ facility. Each Q operation has the same interface as the existing (non-RCU) version. Also, each operation is implemented as macro for now. Using the RCU-enabled DQ, existing DQ users will be able to convert to RCU without using a different list inter

Re: [Qemu-devel] [RFC] TCG unit testing

2013-08-23 Thread Stefan Weil
Am 23.08.2013 21:47, schrieb Richard Henderson: > I've been thinking for a while about how to reliably test TCG backends, and > maybe how to do regression testing on them. Having to begin the test from a > guest binary, especially considering the vast cross-compilation problem, is > pretty much a

[Qemu-devel] [PATCH 5/5] hw: arm_gic_kvm: Add KVM VGIC save/restore logic

2013-08-23 Thread Christoffer Dall
Save and restore the ARM KVM VGIC state from the kernel. We rely on QEMU to marshal the GICState data structure and therefore simply synchronize the kernel state with the QEMU emulated state in both directions. We take some care on the restore path to check the VGIC has been configured with enoug

[Qemu-devel] [PATCH 4/5] hw: arm_gic: Support setting/getting binary point reg

2013-08-23 Thread Christoffer Dall
Add a binary_point field to the gic emulation structure and support setting/getting this register now when we have it. We don't actually support interrupt grouping yet, oh well. Signed-off-by: Christoffer Dall --- hw/intc/arm_gic.c|5 ++--- hw/intc/arm_gic_common.c |1 + hw/intc

[Qemu-devel] [PATCH 2/5] hw: arm_gic: Introduce GIC_SET_PRIORITY macro

2013-08-23 Thread Christoffer Dall
To make the code slightly cleaner to look at and make the save/restore code easier to understand, introduce this macro to set the priority of interrupts. Signed-off-by: Christoffer Dall --- hw/intc/arm_gic.c |6 +- hw/intc/gic_internal.h |6 ++ 2 files changed, 7 insertions(

[Qemu-devel] [PATCH 3/5] hw: arm_gic: Keep track of SGI sources

2013-08-23 Thread Christoffer Dall
Right now the arm gic emulation doesn't keep track of the source of an SGI (which apparently Linux guests don't use, or they're fine with assuming CPU 0 always). Add the necessary matrix on the GICState structure and maintain the data when setting and clearing the pending state of an IRQ. Note th

[Qemu-devel] [PATCH 0/5] Support arm-gic-kvm save/restore

2013-08-23 Thread Christoffer Dall
Implement support to save/restore the ARM KVM VGIC state from the kernel. The basic appraoch is to transfer state from the in-kernel VGIC to the emulated arm-gic state representation and let the standard QEMU vmstate save/restore handle saving the arm-gic state. Restore works by reversing the pro

[Qemu-devel] [PATCH 1/5] hw: arm_gic: Fix gic_set_irq handling

2013-08-23 Thread Christoffer Dall
For some reason only edge-triggered or enabled level-triggered interrupts would set the pending state of a raised IRQ. This is not in compliance with the specs, which indicate that the pending state is separate from the enabled state, which only controls if a pending interrupt is actually forwarde

Re: [Qemu-devel] [qemu-devel] [PATCH v2] target-i386: Fix segment cache dump

2013-08-23 Thread Richard Henderson
On 08/23/2013 12:09 PM, Tobias Markus wrote: > When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default > operation size bit (D/B bit) is not set for Long Mode Data Segments since > there are only Data Segments in Long Mode and no explicit 16/32/64-bit > Descriptors. > This patch f

Re: [Qemu-devel] [PATCH 3/3] prep: improve Raven PCI host emulation

2013-08-23 Thread Richard Henderson
On 08/23/2013 11:52 AM, Hervé Poussineau wrote: > +uint8_t buf[4]; > +uint64_t val; > + > +if (s->contiguous_map == 0) { > +/* 64 KB contiguous space for IOs */ > +addr &= 0x; > +} else { > +/* 8 MB non-contiguous space for IOs */ > +addr = (addr

[Qemu-devel] [RFC] TCG unit testing

2013-08-23 Thread Richard Henderson
I've been thinking for a while about how to reliably test TCG backends, and maybe how to do regression testing on them. Having to begin the test from a guest binary, especially considering the vast cross-compilation problem, is pretty much a non-starter. I've been thinking of a truly stripped dow

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

2013-08-23 Thread Christoffer Dall
Introduce kvm_arch_irqchip_create an arch-specific hook in preparation for architecture-specific use of the device control API to create IRQ chips. Following patches will implement the ARM irqchip create method to prefer the device control API over the older KVM_CREATE_IRQCHIP API. Signed-off-by:

[Qemu-devel] [PATCH 4/4] arm: vgic device control api support

2013-08-23 Thread Christoffer Dall
Support creating the ARM vgic device through the device control API and setting the base address for the distributor and cpu interfaces in KVM VMs using this API. Because the older KVM_CREATE_IRQCHIP interface needs the irq chip to be created prior to creating the VCPUs, we first test if if can us

[Qemu-devel] [PATCH 3/4] kvm: Common device control API functions

2013-08-23 Thread Christoffer Dall
Introduces two simple functions: int kvm_device_ioctl(int fd, int type, ...); int kvm_create_device(KVMState *s, uint64_t type, bool test); These functions wrap the basic ioctl-based interactions with KVM in a way similar to other KVM ioctl wrappers. Signed-off-by: Christoffer Dall ---

[Qemu-devel] [PATCH 0/4] Create ARM KVM VGIC with device control API

2013-08-23 Thread Christoffer Dall
This patch series adds generic support for issuing device control related ioctls and supports creating the ARM KVM-accelerated VGIC using the device control API while maintaining backwards compatibility for older kernels. Christoffer Dall (4): kvm: Update headers for device control api kvm: In

[Qemu-devel] [PATCH 1/4] kvm: Update headers for device control api

2013-08-23 Thread Christoffer Dall
Update the KVM kernel headers to add support for the device control API on ARM used to create in-kernel devices and set and get attributes on these. This is needed for VGIC save/restore with KVM ARM targets. Headers are included from: git://git.linaro.org/people/cdall/linux-kvm-arm.git vgic-migra

[Qemu-devel] [qemu-devel] [PATCH v2] target-i386: Fix segment cache dump

2013-08-23 Thread Tobias Markus
When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default operation size bit (D/B bit) is not set for Long Mode Data Segments since there are only Data Segments in Long Mode and no explicit 16/32/64-bit Descriptors. This patch fixes this by checking the Long Mode Active bit of the hi

[Qemu-devel] [PATCH 0/3] prep: improve Raven PCI host emulation

2013-08-23 Thread Hervé Poussineau
This patchset improves Raven PCI host emulation, found in some PPC platforms, like the QEMU 'prep' one, and for example the IBM RS/6000 40p. Some features added to raven emulation were already present in prep board (non contiguous I/O, firmware loading), while some other are new (PCI bus mastering

[Qemu-devel] [PATCH 3/3] prep: improve Raven PCI host emulation

2013-08-23 Thread Hervé Poussineau
- let it load a firmware (raw or elf image) - add a GPIO to let it handle the non-contiguous I/O address space - provide a bus master address space Missing part is dynamic endianness change, which is required for IBM AIX and MS Windows NT/PPC. Also move isa_mem_base from PCI host to machine board

[Qemu-devel] [PATCH 2/3] prep: kill get_system_io() usage

2013-08-23 Thread Hervé Poussineau
While ISA address space in prep machine is currently the one returned by get_system_io(), this depends of the implementation of i82378/raven devices, and this may not be the case forever. Use the right ISA address space when adding some more ports to it. We can use whatever ISA device on the right

[Qemu-devel] [PATCH 1/3] pci: remove explicit check to 64K ioport size

2013-08-23 Thread Hervé Poussineau
This check is useless, as bigger addresses will be ignored when added to 'io' MemoryRegion, which has a size of 64K. However, on architectures which have memory-mapped I/O, PCI I/O BARs can be mapped to an I/O address which is bigger than 64K. Signed-off-by: Hervé Poussineau --- hw/pci/pci.c |

Re: [Qemu-devel] [PATCH v2] migration: Fix debug print type

2013-08-23 Thread Stefan Weil
Am 23.08.2013 19:34, schrieb Christoffer Dall: > The printf args are uint64_t and with -Werr QEMU doesn't compile with > migration debugging turned on unless this is fixed. Fix it. > > Signed-off-by: Christoffer Dall > --- > > [Changelog v1 -> v2]: > - Use PRIu64 instead of %llu > > migration.

Re: [Qemu-devel] [QEMU-1.6 PATCH] vl.c: Output error on invalid machine type provided

2013-08-23 Thread Markus Armbruster
Andreas Färber writes: > Am 23.08.2013 17:52, schrieb Michal Novotny: >> Ping? There are reviews already? Anybody to apply it? > > There is no submaintainer for vl.c, so it must go through Anthony. > Anthony uses the patches tool for such patches and there is an > unresolved review comment from E

Re: [Qemu-devel] [PATCH 2/2] target-arm: Avoid "1 << 31" undefined behaviour

2013-08-23 Thread Richard Henderson
On 08/23/2013 09:12 AM, Peter Maydell wrote: > #define CPSR_V (1 << 28) > #define CPSR_C (1 << 29) > #define CPSR_Z (1 << 30) > -#define CPSR_N (1 << 31) > +#define CPSR_N (1U << 31) > #define CPSR_NZCV (CPSR_N | CPSR_Z | CPSR_C | CPSR_V) You'd be better off making all of the CPSR bits unsigne

Re: [Qemu-devel] [PATCH 1/2] target-arm: Use sextract32() in branch decode

2013-08-23 Thread Richard Henderson
On 08/23/2013 09:12 AM, Peter Maydell wrote: > -offset = (((int32_t)insn << 8) >> 8); > -val += (offset << 2) + 4; > +offset = sextract32(insn << 2, 0, 26); > +val += offset + 4; I read this incorrectly at first, considering the shift

[Qemu-devel] [PATCH v2] migration: Fix debug print type

2013-08-23 Thread Christoffer Dall
The printf args are uint64_t and with -Werr QEMU doesn't compile with migration debugging turned on unless this is fixed. Fix it. Signed-off-by: Christoffer Dall --- [Changelog v1 -> v2]: - Use PRIu64 instead of %llu migration.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

Re: [Qemu-devel] [QEMU-1.6 PATCH] vl.c: Output error on invalid machine type provided

2013-08-23 Thread Andreas Färber
Am 23.08.2013 17:52, schrieb Michal Novotny: > Ping? There are reviews already? Anybody to apply it? There is no submaintainer for vl.c, so it must go through Anthony. Anthony uses the patches tool for such patches and there is an unresolved review comment from Eric, so please respin. Following E

Re: [Qemu-devel] [PATCH] slirp/arp_table.c: Avoid shifting into sign bit of signed integers

2013-08-23 Thread Jan Kiszka
On 2013-08-23 18:36, Peter Maydell wrote: > "0xf << 28" shifts right into the sign bit, since 0xf is a signed > integer. Use the 'U' suffix to force an unsigned shift to avoid > this undefined behaviour and a clang sanitizer warning. > > Signed-off-by: Peter Maydell > --- > slirp/arp_table.c |

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-23 Thread Jan Kiszka
On 2013-08-21 04:15, Liu Ping Fan wrote: > If slirp needs to emulate tcp timeout, then the timeout value > for mainloop should be more precise, which is determined by > slirp's fasttimo or slowtimo. Achieve this by swap the logic > sequence of slirp_pollfds_fill and slirp_update_timeout. > > Signe

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-23 Thread Jan Kiszka
On 2013-08-21 10:07, liu ping fan wrote: > On Wed, Aug 21, 2013 at 3:36 PM, Alex Bligh wrote: >> >> >> --On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote: >> >>> -void slirp_update_timeout(uint32_t *timeout) >>> +static void slirp_update_timeout(uint32_t *timeout) >>> { >>> -if (!QTAILQ_E

Re: [Qemu-devel] [PATCH] block/qcow2.h: Avoid "1LL << 63" (shifts into sign bit)

2013-08-23 Thread Eric Blake
On 08/23/2013 10:35 AM, Peter Maydell wrote: > The expression "1LL << 63" tries to shift the 1 into the sign bit of a > 'long long', which provokes a clang sanitizer warning: > > runtime error: left shift of 1 by 63 places cannot be represented in type > 'long long' Yep, C99 6.5.7p3 states it is

Re: [Qemu-devel] [PATCH] slirp/arp_table.c: Avoid shifting into sign bit of signed integers

2013-08-23 Thread Eric Blake
On 08/23/2013 10:36 AM, Peter Maydell wrote: > "0xf << 28" shifts right into the sign bit, since 0xf is a signed > integer. Use the 'U' suffix to force an unsigned shift to avoid > this undefined behaviour and a clang sanitizer warning. > > Signed-off-by: Peter Maydell > --- > slirp/arp_table.c

Re: [Qemu-devel] [PATCH] vmxnet3: Eliminate __packed redefined warning

2013-08-23 Thread Andreas Färber
Am 23.08.2013 18:28, schrieb Brad Smith: > This eliminates a warning about __packed being redefined as exposed by the > vmxnet3 code. __packed is not used anywhere in the vmxnet3 code. > > CChw/net/vmxnet3.o > In file included from hw/net/vmxnet3.c:29: > hw/net/vmxnet3.h:37:1: warning: "__pa

[Qemu-devel] [PATCH] slirp/arp_table.c: Avoid shifting into sign bit of signed integers

2013-08-23 Thread Peter Maydell
"0xf << 28" shifts right into the sign bit, since 0xf is a signed integer. Use the 'U' suffix to force an unsigned shift to avoid this undefined behaviour and a clang sanitizer warning. Signed-off-by: Peter Maydell --- slirp/arp_table.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[Qemu-devel] [PATCH] block/qcow2.h: Avoid "1LL << 63" (shifts into sign bit)

2013-08-23 Thread Peter Maydell
The expression "1LL << 63" tries to shift the 1 into the sign bit of a 'long long', which provokes a clang sanitizer warning: runtime error: left shift of 1 by 63 places cannot be represented in type 'long long' Use "1ULL << 63" as the definition of QCOW_OFLAG_COPIED instead to avoid this. For c

[Qemu-devel] [PATCH] vmxnet3: Eliminate __packed redefined warning

2013-08-23 Thread Brad Smith
This eliminates a warning about __packed being redefined as exposed by the vmxnet3 code. __packed is not used anywhere in the vmxnet3 code. CChw/net/vmxnet3.o In file included from hw/net/vmxnet3.c:29: hw/net/vmxnet3.h:37:1: warning: "__packed" redefined In file included from /usr/include/st

[Qemu-devel] [PATCH 2/2] hw/scsi/lsi53c895a: Use deposit32 rather than handcoded shift/mask

2013-08-23 Thread Peter Maydell
Use deposit32() rather than handcoded shifts/masks to update the scratch registers. This is cleaner and incidentally avoids a clang sanitizer complaint ("runtime error: left shift of 255 by 24 places cannot be represented in type 'int'"). Signed-off-by: Peter Maydell --- hw/scsi/lsi53c895a.c |

[Qemu-devel] [PATCH 2/2] target-arm: Avoid "1 << 31" undefined behaviour

2013-08-23 Thread Peter Maydell
Avoid the undefined behaviour of "1 << 31" by using 1U to make the shift be of an unsigned value rather than shifting into the sign bit of a signed integer. Signed-off-by: Peter Maydell --- target-arm/cpu.h|2 +- target-arm/helper.c |4 ++-- 2 files changed, 3 insertions(+), 3 deleti

[Qemu-devel] [PATCH 1/2] hw/scsi/lsi53c895a: Use sextract32 for sign-extension

2013-08-23 Thread Peter Maydell
Use sextract32() for doing sign-extension rather than rolling our own implementation. Signed-off-by: Peter Maydell --- hw/scsi/lsi53c895a.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 611f2aa..333c62f 1

[Qemu-devel] [PATCH 1/2] target-arm: Use sextract32() in branch decode

2013-08-23 Thread Peter Maydell
In the decode of ARM B and BL insns, swap the order of the "append 2 implicit zeros to imm24" and the sign extend, and use the new sextract32() utility function to do the latter. This avoids a direct dependency on the undefined C behaviour of shifting into the sign bit of an integer. Signed-off-by

Re: [Qemu-devel] [PATCH] hw: fix to display correct memory size

2013-08-23 Thread Andreas Färber
Am 23.08.2013 16:57, schrieb Yongbok Kim: > A parenthesis placed inappropriately caused displaying > wrong memory size bigger than 4GB. > > Signed-off-by: Yongbok Kim > --- > hw/mips/mips_malta.c |2 +- > hw/mips/mips_r4k.c|2 +- > hw/ppc/mac_oldworld.c |2 +- > 3 files changed,

[Qemu-devel] [PATCH 0/2] lsi53c895a: avoid integer undefined behaviours

2013-08-23 Thread Peter Maydell
More patches to fix clang sanitizer warnings; in this case we can fix them and clean up the code a bit by replacing hand-coded operations with functions from the bitops header. Peter Maydell (2): hw/scsi/lsi53c895a: Use sextract32 for sign-extension hw/scsi/lsi53c895a: Use deposit32 rather tha

Re: [Qemu-devel] [PATCH v6 3/8] block: implement reference count for BlockDriverState

2013-08-23 Thread Jeff Cody
On Fri, Aug 23, 2013 at 09:14:46AM +0800, Fam Zheng wrote: > Introduce bdrv_ref/bdrv_unref to manage the lifecycle of > BlockDriverState. They are unused for now but will used to replace > bdrv_delete() later. > > Signed-off-by: Fam Zheng > --- > block.c | 21 ++

[Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings

2013-08-23 Thread Peter Maydell
These patches avoid some clang sanitizer warnings triggered on target-arm code which inadvertently shifts into the sign bit of a signed integer (which is undefined behaviour in C). (For more info on the sanitizer see http://blog.regehr.org/archives/963 ; the basic approach is to install clang 3.3

Re: [Qemu-devel] [PATCH] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial

2013-08-23 Thread Andreas Färber
Am 23.08.2013 18:01, schrieb arm...@redhat.com: > From: Markus Armbruster > > scsi_bus_legacy_add_drive() creates either a scsi-disk or a > scsi-generic device. It sets property "serial" to argument serial > unless null. Crashes with scsi-generic, because it doesn't have such > the property. >

[Qemu-devel] [PATCH] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial

2013-08-23 Thread armbru
From: Markus Armbruster scsi_bus_legacy_add_drive() creates either a scsi-disk or a scsi-generic device. It sets property "serial" to argument serial unless null. Crashes with scsi-generic, because it doesn't have such the property. Only usb_msd_initfn_storage() passes non-null serial. Reprod

Re: [Qemu-devel] [QEMU-1.6 PATCH] vl.c: Output error on invalid machine type provided

2013-08-23 Thread Michal Novotny
Ping? There are reviews already? Anybody to apply it? Michal On 08/12/2013 06:34 PM, Michal Novotny wrote: > Output error message using qemu's error_report() function when user > provides the invalid machine type on the command line. This also saves > time to find what issue is when you downgrade

[Qemu-devel] [PATCH] mips_malta: support up to 2GiB RAM

2013-08-23 Thread Yongbok Kim
From: Paul Burton A Malta board can support up to 2GiB of RAM. Since the unmapped kseg0/1 regions are only 512MiB large & the latter 256MiB of those are taken up by the IO region, access to RAM beyond 256MiB must be done through a mapped region. In the case of a Linux guest this means we need to

[Qemu-devel] [PATCH] hw: fix to display correct memory size

2013-08-23 Thread Yongbok Kim
A parenthesis placed inappropriately caused displaying wrong memory size bigger than 4GB. Signed-off-by: Yongbok Kim --- hw/mips/mips_malta.c |2 +- hw/mips/mips_r4k.c|2 +- hw/ppc/mac_oldworld.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_

Re: [Qemu-devel] [PATCH resend 2/3] savevm: fix wrong error set by ram_control_load_hook()

2013-08-23 Thread Michael R. Hines
On 08/23/2013 09:30 AM, Lei Li wrote: It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..a0be109 100644 --- a/savevm.c +++ b/savevm.c @@

Re: [Qemu-devel] [PATCH 1/2] virtio: Remove unnecessary OBJECT casts

2013-08-23 Thread Andreas Färber
Am 23.08.2013 15:38, schrieb Peter Maydell: > There's no need to cast the first argument of object_initialize > to Object, and it would defeat the ability to check that the > pointer being passed is to a type large enough for the object. > Remove these unnecessary casts. > > Signed-off-by: Peter M

Re: [Qemu-devel] [PATCH resend 2/3] savevm: fix wrong error set by ram_control_load_hook()

2013-08-23 Thread Michael R. Hines
On 08/23/2013 09:30 AM, Lei Li wrote: It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..a0be109 100644 --- a/savevm.c +++ b/savevm.c @@

Re: [Qemu-devel] [PATCH 0/2] object_initialize: check size of passed in memory

2013-08-23 Thread Andreas Färber
Am 23.08.2013 15:38, schrieb Peter Maydell: > This patchset addresses a concern that came up with Andreas' recent > patches for using embedded objects in some of the ARM CPU devices: > object_initialize() doesn't check that there's actually enough space > for the type being added, so if you have: >

Re: [Qemu-devel] [PATCH] mips/malta: prevent writes to reset flash mapping faulting

2013-08-23 Thread James Hogan
Hi Andreas, On 23/08/13 12:08, Andreas Färber wrote: > Am 23.08.2013 09:59, schrieb Leon Alrae: >> From: James Hogan >> >> Commit a427338 (mips_malta: correct reading MIPS revision at 0x1fc00010) >> altered the behaviour of the monitor flash mapping at the reset address >> by making it read only.

Re: [Qemu-devel] [PATCH V9 07/12] NUMA: parse guest numa nodes memory policy

2013-08-23 Thread Andrew Jones
- Original Message - > The memory policy setting format is like: > > policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N > And we are adding this setting as a suboption of "-numa mem,", > the memory policy then can be set like following: > -numa node,node

  1   2   3   >