Re: [Qemu-devel] [PATCH 2/8] migration: stop allocating andfreeingmemory frequently

2018-03-18 Thread jiang.biao2
>>> +err = deflate(stream, Z_FINISH); >>> +if (err != Z_STREAM_END) { >>> +return -1; >>> +} >>> + >>> +return stream->next_out - dest; >>> +} >>> + >>> >>> @@ -683,8 +707,10 @@ ssize_t qemu_put_compression_data(QEMUFile *f, const >>> uint8_t *p, size_t size, >>> return

Re: [Qemu-devel] [PATCH] migration: Fix block migration flag case

2018-03-18 Thread Peter Xu
On Fri, Mar 16, 2018 at 08:21:14PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Fix the case where when a migration with a bad protocol is tried, > we leave the block migration capability set. > > (This is a cut down version of my

Re: [Qemu-devel] Partial NUMA config

2018-03-18 Thread Alexey Kardashevskiy
On 13/3/18 1:26 pm, Alexey Kardashevskiy wrote: > Hi Igor, > > ec78f8114bc4c1 "numa: use possible_cpus for not mapped CPUs check" added a > warning about "All CPU(s) up to maxcpus should be described in NUMA config, > ability to start up with partial NUMA mappings is obsoleted and will be >

Re: [Qemu-devel] [PATCH v5 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-18 Thread Michael S. Tsirkin
On Sun, Mar 18, 2018 at 06:36:20PM +0800, Wei Wang wrote: > On 03/16/2018 11:16 PM, Michael S. Tsirkin wrote: > > On Fri, Mar 16, 2018 at 06:48:28PM +0800, Wei Wang wrote: > > > The new feature enables the virtio-balloon device to receive hints of > > > guest free pages from the free page vq. > >

Re: [Qemu-devel] [PATCH 2/8] migration: stop allocating and freeingmemory frequently

2018-03-18 Thread Xiao Guangrong
On 03/19/2018 09:49 AM, jiang.bi...@zte.com.cn wrote: Hi, guangrong +/* return the size after compression, or negative value on error */ +static int qemu_compress_data(z_stream *stream, uint8_t *dest, size_t dest_len, + const uint8_t *source, size_t source_len)

[Qemu-devel] [PATCH v2] tcg: Really fix cpu_io_recompile

2018-03-18 Thread Richard Henderson
We have confused the number of instructions that have been executed in the TB with the number of instructions needed to repeat the I/O instruction. We have used cpu_restore_state_from_tb, which means that the guest pc is pointing to the I/O instruction. The only time the answer to the later

[Qemu-devel] [Bug 1754542] Re: colo: vm crash with segmentation fault

2018-03-18 Thread 李穗恒
Hi Zhang Chen, I follow the https://wiki.qemu.org/Features/COLO, And Vm no crash. But SVM rebooting constantly after print RESET, PVM normal startup. Secondary: {"timestamp": {"seconds": 1521421788, "microseconds": 541058}, "event": "RESUME"} {"timestamp": {"seconds": 1521421808, "microseconds":

Re: [Qemu-devel] [PATCH 2/8] migration: stop allocating and freeingmemory frequently

2018-03-18 Thread jiang.biao2
Hi, guangrong > > +/* return the size after compression, or negative value on error */ > +static int qemu_compress_data(z_stream *stream, uint8_t *dest, size_t > dest_len, > + const uint8_t *source, size_t source_len) > +{ > +int err; > + > +err =

[Qemu-devel] [PULL 2/8] tests/boot-serial: Check the 40p machine, too

2018-03-18 Thread David Gibson
From: Thomas Huth The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" machine, so we can test it accordingly with the boot-serial tester, too. While we're at it, also change the strings that we are using for the "prep" machine, so that this test now also

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315

2018-03-18 Thread David Gibson
On Sat, Mar 17, 2018 at 12:30:58PM +0100, BALATON Zoltan wrote: > On Sat, 17 Mar 2018, BALATON Zoltan wrote: > > On Sat, 17 Mar 2018, Peter Maydell wrote: > > > On 17 March 2018 at 04:02, David Gibson > > > wrote: > > > > On Fri, Mar 16, 2018 at 05:25:04PM +,

[Qemu-devel] [PULL 7/8] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)

2018-03-18 Thread David Gibson
From: BALATON Zoltan Using log unimp is more appropriate for these messages and this also silences them by default so they won't clobber make check output when tests are added for this board. Signed-off-by: BALATON Zoltan Reviewed-by: Thomas Huth

[Qemu-devel] [PULL 8/8] target/ppc: fix tlbsync to check privilege level depending on GTSE

2018-03-18 Thread David Gibson
From: Cédric Le Goater tlbsync also needs to check the Guest Translation Shootdown Enable (GTSE) bit in the Logical Partition Control Register (LPCR) to determine at which privilege level it is running. See commit c6fd28fd573d ("target/ppc: Update tlbie to check privilege level

[Qemu-devel] [PULL 3/8] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices

2018-03-18 Thread David Gibson
From: Thomas Huth The global hack for creating SCSI devices has recently been removed, but this apparently broke SCSI devices on some boards that were not ready for this change yet. For the 40p machine you now get: $ ppc64-softmmu/qemu-system-ppc64 -M 40p -cdrom x.iso

[Qemu-devel] [PULL 4/8] hw/misc/macio: Mark the macio devices with user_creatable = false

2018-03-18 Thread David Gibson
From: Thomas Huth The macio devices currently cause a crash when the user tries to instantiate them on a different machine: $ ppc64-softmmu/qemu-system-ppc64 -device macio-newworld Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222: qemu-system-ppc64: -device

[Qemu-devel] [PULL 6/8] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth"

2018-03-18 Thread David Gibson
From: Thomas Huth With the new "--nic" command line parameter option, the "old" way of specifying a NIC model via the nd_table[] is becoming more prominent again. But for the pseries "spapr-vlan" device, there is a confusing discrepancy between the model name that is used for

[Qemu-devel] [PULL 1/8] sii3112: Remove unneeded exit function

2018-03-18 Thread David Gibson
From: BALATON Zoltan An exit function was mistakenly left here but it's not needed because the PCI bars are organised differently in this device. Calling this exit function during device_del was causing an abort with memory_region_del_subregion: `Assertion

[Qemu-devel] [PULL 5/8] PPC e500: Fix gap between u-boot and kernel

2018-03-18 Thread David Gibson
From: David Engraf This patch moves the gap between u-boot and kernel at the correct location. Signed-off-by: David Engraf Signed-off-by: David Gibson --- hw/ppc/e500.c | 9 - 1 file changed, 4

Re: [Qemu-devel] [PULL 0/9] ppc-for-2.12 queue 20180315

2018-03-18 Thread David Gibson
On Sat, Mar 17, 2018 at 10:08:26AM +, Peter Maydell wrote: > On 17 March 2018 at 04:02, David Gibson wrote: > > On Fri, Mar 16, 2018 at 05:25:04PM +, Peter Maydell wrote: > >> Hi -- this looks like it provokes new runtime error warnings from the > >> clang

[Qemu-devel] [PULL 0/8] ppc-for-2.12 queue 20180319

2018-03-18 Thread David Gibson
The following changes since commit e1e44a9916b4318e943aecd669e096222cb3eaeb: Merge remote-tracking branch 'remotes/xtensa/tags/20180316-xtensa' into staging (2018-03-17 14:15:03 +) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.12-20180319 for

Re: [Qemu-devel] [virtio-dev] Re: [v23 1/2] virtio-crypto: Add virtio crypto device specification

2018-03-18 Thread Michael S. Tsirkin
On Fri, Mar 16, 2018 at 07:18:45PM +0100, Halil Pasic wrote: > > > On 03/16/2018 05:27 PM, Michael S. Tsirkin wrote: > > On Tue, Jan 09, 2018 at 06:05:41PM +0100, Halil Pasic wrote: > >>> +\item[\field{max_cipher_key_len}] is the maximum length of cipher key > >>> supported by the device. > >>

Re: [Qemu-devel] [PATCH 3/3] nvram: at24c: use a sane default for "rom-size"

2018-03-18 Thread Philippe Mathieu-Daudé
Hi Wolfram, On 03/13/2018 09:16 PM, Wolfram Sang wrote: > Hi Philippe, > >>> static Property at24c_eeprom_props[] = { >>> -DEFINE_PROP_UINT32("rom-size", EEPROMState, rsize, 0), >>> +DEFINE_PROP_UINT32("rom-size", EEPROMState, rsize, 128), >> >> This patch should goes before your 2/3 in

Re: [Qemu-devel] [PATCH] target-mips: Add initrd support for the Boston board

2018-03-18 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 03/14/2018 04:17 PM, Aleksandar Rikalo wrote: > From: Aleksandar Rikalo > > Add support for initial ramdisk loading for the Mips Boston board. > > Signed-off-by: Aleksandar Rikalo > --- > hw/mips/boston.c | 54

Re: [Qemu-devel] [PATCH] gdbstub: send a terminaison packet instead of crashing gdb

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 05:23 PM, KONRAD Frederic wrote: > Since the commit: > commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 > Author: Stefan Hajnoczi > Date: Wed Mar 7 14:42:05 2018 + > > vl: introduce vm_shutdown() > > GDB crash when qemu exits (at least on

Re: [Qemu-devel] [PATCH] target/m68k: add a mechanism to automatically free TCGv

2018-03-18 Thread Philippe Mathieu-Daudé
Hi Laurent, On 03/18/2018 05:12 PM, Laurent Vivier wrote: > SRC_EA() and gen_extend() can return either a temporary > TCGv or a memory allocated one. Mark them when they are > allocated, and free them automatically at end of the > instruction translation. > > We want to free locally allocated

Re: [Qemu-devel] [PATCH] tcg: fix cpu_io_recompile

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 04:53 PM, Richard Henderson wrote: > We have confused the number of instructions that have been > executed in the TB with the number of instructions needed > to repeat the I/O instruction. > > We have used cpu_restore_state_from_tb, which means that > the guest pc is pointing to the

Re: [Qemu-devel] [PATCH v3] RISC-V: Fix riscv_isa_string memory size bug

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 06:26 PM, Michael Clark wrote: > This version uses a constant size memory buffer sized for > the maximum possible ISA string length. It also uses g_new > instead of g_new0, uses more efficient logic to append > extensions and adds manual zero termination of the string. > > Cc:

Re: [Qemu-devel] [PATCH v3 14/22] target/arm: Make PMOVSCLR 64 bits wide

2018-03-18 Thread Philippe Mathieu-Daudé
Hi Aaron, On 03/16/2018 09:31 PM, Aaron Lindsay wrote: > This is a bug fix to ensure 64-bit reads of this register don't read > adjacent data. > > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 01/22] target/arm: A53: Initialize PMCEID[01]

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/18/2018 11:35 PM, Philippe Mathieu-Daudé wrote: > Hi Aaron, > > On 03/16/2018 09:30 PM, Aaron Lindsay wrote: >> A53 advertises ARM_FEATURE_PMU, but wasn't initializing pmceid[01]. >> pmceid[01] are already being initialized to zero for both A15 and A57. >> >> Signed-off-by: Aaron Lindsay

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 20/22] target/arm: PMU: Add instruction and cycle events

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 09:31 PM, Aaron Lindsay wrote: > The instruction event is only enabled when icount is used, cycles are > always supported. Always defining get_cycle_count (but altering its > behavior depending on CONFIG_USER_ONLY) allows us to remove some > CONFIG_USER_ONLY #defines throughout the

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 15/22] target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 09:31 PM, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay Reviewed-by: Philippe Mathieu-Daudé > --- > target/arm/cpu.c | 3 +++ > target/arm/cpu.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/target/arm/cpu.c

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 20/22] target/arm: PMU: Add instruction and cycle events

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 09:31 PM, Aaron Lindsay wrote: > The instruction event is only enabled when icount is used, cycles are > always supported. Always defining get_cycle_count (but altering its > behavior depending on CONFIG_USER_ONLY) allows us to remove some > CONFIG_USER_ONLY #defines throughout the

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 08/22] target/arm: Support multiple EL change hooks

2018-03-18 Thread Philippe Mathieu-Daudé
On 03/16/2018 09:31 PM, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu.c | 15 ++- > target/arm/cpu.h | 23 --- > target/arm/internals.h | 7 --- > 3 files changed, 26 insertions(+), 19

Re: [Qemu-devel] [Qemu-arm] [PATCH v3 01/22] target/arm: A53: Initialize PMCEID[01]

2018-03-18 Thread Philippe Mathieu-Daudé
Hi Aaron, On 03/16/2018 09:30 PM, Aaron Lindsay wrote: > A53 advertises ARM_FEATURE_PMU, but wasn't initializing pmceid[01]. > pmceid[01] are already being initialized to zero for both A15 and A57. > > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu64.c | 2 ++ > 1

[Qemu-devel] Google Summer of Code 2018 - add Windows NT 4.0 PowerPC support

2018-03-18 Thread Programmingkid
Is there still time to add another idea to the Google Summer of Code 2018 list? I just came across an interesting idea to add support for Windows NT 4.0 PowerPC to QEMU. If there is still time, would there be anyone interested in mentoring this project?

[Qemu-devel] [Bug 1756728] Re: virtio-scsi virtio-scsi-single and virtio-blk on raw image, games are not starting

2018-03-18 Thread Alexandre ARNOUD
** Description changed: - Using virtio-scsi / vitro-scsi-sing and vitro-blk on a ZFS/raw image, + Using virtio-scsi / vitro-scsi-single or vitro-blk on a ZFS/raw image, most Assassin's Creed (Origin especially) games are not starting (uPlay), it seems related to some check or commands

[Qemu-devel] [Bug 1756728] [NEW] virtio-scsi virtio-scsi-single and virtio-blk on raw image, games are not starting

2018-03-18 Thread Alexandre ARNOUD
Public bug reported: Using virtio-scsi / vitro-scsi-sing and vitro-blk on a ZFS/raw image, most Assassin's Creed (Origin especially) games are not starting (uPlay), it seems related to some check or commands applications are doing on the disk drive that fails to respond. Workaround has been

[Qemu-devel] [PATCH] target/m68k: add a mechanism to automatically free TCGv

2018-03-18 Thread Laurent Vivier
SRC_EA() and gen_extend() can return either a temporary TCGv or a memory allocated one. Mark them when they are allocated, and free them automatically at end of the instruction translation. We want to free locally allocated TCGv to avoid overflow in sequence like: 0xc00ae406: movel

Re: [Qemu-devel] [PATCH v5 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-18 Thread Wei Wang
On 03/16/2018 11:16 PM, Michael S. Tsirkin wrote: On Fri, Mar 16, 2018 at 06:48:28PM +0800, Wei Wang wrote: The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. balloon_free_page_start - start guest free page hint reporting.