Re: [Qemu-devel] [RFC PATCH] qapi: Allow setting default values for optional parameters

2014-04-18 Thread Amos Kong
On Fri, Apr 18, 2014 at 03:15:09PM -0600, Eric Blake wrote: > On 04/16/2014 12:04 AM, Fam Zheng wrote: > > In command definition, 'default' is now parsed as a dict of default > > values. Only optional parameters will have effect in generated code. > > Can you make the python code explicitly error

[Qemu-devel] [PATCH] qapi: generate space in c_type() to fix coding style

2014-04-18 Thread Amos Kong
Currently we always add a space after c_type in mcgen(), there is some redundant space in generated code. The space isn't needed for points by the coding style. char * value; ^ qapi_free_NameInfo(NameInfo * obj) ^ It's fussy to add checking in each mcgen(

Re: [Qemu-devel] building for an arm host on an x86_64 machine [was: qemu builds on arm hosts]

2014-04-18 Thread New B
I just realized that the original subject of my question was not accurate. I am trying to compile qemu to run on an arm host. I don't have an arm host yet. Until I get one, I am just trying to build and link it on an x86_64 ubuntu machine. (If I am already out of bounds at this point as I wou

Re: [Qemu-devel] [ceph-users] qemu + rbd block driver with cache=writeback, is live migration safe ?

2014-04-18 Thread Josh Durgin
On 04/18/2014 10:47 AM, Alexandre DERUMIER wrote: Thanks Kevin for for the full explain! cache.writeback=on,cache.direct=off,cache.no-flush=off I didn't known about the cache options split,thanks. rbd does, to my knowledge, not use the kernel page cache, so we're safe >from that part. It

Re: [Qemu-devel] [RFC PATCH] qapi: Allow setting default values for optional parameters

2014-04-18 Thread Eric Blake
On 04/16/2014 12:04 AM, Fam Zheng wrote: > In command definition, 'default' is now parsed as a dict of default > values. Only optional parameters will have effect in generated code. Can you make the python code explicitly error out for a default supplied for a parameter not marked with * in data?

Re: [Qemu-devel] [PATCH] vexpress: Add support for the -bios flag to provide firmware

2014-04-18 Thread Grant Likely
On Tue, 15 Apr 2014 16:50:06 +0100, Peter Maydell wrote: > On 28 March 2014 17:57, Grant Likely wrote: > > Right now to run firmware inside the QEMU VExpress model requires > > padding out the firmware image to the size of the virtual flash and > > passing it in via the -pflash argument. If the

Re: [Qemu-devel] [PATCH] vexpress: Add support for the -bios flag to provide firmware

2014-04-18 Thread Grant Likely
On Tue, 15 Apr 2014 16:46:50 +0100, Peter Maydell wrote: > On 28 March 2014 17:57, Grant Likely wrote: > > Right now to run firmware inside the QEMU VExpress model requires > > padding out the firmware image to the size of the virtual flash and > > passing it in via the -pflash argument. If the

Re: [Qemu-devel] Regression (?) due to c4177479 ('spapr: make sure RMA is in first mode of first memory node')

2014-04-18 Thread Benjamin Herrenschmidt
On Fri, 2014-04-18 at 23:29 +1000, Alexey Kardashevskiy wrote: > Which would be what in the current QEMU? > > If I read the current QEMU code correctly, NUMA nodes and device tree > nodes > are the same thing for SPAPR now, see spapr_populate_memory() > function. So the trick here would be to fin

Re: [Qemu-devel] [PATCH 17/37] target-ppc: Introduce DFP Add

2014-04-18 Thread Tom Musta
On 4/18/2014 2:10 PM, Richard Henderson wrote: > On 04/18/2014 07:50 AM, Tom Musta wrote: [...] > > The forms seem equally readable to me, with the advantage that we'll get good > branch prediction on direct subroutine calls. And if the compiler decides > that > inlining is profitable, it'll hav

Re: [Qemu-devel] [PATCH 17/37] target-ppc: Introduce DFP Add

2014-04-18 Thread Richard Henderson
On 04/18/2014 07:50 AM, Tom Musta wrote: > +__attribute__ ((unused)) > +static void dfp_run_post_processors(struct PPC_DFP *dfp, > +PPC_DFP_PostProc post_processors[], const size_t n) > +{ > +int i; > + > +for (i = 0; i < n; i++) { > +post_processors[i](dfp); > +

[Qemu-devel] Controlling SDL2 output with Ctrl+Alt+*

2014-04-18 Thread Michael Tokarev
SDL2 display apparently does not work with standard keyboard shortcuts documented in the qemu manpage. In particular, Ctrl+Alt+(123) does not switch between monitor, serial and guest graphical conslole, Ctrl+Alt+[-+] does not grow/shrink guest window and so on. Is it intentional? Thanks, /mjt

Re: [Qemu-devel] [PATCH 17/37] target-ppc: Introduce DFP Add

2014-04-18 Thread Richard Henderson
On 04/18/2014 07:50 AM, Tom Musta wrote: > +PPC_DFP_PostProc ADD_PPs[] = { static const. r~

Re: [Qemu-devel] AArch64: QEMU fails in swapcontext

2014-04-18 Thread Mian M. Hamayun
On 18/04/2014 16:44, Richard Henderson wrote: On 04/18/2014 07:00 AM, Mian M. Hamayun wrote: Hello Peter & All, I am trying to figure out a problem in qemu on aarch64 (with kvm enabled). I have found this problem in many different versions of qemu (v2.0.0-rc3/rc2/rc1/rc0, master 2d03b49), and

Re: [Qemu-devel] [PATCH 09/37] libdecnumber: Introduce decNumberFrom[U]Int64

2014-04-18 Thread Richard Henderson
On 04/18/2014 07:50 AM, Tom Musta wrote: > +uint64_t unsig; > +if (in >= 0) { > +unsig = in; > +} else { /* negative (possibly BADINT) */ > +if (in == INT64_MIN) { > +unsig = 1ull << 63; /* special case */ > +} else { > +

Re: [Qemu-devel] qemu + rbd block driver with cache=writeback, is live migration safe ?

2014-04-18 Thread Alexandre DERUMIER
Thanks Kevin for for the full explain! >>cache.writeback=on,cache.direct=off,cache.no-flush=off I didn't known about the cache options split,thanks. >>rbd does, to my knowledge, not use the kernel page cache, so we're safe >>from that part. It does however honour the cache.direct flag when it >

Re: [Qemu-devel] [PATCH 0/4] Fix memory leaks in QEMU

2014-04-18 Thread Peter Maydell
On 18 April 2014 18:08, Kirill Batuzov wrote: > And something like this happens every time qemu_allocate_irqs is called. Which generally only happens in the board init stage, ie once. So why care? Leaks are interesting if they happen in code that could be called multiple times (eg for hotplugged

[Qemu-devel] [Bug 1308542] Re: hang in qemu_gluster_init

2014-04-18 Thread Soumya Koduri
" glfs_init" cannot be called before since it checks for cmds_args->volfile_server which is allocated only in "glfs_set_volfile_server". We should either modify "glfs_fini" or define a new function to do the cleanup based on if init is done or not. -- You received this bug notification because

Re: [Qemu-devel] [PATCH 1/4] Replace acpi_pcihp_get_bsel with generic object_property_get_int

2014-04-18 Thread Kirill Batuzov
Andreas Färber писал 2014-04-18 20:30: Am 18.04.2014 15:41, schrieb Kirill Batuzov: acpi_pcihp_get_bsel implements functionality of object_property_get_int for specific property named ACPI_PCIHP_PROP_BSEL, but fails to decrement object's reference counter properly. Replacing it with generic ob

Re: [Qemu-devel] [PATCH 0/4] Fix memory leaks in QEMU

2014-04-18 Thread Kirill Batuzov
Note that generally these "leaks" are not really leaks, because we set up the board and wire IRQs together once, and they remain that way for the lifetime of QEMU and are freed automatically when QEMU exits. Unfortunately they are really leaks. As I said qemu_allocate_irqs allocates two chunks

Re: [Qemu-devel] [Xen-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-18 Thread Fabio Fantoni
Il 18/04/2014 17:59, Andreas Färber ha scritto: Am 18.04.2014 17:36, schrieb Fabio Fantoni: 2014-04-18 17:21 GMT+02:00 Andreas Färber mailto:afaer...@suse.de>>: Hi Don, Am 25.03.2014 00 :55, schrieb Don Slutz: > This can help a user understand why -global was ignored. >

Re: [Qemu-devel] [PATCH 4/4] PortioList: fix PortioList uses so they do not leak memory

2014-04-18 Thread Andreas Färber
Am 18.04.2014 15:41, schrieb Kirill Batuzov: > PortioList is an abstraction used for construction of MemoryRegionPortioList > from MemoryRegionPortio. It is not needed later, so there is no need to > allocate it dynamically. Also portio_list_destroy should be called to free > memory allocated in

[Qemu-devel] [PATCH 18/37] target-ppc: Introduce DFP Subtract

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Subtract instructions dsub[q][.] Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 18 ++ target-ppc/helper.h |2 ++ target-ppc/translate.c |5 - 3 files changed, 24 insertions(+), 1 deletions(-) diff --

Re: [Qemu-devel] [PATCH 3/4] graphic_console_init: do not receive unneeded error descriptions

2014-04-18 Thread Andreas Färber
Am 18.04.2014 15:41, schrieb Kirill Batuzov: > Error set by error_set is dynamically allocated and needs to be cleared > properly later. graphic_console_init neither needs error descriptions nor > frees > them. Pass NULL instead of actual pointers to avoid unnecessary memory > allocations. > >

[Qemu-devel] [PATCH 31/37] target-ppc: Introduce DFP Convert to Fixed

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Convert to Fixed instructions dctfix[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 25 + target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 31 insertions(+), 0 dele

Re: [Qemu-devel] [PATCH 1/4] Replace acpi_pcihp_get_bsel with generic object_property_get_int

2014-04-18 Thread Andreas Färber
Am 18.04.2014 15:41, schrieb Kirill Batuzov: > acpi_pcihp_get_bsel implements functionality of object_property_get_int for > specific property named ACPI_PCIHP_PROP_BSEL, but fails to decrement object's > reference counter properly. Replacing it with generic object_property_get_int > serves two pur

[Qemu-devel] [PATCH 30/37] target-ppc: Introduce Round to DFP Short/Long

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Round to DFP Short (drsp[.]) and Round to DFP Long (drdpq[.]) instructions. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 52 +++ target-ppc/helper.h |2 + target-ppc/translate.c |4 +++ 3 files chan

[Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-04-18 Thread Stanislav Vorobiov
From: Sangho Park g_poll has a problem on Windows when using timeouts < 10ms, in glib/gpoll.c: /* If not, and we have a significant timeout, poll again with * timeout then. Note that this will return indication for only * one event, or only for messages. We ignore timeouts less than * ten mil

Re: [Qemu-devel] [PATCH v3 4/4] xen-all: Pass max_ram_below_4g to xen_hvm_init.

2014-04-18 Thread Andreas Färber
Am 25.03.2014 00:55, schrieb Don Slutz: > This is the xen part of "pc & q35: Add new object pc-memory-layout." > > Signed-off-by: Don Slutz > --- > v3: Adjust for code readability. Set max_ram_below_4g always and use > it to calculate above_4g_mem_size, below_4g_mem_size. > > hw/i386/pc_piix.c

[Qemu-devel] [PATCH 21/37] target-ppc: Introduce DFP Compares

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Compare instructions dcmpu[q] and dcmpo[q]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 56 +++ target-ppc/helper.h |4 +++ target-ppc/translate.c |8 ++ 3 files changed,

Re: [Qemu-devel] [Xen-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-18 Thread Andreas Färber
Am 18.04.2014 17:36, schrieb Fabio Fantoni: > 2014-04-18 17:21 GMT+02:00 Andreas Färber >: > > Hi Don, > > Am 25.03.2014 00 :55, schrieb Don Slutz: > > This can help a user understand why -global was ignored. > > > > For example: with "-vga cirrus"; "

[Qemu-devel] [PATCH 22/37] target-ppc: Introduce DFP Test Data Class

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Test Data Class instructions dtstdc[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 32 target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 38 insertions(+),

[Qemu-devel] [PATCH 28/37] target-ppc: Introduce DFP Round to Integer

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point (DFP) Round to FP Integer With Inexact (drintx[q][.]) and DFP Round to FP Integer Without Inexact (drintn[q][.]) instructions. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 38 ++ target-ppc/helper

Re: [Qemu-devel] [PATCH v2] glib: fix g_poll early timeout on windows

2014-04-18 Thread Stefan Weil
Please see my remarks below. Am 18.04.2014 13:51, schrieb Stanislav Vorobiov: > From: Sangho Park > > g_poll has a problem on windows when using > timeouts < 10ms, in glib/gpoll.c: > > /* If not, and we have a significant timeout, poll again with > * timeout then. Note that this will return in

Re: [Qemu-devel] [PATCH v3 3/4] pc & q35: Add new object pc-memory-layout.

2014-04-18 Thread Andreas Färber
Am 25.03.2014 00:55, schrieb Don Slutz: > This new object has the property max-ram-below-4g. > > If you add enough PCI devices then all mmio for them will not fit > below 4G which may not be the layout the user wanted. This allows > you to increase the below 4G address space that PCI devices can u

[Qemu-devel] [PATCH 25/37] target-ppc: Introduce DFP Test Significance

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Test Significance instructions dtstsf[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 35 +++ target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 41 insertions

[Qemu-devel] [PATCH 23/37] target-ppc: Introduce DFP Test Data Group

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Test Data Group instructions dtstdg[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 55 +++ target-ppc/helper.h |2 + target-ppc/translate.c |4 +++ 3 files changed, 61 in

Re: [Qemu-devel] [Xen-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-18 Thread Fabio Fantoni
2014-04-18 17:21 GMT+02:00 Andreas Färber : > Hi Don, > > Am 25.03.2014 00:55, schrieb Don Slutz: > > This can help a user understand why -global was ignored. > > > > For example: with "-vga cirrus"; "-global vga.vgamem_mb=16" is just > > ignored when "-global cirrus-vga.vgamem_mb=16" is not. > >

[Qemu-devel] [PATCH 35/37] target-ppc: Introduce DFP Extract Biased Exponent

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Extract Biased Exponent instructions dxex[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 31 +++ target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 37 insertions

[Qemu-devel] [PATCH 16/37] target-ppc: Introduce DFP Post Processor Utilities

2014-04-18 Thread Tom Musta
Add post-processing utilities to the PowerPC Decimal Floating Point (DFP) helper code. Post-processors are small routines that execute after a preliminary DFP result is computed. They are used, among other things, to compute status bits. This change defines a function type for post processors as

Re: [Qemu-devel] [PATCH] qemu-img: Exit with code 0 if there is no error

2014-04-18 Thread Michael Tokarev
18.04.2014 18:29, Eric Blake wrote: > On 04/18/2014 12:23 AM, Fam Zheng wrote: >> Signed-off-by: Fam Zheng >> --- >> qemu-img.c | 68 >> +++--- >> 1 file changed, 34 insertions(+), 34 deletions(-) >> > >> /* Please keep in synch with qemu

Re: [Qemu-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-18 Thread Andreas Färber
Hi Don, Am 25.03.2014 00:55, schrieb Don Slutz: > This can help a user understand why -global was ignored. > > For example: with "-vga cirrus"; "-global vga.vgamem_mb=16" is just > ignored when "-global cirrus-vga.vgamem_mb=16" is not. > > This is currently clear when the wrong property is provi

[Qemu-devel] [PATCH 15/37] target-ppc: Introduce DFP Helper Utilities

2014-04-18 Thread Tom Musta
Add a new file (dfp_helper.c) to the PowerPC implementation for Decimal Floating Point (DFP) emulation. This first version of the file declares a structure that will be used by DFP helpers. It also implements utilities that will initialize such a structure for either a long (64 bit) DFP instructi

Re: [Qemu-devel] [PATCH 0/4] Fix memory leaks in QEMU

2014-04-18 Thread Peter Maydell
On 18 April 2014 14:41, Kirill Batuzov wrote: > qemu_allocate_irqs: > The most troublesome case. It will need its own patch series and I need > some advices on how to deal with it. I would suggest that we should deal with this by converting from qemu_irq to a QOM property or link based inter

Re: [Qemu-devel] [RFC v2 3/6] vfio: add vfio-platform support

2014-04-18 Thread Alex Williamson
On Wed, 2014-04-09 at 16:33 +0100, Eric Auger wrote: > From: Kim Phillips > > Functions for which PCI and platform device support share are moved > into common.c. The common vfio_{get,put}_group() get an additional > argument, a pointer to a vfio_reset_handler(), for which to pass on to > qemu_r

[Qemu-devel] [PATCH 05/37] libdecnumber: Change gstdint.h to stdint.h

2014-04-18 Thread Tom Musta
Replace the inclusion of gstdint.h with the standard stdint.h header file. Signed-off-by: Tom Musta --- include/libdecnumber/decContext.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/libdecnumber/decContext.h b/include/libdecnumber/decContext.h index 1a3f15e

[Qemu-devel] [PATCH 20/37] target-ppc: Introduce DFP Divide

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Divide instructions ddiv[q][.] Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 36 target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 42 insertions(+), 0 deleti

[Qemu-devel] [PATCH 36/37] target-ppc: Introduce DFP Insert Biased Exponent

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Insert Biased Exponent instructions diex[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 68 +++ target-ppc/helper.h |2 + target-ppc/translate.c |4 +++ 3 files changed,

[Qemu-devel] [PATCH 37/37] target-ppc: Introduce DFP Shift Significand

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Shift Significand Left Immediate (dscli[q][.]) and DFP Shift Significant Right Immediate (dscri[q][.]) instructions. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 95 +++ target-ppc/helper.

[Qemu-devel] [PATCH 32/37] target-ppc: Introduce DFP Convert to Fixed

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Convert to Fixed instructions dctfix[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 36 target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 42 insertions

[Qemu-devel] [PATCH 34/37] target-ppc: Introduce DFP Encode BCD to DPD

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Encode Binary Coded Decimal to Densely Packed Decimal instructions denbcd[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 72 +++ target-ppc/helper.h |2 + target-ppc/translate

[Qemu-devel] [PATCH 33/37] target-ppc: Introduce DFP Decode DPD to BCD

2014-04-18 Thread Tom Musta
Add emulation of the Power PC Decimal Floating Point Decode Densely Packed Decimal to Binary Coded Decimal instructions ddedpd[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 66 +++ target-ppc/helper.h |2 + target-ppc/translat

[Qemu-devel] [PATCH 27/37] target-ppc: Introduce DFP Reround

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Reround instructions drrnd[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 97 +++ target-ppc/helper.h |2 + target-ppc/translate.c |4 ++ 3 files changed, 103 insertions(

[Qemu-devel] [PATCH 26/37] target-ppc: Introduce DFP Quantize

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Quantize instructions dquai[q][.] and dqua[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 131 +++ target-ppc/helper.h |4 ++ target-ppc/translate.c |8 +++ 3 files change

[Qemu-devel] [PATCH 19/37] target-ppc: Introduce DFP Multiply

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Multiply instructions dmul[q][.] Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 22 ++ target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 28 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 24/37] target-ppc: Introduce DFP Test Exponent

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Test Exponent instructions dtstex[q][.]. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 32 target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files changed, 38 insertions(+), 0

[Qemu-devel] [PATCH 29/37] target-ppc: Introduce DFP Convert to Long/Extended

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Convert to DFP Long (dctdp[.]) and Convert to DFP Extended (dctqpq[.]) instructions. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 35 +++ target-ppc/helper.h |2 ++ target-ppc/translate.c |4 3 files chang

[Qemu-devel] [PATCH 14/37] target-ppc: Introduce Decoder Macros for DFP

2014-04-18 Thread Tom Musta
Add decoder macros for the various Decimal Floating Point instruction forms. Illegal instruction masks are used to not only guard against reserved instruction field use, but also to catch illegal quad word forms that use odd-numbered floating point registers. Signed-off-by: Tom Musta --- target

[Qemu-devel] [PATCH 17/37] target-ppc: Introduce DFP Add

2014-04-18 Thread Tom Musta
Add emulation of the PowerPC Decimal Floating Point Add instructions dadd[q][.] Various GCC unused annotations are removed since it is now safe to remove them. Signed-off-by: Tom Musta --- target-ppc/dfp_helper.c | 129 +-- target-ppc/helper.h |

[Qemu-devel] [PATCH 11/37] libdecnumber: Fix decNumberSetBCD

2014-04-18 Thread Tom Musta
Fix a simple bug in the decNumberSetBCD() function. This function encodes a decNumber with "n" BCD digits. The original code erroneously computed the number of declets from the dn argument, which is the output decNumber value, and hence may contain garbage. Instead, the input "n" value is used.

[Qemu-devel] [PATCH 09/37] libdecnumber: Introduce decNumberFrom[U]Int64

2014-04-18 Thread Tom Musta
Introduce two conversion functions to the libdecnumber library. These conversions transform 64 bit integers to the internal decNumber representation. Both a signed and unsigned version is added. Signed-off-by: Tom Musta --- include/libdecnumber/decNumber.h |2 ++ libdecnumber/decNumber.c

[Qemu-devel] [PATCH 12/37] target-ppc: Define FPR Pointer Type for Helpers

2014-04-18 Thread Tom Musta
Define a floating pointer register pointer type in the PowerPC helper header. The type will be used to pass FPR register operands to Decimal Floating Point (DFP) helpers. A pointer is used because the quad word forms of PowerPC DFP instructions operate on adjacent pairs of floating point register

[Qemu-devel] [PATCH 13/37] target-ppc: Introduce Generator Macros for DFP Arithmetic Forms

2014-04-18 Thread Tom Musta
Add general support for generators of PowerPC Decimal Floating Point helpers. Some utilities are annotated with GCC attribute unused in order to preserve build bisection. These annotations will be removed in later patches. Signed-off-by: Tom Musta --- target-ppc/translate.c | 177

[Qemu-devel] [PATCH 06/37] libdecnumber: Eliminate redundant declarations

2014-04-18 Thread Tom Musta
Eliminate redundant declarations of symbols DPD2BIN and BIN2DPD in various .c source files. These symbols are already declared in decDPD.h and thus will trigger 'redundant redeclaration of ?XXX?' warnings, which, of course, may fail QEMU compilation. Signed-off-by: Tom Musta --- libdecnumber/dp

[Qemu-devel] [PATCH 10/37] libdecnumber: Introduce decNumberIntegralToInt64

2014-04-18 Thread Tom Musta
Introduce a new conversion function to the libdecnumber library. This function converts a decNumber to a signed 64-bit integer. In order to support 64-bit integers (which may have up to 19 decimal digits), the existing "powers of 10" array is expanded from 10 to 19 entries. Signed-off-by: Tom Must

[Qemu-devel] [PATCH 07/37] libdecnumber: Eliminate Unused Variable in decSetSubnormal

2014-04-18 Thread Tom Musta
Eliminate an unused variable in the decSetSubnormal routine. The variable dnexp is declared and eventually set but never used, and thus may trigger an unused-but-set-variable warning. Signed-off-by: Tom Musta --- libdecnumber/decNumber.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(

[Qemu-devel] [PATCH 08/37] target-ppc: Enable Building of libdecnumber

2014-04-18 Thread Tom Musta
Enable compilation of the newly added libdecnumber library code. Object file targets are added to Makefile.target using a newly introduced flag CONFIG_LIBDECNUMBER. The flag is added to the PowerPC targets (ppc[64]-linux-user, ppc[64]-softmmu). Signed-off-by: Tom Musta --- Makefile.target

[Qemu-devel] [PATCH 03/37] libdecnumber: Prepare libdecnumber for QEMU include structure

2014-04-18 Thread Tom Musta
Consistent with other libraries in QEMU, the libdecnumber header files were placed in include/libdecnumber, separate from the C code. This is different from the original libdecnumber source, where they were co-located. Change the libdecnumber source code so that it reflects this split. Specific

[Qemu-devel] [PATCH 02/37] libdecnumber: Eliminate #include *Symbols.h

2014-04-18 Thread Tom Musta
The various *Symbols.h files were not copied from the original GCC libdecnumber library; they are not necessary for use in QEMU. Remove all instances of #include "*Symbols.h" Signed-off-by: Tom Musta --- include/libdecnumber/decContext.h |1 - include/libdecnumber/decDPD.h

[Qemu-devel] [PATCH 04/37] libdecnumber: Modify dconfig.h to Integrate with QEMU

2014-04-18 Thread Tom Musta
Modify the dconfig.h header file so that libdecnumber code integrates QEMU configuration. Specifically: - the WORDS_BIGENDIAN preprocessor macro is used in libdecnumber code to determines endianness. It is derived from the existing QEMU macro HOST_WORDS_BIGENDIAN which is defined in c

[Qemu-devel] [PATCH 00/37] target-ppc: Decimal Floating Point

2014-04-18 Thread Tom Musta
This patch series adds emulation of the PowerPC Decimal Floating Point (DFP) instructions. The complete set of DFP instructions defined by the Power ISA is introduced. The foundation of the emulation code is libdecnumber, a software library that models DFP numbers and operations in a manner sim

Re: [Qemu-devel] AArch64: QEMU fails in swapcontext

2014-04-18 Thread Richard Henderson
On 04/18/2014 07:00 AM, Mian M. Hamayun wrote: > Hello Peter & All, > > I am trying to figure out a problem in qemu on aarch64 (with kvm enabled). I > have found this problem in many different versions of qemu > (v2.0.0-rc3/rc2/rc1/rc0, master 2d03b49), and I believe that either I am > missing som

Re: [Qemu-devel] [PATCH] qemu-img: Exit with code 0 if there is no error

2014-04-18 Thread Eric Blake
On 04/18/2014 12:23 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > qemu-img.c | 68 > +++--- > 1 file changed, 34 insertions(+), 34 deletions(-) > > /* Please keep in synch with qemu-img.texi */ > -static void help(void) > +stat

Re: [Qemu-devel] [PATCH v3 1/4] xen-all: Fix xen_hvm_init() to adjust pc memory layout.

2014-04-18 Thread Andreas Färber
Am 25.03.2014 00:55, schrieb Don Slutz: > This is just below_4g_mem_size and above_4g_mem_size which is used later in > QEMU. > > Signed-off-by: Don Slutz > Acked-by: Stefano Stabellini Please remember to place your Signed-off-by last. In theory you would place another Signed-off-by last, but

Re: [Qemu-devel] [PATCH v3 0/4] Add max-ram-below-4g (was Add pci_hole_min_size machine option)

2014-04-18 Thread Andreas Färber
Am 25.03.2014 10:08, schrieb Michael S. Tsirkin: > On Mon, Mar 24, 2014 at 07:55:32PM -0400, Don Slutz wrote: >> Changes v2 to v3: >> Stefano Stabellini: >> Acked-by #1 "xen-all: Fix xen_hvm_init() to adjust pc memory" >> Adjust for code readability #4 "xen-all: Pass max_ram_below_4g to

[Qemu-devel] AArch64: QEMU fails in swapcontext

2014-04-18 Thread Mian M. Hamayun
Hello Peter & All, I am trying to figure out a problem in qemu on aarch64 (with kvm enabled). I have found this problem in many different versions of qemu (v2.0.0-rc3/rc2/rc1/rc0, master 2d03b49), and I believe that either I am missing something common in all of these versions or its a genuine

[Qemu-devel] [PATCH 2/4] acpi-build: properly decrement objects' reference counters

2014-04-18 Thread Kirill Batuzov
Object returned bu object_property_get_qobject needs it's reference counter to be decremented when it is not needed by caller anymore. Signed-off-by: Kirill Batuzov --- hw/i386/acpi-build.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c i

[Qemu-devel] [PATCH 0/4] Fix memory leaks in QEMU

2014-04-18 Thread Kirill Batuzov
I tried running QEMU under Valgrind's Memcheck tool and managed to find some memory leaks. I only checked "definitely lost" reports. I ignored reports related to SDL/GTK because it is hard to tell if memory leak occurred in QEMU or in the library. All found errors followed one pattern: 1) Calle

[Qemu-devel] [PATCH 4/4] PortioList: fix PortioList uses so they do not leak memory

2014-04-18 Thread Kirill Batuzov
PortioList is an abstraction used for construction of MemoryRegionPortioList from MemoryRegionPortio. It is not needed later, so there is no need to allocate it dynamically. Also portio_list_destroy should be called to free memory allocated in portio_list_init. This change spans several target p

[Qemu-devel] [PATCH 3/4] graphic_console_init: do not receive unneeded error descriptions

2014-04-18 Thread Kirill Batuzov
Error set by error_set is dynamically allocated and needs to be cleared properly later. graphic_console_init neither needs error descriptions nor frees them. Pass NULL instead of actual pointers to avoid unnecessary memory allocations. Signed-off-by: Kirill Batuzov --- ui/console.c |7 ++--

[Qemu-devel] [PATCH 1/4] Replace acpi_pcihp_get_bsel with generic object_property_get_int

2014-04-18 Thread Kirill Batuzov
acpi_pcihp_get_bsel implements functionality of object_property_get_int for specific property named ACPI_PCIHP_PROP_BSEL, but fails to decrement object's reference counter properly. Replacing it with generic object_property_get_int serves two purposes: reducing code duplication and fixing memory le

Re: [Qemu-devel] qemu-ga: How to static compilation qemu-ga.exe for windows on fedora 18

2014-04-18 Thread Wangrui (K)
Any ideas about the issue ? Regards. > -Original Message- > From: Gonglei (Arei) > Sent: Wednesday, April 16, 2014 10:05 AM > To: qemu-devel@nongnu.org > Cc: mdr...@linux.vnet.ibm.com; Wangrui (K) > Subject: qemu-ga: How to static compilation qemu-ga.exe for windows on > fedora 18 > > Hi

Re: [Qemu-devel] Regression (?) due to c4177479 ('spapr: make sure RMA is in first mode of first memory node')

2014-04-18 Thread Alexey Kardashevskiy
On 04/18/2014 09:03 AM, Nishanth Aravamudan wrote: > On 18.04.2014 [08:46:55 +1000], Benjamin Herrenschmidt wrote: >> On Fri, 2014-04-18 at 08:43 +1000, Alexey Kardashevskiy wrote: >>> On 04/18/2014 06:25 AM, Nishanth Aravamudan wrote: Hi Alexey, Prior to the $SUBJECT commit, we coul

[Qemu-devel] [PATCH] vmdk: Optimize cluster allocation

2014-04-18 Thread Fam Zheng
On mounted NFS filesystem, ftruncate is much much slower than doing a zero write. Changing this significantly speeds up cluster allocation. Comparing by converting a cirros image (296M) to VMDK on an NFS mount point, over 1Gbe LAN: $ time qemu-img convert cirros-0.3.1.img /mnt/a.raw -O vmdk

[Qemu-devel] [PATCH] po: Update all *.po files

2014-04-18 Thread Stefan Weil
Most changes were caused by line changes in ui/gtk.c and updated automatically by running "make -C po update". In addition, the header entry "Language" was fixed, see this reference: http://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html. "Project-Id-Version" now shows the current

[Qemu-devel] [PATCH] po/Makefile: Fix source path for in-tree builds

2014-04-18 Thread Stefan Weil
Use an absolute value for SRC_PATH. This fixes a build problem: $ LANG=C make -C po update make: Entering directory `/qemu/po' GEN ../po/messages.po /bin/sh: 1: cannot create ../po/messages.po: Directory nonexistent make: *** [../po/messages.po] Error 2 make: Leaving directory `/qemu/po' Sign

[Qemu-devel] [PATCH v2] glib: fix g_poll early timeout on windows

2014-04-18 Thread Stanislav Vorobiov
From: Sangho Park g_poll has a problem on windows when using timeouts < 10ms, in glib/gpoll.c: /* If not, and we have a significant timeout, poll again with * timeout then. Note that this will return indication for only * one event, or only for messages. We ignore timeouts less than * ten mil

Re: [Qemu-devel] [PATCH] timer: fix qemu_poll_ns early timeout on windows

2014-04-18 Thread Alex Bligh
On 18 Apr 2014, at 10:26, Stanislav Vorobiov wrote: > Yes, it's possible to work around like this, but if we look at this: > > if (ms < 10) { > ms = 10; > } > > the question arises: where did 10 come from ? It looks like a magic number > and in fact > it is, it was taken from g

Re: [Qemu-devel] [PATCH] timer: fix qemu_poll_ns early timeout on windows

2014-04-18 Thread Stanislav Vorobiov
Hi, see below On 04/18/2014 12:03 PM, Stefan Weil wrote: > Am 18.04.2014 09:34, schrieb Stanislav Vorobiov: >> Hi, >> >> Please see below >> >> On 04/18/2014 10:46 AM, Stefan Weil wrote: >>> Hi, > [...] >> >>> >>> Would it be sufficient to round any timeout > 0 and < 10 to 10 for >>> Windows hosts

Re: [Qemu-devel] [PATCH] timer: fix qemu_poll_ns early timeout on windows

2014-04-18 Thread Stanislav Vorobiov
Hi, Please see below On 04/18/2014 12:29 PM, Alex Bligh wrote: > > On 18 Apr 2014, at 03:11, Sangho Park wrote: > >>> >>> g_poll has a problem on windows when using timeouts < 10ms, in >>> glib/gpoll.c: >>> >>> /* If not, and we have a significant timeout, poll again with >>> * timeout then. N

[Qemu-devel] [RFC] about don't support hotplug usb-ehci controller

2014-04-18 Thread Gonglei (Arei)
Hi, Gerd. IMHO, the usb-ehci controller as a common PCI device, likes NIC. If we don't use the multifunction capability of EHCI, we should support to hot plug / unplug Usb-ehci controller. And I think the Bug 879096 is just a bug. Am I right? Thanks. The patch: http://lists.gnu.org/arch

Re: [Qemu-devel] memory access trace from qemu

2014-04-18 Thread Max Filippov
On Fri, Apr 18, 2014 at 12:48 PM, Pavel Dovgaluk wrote: > You can insert tracing code into the functions from the > “include\exec\softmmu_template.h” file: like helper_le_ld_name, > helper_le_st_name and so on. It's not enough, you also need to disable memory access fast path so that these functi

Re: [Qemu-devel] memory access trace from qemu

2014-04-18 Thread Pavel Dovgaluk
Hello, Pete. You can insert tracing code into the functions from the “include\exec\softmmu_template.h” file: like helper_le_ld_name, helper_le_st_name and so on. These functions are used for CPU emulation. However, you may also need to trace DMA accesses, that are executed through other

Re: [Qemu-devel] Change of TEXT_OFFSET for multi_v7_defconfig

2014-04-18 Thread Russell King - ARM Linux
On Thu, Apr 17, 2014 at 09:53:23PM -0500, Rob Herring wrote: > On Thu, Apr 17, 2014 at 4:35 PM, Russell King - ARM Linux > wrote: > > No. You simply can't eliminate any of the above - each one has been > > negotiated through quite an amount of discussion with relevant parties > > and/or due to te

Re: [Qemu-devel] [PATCH] timer: fix qemu_poll_ns early timeout on windows

2014-04-18 Thread Alex Bligh
On 18 Apr 2014, at 03:11, Sangho Park wrote: >> >> g_poll has a problem on windows when using timeouts < 10ms, in >> glib/gpoll.c: >> >> /* If not, and we have a significant timeout, poll again with >> * timeout then. Note that this will return indication for only >> * one event, or only for m

Re: [Qemu-devel] [Spice-devel] Automatic spice port selection

2014-04-18 Thread Fabio Fantoni
2014-04-18 9:42 GMT+02:00 Christophe Fergeau : > > > - Mail original - > > Il 26/03/2014 17:15, Fabio Fantoni ha scritto: > > > Time ago I have read somewhere that there is an option to > > > automatically spice port in qemu as for vnc. > > > I started to write a libxl patch to add this fe

Re: [Qemu-devel] [PATCH] timer: fix qemu_poll_ns early timeout on windows

2014-04-18 Thread Stefan Weil
Am 18.04.2014 09:34, schrieb Stanislav Vorobiov: > Hi, > > Please see below > > On 04/18/2014 10:46 AM, Stefan Weil wrote: >> Hi, [...] > >> >> Would it be sufficient to round any timeout > 0 and < 10 to 10 for >> Windows hosts? Maybe this could be done in qemu_timeout_ns_to_ms. > We tried that,

Re: [Qemu-devel] [PATCH] configure: Add new target ppc64el-linux-user

2014-04-18 Thread Peter Maydell
On 17 April 2014 22:24, Doug Kwan wrote: > This patch adds a new target for running ppc64 little-endian binaries in > user mode. Only change to configure is included in this patch. Patch for > loading and executing LE binaries will be submitted later. Please put the configure patch as the final

Re: [Qemu-devel] [Spice-devel] Automatic spice port selection

2014-04-18 Thread Christophe Fergeau
- Mail original - > Il 26/03/2014 17:15, Fabio Fantoni ha scritto: > > Time ago I have read somewhere that there is an option to > > automatically spice port in qemu as for vnc. > > I started to write a libxl patch to add this feature like the vnc one: > > https://github.com/Fantu/Xen/com

Re: [Qemu-devel] [PATCH] timer: fix qemu_poll_ns early timeout on windows

2014-04-18 Thread Stanislav Vorobiov
Hi, Please see below On 04/18/2014 10:46 AM, Stefan Weil wrote: > Hi, > > sorry, your patch was too late for QEMU 2.0. It remained unnoticed for > two reasons: > > * Patches for some special version should show this in the subject line: > [PATCH for 2.0] instead of [PATCH] > > * CC'ing the m

Re: [Qemu-devel] [Qemu-trivial] [PATCH v4 0/2] convert -m to QemuOpts

2014-04-18 Thread Michael Tokarev
18.04.2014 11:18, Igor Mammedov wrote: > On Thu, 20 Mar 2014 20:21:14 +0400 > Michael Tokarev wrote: > >> 06.03.2014 13:39, Igor Mammedov wrote: >>> Igor Mammedov (1): >>> vl: convert -m to QemuOpts >> >> This patch (2/2) was mime-damaged, I had to edit it manually >> in order for it to apply.

  1   2   >