Re: [Qemu-devel] [PATCH 6/6] target-ppc: add stxvb16x and stxvh8x

2016-08-07 Thread Richard Henderson
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: +#define STXV(name, access, swap, type, elems) \ +void helper_##name(CPUPPCState *env, uint64_t vsr, \ + target_ulong addr) \ +{

Re: [Qemu-devel] [PATCH 5/6] target-ppc: add lxvb16x and lxvh8x

2016-08-07 Thread Richard Henderson
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: +#define LXV(name, access, swap, type, elems) \ +uint64_t helper_##name(CPUPPCState *env, \ + target_ulong addr)\ +{

Re: [Qemu-devel] [PATCH 4/6] target-ppc: add stxsi[bh]x instruction

2016-08-07 Thread Richard Henderson
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: +#define GEN_QEMU_STORE_64(stop) \ +static void gen_qemu_##stop##_i64(DisasContext *ctx,\ + TCGv_i64 val, \ +

Re: [Qemu-devel] [PATCH 3/6] target-ppc: add lxsi[bw]zx instruction

2016-08-07 Thread Richard Henderson
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: +#define GEN_QEMU_LOAD_64(ldop, ext) \ +static void glue(gen_qemu_, glue(ldop, _i64))(DisasContext *ctx,\ + TCGv_i64 val,\ +

Re: [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-07 Thread Richard Henderson
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: +target_ulong helper_darn(uint32_t l) +{ +target_ulong r = UINT64_MAX; + +if (l <= 2) { +do { +r = random() * random(); +r &= l ? UINT64_MAX : UINT32_MAX; +} while (r == UINT64_MAX); +} + +

Re: [Qemu-devel] [PATCH 1/6] target-ppc: add xxspltib instruction

2016-08-07 Thread Richard Henderson
On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: +#define pattern(x) (((x) & 0xff) * (~(target_ulong)0 / 0xff)) + +static void gen_xxspltib(DisasContext *ctx) +{ +unsigned char uim8 = IMM8(ctx->opcode); +if (xS(ctx->opcode) < 32) { +if (unlikely(!ctx->altivec_enabled)) { +

Re: [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-07 Thread Nikunj A Dadhania
Benjamin Herrenschmidt writes: > On Mon, 2016-08-08 at 07:22 +0530, Nikunj A Dadhania wrote: >> >> > Isn't this a bit week ? Look at the implementation of H_RANDOM... >> >> Sure, will have a look. > > And if course I meant "weak" :-) That's what happens when I reply >

Re: [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-07 Thread Benjamin Herrenschmidt
On Mon, 2016-08-08 at 07:22 +0530, Nikunj A Dadhania wrote: > > > Isn't this a bit week ? Look at the implementation of H_RANDOM... > > Sure, will have a look. And if course I meant "weak" :-) That's what happens when I reply before breakfast ! Cheers, Ben.

Re: [Qemu-devel] [Qemu-block] [PATCH 1/7] util: Add UUID API

2016-08-07 Thread Fam Zheng
On Thu, 08/04 11:33, Jeff Cody wrote: > > +void qemu_uuid_generate(qemu_uuid_t out) > > +{ > > +/* Version 4 UUID, RFC4122 4.4. */ > > +QEMU_BUILD_BUG_ON(sizeof(qemu_uuid_t) != 16); > > +*((guint32 *)out + 0) = g_random_int(); > > +*((guint32 *)out + 1) = g_random_int(); > > +

Re: [Qemu-devel] [PATCH] iotest 055: refactor and speed up

2016-08-07 Thread Fam Zheng
On Sat, 08/06 21:09, Vladimir Sementsov-Ogievskiy wrote: > Source disk is created and filled with test data before each test case. > Instead initialize it once for the whole unit. > > performance: > qcow2: 25s -> 15s > raw: 16s -> 11s > > Actually, changed only TestSetSpeed: before this patch

[Qemu-devel] [PULL 3/3] spapr: Fix undefined behaviour in spapr_tce_reset()

2016-08-07 Thread David Gibson
When a TCE table (sPAPR IOMMU context) is in disabled state (which is true by default for the 64-bit window), it has tcet->nb_table == 0 and tcet->table == NULL. However, on system reset, spapr_tce_reset() executes, which unconditionally calls memset(tcet->table, 0, table_size); We get

[Qemu-devel] [PULL 0/3] ppc-for-2.7 queue 20160808

2016-08-07 Thread David Gibson
The following changes since commit 51009170d8fc263cfdcd5a60fe3ba213daa3d15b: tests: Rename qtests which have names ending "error" (2016-08-05 15:27:15 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.7-20160808 for you to fetch changes up to

[Qemu-devel] [PULL 2/3] macio: set res_count value to 0 after non-block ATAPI DMA transfers

2016-08-07 Thread David Gibson
From: Mark Cave-Ayland res_count should be set to the number of outstanding bytes after a DBDMA request. Unfortunately this wasn't being set to zero by the non-block transfer codepath meaning drivers that checked the descriptor result for such requests (e.g reading

[Qemu-devel] [PULL 1/3] spapr: Correctly set query_hotpluggable_cpus hook based on machine version

2016-08-07 Thread David Gibson
Prior to c8721d3 "spapr: Error out when CPU hotplug is attempted on older pseries machines", attempting to use query-hotpluggable-cpus on pseries-2.6 and earlier machine types would SEGV. That change fixed that, but due to some unexpected interactions in init order and a brown-paper-bag worthy

[Qemu-devel] [PATCH] docs: add cpu-hotplug.txt

2016-08-07 Thread Dou Liyang
This document describes how to use cpu hotplug in QEMU. Signed-off-by: Dou Liyang --- docs/cpu-hotplug.txt | 110 +++ 1 file changed, 110 insertions(+) create mode 100644 docs/cpu-hotplug.txt diff --git

[Qemu-devel] [PATCH v2 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-08-07 Thread Ashish Mittal
This patch adds support for a new block device type called "vxhs". Source code for the library that this code loads can be downloaded from: https://github.com/MittalAshish/libqnio.git Version 2 patch submission fixes the following issues: (1) Removed code to dlopen library. We now check if

Re: [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-07 Thread Nikunj A Dadhania
Benjamin Herrenschmidt writes: > On Sun, 2016-08-07 at 23:06 +0530, Nikunj A Dadhania wrote: >> +target_ulong helper_darn(uint32_t l) >> +{ >> +    target_ulong r = UINT64_MAX; >> + >> +    if (l <= 2) { >> +    do { >> +    r = random() * random(); >> + 

Re: [Qemu-devel] [PATCH] debugcon: Add -debugport option to allow changing debug console port number

2016-08-07 Thread Zheng, Lv
Hi, Michael > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Subject: Re: [PATCH] debugcon: Add -debugport option to allow changing > debug console port number > > On Fri, Aug 05, 2016 at 06:19:39PM +0800, Lv Zheng wrote: > > Changing debugcon port to 0x402 allows the seabios AML table pre-

Re: [Qemu-devel] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook based on machine version

2016-08-07 Thread David Gibson
On Fri, Aug 05, 2016 at 08:21:59PM +0530, Bharata B Rao wrote: > On Fri, Aug 05, 2016 at 05:50:29PM +1000, David Gibson wrote: > > Prior to c8721d3 "spapr: Error out when CPU hotplug is attempted on older > > pseries machines", attempting to use query-hotpluggable-cpus on pseries-2.6 > > and

Re: [Qemu-devel] hw/ppc/spapr_iommu.c: spapr_tce_reset() calls memset on NULL pointer

2016-08-07 Thread David Gibson
On Fri, Aug 05, 2016 at 10:45:57AM +0100, Peter Maydell wrote: > If you build with clang-3.8's undefined behaviour sanitizer > it reveals that hw/ppc/spapr_iommu.c is calling memset() > with a NULL pointer: > > $ (cd build/clang; UBSAN_OPTIONS=print_stacktrace=1 >

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-07 Thread Marek Vasut
On 07/30/2016 11:42 PM, Dmitry Osipenko wrote: > Hello Marek, Hi! Sorry for the late reply, I got back from vacation only recently. I noticed that a lot of files in this patchset are under LGPLv2.1 , I believe that needs fixing too, right ? I will talk to Chris about this as he is the original

Re: [Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-07 Thread Benjamin Herrenschmidt
On Sun, 2016-08-07 at 23:06 +0530, Nikunj A Dadhania wrote: > +target_ulong helper_darn(uint32_t l) > +{ > +    target_ulong r = UINT64_MAX; > + > +    if (l <= 2) { > +    do { > +    r = random() * random(); > +    r &= l ? UINT64_MAX : UINT32_MAX; > +    } while (r ==

[Qemu-devel] [PULL for-2.7 9/9] ahci: fix sglist leak on retry

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau ahci-test /x86_64/ahci/io/dma/lba28/retry triggers the following leak: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fc4b2a25e20 in malloc (/lib64/libasan.so.3+0xc6e20) #1 0x7fc4993bce58 in g_malloc

[Qemu-devel] [PULL for-2.7 8/9] usb: free leaking path

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau qdev_get_dev_path() returns an allocated string, free it when no longer needed. Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann --- hw/usb/desc.c | 1 + 1 file changed, 1

[Qemu-devel] [PULL for-2.7 6/9] virtio-input: free config list

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau Clear the list when finalizing. The list is created during realize with virtio_input_idstr_config() and later by further calls to virtio_input_init_config() and virtio_input_add_config(). This leak can be reproduced with

[Qemu-devel] [PULL for-2.7 1/9] numa: do not leak NumaOptions

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau In all cases, call qapi_free_NumaOptions(), by using a common ending block. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- numa.c | 15 --- 1 file changed, 8

[Qemu-devel] [PULL for-2.7 4/9] ahci: free irqs array

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau Each irq is referenced by the IDEBus in ide_init2(), thus we can free the no longer used array. Signed-off-by: Marc-André Lureau Reviewed-by: John Snow Acked-by: John Snow

[Qemu-devel] [PULL for-2.7 7/9] usb: free USBDevice.strings

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau The list is created during instance init and further populated with usb_desc_set_string(). Clear it when unrealizing the device. Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann ---

[Qemu-devel] [PULL for-2.7 5/9] qjson: free str

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau Release the qstring allocated in qjson_new(). Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- migration/qjson.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Qemu-devel] [PULL for-2.7 2/9] char: free the tcp connection data when closing

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau Make sure the connection data got freed when closing the chardev, to avoid leaks. Introduce tcp_chr_free_connection() to clean all connection related data, and move some tcp_chr_close() clean-ups there. (while at it, set write_msgfds_num to 0

[Qemu-devel] [PULL for-2.7 3/9] char: free MuxDriver when closing

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau Similarly to other chr_close callbacks, free char type specific data. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- qemu-char.c | 8 1 file changed, 8 insertions(+)

[Qemu-devel] [PULL for-2.7 0/9] Leak fixes for 2.7

2016-08-07 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 51009170d8fc263cfdcd5a60fe3ba213daa3d15b: tests: Rename qtests which have names ending "error" (2016-08-05 15:27:15 +0100) are available in the git repository at: git://github.com/elmarco/qemu.git

Re: [Qemu-devel] [PATCH for-2.7 v4 00/36] Various memory leak fixes

2016-08-07 Thread Peter Maydell
On 7 August 2016 at 20:31, Marc-André Lureau wrote: > Hi > > On Sun, Aug 7, 2016 at 11:15 PM Peter Maydell > wrote: >> >> On 5 August 2016 at 19:01, Marc-André Lureau >> wrote: >> > Hi Peter, >> > >> > All patches

Re: [Qemu-devel] [PATCH for-2.7 v4 00/36] Various memory leak fixes

2016-08-07 Thread Marc-André Lureau
Hi On Sun, Aug 7, 2016 at 11:15 PM Peter Maydell wrote: > On 5 August 2016 at 19:01, Marc-André Lureau > wrote: > > Hi Peter, > > > > All patches have a reviewed-by tag now, Given the mix of domains, I can > send > > you a pull request.

Re: [Qemu-devel] [PATCH for-2.7 v4 00/36] Various memory leak fixes

2016-08-07 Thread Peter Maydell
On 5 August 2016 at 19:01, Marc-André Lureau wrote: > Hi Peter, > > All patches have a reviewed-by tag now, Given the mix of domains, I can send > you a pull request. What do you think? 36 patches is a lot to be landing on the eve of rc2. How many of these are actual

[Qemu-devel] [Bug 1543163] Re: VMs unable to boot from network with e1000 since 2.2

2016-08-07 Thread John Doe
Probably the same issue in different scenario: DHCP server is running on the host machine (VMs use virtual NICs connected to a bridge) and is also configured to do PXE, which works, but only when VMs are launched in BIOS mode. When launched in UEFI mode using Tianocore, they fail. Now the

[Qemu-devel] [PATCH 5/6] target-ppc: add lxvb16x and lxvh8x

2016-08-07 Thread Nikunj A Dadhania
lxvb16x: Load VSX Vector Byte*16 lxvh8x: Load VSX Vector Halfword*8 Signed-off-by: Nikunj A Dadhania --- target-ppc/helper.h | 2 ++ target-ppc/mem_helper.c | 33 + target-ppc/translate/vsx-impl.inc.c | 20

[Qemu-devel] [PATCH 4/6] target-ppc: add stxsi[bh]x instruction

2016-08-07 Thread Nikunj A Dadhania
stxsibx - Store VSX Scalar as Integer Byte Indexed stxsihx - Store VSX Scalar as Integer Halfword Indexed Signed-off-by: Nikunj A Dadhania --- target-ppc/translate.c | 19 +-- target-ppc/translate/vsx-impl.inc.c | 2 ++

[Qemu-devel] [PATCH 3/6] target-ppc: add lxsi[bw]zx instruction

2016-08-07 Thread Nikunj A Dadhania
lxsibzx - Load VSX Scalar as Integer Byte & Zero Indexed lxsihzx - Load VSX Scalar as Integer Halfword & Zero Indexed Signed-off-by: Nikunj A Dadhania --- target-ppc/translate.c | 29 +++-- target-ppc/translate/vsx-impl.inc.c | 2

[Qemu-devel] [PATCH 6/6] target-ppc: add stxvb16x and stxvh8x

2016-08-07 Thread Nikunj A Dadhania
stxvb16x: Store VSX Vector Byte*16 stxvh8x: Store VSX Vector Halfword*8 Signed-off-by: Nikunj A Dadhania --- target-ppc/helper.h | 2 ++ target-ppc/mem_helper.c | 32 target-ppc/translate/vsx-impl.inc.c |

[Qemu-devel] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-07 Thread Nikunj A Dadhania
From: Ravi Bangoria darn: Deliver A Random Number For both CRN and RRN, returning 64-bit random number. Signed-off-by: Ravi Bangoria Signed-off-by: Nikunj A Dadhania --- target-ppc/helper.h |

[Qemu-devel] [PATCH 0/6] POWER9 TCG enablements - part4

2016-08-07 Thread Nikunj A Dadhania
This series contains 10 new instructions for POWER9 ISA3.0. Patches: 01: xxspltib: VSX Vector Splat Immediate Byte 02: darn: Deliver A Random Number 03: lxsibzx - Load VSX Scalar as Integer Byte & Zero Indexed lxsihzx - Load VSX Scalar as Integer Halfword & Zero Indexed

[Qemu-devel] [PATCH 1/6] target-ppc: add xxspltib instruction

2016-08-07 Thread Nikunj A Dadhania
xxspltib: VSX Vector Splat Immediate Byte Copy the immediate byte in each byte of target VSR Signed-off-by: Nikunj A Dadhania --- target-ppc/translate.c | 2 ++ target-ppc/translate/vsx-impl.inc.c | 20

Re: [Qemu-devel] [PATCH] ivshmem: Delete duplicate debug message

2016-08-07 Thread Marc-André Lureau
On Sun, Aug 7, 2016 at 5:48 PM Stefano Dong (董兴水) wrote: > When Debug switch is open, this debug message will print again in > function 'process_msg'. Delete it. > > Signed-off-by: Stefano Dong (董兴水) > Reviewed-by: Marc-André Lureau

[Qemu-devel] [PATCH] ivshmem: Delete duplicate debug message

2016-08-07 Thread 董兴水
When Debug switch is open, this debug message will print again in function 'process_msg'. Delete it. Signed-off-by: Stefano Dong (董兴水) --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 40a2ebc..f803dfd

Re: [Qemu-devel] [Xen-devel] [PATCH 15/19] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2016-08-07 Thread Emil Condrea
On Mon, Jul 25, 2016 at 7:01 PM, Anthony PERARD wrote: > > On Sun, Jul 10, 2016 at 02:47:46PM +0300, Emil Condrea wrote: > > This patch adds infrastructure for xen front drivers living in qemu, > > so drivers don't need to implement common stuff on their own. It's > >

Re: [Qemu-devel] [PATCH for-2.8 16/18] pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs

2016-08-07 Thread Michael S. Tsirkin
On Fri, Aug 05, 2016 at 11:46:15AM +0200, Igor Mammedov wrote: > Currently firmware uses 1 byte at 0x5F offset in RTC CMOS > to get number of CPUs present at boot. However 1 byte is > not enough to handle more than 255 CPUs. So add a new > fw_cfg file that would allow QEMU to tell it. > For

Re: [Qemu-devel] [PATCH] debugcon: Add -debugport option to allow changing debug console port number

2016-08-07 Thread Michael S. Tsirkin
On Fri, Aug 05, 2016 at 06:19:39PM +0800, Lv Zheng wrote: > Changing debugcon port to 0x402 allows the seabios AML table pre-defined > DBUG() control method to be able to dump the AML debugging information to > the re-directed debugging console. > > If the debug port number is configurable, users