Re: [Qemu-devel] [PATCH] hw/qxl: warn on sync io usage

2012-10-10 Thread Gerd Hoffmann
Hi, > +static void sync_io_warning(PCIQXLDevice *qxl, uint32_t io_port) > +{ > +fprintf(stderr, "qxl-%d: WARNING: sync io used, see (RHBZ 747011)", > +qxl->id); > +fprintf(stderr, "qxl-%d: WARNING: virt-viewer/remote-viewer can hang\n", > +qxl->id); > +if (qxl

Re: [Qemu-devel] [PATCH 4/7] savevm: Add VMSTATE_ helpers for target_phys_addr_t

2012-10-10 Thread David Gibson
On Wed, Oct 10, 2012 at 11:17:31AM +1100, David Gibson wrote: > On Tue, Oct 09, 2012 at 05:24:29PM +0100, Peter Maydell wrote: > > On 9 October 2012 13:53, David Gibson wrote: > > > Well, the place I've used this (in patches yet to be posted) is saving > > > the state of the pseries machine itself

Re: [Qemu-devel] [PATCH v3 23/23] pci: honor PCI_COMMAND_MASTER

2012-10-10 Thread liu ping fan
On Wed, Oct 10, 2012 at 12:32 AM, Avi Kivity wrote: > Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when > the bit is clear. > > Honor PCI_COMMAND_MASTER by inserting a memory region into the device's > bus master address space, and tying its enable status to PCI_COMMAND_MAS

Re: [Qemu-devel] [PATCH v3 19/23] memory: per-AddressSpace dispatch

2012-10-10 Thread liu ping fan
On Wed, Oct 10, 2012 at 12:32 AM, Avi Kivity wrote: > Currently we use a global radix tree to dispatch memory access. This only > works with a single address space; to support multiple address spaces we > make the radix tree a member of AddressSpace (via an intermediate structure > AddressSpaceDi

[Qemu-devel] [PATCH v2 2/7] ppc: Pass PowerPCCPU to {ppc6xx, ppc970, power7, ppc40x, ppce500}_set_irq()

2012-10-10 Thread Andreas Färber
Needed for changing qemu_cpu_kick() argument type to CPUState and for moving halted field into CPUState. Signed-off-by: Andreas Färber --- hw/ppc.c | 55 +++ 1 Datei geändert, 35 Zeilen hinzugefügt(+), 20 Zeilen entfernt(-) diff --git a/hw/p

[Qemu-devel] [PATCH v2 1/7] ppce500_spin: Store PowerPCCPU in SpinKick

2012-10-10 Thread Andreas Färber
Needed for moving stop field to CPUState. Signed-off-by: Andreas Färber --- hw/ppce500_spin.c |6 +++--- 1 Datei geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c index c5b8e05..fcfd653 100644 --- a/hw/ppce500_spin.c +++ b/hw/ppce500_

[Qemu-devel] [PATCH] Add nvram to default boot device list

2012-10-10 Thread Avik Sil
This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified. Suggested by: Alexander Graf Signed-off-by: Avik Sil --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[Qemu-devel] [PATCH v2 4/7] target-ppc: Pass PowerPCCPU to powerpc_excp()

2012-10-10 Thread Andreas Färber
Needed for changing cpu_ppc_hypercall() argument type to PowerPCCPU. Signed-off-by: Andreas Färber --- target-ppc/excp_helper.c | 36 1 Datei geändert, 20 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-) diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_

[Qemu-devel] [PATCH v2 5/7] target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall

2012-10-10 Thread Andreas Färber
Adapt emulate_spapr_hypercall() accordingly. Needed for changing spapr_hypercall() argument type to PowerPCCPU. Signed-off-by: Andreas Färber --- hw/spapr.c |4 +++- target-ppc/cpu.h |2 +- target-ppc/excp_helper.c |4 ++-- 3 Dateien geändert, 6 Zeilen hinzugef

[Qemu-devel] [PATCH v2 0/7] target-ppc: Preparations for CPUState part 4b series

2012-10-10 Thread Andreas Färber
Hi Alex, Here's a rebased and extracted queue of my QOM CPUState part 4 series ppc patches, originally posted in May. All are pretty trivial refactorings to facilitate migrating from CPUPPCState and CPU_COMMON macro to QOM CPUState. Please ack and (optionally) queue for ppc-next. Available from:

Re: [Qemu-devel] [PATCH V6 1/5] libqblock build system

2012-10-10 Thread wenchao xia
于 2012-10-9 22:25, Paolo Bonzini 写道: Il 09/10/2012 02:01, wenchao xia ha scritto: Could u give more tip about this error? what is obj-amd64? My understanding is you tried to build the library from another directory similar as: /extend_disk/xiawenc/qemu/qemu have the qemu source code, then

[Qemu-devel] [PATCH v2 7/7] spapr: Pass PowerPCCPU to hypercalls

2012-10-10 Thread Andreas Färber
Needed for changing cpu_has_work() argument type to CPUState, used in h_cede(). Signed-off-by: Andreas Färber --- hw/spapr.h |2 +- hw/spapr_hcall.c | 38 +- hw/spapr_iommu.c |2 +- hw/spapr_llan.c | 10 +- hw/spapr_vio.c | 10 ++

[Qemu-devel] [PATCH v2 6/7] spapr: Pass PowerPCCPU to spapr_hypercall()

2012-10-10 Thread Andreas Färber
Needed for changing the hypercall handlers' argument type to PowerPCCPU. Signed-off-by: Andreas Färber --- hw/spapr.c |2 +- hw/spapr.h |2 +- hw/spapr_hcall.c |4 +++- target-ppc/kvm.c |3 ++- 4 Dateien geändert, 7 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --

[Qemu-devel] [PATCH v2 3/7] target-ppc: Rename kvm_kick_{env => cpu} and pass PowerPCCPU

2012-10-10 Thread Andreas Färber
Needed for changing qemu_cpu_kick() argument type to CPUState. Signed-off-by: Andreas Färber --- target-ppc/kvm.c |8 ++-- 1 Datei geändert, 6 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 5cbe98a..d7d8e8f 100644 --- a/target-ppc/kvm.

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: >> Note before anyone gets confused; we were talking about using the PCI >> config space to indicate what BAR(s) the virtio stuff is in. An >> alternative would be to simply specify a new layout format i

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Oct 10, 2012 at 08:36:12AM -0500, Anthony Liguori wrote: >> Rusty Russell writes: >> >> > Gerd Hoffmann writes: >> >> So how about this: >> >> >> >> (1) Add a vendor specific pci capability for new-style virtio. >> >> Specifies the pci bar used for new

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Rusty Russell writes: > Jamie Lokier writes: > >> Rusty Russell wrote: >>> I don't think it'll be that bad; reset clears the device to unknown, >>> bar0 moves it from unknown->legacy mode, bar1/2/3 changes it from >>> unknown->modern mode, and anything else is bad (I prefer being strict so >>> we

[Qemu-devel] [Bug 1065325] [NEW] qemu-system-arm hangs on SIGUSR1 on OS X 10.8.2

2012-10-10 Thread Oliver
Public bug reported: I built the latest version of QEMU commit b4ae3cfa57b8c1bdbbd7b7d420971e9171203ade Date: Mon Oct 1 12:34:37 2012 +1000 My system is: Darwin localhost 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 localhost:

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Oliver
All right that makes sense. I pulled the latest version from git, but I get a build error, so I will post a new bug. I will let you decided how you want to mark this bug. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.

[Qemu-devel] [PATCH] tcg-ia64: Implement deposit

2012-10-10 Thread Richard Henderson
Note that in the general reg=reg,reg case we're restricted to 16-bit insertions. This makes it easy to allow "any" constant as input, as post-truncation it will fit into the constant load insn for which we have room in the bundle. Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 53

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Peter Maydell
Thanks. QEMU 1.2 (or earlier) won't work when built with a gcc which is really an llvm-gcc, because llvm-gcc doesn't support the "tie this variable to a specific native register" which QEMU requires. (I had hoped it would give a compile failure, but it seems to just generate wrong code.) We've actu

Re: [Qemu-devel] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-10 Thread Eric Blake
On 10/10/2012 08:20 AM, Corey Bryant wrote: > This option can be used for passing file descriptors on the > command line. It mirrors the existing add-fd QMP command which > allows an fd to be passed to QEMU via SCM_RIGHTS and added to an > fd set. > > This can be combined with commands such as -d

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Oliver
Peter, I built in from the zipped tar ball for qemu-1.2.0 I did not get it from the repository, although I am happy to do this for you. I used ./configure This what configure said Silently falling back into gthread backend under darwin C compilergcc Host C compiler gcc Objective

Re: [Qemu-devel] [PATCH v4] target-i386: initialize APIC at CPU level

2012-10-10 Thread Andreas Färber
Am 10.10.2012 21:43, schrieb Igor Mammedov: > (L)APIC is a part of cpu [1] so move APIC initialization inside of > x86_cpu object. Since cpu_model and override flags currently specify > whether APIC should be created or not, APIC creation&initialization is > moved into x86_cpu_apic_init() which is

Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set

2012-10-10 Thread Eric Blake
On 10/10/2012 08:20 AM, Corey Bryant wrote: > qmp_add_fd() gets an fd that was received over a socket with > SCM_RIGHTS and adds it to an fd set. This patch adds support > that will enable adding an fd that was inherited on the > command line to an fd set. > > This patch also prevents removal of

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Peter Maydell
Thanks for this bug report; it would be helpful if you could let us know the following info: (1) Are you running qemu built directly from the upstream sources, or have you built this from the versions shipped by fink or similar package management system? (2) can you give the full configure line

Re: [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified fd set

2012-10-10 Thread Eric Blake
On 10/10/2012 08:20 AM, Corey Bryant wrote: > The first call to add an fd to an fd set was previously not > allowed to choose the fd set ID. The ID was generated as > the first available and ensuing calls could add more fds by > specifying the fd set ID. This change allows users to > choose the f

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Oliver
OK one more comment. When I look at register r14, where the env valuable should be stored, I see the "correct" value (gdb) info register r14 r140x102064038 4328931384 Oliver -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed t

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Oliver
One more comment, the env address looks wrong going all the way up the stack #0 0x000100436b71 in gen_intermediate_code_internal (env=0x102064680, tb=0x108e5b070, search_pc=1) at translate.c:9793 #1 0x000100437776 in gen_intermediate_code_pc (env=0x102064680, tb=0x108e5b070) at transla

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Oliver
It appears that the problem might be the value of env has changed. All the values in env look bad and when I run (gdb) print env $12 = (CPUARMState *) 0x102064680 It appears env has moved. If I dump the memory at the old env location (gdb) print *(CPUARMState *) 0x102064038 stuff looks pretty

[Qemu-devel] [Bug 1065232] [NEW] qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-10 Thread Oliver
Public bug reported: On startup qemu-system-arm crashes on this line 9373 of target-arm if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) { QTAILQ_FOREACH(bp, &env->breakpoints, entry) { if (bp->pc == dc->pc) { // <-- CRASH gen_exception

Re: [Qemu-devel] bug in popcnt emulation with some register operand(s)?

2012-10-10 Thread malc
On Thu, 11 Oct 2012, Andriy Gapon wrote: > on 08/10/2012 12:02 Andriy Gapon said the following: > > on 08/10/2012 10:52 malc said the following: > >> On Mon, 8 Oct 2012, Andriy Gapon wrote: > >> > >>> > >>> I am running Qemu (plain, no kvm, etc) on an AMD 10h machine that > >>> provides popcnt ins

Re: [Qemu-devel] bug in popcnt emulation with some register operand(s)?

2012-10-10 Thread Andriy Gapon
on 08/10/2012 12:02 Andriy Gapon said the following: > on 08/10/2012 10:52 malc said the following: >> On Mon, 8 Oct 2012, Andriy Gapon wrote: >> >>> >>> I am running Qemu (plain, no kvm, etc) on an AMD 10h machine that >>> provides popcnt instruction. Qemu advertises availability of pocnt >>> to

Re: [Qemu-devel] [PATCH 4/4] tcg/ia64: slightly optimize TLB access code

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:32 PM, Aurelien Jarno wrote: > It is possible to slightly optimize the TLB access code, by replacing > the movi + and instructions by a deposit instruction. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 3/4] tcg/ia64: remove suboptimal register shifting in qemu_ld/st ops

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:32 PM, Aurelien Jarno wrote: > Remove suboptimal register shifting in qemu_ld/st ops, introduced at the > CONFIG_TCG_PASS_AREG0 time. > > As mem_idx is now loaded in register R58/R59 for the slow path, we have > to make sure to do it last, to not add additional register constraint

Re: [Qemu-devel] [PATCH 2/4] tcg/ia64: implement movcond_i32/64

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:32 PM, Aurelien Jarno wrote: > Implement movcond_i32/64 on ia64 hosts. It is not possible to have > immediate compare arguments without adding a new bundle, but it is > possible to have 22-bit immediate value arguments. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Hend

Re: [Qemu-devel] [PATCH 13/14] target-mips: fix TLBR wrt SEGMask

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > tag = env->CP0_EntryHi & ~mask; > VPN = tlb->VPN & ~mask; > +#if defined(TARGET_MIPS64) > +tag &= env->SEGMask; > +#endif > /* Check ASID, virtual page number & size */ Indentation. r~

Re: [Qemu-devel] [PATCH 12/14] target-mips: use deposit instead of hardcoded version

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > Use the deposit op instead of and hardcoded bit field insertion. It > allows the host to emit the corresponding instruction if available. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 24/25] qmp: add NBD server commands

2012-10-10 Thread Eric Blake
On 10/10/2012 08:03 AM, Paolo Bonzini wrote: > Adding an NBD server inside QEMU is trivial, since all the logic is > in nbd.c and can be shared easily between qemu-nbd and QEMU itself. > The main difference is that qemu-nbd serves a single unnamed export, > while QEMU serves named exports. > > Ack

Re: [Qemu-devel] [PATCH 11/14] target-mips: optimize ddiv/ddivu/div/divu with movcond

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > +tcg_gen_setcondi_tl(TCG_COND_EQ, t2, t0, INT_MIN); > +tcg_gen_setcondi_tl(TCG_COND_EQ, t3, t1, -1); > +tcg_gen_and_tl(t2, t2, t3); > +tcg_gen_setcondi_tl(TCG_COND_EQ, t3, t1, 0); > +tcg_gen_

Re: [Qemu-devel] [PATCH 10/14] target-mips: implement movn/movz using movcond

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > Avoid the branches in movn/movz implementation and replace them with > movcond. Also update a wrong command. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

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

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > 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 operatio

Re: [Qemu-devel] [PATCH 08/14] target-mips: implement unaligned loads using TCG

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > 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 t

Re: [Qemu-devel] [PATCH qom-next 42/59] xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb()

2012-10-10 Thread Max Filippov
On Wed, Oct 10, 2012 at 8:33 PM, Andreas Färber wrote: > Am 10.10.2012 17:35, schrieb Max Filippov: >> On Wed, Oct 10, 2012 at 7:15 PM, Andreas Färber wrote: >>> Am 23.05.2012 05:08, schrieb Andreas Färber: Needed for cpu_has_work(). Signed-off-by: Andreas Färber >>> >>> Max, coul

Re: [Qemu-devel] [PATCH 07/14] target-mips: simplify load/store microMIPS helpers

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > 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. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 06/14] target-mips: optimize load operations

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > Only allocate t1 when needed. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 05/14] target-mips: cleanup load/store operations

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > 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. > > Signed-off-by: Aurelien Jarno > --- > target-mips/translate.c | 91 > -

Re: [Qemu-devel] [PATCH 04/14] target-mips: use softfloat constants when possible

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > 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 > technical

Re: [Qemu-devel] [PATCH 03/14] target-mips: fix FPU exceptions

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > -return float64_sqrt(fdt0, &env->active_fpu.fp_status); > +set_float_exception_flags(0, &env->active_fpu.fp_status); > +fdt0 = float64_sqrt(fdt0, &env->active_fpu.fp_status); > +update_fcr31(env); > +return fdt0; While accurate, I

Re: [Qemu-devel] [PATCH 02/14] target-mips: use the softfloat floatXX_muladd functions

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > 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 th

[Qemu-devel] [PATCH v4] target-i386: initialize APIC at CPU level

2012-10-10 Thread Igor Mammedov
(L)APIC is a part of cpu [1] so move APIC initialization inside of x86_cpu object. Since cpu_model and override flags currently specify whether APIC should be created or not, APIC creation&initialization is moved into x86_cpu_apic_init() which is called from x86_cpu_realize(). [1] - all x86 cpus h

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-10 Thread Alex Williamson
On Tue, 2012-10-09 at 09:09 +0200, Jan Kiszka wrote: > On 2012-10-08 23:11, Alex Williamson wrote: > > On Mon, 2012-10-08 at 23:40 +0200, Michael S. Tsirkin wrote: > >> On Mon, Oct 08, 2012 at 01:27:33PM -0600, Alex Williamson wrote: > >>> On Mon, 2012-10-08 at 22:15 +0200, Michael S. Tsirkin wrote

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Eric Blake
On 10/10/2012 12:57 PM, Jeff Cody wrote: > > We are already relying on realpath() in block.c. So rather than making > this patch series much more complicated for a minor fix, I think that if > there are concerns about realpath() on other OSes such as Solaris 10, > then those concerns should be ad

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Jeff Cody
On 10/10/2012 02:34 PM, Eric Blake wrote: > On 10/10/2012 12:29 PM, Jeff Cody wrote: > >>> That's a LOT of stack space, which risks stack overflow, will mostly be >>> unused, and still doesn't work if you have super-deep hierarchies larger >>> than PATH_MAX. Would you be better off using realpath

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Eric Blake
On 10/10/2012 12:29 PM, Jeff Cody wrote: >> That's a LOT of stack space, which risks stack overflow, will mostly be >> unused, and still doesn't work if you have super-deep hierarchies larger >> than PATH_MAX. Would you be better off using realpath(,NULL) for its >> allocating semantics, and then

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Jeff Cody
On 10/10/2012 02:13 PM, Eric Blake wrote: > On 10/09/2012 11:56 PM, Jeff Cody wrote: >> Currently, bdrv_find_backing_image compares bs->backing_file with >> what is passed in as a backing_file name. Mismatches may occur, >> however, when bs->backing_file and backing_file are both not >> absolute o

Re: [Qemu-devel] [PATCH 2/2] block: in commit, determine base image from the top image

2012-10-10 Thread Eric Blake
On 10/09/2012 11:56 PM, Jeff Cody wrote: > This simplifies some code and error checking, and also fixes a bug. > > bdrv_find_backing_image() should only be passed absolute filenames, > or filenames relative to the chain. In the QMP message handler for > block commit, when looking up the base do s

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Eric Blake
On 10/09/2012 11:56 PM, Jeff Cody wrote: > Currently, bdrv_find_backing_image compares bs->backing_file with > what is passed in as a backing_file name. Mismatches may occur, > however, when bs->backing_file and backing_file are both not > absolute or relative. > > Use path_combine() to make sure

Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-10-10 Thread Alberto Garcia
On Wed, Oct 10, 2012 at 01:35:06PM +0200, Avi Kivity wrote: > > Hey, I finally found some time to look into this, the problem that > > I see is that the PCI carrier doesn't just map each space into its > > local address spaces, in addition to that: > > > > 1) it changes the data and addresses a

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Eric Blake
On 10/10/2012 10:17 AM, Paolo Bonzini wrote: > Il 10/10/2012 18:14, Stefan Weil ha scritto: >>> >>> >>> diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c >>> index f9a8270..b34a84a 100644 >>> --- a/fsdev/virtfs-proxy-helper.c >>> +++ b/fsdev/virtfs-proxy-helper.c >>> @@ -290,8

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Eric Blake
On 10/10/2012 05:32 AM, Paolo Bonzini wrote: > Fixes the following error with glibc 2.16 on Fedora 18: > > virtfs-proxy-helper.c: In function ‘setfsugid’: > virtfs-proxy-helper.c:293:13: error: ignoring return value of ‘setfsgid’, > declared with attribute warn_unused_result [-Werror=unused-resul

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Paolo Bonzini
Il 10/10/2012 18:54, Stefan Weil ha scritto: >> >> if (setfsuid(uid) < 0 || setfsuid(uid) != uid) { >> return -1; >> } >> >> but it seems wasteful to do four syscalls instead of two. > > I added a local variable in my example to avoid those extra > syscalls. Note that the two setf

[Qemu-devel] [PATCH] arm_gic: Rename gic_state to GICState

2012-10-10 Thread Peter Maydell
Rename the gic_state struct to match QEMU's coding style conventions for structure names, since the impending KVM-for-ARM patches will create another subclass of it. This patch was created using: sed -i 's/gic_state/GICState/g' hw/arm_gic.c hw/arm_gic_common.c \ hw/arm_gic_internal.h hw/armv7

Re: [Qemu-devel] [RFC v2 4/6] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2012-10-10 Thread Peter Maydell
On 10 October 2012 18:23, Andreas Färber wrote: > Am 10.10.2012 17:07, schrieb Peter Maydell: >> Implement support for using the KVM in-kernel GIC for ARM. >> >> Signed-off-by: Peter Maydell >> --- >> hw/a15mpcore.c |8 ++- >> hw/arm/Makefile.objs |1 + >> hw/kvm/arm_gic.c | 1

Re: [Qemu-devel] [RFC v2 3/6] hw/arm_gic: Add presave/postload hooks

2012-10-10 Thread Andreas Färber
Am 10.10.2012 17:07, schrieb Peter Maydell: > Add presave/postload hooks to the ARM GIC common base class. > These will be used by the KVM in-kernel GIC subclass to sync > state between kernel and userspace when migrating. > > Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber /-F -- S

[Qemu-devel] [PATCH 02/13] tcg-sparc: Fix brcond2

2012-10-10 Thread Richard Henderson
Much the same problem as recently fixed for hppa. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 0c32baa..2475808 100644 --- a/tcg/sparc

Re: [Qemu-devel] [PATCH v2 00/26] tcg: rework liveness analysis and register allocator

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:55 PM, Aurelien Jarno wrote: > Aurelien Jarno (26): > tcg: add temp_dead() > tcg: add tcg_reg_sync() > tcg: add temp_sync() > tcg: sync output arguments on liveness request > tcg: rework liveness analysis > tcg: improve tcg_reg_alloc_movi() > tcg: rewrite tcg_reg_allo

Re: [Qemu-devel] [RFC v2 4/6] hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC

2012-10-10 Thread Andreas Färber
Am 10.10.2012 17:07, schrieb Peter Maydell: > Implement support for using the KVM in-kernel GIC for ARM. > > Signed-off-by: Peter Maydell > --- > hw/a15mpcore.c |8 ++- > hw/arm/Makefile.objs |1 + > hw/kvm/arm_gic.c | 162 > ++

Re: [Qemu-devel] [PATCH v2 26/26] tcg: remove compatiblity call flags

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Signed-off-by: Aurelien Jarno > --- > tcg/tcg.h |4 > 1 file changed, 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v2 18/26] target-i386: rename helper flags

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Rename helper flags to the new ones. This is purely a mechanical change, > it's possible to use better flags by looking at the helpers. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v2 15/26] target-alpha: rename helper flags

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Rename helper flags to the new ones. This is purely a mechanical change, > it's possible to use better flags by looking at the helpers. > > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno Acked-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v2 14/26] tcg: rework TCG helper flags

2012-10-10 Thread Richard Henderson
On 10/10/2012 10:12 AM, Richard Henderson wrote: > On 10/09/2012 01:24 PM, Aurelien Jarno wrote: >> Maybe NO_RG_SE? > > Perhaps, yes. But I certainly can't think of anything better. How about NO_RWG_SE. I like having the fact that R implies W be included in the symbol. r~

Re: [Qemu-devel] [PATCH v2 14/26] tcg: rework TCG helper flags

2012-10-10 Thread Richard Henderson
On 10/09/2012 01:24 PM, Aurelien Jarno wrote: > Maybe NO_RG_SE? Perhaps, yes. But I certainly can't think of anything better. r~

Re: [Qemu-devel] [PATCH v2 14/26] tcg: rework TCG helper flags

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > +if (!(call_flags & (TCG_CALL_NO_WRITE_GLOBALS | > +TCG_CALL_NO_READ_GLOBALS))) { Code like this would be shorter, and perhaps clearer, by > +/* Helper does not read globals (either directl

Re: [Qemu-devel] [PATCH v2 00/26] tcg: rework liveness analysis and register allocator

2012-10-10 Thread Richard Henderson
On 10/10/2012 12:42 AM, Aurelien Jarno wrote: >> > - constant propagation using constraints. This would let tcg-i386 use >> > effectively the mov $imm,(addr) instruction for spills of known-constant >> > values. > This is indeed something quite frustrating and even more when the > same immediate v

Re: [Qemu-devel] [PATCH v2 13/26] tcg: synchronize globals for ops with side effects

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Operations with side effects (in practice qemu_ld/st ops), only need to > synchronize globals to make sure the CPU state is consistent in case of > exception. > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Stefan Weil
Am 10.10.2012 18:54, schrieb Stefan Weil: Am 10.10.2012 18:36, schrieb Paolo Bonzini: Il 10/10/2012 18:23, Stefan Weil ha scritto: < 0 would be wrong because it looks like both functions never return negative values. I just wrote a small test program (see below) and called it with different uid

Re: [Qemu-devel] [PATCH v2 12/26] tcg: forbid ld/st function to modify globals

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Mapping a memory address using a global and accessing it through > ld/st operations is currently broken. As it doesn't make any sense > to do that performance wise, let's forbid that. > > Update the TCG documentation, and remove partial support for t

Re: [Qemu-devel] [PATCH v2 11/26] tcg: fix some op flags

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Some branch related ops are marked with TCG_OPF_SIDE_EFFECTS, some other > not. In practice they don't need to, as they are all marked with > TCG_OPF_BB_END, which is handled specifically in all the code. > > The call op is marked as TCG_OPF_SIDE_EFF

Re: [Qemu-devel] [PATCH v2 10/26] tcg: don't explicitly save globals and temps

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > The liveness analysis ensures that globals and temps are at the correct > state at a basic block end or with an op with side effects. Avoid > looping on all temps, this can be time consuming on targets with a lot > of globals. Keep an assert in debug

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Stefan Weil
Am 10.10.2012 18:36, schrieb Paolo Bonzini: Il 10/10/2012 18:23, Stefan Weil ha scritto: < 0 would be wrong because it looks like both functions never return negative values. I just wrote a small test program (see below) and called it with different uids with and without root rights. This patter

[Qemu-devel] [PATCH 13/13] tcg-sparc: Emit MOVR insns for setcond_i64 and movcond_64

2012-10-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 3b18fce..f146647 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-targe

[Qemu-devel] [PATCH 06/13] tcg-sparc: Fix setcond

2012-10-10 Thread Richard Henderson
The set of comparisons that can immediately use the carry are LTU/GEU, not LTU/LEU. Don't swap operands when we need a temp register; the register may already be in use from setcond2. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 33 +++-- 1 file chan

[Qemu-devel] [PATCH 04/13] tcg-sparc: Fix setcond2

2012-10-10 Thread Richard Henderson
Like brcond2, use tcg_high_cond. Use movcc instead of branches. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 38 ++ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 79530ec.

Re: [Qemu-devel] [PATCH v3] target-i386: initialize APIC at CPU level

2012-10-10 Thread Luiz Capitulino
On Wed, 10 Oct 2012 12:01:29 +0200 Andreas Färber wrote: > Am 09.10.2012 19:17, schrieb Igor Mammedov: > > (L)APIC is a part of cpu [1] so move APIC initialization inside of > > x86_cpu object. Since cpu_model and override flags currently specify > > whether APIC should be created or not, APIC cr

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Paolo Bonzini
Il 10/10/2012 18:23, Stefan Weil ha scritto: > < 0 would be wrong because it looks like both functions never > return negative values. > I just wrote a small test program (see > below) and called it with different uids with and without root > rights. This pattern should be fine: > > new_uid = setf

Re: [Qemu-devel] [PATCH 01/23] target-i386: return Error from cpu_x86_find_by_name()

2012-10-10 Thread Luiz Capitulino
On Wed, 10 Oct 2012 16:38:10 +0200 Igor Mammedov wrote: > On Wed, 10 Oct 2012 16:05:10 +0200 > Andreas Färber wrote: > > > Am 02.10.2012 17:36, schrieb Igor Mammedov: > > > it will allow to use property setters there later. > > > > > > Signed-off-by: Igor Mammedov > > > Reviewed-by: Don Slutz

Re: [Qemu-devel] [PATCH qom-next 42/59] xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb()

2012-10-10 Thread Andreas Färber
Am 10.10.2012 17:35, schrieb Max Filippov: > On Wed, Oct 10, 2012 at 7:15 PM, Andreas Färber wrote: >> Am 23.05.2012 05:08, schrieb Andreas Färber: >>> Needed for cpu_has_work(). >>> >>> Signed-off-by: Andreas Färber >> >> Max, could you ack this trivial patch please? It still applies. > > Well,

Re: [Qemu-devel] [PATCH v2 07/26] tcg: rewrite tcg_reg_alloc_mov()

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Now that the liveness analysis provides more information, rewrite > tcg_reg_alloc_mov(). This changes the behaviour about propagating > constants and memory accesses. We now take the assumption that once > a value is loaded into a register (from memor

Re: [Qemu-devel] [PATCH v2] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Stefan Weil
Am 10.10.2012 18:19, schrieb Paolo Bonzini: Fixes the following error with glibc 2.16 on Fedora 18: virtfs-proxy-helper.c: In function ‘setfsugid’: virtfs-proxy-helper.c:293:13: error: ignoring return value of ‘setfsgid’, declared with attribute warn_unused_result [-Werror=unused-result] virtfs

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Stefan Weil
Am 10.10.2012 18:17, schrieb Paolo Bonzini: Il 10/10/2012 18:14, Stefan Weil ha scritto: diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index f9a8270..b34a84a 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -290,8 +290,12 @@ static int setfs

[Qemu-devel] [PATCH 11/13] tcg-sparc: Dump illegal opode contents

2012-10-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- sparc-dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparc-dis.c b/sparc-dis.c index cdd337a..1d017fa 100644 --- a/sparc-dis.c +++ b/sparc-dis.c @@ -3270,6 +3270,6 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info) }

Re: [Qemu-devel] [PATCH v2 04/26] tcg: sync output arguments on liveness request

2012-10-10 Thread Richard Henderson
On 10/09/2012 12:56 PM, Aurelien Jarno wrote: > Synchronize an output argument when requested by the liveness analysis. > This is needed so that the temp can be declared dead later. > > For that, add a new op_sync_args table in which each bit tells if the > corresponding output argument needs to b

[Qemu-devel] [PATCH v2] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Paolo Bonzini
Fixes the following error with glibc 2.16 on Fedora 18: virtfs-proxy-helper.c: In function ‘setfsugid’: virtfs-proxy-helper.c:293:13: error: ignoring return value of ‘setfsgid’, declared with attribute warn_unused_result [-Werror=unused-result] virtfs-proxy-helper.c:294:13: error: ignoring return

[Qemu-devel] [PATCH] hw/qxl: warn on sync io usage

2012-10-10 Thread Alon Levy
Signed-off-by: Alon Levy --- Try to warn people who keep getting bitten by this. In addition maybe we should bug out if revision >= 3 and sync io is used, and warn if revision < 3 is used in the first place? hw/qxl.c | 27 +++ 1 file changed, 27 insertions(+) diff --git

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Paolo Bonzini
Il 10/10/2012 18:14, Stefan Weil ha scritto: >> >> >> diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c >> index f9a8270..b34a84a 100644 >> --- a/fsdev/virtfs-proxy-helper.c >> +++ b/fsdev/virtfs-proxy-helper.c >> @@ -290,8 +290,12 @@ static int setfsugid(int uid, int gid) >>

[Qemu-devel] [PATCH 01/13] target-sparc: Fix optimized %icc comparisons

2012-10-10 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 472eb51..71b9d65 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -1120,6 +1120,7 @@ static void gen_c

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-10 Thread Stefan Weil
Am 10.10.2012 13:32, schrieb Paolo Bonzini: Fixes the following error with glibc 2.16 on Fedora 18: virtfs-proxy-helper.c: In function ‘setfsugid’: virtfs-proxy-helper.c:293:13: error: ignoring return value of ‘setfsgid’, declared with attribute warn_unused_result [-Werror=unused-result] virtfs

[Qemu-devel] [PATCH v2 00/13] tcg-sparc fixes and improvements

2012-10-10 Thread Richard Henderson
Changes v2->v2 * Rebase vs master, which now includes all dependencies. * Patch 7 has had braces fixed. Tree available at git://github.com/rth7680/qemu.git tcg-sparc r~ Richard Henderson (13): target-sparc: Fix optimized %icc comparisons tcg-sparc: Fix brcond2 tcg-sparc: Implement

[Qemu-devel] [PATCH 10/13] tcg-sparc: Drop use of Bicc in favor of BPcc

2012-10-10 Thread Richard Henderson
Now that we're always sparcv9, we can not bother using Bicc for 32-bit branches and BPcc for 64-bit branches and instead always use BPcc. New interfaces allow less direct use of tcg_out32 and raw numbers inside the qemu_ld/st routines. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c

  1   2   3   >