Re: [Qemu-devel] [PATCH v1 12/13] q35: fill in usb pci slots with -usb

2012-10-29 Thread Gerd Hoffmann
Hi, > +uhci_devname[sizeof(uhci_devname) - 2] = ((char)'1') + i; snprintf(devname, sizeof(devname), "...%d", i) is more readable. > +qdev_prop_set_string(usb_qdev, "masterbus", "ich9-usb-bus.0"); Any reason why you rename the usb bus? cheers, Gerd

[Qemu-devel] [PATCH] exynos4210: Added SD host controller model

2012-10-29 Thread Peter Crosthwaite
From: Igor Mitsyanko Custom Exynos4210 SD/MMC host controller, based on SD association standard host controller ver. 2.00. Signed-off-by: Igor Mitsyanko Signed-off-by: Peter Crosthwaite --- Hi Igor, I had to change this patch significantly without any testing so I dont have any confidence in

[Qemu-devel] [PATCH v7 3/3] xilinx_zynq: Added SD controllers

2012-10-29 Thread Peter Crosthwaite
The Xilinx Zynq device has two SDHCI controllers. Added to the machine model. Reviewed-by: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55dafb..3

[Qemu-devel] [PATCH v7 2/3] vl.c: allow for repeated -sd arguments

2012-10-29 Thread Peter Crosthwaite
Allows for repeating of -sd arguments in the same way as -pflash and -mtdblock. Acked-by: Igor Mitsyanko Reviewed-by: Peter Maydell Signed-off-by: Peter Crosthwaite --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 5a3d316..978bd68 100644 ---

[Qemu-devel] [PATCH v7 0/3] Standard SD host controller model

2012-10-29 Thread Peter Crosthwaite
[Original cover by Igor] First patch introduces standard SD host controller model. This is accumulated version of my previous patch I sent a while ago and a recent SDHCI patch by Peter A. G. Crosthwaite. Second patch introduces Exynos4210-specific SDHCI built on top of standard SDHCI model. Sec

Re: [Qemu-devel] [PATCH v7 0/3] tcg: enhance code generation quality for qemu_ld/st IRs

2012-10-29 Thread Yeongkyoon Lee
I've found that git status of my local repo is somewhat twisted. Sorry for your inconvenience. I'll send new patch after cleaning my repo. On 2012년 10월 29일 23:32, Yeongkyoon Lee wrote: Here is the 7th version of the series optimizing TCG qemu_ld/st code generation. v7: - Rebase and fix misty

Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-29 Thread H. Peter Anvin
On 10/29/2012 01:45 AM, Paolo Bonzini wrote: Il 26/10/2012 22:29, H. Peter Anvin ha scritto: This is surreal. Output from /dev/hwrng turns into output for /dev/random... it us guaranteed worse; period, end of story. Isn't that exactly what happens in bare-metal? hwrng -> rngd -> random. In

[Qemu-devel] Nahanni Issues

2012-10-29 Thread GaoYi
Hi Cam, Does nahanni support asynchronous communication between multi-guests in the same machine? Besides, is the Nahanni-MPI latency in your slide "Nahanni: a shared memory interface for KVM" the average result or the maximal result? Thanks, Yi

Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-29 Thread H. Peter Anvin
On 10/29/2012 01:45 AM, Paolo Bonzini wrote: First, hwrng is only one of the sources used by rngd. It can also (currently) use RDRAND or TPM; additional sources are likely to be added in the future. Second, the harvesting of environmental noise -- timings -- is not as good in a VM as on plain h

Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support

2012-10-29 Thread H. Peter Anvin
On 10/28/2012 11:23 PM, Amit Shah wrote: One solution could be to feed host's /dev/urandom to readers of guests' /dev/urandom. We could then pass the rare true entropy bits from host's /dev/hwrng or /dev/random to the guest via virtio-rng-pci's /dev/hwrng interface in the guest. If this is a va

[Qemu-devel] [PATCH 09/16] pseries: Allow RTAS tokens without a qemu handler

2012-10-29 Thread David Gibson
From: Ben Herrenschmidt Kernel-based RTAS calls will not have a qemu handler, but will still be registered in qemu in order to be assigned a token number and appear in the device-tree. Let's test for the name being NULL rather than the handler when deciding to skip an entry while building the de

[Qemu-devel] [PATCH 04/16] pseries: Clean up inconsistent variable name in xics.c

2012-10-29 Thread David Gibson
Throughout xics.c 'nr' is used to refer to a global interrupt number, and 'server' is used to refer to an interrupt server number (i.e. CPU number). Except in icp_set_mfrr(), where 'nr' is used as a server number. Fix this confusing inconsistency. Signed-off-by: David Gibson --- hw/xics.c |

[Qemu-devel] [PATCH 16/16] pseries: Generate unique LIOBNs for PCI host bridges

2012-10-29 Thread David Gibson
From: Alexey Kardashevskiy In future (with VFIO) we will have multiple PCI host bridges on pseries. Each one needs a unique LIOBN (IOMMU id). At the moment we derive these from the pci domain number, but the whole notion of domain numbers on the qemu side is bogus and in any case they're not ac

[Qemu-devel] [PATCH 06/16] pseries: Cleanup duplications of ics_valid_irq() code

2012-10-29 Thread David Gibson
A couple of places in xics.c open-coded the same logic as is already implemented in ics_valid_irq(). This patch fixes the code duplication. Signed-off-by: David Gibson --- hw/xics.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xics.c b/hw/xics.c index db01fe3.

[Qemu-devel] [PATCH 12/16] target-pcc: Convert ppcemb_tlb_t to use fixed 64-bit RPN

2012-10-29 Thread David Gibson
Currently the ppcemb_tlb_t struct, used on a number of embedded ppc models to represent a TLB entry contains a hwaddr. That works reasonably for now, but is troublesome for saving the state, which we'll want to do in future. hwaddr is a large enough type to contain a physical address for any suppo

[Qemu-devel] [PATCH 13/16] pseries: Implement PAPR NVRAM

2012-10-29 Thread David Gibson
The PAPR specification requires a certain amount of NVRAM, accessed via RTAS, which we don't currently implement in qemu. This patch addresses this deficiency, implementing the NVRAM as a VIO device, with some glue to instantiate it automatically based on a machine option. The machine option spec

[Qemu-devel] [PATCH 01/16] Revert "PPC: pseries: Remove hack for PIO window"

2012-10-29 Thread David Gibson
This reverts commit a178274efabcbbc5d44805b51def874e47051325. Contrary to that commit's message, the users of old_portio are not all gone. In particular VGA still uses it via portio_list_add(). Signed-off-by: David Gibson --- hw/spapr_pci.c | 44 +++-

[Qemu-devel] [PATCH 03/16] target-ppc: Extend FPU state for newer POWER CPUs

2012-10-29 Thread David Gibson
This patch adds some extra FPU state to CPUPPCState. Specifically, fpscr is extended to a target_ulong bits, since some recent (64 bit) CPUs now have more status bits than fit inside 32 bits. Also, we add the 32 VSR registers present on CPUs with VSX (these extend the standard FP regs, which toge

[Qemu-devel] [PATCH 07/16] pseries: Move XICS initialization before cpu initialization

2012-10-29 Thread David Gibson
From: Ben Herrenschmidt Currently, the pseries machine initializes the cpus, then the XICS interrupt controller. However, to support the upcoming in-kernel XICS implementation we will need to initialize the irq controller before the vcpus. This patch makes the necesssary rearrangement. This me

[Qemu-devel] [PATCH 15/16] pseries: Fix bug in PCI MSI allocation

2012-10-29 Thread David Gibson
From: Alexey Kardashevskiy In one of the recent reworks to the XICS code, a bug was introduced where we use the wrong sense and allocate level interrupts instead of message interrupts for PCI MSIs. This patch fixes it. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/sp

[Qemu-devel] [PATCH 10/16] pseries: Add tracepoints to the XICS interrupt controller

2012-10-29 Thread David Gibson
This patch adds tracing / debugging calls to the XICS interrupt controller implementation used on the pseries machine. Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/xics.c| 23 --- trace-events | 13 + 2 files changed, 33 insertions(

[Qemu-devel] [PATCH 02/16] target-ppc: Rework storage of VPA registration state

2012-10-29 Thread David Gibson
With PAPR guests, hypercalls allow registration of the Virtual Processor Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow for certain communication between the guest and hypervisor. Currently, we store the addresses of the three areas and the size of the dtl in CPUPPCState.

[Qemu-devel] [PATCH 05/16] pseries: Use #define for XICS base irq number

2012-10-29 Thread David Gibson
From: Ben Herrenschmidt Currently the lowest "real" irq number for the XICS irq controller (as opposed to numbers reserved for IPIs and other special purposes) is hard coded as 16 in two places - in xics_system_init() and in spapr.c. As well as being generally bad practice, we're going to need t

[Qemu-devel] [PATCH 11/16] pseries: Split xics irq configuration from state information

2012-10-29 Thread David Gibson
Currently the XICS irq controller code has a per-irq state structure which amongst other things includes whether the interrupt is level or message triggered - this is configured by the platform code, and is not directly visible to the guest. This leads to a slightly awkward construct at reset time

[Qemu-devel] [PATCH 08/16] pseries: Return the token when we register an RTAS call

2012-10-29 Thread David Gibson
From: Michael Ellerman The kernel will soon be able to service some RTAS calls. However the choice of tokens will still be up to userspace. To support this have spapr_rtas_register() return the token that is allocated for an RTAS call, that allows the calling code to tell the kernel what the toke

[Qemu-devel] [0/16] pseries and PPC pending patches

2012-10-29 Thread David Gibson
Alex, Having updated for your latest merge upstream, here's my current pending set of pseries related patches. Note that 1/16 is an important bugfix reverting a broken patch of yours: old_portio is not gone, alas, so we still need the workaround to handle it for in the pseries PCI code. The rest

[Qemu-devel] [PATCH v1 12/13] q35: fill in usb pci slots with -usb

2012-10-29 Thread Jason Baron
From: Jason Baron This fills out the usb slots on q35, when -usb is passed. We now have (lspci output): 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)

[Qemu-devel] [PATCH v1 01/13] pc/piix_pci: factor out smram/pam logic

2012-10-29 Thread Jason Baron
From: Isaku Yamahata Factor out smram/pam logic for later use. Which will be used by q35 too. [jba...@redhat.com: changes for updated memory API] Signed-off-by: Isaku Yamahata Signed-off-by: Jason Baron --- hw/i386/Makefile.objs |1 + hw/pam.c | 87 +

[Qemu-devel] [PATCH v1 02/13] Back out add of i21154

2012-10-29 Thread Jason Baron
From: Jason Baron As pointed out by Andreas Färber this is covered by dec_pci.c. Signed-off-by: Jason Baron --- hw/Makefile.objs |2 +- hw/i21154.c | 113 -- hw/i21154.h |9 3 files changed, 1 insertions(+), 123 deleti

[Qemu-devel] [PATCH v1 07/13] q35: Introduce q35 pc based chipset emulator

2012-10-29 Thread Jason Baron
From: Isaku Yamahata pc q35 based chipset emulator to support pci express natively. Based on Anthony Liguori's suggestion, the machine name is 'q35-next', with an alias of 'q35'. At this point, there are no compatibility guarantees. When the chipset stabilizes more, we will begin to version the m

[Qemu-devel] [PATCH v1 13/13] Fixup q35/ich9 Licenses

2012-10-29 Thread Jason Baron
From: Jason Baron Cleanup the q35/ich9 license headers. Signed-off-by: Jason Baron --- hw/acpi_ich9.c | 13 +++-- hw/lpc_ich9.c | 32 hw/smbus_ich9.c | 14 -- 3 files changed, 23 insertions(+), 36 deletions(-) diff --git a/hw/acpi_

[Qemu-devel] [PATCH v1 11/13] q35: automatically load the q35 dsdt table

2012-10-29 Thread Jason Baron
From: Jason Baron Automatically, locate the required q35 dsdt table on load. Otherwise we error out. This could be done in the bios, but its harder to produce a good error message. Signed-off-by: Jason Baron --- hw/pc.c | 19 +++ hw/pc.h |2 ++ hw/pc_q35.c |7

[Qemu-devel] [PATCH v1 09/13] q35: Add kvmclock support

2012-10-29 Thread Jason Baron
From: Jan Kiszka Reviewed-by: Paolo Bonzini Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- hw/pc_q35.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/pc_q35.c b/hw/pc_q35.c index cf0d361..1f31486 100644 --- a/hw/pc_q35.c +++ b/hw/pc_q35.c @@ -52,6 +52,

[Qemu-devel] [PATCH v1 08/13] q35: Suppress SMM BIOS initialization under KVM

2012-10-29 Thread Jason Baron
From: Jan Kiszka Same as for i44fx: KVM does not support SMM yet. Signal it initialized to Seabios to avoid failures. Reviewed-by: Paolo Bonzini Signed-off-by: Jan Kiszka Signed-off-by: Jason Baron --- hw/acpi_ich9.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --gi

[Qemu-devel] [PATCH v1 10/13] Add a fallback bios file search, if -L fails.

2012-10-29 Thread Jason Baron
From: Jason Baron If -L is specified, and qemu does not find the bios file in , then the search fails. Add infrastructure such that the search will continue in the default paths, if not found in the -L path. Reviewed-by: Paolo Bonzini Signed-off-by: Jason Baron --- vl.c | 36 ++

[Qemu-devel] [PATCH v1 04/13] blockdev: Introduce IF_AHCI

2012-10-29 Thread Jason Baron
From: Jason Baron Introduce IF_AHCI so that q35 can differentiate between ide and ahci disks. This allows q35 to specify its default disk type. It also allows q35 to differentiate between ahci and ide disks, such that -drive if=ide does not result in the creating of an ahci disk. This is importan

[Qemu-devel] [PATCH v1 03/13] blockdev: Introduce QEMUMachine->default_drive_if

2012-10-29 Thread Jason Baron
From: Jason Baron The current QEMUMachine definition has a 'use_scsi' field to indicate if a machine type should use scsi by default. However, Q35 wants to use ahci by default. Thus, introdue a new field in the QEMUMachine defintion, default_drive_if. Please use 'static inline int get_default_dr

[Qemu-devel] [PATCH v1 06/13] pc: Move ioapic_init() from pc_piix.c to pc.c

2012-10-29 Thread Jason Baron
From: Jason Baron Move ioapic_init from pc_piix.c to pc.c, to make it a common function. Rename ioapic_init -> ioapic_init_gsi. Reviewed-by: Paolo Bonzini Signed-off-by: Jason Baron --- hw/pc.c | 24 hw/pc.h |2 ++ hw/pc_piix.c | 25 +

[Qemu-devel] [PATCH v1 05/13] pc, pc_piix: split out pc nic initialization

2012-10-29 Thread Jason Baron
From: Isaku Yamahata Factor out pc nic initialization. This simplifies the pc initialization and will reduce the code duplication of q35 pc initialization. Reviewed-by: Paolo Bonzini Signed-off-by: Isaku Yamahata Signed-off-by: Jason Baron --- hw/pc.c | 15 +++ hw/pc.h

[Qemu-devel] [PATCH v1 00/13] q35 patches for pci tree

2012-10-29 Thread Jason Baron
Hi, Re-base of my previous q35 patches on top of Michael Tsirkin's pci tree. Qemu bits for q35 support, I'm posting the seabios changes separately. The patches require '-M q35' and -L 'seabios dir with q35 changes' on the qemu command line. Hopefully, we can make it the default for x86 at some fu

[Qemu-devel] [PATCH v6 1/2] pl330: Initial version

2012-10-29 Thread Peter Crosthwaite
Device model for Primecell PL330 dma controller. Signed-off-by: Peter Crosthwaite Signed-off-by: Kirill Batuzov Tested-by: Igor Mitsyanko --- changed from v5: s/cpu_physical_memory_foo/dma_memory_foo (PMM review) remove casts of g_new/malloc (PMM review) s/hw_error/qemu_log_mask for registers r

[Qemu-devel] [PATCH v6 2/2] xilinx_zynq: added pl330 to machine model

2012-10-29 Thread Peter Crosthwaite
Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index c55dafb..e985e26 100644 --- a/hw/xilinx_zynq.c +++ b/hw/xilinx_zynq.c @@ -33,6 +33,10 @@ #define IRQ

[Qemu-devel] [PATCH v6 0/2] Xilinx Zynq PL330 support

2012-10-29 Thread Peter Crosthwaite
These patches add support for the Primcell PL330 DMA controller and add it to the Xilinx Zynq machine model. Patch 1 is the device model. Patch 2 is the machine model update. The Device model was originally contributed by Kirill Batuzov / Samsung, as indicated by the (C) notice in hw/pl330.c.

[Qemu-devel] [PATCH v2 19/19] target-mips: don't flush extra TLB on permissions upgrade

2012-10-29 Thread Aurelien Jarno
If the guest uses a TLBWI instruction for upgrading permissions, we don't need to flush the extra TLBs. This improve boot time performance by about 10%. Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH v2 08/19] target-mips: use softfloat constants when possible

2012-10-29 Thread Aurelien Jarno
softfloat already has a few constants defined, use them instead of redefining them in target-mips. Rename FLOAT_SNAN32 and FLOAT_SNAN64 to FP_TO_INT32_OVERFLOW and FP_TO_INT64_OVERFLOW as even if they have the same value, they are technically different (and defined differently in the MIPS ISA). R

[Qemu-devel] [PATCH v2 11/19] target-mips: optimize load operations

2012-10-29 Thread Aurelien Jarno
Only allocate t1 when needed. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 4485a81..c46129d 100644 --- a/ta

[Qemu-devel] [PATCH v2 04/19] target-mips: use the softfloat floatXX_muladd functions

2012-10-29 Thread Aurelien Jarno
Use the new softfloat floatXX_muladd() functions to implement the madd, msub, nmadd and nmsub instructions. At the same time replace the name of the helpers by the name of the instruction, as the only reason for the previous names was to keep the macros simple. Reviewed-by: Richard Henderson Sign

[Qemu-devel] [PATCH v2 14/19] target-mips: don't use local temps for store conditional

2012-10-29 Thread Aurelien Jarno
Store conditional operations only need local temps in user mode. Fix the code to use temp local only in user mode, this spares two memory stores in system mode. At the same time remove a wrong a wrong copied & pasted comment, store operations don't have a register destination. Reviewed-by: Richar

[Qemu-devel] [PATCH v2 07/19] target-mips: cleanup float to int conversion helpers

2012-10-29 Thread Aurelien Jarno
Instead of accessing the flags from the floating point control register after updating it, read the softfloat flags. This is just code cleanup and should not change the behaviour. Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c | 118 +++ 1

[Qemu-devel] [PATCH v2 09/19] target-mips: restore CPU state after an FPU exception

2012-10-29 Thread Aurelien Jarno
Rework *raise_exception*() functions so that they can be called from other helpers, passing the return address as an argument. Use do_raise_exception() function in update_fcr31() to correctly restore the CPU state after an FPU exception. Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c

[Qemu-devel] [PATCH v2 18/19] target-mips: fix TLBR wrt SEGMask

2012-10-29 Thread Aurelien Jarno
Like r4k_map_address(), r4k_helper_tlbp() should use SEGMask to mask the address. Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 773c710..cdd6880 100644 --- a/target-mi

[Qemu-devel] [PATCH v2 00/19] target-mips: misc fixes and optimizations

2012-10-29 Thread Aurelien Jarno
This patch series does some bug fixes and code cleanup in the MIPS target, and then does some optimizations. Changes v1 -> v2: - patch 1: new patch - patch 2: new patch - patch 5: new patch to address Richard Henders comments - patch 6: update following patch 5 addition - patch 7: new pat

[Qemu-devel] [PATCH v2 02/19] target-mips: do not save CPU state when using retranslation

2012-10-29 Thread Aurelien Jarno
When the CPU state after a possible retranslation is going to be handled through code retranslation, we don't need to save the CPU state before. Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/target-mips/transla

Re: [Qemu-devel] [PATCH v5 1/2] pl330: Initial version

2012-10-29 Thread Peter Crosthwaite
All changed made, Thanks, Peter On Mon, Oct 29, 2012 at 7:41 PM, Igor Mitsyanko wrote: > Good day, Peter) > > > On 10/29/2012 10:35 AM, Peter Crosthwaite wrote: >> >> Device model for Primecell PL330 dma controller. >> >> + >> +static Property pl330_properties[] = { >> +/* CR0 */ >> +DEF

Re: [Qemu-devel] [PATCH v5 1/2] pl330: Initial version

2012-10-29 Thread Peter Crosthwaite
All changed made Thanks, Peter On Mon, Oct 29, 2012 at 6:32 PM, Peter Maydell wrote: > On 29 October 2012 06:35, Peter Crosthwaite > wrote: >> Device model for Primecell PL330 dma controller. > > A general question -- this is a DMA controller so should it be using > the DMAContext APIs now? Avi

[Qemu-devel] [PATCH v2 01/19] target-mips: correctly restore btarget upon exception

2012-10-29 Thread Aurelien Jarno
When the CPU state is restored through retranslation after an exception, btarget should also be restored. Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index ed55e26..

[Qemu-devel] buildbot failure in qemu on default_mingw32

2012-10-29 Thread qemu
The Buildbot has detected a new failure on builder default_mingw32 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_mingw32/builds/420 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_rhel61 Build Reason:

[Qemu-devel] buildbot failure in qemu on default_x86_64_rhel61

2012-10-29 Thread qemu
The Buildbot has detected a new failure on builder default_x86_64_rhel61 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel61/builds/420 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_rhel61 B

[Qemu-devel] [PATCH v2 10/19] target-mips: cleanup load/store operations

2012-10-29 Thread Aurelien Jarno
Load/store operations use macros for historical reasons. Now that there is no point in keeping them, replace them by direct calls to qemu_ld/st. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 91 --- 1 fil

[Qemu-devel] [PATCH v2 16/19] target-mips: optimize ddiv/ddivu/div/divu with movcond

2012-10-29 Thread Aurelien Jarno
The result of a division by 0, or a division of INT_MIN by -1 in the signed case, is unpredictable. Just replace 0 by 1 in that case so that it doesn't trigger a floating point exception on the host. Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 85 +--

[Qemu-devel] [PATCH v2 1/3] tcg/arm: fix TLB access in qemu-ld/st ops

2012-10-29 Thread y
From: Aurelien Jarno The TCG arm backend considers likely that the offset to the TLB entries does not exceed 12 bits for mem_index = 0. In practice this is not true for at least the MIPS target. The current patch fixes that by loading the bits 23-12 with a separate instruction, and using loads w

[Qemu-devel] [PATCH v2 2/3] tcg/arm: fix cross-endian qemu_st16

2012-10-29 Thread y
From: Aurelien Jarno The bswap16 TCG opcode assumes that the high bytes of the temp equal to 0 before calling it. The ARM backend implementation takes this assumption to slightly optimize the generated code. The same implementation is called for implementing the cross-endian qemu_st16 opcode, wh

[Qemu-devel] [PATCH v2 3/3] target-openrisc: remove conflicting definitions from cpu.h

2012-10-29 Thread y
From: Aurelien Jarno On an ARM host, the registers definitions from cpu.h clash with /usr/include/sys/ucontext.h. As there are unused, just remove them. Cc: Jia Liu Cc: qemu-sta...@nongnu.org Signed-off-by: Aurelien Jarno --- target-openrisc/cpu.h | 18 -- 1 file changed, 18

[Qemu-devel] [PATCH v2 0/3] tcg/arm: misc fixes

2012-10-29 Thread y
From: Aurelien Jarno This patch series fixes the TCG arm backend for the MIPS target, as well as for big endian targets when not using the ARMv6+ instructions set. The corresponding patches are candidate for a stable release. -- Changes v1 -> v2: - patch 1: - added an assert to make sure the

[Qemu-devel] [PATCH v2 15/19] target-mips: implement movn/movz using movcond

2012-10-29 Thread Aurelien Jarno
Avoid the branches in movn/movz implementation and replace them with movcond. Also update a wrong command. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 12/19] target-mips: simplify load/store microMIPS helpers

2012-10-29 Thread Aurelien Jarno
load/store microMIPS helpers are reinventing the wheel. Call do_lw, do_ll, do_sw and do_sl instead of using a macro calling the cpu_* load/store functions. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c | 73 ++-

[Qemu-devel] [PATCH v2 05/19] target-mips: keep softfloat exception set to 0 between instructions

2012-10-29 Thread Aurelien Jarno
Instead of clearing the softfloat exception flags before each floating point instruction, reset them to 0 in update_fcr31() when an exception is detected. Signed-off-by: Aurelien Jarno --- target-mips/op_helper.c | 73 +++ 1 file changed, 10 insertio

[Qemu-devel] [PATCH v2 06/19] target-mips: fix FPU exceptions

2012-10-29 Thread Aurelien Jarno
For each FPU instruction that can trigger an FPU exception, to call call update_fcr31() after. Remove the manual NaN assignment in case of float to float operation, as softfloat is already taking care of that. However for float to int operation, the value has to be changed to the MIPS one. In the

[Qemu-devel] [PATCH v2 13/19] target-mips: implement unaligned loads using TCG

2012-10-29 Thread Aurelien Jarno
Load/store from helpers should be avoided as they are quite inefficient. Rewrite unaligned loads instructions using TCG and aligned loads. The number of actual loads operations to implement an unaligned load instruction is reduced from up to 8 to 1. Note: As we can't rely on shift by 32 or 64 unde

[Qemu-devel] [PATCH v2 03/19] softfloat: implement fused multiply-add NaN propagation for MIPS

2012-10-29 Thread Aurelien Jarno
Add a pickNaNMulAdd function for MIPS, implementing NaN propagation rules for MIPS fused multiply-add instructions. Cc: Peter Maydell Signed-off-by: Aurelien Jarno --- fpu/softfloat-specialize.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/fpu/softfloat-spe

[Qemu-devel] [PATCH v2 17/19] target-mips: use deposit instead of hardcoded version

2012-10-29 Thread Aurelien Jarno
Use the deposit op instead of and hardcoded bit field insertion. It allows the host to emit the corresponding instruction if available. At the same time remove the (lsb > msb) test. The MIPS64R2 instruction set manual says "Because of the instruction format, lsb can never be greater than msb, so t

Re: [Qemu-devel] [PULL 0/7] s390 patch queue 2012-10-29

2012-10-29 Thread Aurelien Jarno
On Mon, Oct 29, 2012 at 07:40:17PM +0100, Alexander Graf wrote: > Hi Blue / Aurelien, > > This is my current patch queue for s390. Please pull. > > Alex > > > The following changes since commit b308c82cbda44e138ef990af64d44a5613c16092: > Avi Kivity (1): > pci: avoid destroying bridge

Re: [Qemu-devel] [PATCH 07/18] migration: make writes blocking

2012-10-29 Thread Paolo Bonzini
Il 29/10/2012 18:32, Juan Quintela ha scritto: >> > New users can't "just add socket_set_nonblock()". They'd have to add it >> > right where you deleted it: between qemu_socket() and connect(). Else >> > the connect() is blocking. > Grrr. > > So, is there any way to make a connection that is non

Re: [Qemu-devel] [PATCH] memory: fix rendering of a region obscured by another

2012-10-29 Thread Anthony Liguori
Avi Kivity writes: > The memory core drops regions that are hidden by another region (for example, > during BAR sizing), but it doesn't do so correctly if the lower address of the > existing range is below the lower address of the new range. > > Example (qemu-system-mips -M malta -kernel vmlinux-

Re: [Qemu-devel] [PULL rebased] virtio,pci infrastructure

2012-10-29 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > The following changes since commit d262cb02861dd33375c08fc798930653b14769e9: > > Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf (2012-10-29 > 14:56:17 +0100) > > are available in the git repository at: Pulled. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v7 00/17] target-i386: Add way to expose VMWare CPUID

2012-10-29 Thread Marcelo Tosatti
On Fri, Oct 12, 2012 at 03:56:05PM -0400, Don Slutz wrote: > Also known as Paravirtualization CPUIDs. > > This is primarily done so that the guest will think it is running > under vmware when hypervisor-vendor=vmware is specified as a > property of a cpu. > > Patches 1 to 3 define new cpu propert

Re: [Qemu-devel] [QEMU PATCH 0/3] Fix -cpu host and enforce/check to use GET_SUPPORTED_CPUID

2012-10-29 Thread Marcelo Tosatti
On Wed, Oct 24, 2012 at 07:44:04PM -0200, Eduardo Habkost wrote: > This depends on a previous series I have submitted: > Subject: [QEMU PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes > Message-Id: <1349383747-19383-1-git-send-email-ehabk...@redhat.com> > http://article.gmane.org

Re: [Qemu-devel] x86_64-softmmu broken on Windows (TCG?)

2012-10-29 Thread Aurelien Jarno
On Mon, Oct 29, 2012 at 06:53:14PM +0100, Paolo Bonzini wrote: > Known-good commit: 8473f377393219390ea6f2d8d450a2b054bb823e > Known-bad commit: d262cb02861dd33375c08fc798930653b14769e9 > > i386-softmmu seems to work. I may try to bisect it tomorrow, but I'd be > glad if somebody else beats me.

Re: [Qemu-devel] [PULL 00/36] usb patch queue

2012-10-29 Thread Anthony Liguori
Gerd Hoffmann writes: > Hi, > > Here comes the usb patch queue. Nothing big standing out. Tons of > cleanups and small bug fixes. Some performance improvements too. > Some patches preparing the usb core for the upcoming input pipelining > bits. > > please pull, > Gerd > Pulled. Thanks. R

Re: [Qemu-devel] [PULL 00/32] Block patches

2012-10-29 Thread Anthony Liguori
Kevin Wolf writes: > The following changes since commit a8170e5e97ad17ca169c64ba87ae2f53850dab4c: > > Rename target_phys_addr_t to hwaddr (2012-10-23 08:58:25 -0500) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git for-anthony > Pulled. Thanks. Regards, Antho

[Qemu-devel] [PATCH 7/7] s390: sclp ascii console support

2012-10-29 Thread Alexander Graf
From: Heinz Graalfs This code adds console support by implementing SCLP's ASCII Console Data event. This is the same console as LPARs ASCII console or z/VMs sysascii. The console can be specified manually with something like -chardev stdio,id=charconsole0 -device sclpconsole,chardev=charconsol

[Qemu-devel] [PATCH 01/11] janitor: move iovector functions out of cutils.c

2012-10-29 Thread Paolo Bonzini
This removes the dependency of cutils.c on iov.c, and lets us remove iov.o from several builds. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- Makefile.objs | 4 +-- cutils.c | 103 - iov.c | 103 +++

[Qemu-devel] [PATCH 6/7] s390: sclp signal quiesce support

2012-10-29 Thread Alexander Graf
From: Heinz Graalfs This implements the sclp signal quiesce event via the SCLP Event Facility. This allows to gracefully shutdown a guest by using system_powerdown notifiers. It creates a service interrupt that will trigger a Read Event Data command from the guest. This code will then add an even

[Qemu-devel] [PATCH 2/7] s390/kvm_stat: correct sys_perf_event_open syscall number

2012-10-29 Thread Alexander Graf
From: Heinz Graalfs Correct sys_perf_event_open syscall number for s390 architecture - the hardcoded syscall number 298 is for x86 but should be different for other architectures. In case we figure out via /proc/cpuinfo that we are running on s390 the appropriate syscall number

Re: [Qemu-devel] [PATCH v2 4/6] ppc: add missing static

2012-10-29 Thread Alexander Graf
On 28.10.2012, at 12:04, Blue Swirl wrote: > Add missing 'static' qualifiers. > > Signed-off-by: Blue Swirl Acked-by: Alexander Graf Alex

Re: [Qemu-devel] [PATCH v2 5/6] target-ppc: make some functions static

2012-10-29 Thread Alexander Graf
On 28.10.2012, at 12:04, Blue Swirl wrote: > Signed-off-by: Blue Swirl Acked-by: Alexander Graf Alex > --- > target-ppc/cpu.h|6 -- > target-ppc/mmu_helper.c | 11 ++- > 2 files changed, 6 insertions(+), 11 deletions(-) > > diff --git a/target-ppc/cpu.h b/target-ppc/

[Qemu-devel] [PULL 0/7] s390 patch queue 2012-10-29

2012-10-29 Thread Alexander Graf
Hi Blue / Aurelien, This is my current patch queue for s390. Please pull. Alex The following changes since commit b308c82cbda44e138ef990af64d44a5613c16092: Avi Kivity (1): pci: avoid destroying bridge address space windows in a transaction are available in the git repository at:

[Qemu-devel] [PATCH 10/11] qemu-tool: do not depend on qemu-timer.c

2012-10-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-tool.c | 2 +- 1 file modificato, 1 inserzione(+). 1 rimozione(-) diff --git a/qemu-tool.c b/qemu-tool.c index 28a4e8d..b46631e 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -70,7 +70,7 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) int

[Qemu-devel] [PATCH 4/7] s390: sclp base support

2012-10-29 Thread Alexander Graf
From: Heinz Graalfs This adds a more generic infrastructure for handling Service-Call requests on s390. Currently we only support a small subset of Read SCP Info directly in target-s390x. This patch provides the base infrastructure for supporting more commands and moves Read SCP Info. In the futu

[Qemu-devel] [PATCH 05/11] fdsets: use weak aliases instead of qemu-tool.c/qemu-user.c

2012-10-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- cutils.c | 5 - osdep.c | 30 ++ qemu-common.h | 1 - qemu-tool.c | 20 qemu-user.c | 20 5 file modificati, 30 inserzioni(+), 46 rimozioni(-) diff --git a/cutils.c b/cutil

[Qemu-devel] [PATCH 11/11] build: do not include main loop where it is not actually used

2012-10-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile | 6 +++--- Makefile.objs | 5 ++--- tests/Makefile | 4 ++-- 3 file modificati, 7 inserzioni(+), 8 rimozioni(-) diff --git a/Makefile b/Makefile index e489583..2ba981c 100644 --- a/Makefile +++ b/Makefile @@ -171,7 +171,7 @@ endif qemu-img.o: qe

[Qemu-devel] [PATCH 3/7] s390: use sync regs for register transfer

2012-10-29 Thread Alexander Graf
From: Christian Borntraeger Newer kernels provide the guest registers in kvm_run. Lets use those if available (i.e. the capability is set). This avoids ioctls on cpu_synchronize_state making intercepts faster. In addition, we have now the prefix register, the access registers the control registe

[Qemu-devel] [PATCH 5/7] s390: sclp event support

2012-10-29 Thread Alexander Graf
From: Heinz Graalfs Several SCLP features are considered to be events. Those events don't provide SCLP commands on their own, instead they are all based on Read Event Data, Write Event Data, Write Event Mask and the service interrupt. Follow-on patches will provide SCLP's Signal Quiesce (via syst

[Qemu-devel] [PATCH 1/7] s390x: fix -initrd in virtio machine

2012-10-29 Thread Alexander Graf
When using -initrd in the virtio machine, we need to indicate the initrd start and size inside the kernel image. These parameters need to be stored in native endianness. Signed-off-by: Alexander Graf Acked-by: Richard Henderson Acked-by: Christian Borntraeger --- hw/s390-virtio.c |4 ++--

[Qemu-devel] [PULL 0/7] s390 patch queue 2012-10-29

2012-10-29 Thread Alexander Graf
Hi Blue / Aurelien, This is my current patch queue for s390. Please pull. Alex The following changes since commit b308c82cbda44e138ef990af64d44a5613c16092: Avi Kivity (1): pci: avoid destroying bridge address space windows in a transaction are available in the git repository at:

[Qemu-devel] [PATCH 1/7] s390x: fix -initrd in virtio machine

2012-10-29 Thread Alexander Graf
When using -initrd in the virtio machine, we need to indicate the initrd start and size inside the kernel image. These parameters need to be stored in native endianness. Signed-off-by: Alexander Graf Acked-by: Richard Henderson Acked-by: Christian Borntraeger --- hw/s390-virtio.c |4 ++--

[Qemu-devel] [PATCH 03/11] compiler: use weak aliases to provide default definitions

2012-10-29 Thread Paolo Bonzini
This is simpler and more portable. Signed-off-by: Paolo Bonzini --- arch_init.h | 2 +- compiler.h | 11 --- qmp.c | 3 ++- 3 file modificati, 7 inserzioni(+), 9 rimozioni(-) diff --git a/arch_init.h b/arch_init.h index d9c572a..5fc780c 100644 --- a/arch_init.h +++ b/arch_init.

[Qemu-devel] [PATCH 08/11] qemu-timer: make initialization functions idempotent

2012-10-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-timer.c | 12 +--- 1 file modificato, 9 inserzioni(+), 3 rimozioni(-) diff --git a/qemu-timer.c b/qemu-timer.c index ede84ff..f3426c9 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -430,9 +430,11 @@ void qemu_unregister_clock_reset_notifier(QEMUCloc

[Qemu-devel] [PATCH 09/11] main-loop: unify qemu_init_main_loop between QEMU and tools

2012-10-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- main-loop.c | 5 - main-loop.h | 10 -- qemu-tool.c | 7 --- vl.c| 5 - 4 file modificati, 4 inserzioni(+), 23 rimozioni(-) diff --git a/main-loop.c b/main-loop.c index eb3b6e6..baefe41 100644 --- a/main-loop.c +++ b/main-loop.c @@

[Qemu-devel] [PATCH 07/11] win32: add weak version of qemu_fd_register

2012-10-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- oslib-win32.c | 5 + 1 file modificato, 5 inserzioni(+) diff --git a/oslib-win32.c b/oslib-win32.c index 51b33e8..9ca83df 100644 --- a/oslib-win32.c +++ b/oslib-win32.c @@ -150,3 +150,8 @@ int qemu_get_thread_id(void) { return GetCurrentThreadId(); } +

  1   2   3   >