Re: [Qemu-devel] [PATCH] fix xen hvm direct kernel boot

2016-05-03 Thread Chun Yan Liu
Any comments? >>> On 4/29/2016 at 11:43 AM, in message <1461901436-6881-1-git-send-email-cy...@suse.com>, Chunyan Liu wrote: > Since commit a1666142: acpi-build: make ROMs RAM blocks resizeable, > xen HVM direct kernel boot failed. Xen HVM direct kernel boot will > insert a

Re: [Qemu-devel] [PATCH v4 13/14] tb hash: track translated blocks with qht

2016-05-03 Thread Richard Henderson
On 05/03/2016 07:26 AM, Emilio G. Cota wrote: On Tue, May 03, 2016 at 08:36:35 +0100, Alex Bennée wrote: Emilio G. Cota writes: static TranslationBlock *tb_find_physical(CPUState *cpu, target_ulong pc,

Re: [Qemu-devel] [PATCH v4 10/14] qdist: add test program

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: Signed-off-by: Emilio G. Cota --- tests/.gitignore | 1 + tests/Makefile | 6 +- tests/test-qdist.c | 363 + 3 files changed, 369 insertions(+), 1 deletion(-) create

Re: [Qemu-devel] [PATCH v4 12/14] qht: add test program

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tests/.gitignore | 1 + tests/Makefile | 5 +- tests/test-qht.c | 177 +++ 3 files

Re: [Qemu-devel] [PATCH v4 14/14] translate-all: add tb hash bucket info to 'info jit' dump

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: Suggested-by: Richard Henderson Signed-off-by: Emilio G. Cota --- translate-all.c | 36 1 file changed, 36 insertions(+) Reviewed-by: Richard Henderson

Re: [Qemu-devel] [PATCH v4 13/14] tb hash: track translated blocks with qht

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpu-exec.c | 82 --- include/exec/exec-all.h | 9 +++--- include/exec/tb-hash.h | 3 +-

Re: [Qemu-devel] [PATCH v4 11/14] qht: QEMU's fast, resizable and scalable Hash Table

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: This is a hash table with optional auto-resizing and MRU promotion for reads and writes. Its implementation goal is to stay fast while scaling for read-mostly workloads. A hash table with these features will be necessary for the scalability of the

Re: [Qemu-devel] [PATCH v4 09/14] qdist: add module to represent frequency distributions of data

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: Signed-off-by: Emilio G. Cota --- include/qemu/qdist.h | 62 + util/Makefile.objs | 2 +- util/qdist.c | 386 +++ 3 files changed, 449 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH v4 06/14] qemu-thread: add simple test-and-set spinlock

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: From: Guillaume Delbergue Signed-off-by: Guillaume Delbergue [Rewritten. - Paolo] Signed-off-by: Paolo Bonzini [Emilio's additions: use atomic_test_and_set

Re: [Qemu-devel] [PATCH v4 05/14] atomics: add atomic_test_and_set

2016-05-03 Thread Richard Henderson
On 04/29/2016 05:33 PM, Emilio G. Cota wrote: This new helper expands to __atomic_test_and_set where available; otherwise it expands to atomic_xchg. Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson r~

[Qemu-devel] [PATCH 2/5] migration: Fix a potential issue

2016-05-03 Thread Liang Li
At the end of live migration and before vm_start() on the destination side, we should make sure all the decompression tasks are finished, if this can not be guaranteed, the VM may get the incorrect memory data, or the updated memory may be overwritten by the decompression thread. Add the code to

[Qemu-devel] [PATCH 5/5] migration: refine ram_save_compressed_page

2016-05-03 Thread Liang Li
Use qemu_put_compression_data to do the compression directly instead of using do_compress_ram_page, avoid some data copy. very small improvement, at the same time, add code to check if the compression is successful. Signed-off-by: Liang Li --- migration/ram.c | 28

[Qemu-devel] [PATCH 3/5] migration: remove useless code

2016-05-03 Thread Liang Li
page_buffer is set twice repeatedly, remove the previous set. Signed-off-by: Liang Li Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 4459b38..bc34bc5

[Qemu-devel] [PATCH 4/5] qemu-file: Fix qemu_put_compression_data flaw

2016-05-03 Thread Liang Li
Current qemu_put_compression_data can only work with no writable QEMUFile, and can't work with the writable QEMUFile. But it does not provide any measure to prevent users from using it with a writable QEMUFile. We should fix this flaw to make it works with writable QEMUFile. Suggested-by: Juan

[Qemu-devel] [PATCH 1/5] migration: Fix multi-thread compression bug

2016-05-03 Thread Liang Li
Recently, a bug related to multiple thread compression feature for live migration is reported. The destination side will be blocked during live migration if there are heavy workload in host and memory intensive workload in guest, this is most likely to happen when there is one decompression

[Qemu-devel] [PATCH 0/5] live migration bug fix and refine

2016-05-03 Thread Liang Li
This patch set fixed a bug which will block live migration and another potential issue when using multi-thread (de)compression. The last three patches were submitted before, put them here together. Liang Li (5): migration: Fix multi-thread compression bug migration: Fix a potential issue

Re: [Qemu-devel] [RFC PATCH v3 3/3] VFIO Type1 IOMMU change: to support with iommu and without iommu

2016-05-03 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, May 04, 2016 6:43 AM > > +int prot, unsigned long *pfn_base) > > { > > + struct vfio_domain *domain = domain_data; > > unsigned long limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT; > >

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-03 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, May 04, 2016 6:43 AM > > + > > + if (gpu_dev->ops->write) { > > + ret = gpu_dev->ops->write(vgpu_dev, > > + user_data, > > +

Re: [Qemu-devel] [RFC PATCH v3 1/3] vGPU Core driver

2016-05-03 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, May 04, 2016 6:44 AM > > +/** > > + * struct gpu_device_ops - Structure to be registered for each physical > > GPU to > > + * register the device to vgpu module. > > + * > > + * @owner: The module owner. > > + * @dev_attr_groups:

Re: [Qemu-devel] [RFC PATCH v3 1/3] vGPU Core driver

2016-05-03 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, May 04, 2016 6:44 AM > > > diff --git a/drivers/vgpu/Kconfig b/drivers/vgpu/Kconfig > > new file mode 100644 > > index 000..792eb48 > > --- /dev/null > > +++ b/drivers/vgpu/Kconfig > > @@ -0,0 +1,21 @@ > > + > > +menuconfig VGPU > > +tristate

Re: [Qemu-devel] [RFC PATCH v0 for 2.7] spapr: Work around the memory hotplug failure with DDW

2016-05-03 Thread Bharata B Rao
On Tue, May 03, 2016 at 06:30:51PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-04-19 06:51:41) > > Memory hotplug can fail for some combinations of RAM and maxmem when > > DDW is enabled in the presence of devices like nec-xhci-usb. DDW depends > > on maximum addressable memory by

Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression bug

2016-05-03 Thread Li, Liang Z
> * Liang Li (liang.z...@intel.com) wrote: > > Recently, a bug related to multiple thread compression feature for > > live migration is reported. The destination side will be blocked > > during live migration if there are heavy workload in host and memory > > intensive workload in guest, this is

Re: [Qemu-devel] [RFC PATCH v3 0/3] Add vGPU support

2016-05-03 Thread Tian, Kevin
> From: Kirti Wankhede > Sent: Tuesday, May 03, 2016 2:41 AM > > This series adds vGPU support to v4.6 Linux host kernel. Purpose of this > series > is to provide a common interface for vGPU management that can be used > by different GPU drivers. This series introduces vGPU core module that

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-03 Thread Christopher Friedt
On May 3, 2016 9:50 AM, "Christopher Friedt" wrote: > > On Tue, May 3, 2016 at 3:06 AM, Richard Henderson wrote: > > On 05/02/2016 03:10 PM, Christopher Friedt wrote: > >> > >> %.a: > >> +ifdef CONFIG_DARWIN > >> + $(call quiet-command,rm -f $@ &&

Re: [Qemu-devel] [RFC PATCH v0 for 2.7] spapr: Work around the memory hotplug failure with DDW

2016-05-03 Thread Michael Roth
Quoting Bharata B Rao (2016-04-19 06:51:41) > Memory hotplug can fail for some combinations of RAM and maxmem when > DDW is enabled in the presence of devices like nec-xhci-usb. DDW depends > on maximum addressable memory by guest and this value is currently > being calculated wrongly by the guest

[Qemu-devel] [PATCH] gdbstub: avoid busy loop while waiting for gdb

2016-05-03 Thread Peter Wu
While waiting for a gdb response, or while sending an acknowledgement there is not much to do, so just mark the socket as non-blocking to avoid a busy loop while paused at gdb. This only affects the user-mode emulation (qemu-arm -g 1234 ./a.out). Note that this issue was reported before at

Re: [Qemu-devel] [RFC PATCH v3 1/3] vGPU Core driver

2016-05-03 Thread Alex Williamson
On Tue, 3 May 2016 00:10:39 +0530 Kirti Wankhede wrote: > Design for vGPU Driver: > Main purpose of vGPU driver is to provide a common interface for vGPU > management that can be used by differnt GPU drivers. > > This module would provide a generic interface to create the

Re: [Qemu-devel] [RFC PATCH v3 2/3] VFIO driver for vGPU device

2016-05-03 Thread Alex Williamson
On Tue, 3 May 2016 00:10:40 +0530 Kirti Wankhede wrote: > VFIO driver registers with vGPU core driver. vGPU core driver creates vGPU > device and calls probe routine of vGPU VFIO driver. This vGPU VFIO driver adds > vGPU device to VFIO core module. > Main aim of this module

Re: [Qemu-devel] [RFC PATCH v3 3/3] VFIO Type1 IOMMU change: to support with iommu and without iommu

2016-05-03 Thread Alex Williamson
On Tue, 3 May 2016 00:10:41 +0530 Kirti Wankhede wrote: > VFIO Type1 IOMMU driver is designed for the devices which are IOMMU capable. > vGPU device are only using IOMMU TYPE1 API, the underlying hardware can be > managed by an IOMMU domain. To use most of the code of IOMMU

[Qemu-devel] [PATCHv2 3/3] nbd: Simplify client FUA handling

2016-05-03 Thread Eric Blake
Now that the block layer honors per-bds FUA support, we don't have to duplicate the fallback flush at the NBD layer. The static function nbd_co_writev_flags() is no longer needed, and the driver can just directly use nbd_client_co_writev(). Signed-off-by: Eric Blake ---

[Qemu-devel] [PATCHv2 0/3] Better 'Force Unit Access' handling

2016-05-03 Thread Eric Blake
I noticed some inconsistencies in FUA handling while working with NBD, then Kevin pointed out that my initial attempt wasn't quite right for iscsi which also had problems, so this has expanded into a series rather than a single patch. I'm not sure if this is qemu-stable material at this point.

[Qemu-devel] [PATCHv2 2/3] block: Honor BDRV_REQ_FUA during write_zeroes

2016-05-03 Thread Eric Blake
The block layer has a couple of cases where it can lose Force Unit Access semantics when writing a large block of zeroes, such that the request returns before the zeroes have been guaranteed to land on underlying media. SCSI does not support FUA during WRITESAME(10/16); FUA is only supported if

[Qemu-devel] [PATCHv2 1/3] block: Make supported_write_flags a per-bds property

2016-05-03 Thread Eric Blake
Pre-patch, .supported_write_flags lives at the driver level, which means we are blindly declaring that all block devices using a given driver will either equally support FUA, or that we need a fallback at the block layer. But there are drivers where FUA support is a per-block decision: the NBD

Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread Stefan Weil
Am 03.05.2016 um 23:11 schrieb Aurelien Jarno: > On 2016-05-03 20:11, Stefan Weil wrote: >> Am 03.05.2016 um 17:58 schrieb dcb: >>> Public bug reported: >>> >>> Recent versions of gcc say this: >>> >>> qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length >>> equal to number of

Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread Aurelien Jarno
On 2016-05-03 20:11, Stefan Weil wrote: > Am 03.05.2016 um 17:58 schrieb dcb: > > Public bug reported: > > > > Recent versions of gcc say this: > > > > qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length > > equal to number of elements without multiplication by element size > >

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h

2016-05-03 Thread haris iqbal
On Wed, May 4, 2016 at 12:32 AM, Peter Maydell wrote: > On 3 May 2016 at 19:10, haris iqbal wrote: >> On Tue, May 3, 2016 at 11:02 PM, Sean Bruno wrote: >>> If this is the only patch needing review for the bsd-user code, please

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h

2016-05-03 Thread Peter Maydell
On 3 May 2016 at 19:10, haris iqbal wrote: > On Tue, May 3, 2016 at 11:02 PM, Sean Bruno wrote: >> If this is the only patch needing review for the bsd-user code, please >> put me down as Reviewed by. > > Sorry, I am a newbie. Just to confirm, should I

[Qemu-devel] [RFC PATCH] firmware: qemu_fw_cfg.c: default to listing user-facing items only

2016-05-03 Thread Gabriel Somlo
Per the QEMU fw_cfg documentation, items targeted at guest-side userspace should have names beginning with the string "opt/". This patch limits the default sysfs fw_cfg listing to items named "opt/*". The "opt/" prefix on a fw_cfg item name may be interpreted as being analogous to bit 2 in ACPI's

Re: [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Dave Hansen
On 05/03/2016 11:23 AM, Eduardo Habkost wrote: > On Tue, May 03, 2016 at 10:53:43AM -0700, Dave Hansen wrote: >> On 05/03/2016 10:44 AM, Xiao Guangrong wrote: > This is the reason why setup_clear_cpu_cap(X86_FEATURE_XSAVES) > introduced by commit e88221c50 > caused XSAVES unreported by

Re: [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Eduardo Habkost
On Tue, May 03, 2016 at 10:53:43AM -0700, Dave Hansen wrote: > On 05/03/2016 10:44 AM, Xiao Guangrong wrote: > >>> This is the reason why setup_clear_cpu_cap(X86_FEATURE_XSAVES) > >>> introduced by commit e88221c50 > >>> caused XSAVES unreported by KVM. > >> > >> So, is this the right behavior, or

Re: [Qemu-devel] [PATCH] Modify net/socket.c to use functions from include/qemu/sockets.h

2016-05-03 Thread Ashi
On Tuesday 03 May 2016 07:31 PM, Daniel P. Berrange wrote: On Tue, May 03, 2016 at 07:04:17PM +0530, Ashijeet Acharya wrote: From: Ashijeet Replaced connect()/listen()/parse_host_port() in net/socket.c with inet_connect()/inet_listen/inet_parse() in

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h

2016-05-03 Thread haris iqbal
On Tue, May 3, 2016 at 11:02 PM, Sean Bruno wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > > > On 05/03/16 02:45, haris iqbal wrote: >> Just a reminder. waiting for a review for the previous patch. >> >> On Tue, Apr 5, 2016 at 6:39 PM, Md Haris Iqbal >>

Re: [Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread Stefan Weil
Am 03.05.2016 um 17:58 schrieb dcb: > Public bug reported: > > Recent versions of gcc say this: > > qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length > equal to number of elements without multiplication by element size > [-Wmemset-elt-size] > > Source code is > >

Re: [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Dave Hansen
On 05/03/2016 10:44 AM, Xiao Guangrong wrote: >>> This is the reason why setup_clear_cpu_cap(X86_FEATURE_XSAVES) >>> introduced by commit e88221c50 >>> caused XSAVES unreported by KVM. >> >> So, is this the right behavior, or KVM can support exposing >> XSAVES to guests even if the cpu_cap bit is

[Qemu-devel] [PATCH 00/12] ppc: preparing pnv landing (round 2)

2016-05-03 Thread Cédric Le Goater
Hello, Here is a new set of fixes extracted from Ben's PowerNV tree : https://github.com/ozbenh/qemu/commits/powernv It was quickly tested with a pseries guest using KVM and TCG. Thanks, C. Benjamin Herrenschmidt (11): ppc: Remove MMU_MODEn_SUFFIX definitions ppc: Use split I/D mmu

Re: [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Xiao Guangrong
On 05/04/2016 12:11 AM, Eduardo Habkost wrote: (CCing KVM mailing list) On Tue, May 03, 2016 at 02:38:44PM +0800, Xiao Guangrong wrote: On 04/29/2016 01:34 AM, Eduardo Habkost wrote: On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: [...] 1. As XSAVES is disabled in upstream

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h

2016-05-03 Thread Sean Bruno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 05/03/16 02:45, haris iqbal wrote: > Just a reminder. waiting for a review for the previous patch. > > On Tue, Apr 5, 2016 at 6:39 PM, Md Haris Iqbal > wrote: >> Signed-off-by: Md Haris Iqbal ---

Re: [Qemu-devel] [PATCH v4 13/14] tb hash: track translated blocks with qht

2016-05-03 Thread Emilio G. Cota
On Tue, May 03, 2016 at 08:36:35 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > static TranslationBlock *tb_find_physical(CPUState *cpu, > >target_ulong pc, > >target_ulong cs_base, >

Re: [Qemu-devel] [PATCH 00/12] ppc: preparing pnv landing (round 2)

2016-05-03 Thread David Gibson
On Tue, May 03, 2016 at 06:03:22PM +0200, Cédric Le Goater wrote: > Hello, > > Here is a new set of fixes extracted from Ben's PowerNV tree : > > https://github.com/ozbenh/qemu/commits/powernv > > It was quickly tested with a pseries guest using KVM and TCG. I'm on holiday - please send

Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression bug

2016-05-03 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: > Recently, a bug related to multiple thread compression feature for > live migration is reported. The destination side will be blocked > during live migration if there are heavy workload in host and > memory intensive workload in guest, this is most likely

Re: [Qemu-devel] [V9 1/4] hw/i386: Introduce AMD IOMMU

2016-05-03 Thread Jan Kiszka
[please shorten too long replies] On 2016-05-03 18:11, David Kiarie wrote: > On Sun, May 1, 2016 at 5:14 PM, Michael S. Tsirkin wrote: >> On Sat, Apr 30, 2016 at 01:42:40AM +0300, David Kiarie wrote: >>> + >>> +#include "hw/hw.h" >>> +#include "hw/pci/pci.h" >>> +#include

[Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread dcb
Public bug reported: Recent versions of gcc say this: qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] Source code is memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo)); Maybe

Re: [Qemu-devel] [V9 1/4] hw/i386: Introduce AMD IOMMU

2016-05-03 Thread David Kiarie
On Sun, May 1, 2016 at 5:14 PM, Michael S. Tsirkin wrote: > On Sat, Apr 30, 2016 at 01:42:40AM +0300, David Kiarie wrote: >> Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU >> The IOMMU does basic translation, error checking and has a >> minimal IOTLB implementation >>

[Qemu-devel] [PATCH 04/12] ppc: Add a bunch of hypervisor SPRs to Book3s

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We don't give them a KVM reg number yet as no current KVM version supports HV mode. Signed-off-by: Benjamin Herrenschmidt [clg: SPRs AMOR,DAWR,DARWX were already included in commit f401dd32cb8e9] Signed-off-by:

[Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Eduardo Habkost
(CCing KVM mailing list) On Tue, May 03, 2016 at 02:38:44PM +0800, Xiao Guangrong wrote: > On 04/29/2016 01:34 AM, Eduardo Habkost wrote: > >On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: [...] > >>1. As XSAVES is disabled in upstream linux kernel by commit e88221c50 >

[Qemu-devel] [PATCH 09/12] ppc: Change 'invalid' bit mask of tlbiel and tlbie

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Otherwise it will trip on the forms used in recent architecture. Ideally, we should have different handlers for different architecture levels but our current implementation of TLB flushing is dumb enough that this will do for now.

[Qemu-devel] [PATCH 12/12] ppc: Add PPC_64H instruction flag to POWER7 and POWER8

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This will enable decoding of hrfid Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-ppc/translate_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH 01/12] ppc: Remove MMU_MODEn_SUFFIX definitions

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We don't use the resulting accessors and this gets in the way of the split I/D TLB work. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git

[Qemu-devel] [PATCH 02/12] ppc: Use split I/D mmu modes to avoid flushes on interrupts

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We rework the way the MMU indices are calculated, providing separate indices for I and D side based on MSR:IR and MSR:DR respectively, and thus no longer need to flush the TLB on context changes. This also adds correct support for HV as a

[Qemu-devel] [PATCH 08/12] ppc: tlbie, tlbia and tlbisync are HV only

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Not that anything remotely recent supports tlbia but ... Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 07/12] ppc: Better figure out if processor has HV mode

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We use an env. flag which is set to the initial value of MSR_HVB in the msr_mask. We also adjust the POWER8 mask to set SHV. Also use this to adjust ctx.hv so that it is *set* when the processor doesn't have an HV mode (970 with Apple mode

[Qemu-devel] [PATCH 06/12] ppc: Fix rfi/rfid/hrfi/... emulation

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This reworks emulation of the various "rfi" variants. I removed some masking bits that I couldn't make sense of, the only bit that I am aware we should mask here is POW, the CPU's MSR mask should take care of the rest. This also fixes some

[Qemu-devel] [PATCH 03/12] ppc: Do some batching of TCG tlb flushes

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt On ppc64 especially, we flush the tlb on any slbie or tlbie instruction. However, those instructions often come in bursts of 3 or more (context switch will favor a series of slbie's for example to an slbia if the SLB has less than a certain

[Qemu-devel] [PATCH 05/12] ppc: Fix hreg_store_msr() so that non-HV mode cannot alter MSR:HV

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This helper is only used by the various instructions that can alter MSR and not interrupts. Add a comment to that effect to the interrupt code as well in case somebody wants to change this Signed-off-by: Benjamin Herrenschmidt

[Qemu-devel] [PATCH 11/12] ppc: Get out of emulation on SMT "OR" ops

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Otherwise tight loops at smt_low for example, which OPAL does, eat so much CPU that we can't boot a kernel anymore. With that, I can boot 8 CPUs just fine with powernv. Signed-off-by: Benjamin Herrenschmidt

[Qemu-devel] [PATCH 10/12] ppc: Fix sign extension issue in mtmsr(d) emulation

2016-05-03 Thread Cédric Le Goater
From: Michael Neuling Signed-off-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-ppc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v5 14/14] block: Kill blk_write(), blk_read()

2016-05-03 Thread Eric Blake
Now that there are no remaining clients, we can drop these functions, to ensure that all future users get the byte-based interfaces. Sadly, there are still remaining sector-based interfaces, such as blk_aio_writev; those will have to wait for another day. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v5 11/14] qemu-io: Switch to byte-based block access

2016-05-03 Thread Eric Blake
blk_write() and blk_read() are now very simple wrappers around blk_pwrite() and blk_pread(). There's no reason to require the user to pass in aligned numbers. Keep 'read -p' and 'write -p' so that I don't have to hunt down and update all users of qemu-io, but make the default 'read' and 'write'

[Qemu-devel] [PATCH v5 10/14] qemu-img: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- qemu-img.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index

[Qemu-devel] [PATCH v5 01/14] block: Allow BDRV_REQ_FUA through blk_pwrite()

2016-05-03 Thread Eric Blake
We have several block drivers that understand BDRV_REQ_FUA, and emulate it in the block layer for the rest by a full flush. But without a way to actually request BDRV_REQ_FUA during a pass-through blk_pwrite(), FUA-aware block drivers like NBD are forced to repeat the emulation logic of a full

[Qemu-devel] [PATCH v5 09/14] nbd: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Signed-off-by: Eric Blake --- qemu-nbd.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index c55b40f..c07ceef 100644 --- a/qemu-nbd.c +++

[Qemu-devel] [PATCH v5 08/14] atapi: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Add new defines ATAPI_SECTOR_BITS and ATAPI_SECTOR_SIZE to use anywhere we were previously scaling BDRV_SECTOR_* by 4, for better legibility. Signed-off-by: Eric Blake --- v4: add new defines for

[Qemu-devel] [PATCH v5 07/14] m25p80: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Signed-off-by: Eric Blake --- v5: compile tested this time --- hw/block/m25p80.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index

[Qemu-devel] [PATCH v5 04/14] onenand: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). This particular device picks its size during onenand_initfn(), and can be at most 0x8000 bytes; therefore, shifting an 'int sec' request to get back to a byte offset should never overflow

[Qemu-devel] [PATCH v5 06/14] sd: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Greatly simplifies the code, now that we let the block layer take care of alignment and read-modify-write on our behalf :) In fact, we no longer need to include 'buf' in the migration stream

[Qemu-devel] [PATCH v5 03/14] nand: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). This file is doing some complex computations to map various flash page sizes (256, 512, and 2048) atop generic uses of 512-byte sector operations. Perhaps someone will want to tidy up the

[Qemu-devel] [PATCH v5 05/14] pflash: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- hw/block/pflash_cfi01.c | 12 ++-- hw/block/pflash_cfi02.c | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-)

[Qemu-devel] [PATCH v5 12/14] block: Switch blk_read_unthrottled() to byte interface

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; convert the one-off variant blk_read_unthrottled(). Signed-off-by: Eric Blake --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 hw/block/hd-geometry.c | 2 +- 3 files changed, 7 insertions(+),

[Qemu-devel] [PATCH v5 13/14] block: Switch blk_write_zeroes() to byte interface

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; convert the one-off variant blk_write_zeroes(). Signed-off-by: Eric Blake Acked-by: Denis V. Lunev --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 block/parallels.c |

[Qemu-devel] [PATCH v5 02/14] fdc: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- hw/block/fdc.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hw/block/fdc.c

[Qemu-devel] [PATCH v5 00/14] block: kill sector-based blk_write/read

2016-05-03 Thread Eric Blake
2.7 material, depends on Kevin's block-next: git://repo.or.cz/qemu/kevin.git block-next Previously posted as part of a larger NBD series [1] and as v4 [2]. Mostly orthogonal to Kevin's recent work to also kill sector interfaces from the driver. [1]

Re: [Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD

2016-05-03 Thread Kevin Wolf
Am 06.04.2016 um 20:28 hat Max Reitz geschrieben: > Turns out NBD is not so simple to do if you do it right. Anyway, this > series adds blockdev-add support for NBD clients. What the series does seems to make sense to me, though things would be a bit nicer (especially on the command line) if

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in ui/shader.c

2016-05-03 Thread haris iqbal
On Tue, May 3, 2016 at 3:42 PM, Gerd Hoffmann wrote: > On Di, 2016-05-03 at 15:16 +0530, haris iqbal wrote: >> Just a reminder. waiting for a review for the previous patch. > > Patch is fine. Just stalled b/c we are in code freeze, I expect trivial > queue will pick this up

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Tue 03 May 2016 03:48:47 PM CEST, Kevin Wolf wrote: > The solution to that should be simply changing the order of things: > > 1. bdrv_drained_begin() > 2. bdrv_reopen_queue() > 3. bdrv_reopen_multiple() > * Instead of bdrv_drain_all(), assert that no requests are pending No requests are

Re: [Qemu-devel] [PATCH v2 1/2] xen: introduce dummy system device

2016-05-03 Thread Anthony PERARD
On Thu, Mar 10, 2016 at 04:19:29PM +0100, Juergen Gross wrote: > Introduce a new dummy system device serving as parent for virtual > buses. This will enable new pv backends to introduce virtual buses > which are removable again opposed to system buses which are meant > to stay once added. > >

Re: [Qemu-devel] [PATCH v2 2/2] xen: add pvUSB backend

2016-05-03 Thread Anthony PERARD
On Thu, Mar 10, 2016 at 04:19:30PM +0100, Juergen Gross wrote: > Add a backend for para-virtualized USB devices for xen domains. > > The backend is using host-libusb to forward USB requests from a > domain via libusb to the real device(s) passed through. > > Signed-off-by: Juergen Gross

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Max Reitz
On 03.05.2016 16:34, Kevin Wolf wrote: > Am 03.05.2016 um 15:48 hat Max Reitz geschrieben: >> On 03.05.2016 15:31, Kevin Wolf wrote: >>> Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: On 02.05.2016 17:36, Kevin Wolf wrote: > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: >> In

[Qemu-devel] [PATCH] cpu-exec: Remove relic orphaned comment

2016-05-03 Thread Sergey Fedorov
From: Sergey Fedorov This comment should have been deleted by commit 0ac087f1f3ae ("removed unused code") but somehow it is still here. There's no point to keep it. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov

Re: [Qemu-devel] [PATCH] cpu-exec: Remove relic orphaned comment

2016-05-03 Thread Sergey Fedorov
On 03/05/16 17:34, Sergey Fedorov wrote: > From: Sergey Fedorov > > This comment should have been deleted by commit 0ac087f1f3ae ("removed > unused code") but somehow it is still here. There's no point to keep it. > > Signed-off-by: Sergey Fedorov >

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 15:48 hat Max Reitz geschrieben: > On 03.05.2016 15:31, Kevin Wolf wrote: > > Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: > >> On 02.05.2016 17:36, Kevin Wolf wrote: > >>> Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > In order to allow block drivers to use that

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-03 Thread Peter Maydell
On 3 May 2016 at 14:50, Christopher Friedt wrote: > To be honest, if it weren't for the man page for libtool on Mac OS X > [1] dating all the way back to Snow Leopard saying that libtool is the > preferred tool on Mac for creating static archives, I'm left wondering > if

Re: [Qemu-devel] [PATCH] Modify net/socket.c to use functions from include/qemu/sockets.h

2016-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2016 at 07:04:17PM +0530, Ashijeet Acharya wrote: > From: Ashijeet > > Replaced connect()/listen()/parse_host_port() in net/socket.c > with inet_connect()/inet_listen/inet_parse() in include/qemu/sockets.h. If you're going to re-work this, then I think

Re: [Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD

2016-05-03 Thread Max Reitz
On 06.04.2016 20:28, Max Reitz wrote: > Turns out NBD is not so simple to do if you do it right. Anyway, this > series adds blockdev-add support for NBD clients. > > Patch 1 adds a QDict function which I needed in later NBD patches for > handling legacy options (move "host" to "address.data.host"

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-03 Thread Christopher Friedt
On Tue, May 3, 2016 at 3:06 AM, Richard Henderson wrote: > On 05/02/2016 03:10 PM, Christopher Friedt wrote: >> >> %.a: >> +ifdef CONFIG_DARWIN >> + $(call quiet-command,rm -f $@ && libtool -static -o $@ $^," >> libtool$(TARGET_DIR)$@") >> +else >> $(call

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 15:33 hat Alberto Garcia geschrieben: > On Tue 03 May 2016 03:23:24 PM CEST, Kevin Wolf wrote: > >> c) we fix bdrv_reopen() so we can actually run both jobs at the same > >>time. I'm wondering if pausing all block jobs between > >>bdrv_reopen_prepare() and

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Max Reitz
On 03.05.2016 15:31, Kevin Wolf wrote: > Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: >> On 02.05.2016 17:36, Kevin Wolf wrote: >>> Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: In order to allow block drivers to use that function, it needs to be public. In order to be useful,

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: > On 02.05.2016 17:36, Kevin Wolf wrote: > > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > >> In order to allow block drivers to use that function, it needs to be > >> public. In order to be useful, it needs to take a parameter which allows >

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Tue 03 May 2016 03:23:24 PM CEST, Kevin Wolf wrote: >> c) we fix bdrv_reopen() so we can actually run both jobs at the same >>time. I'm wondering if pausing all block jobs between >>bdrv_reopen_prepare() and bdrv_reopen_commit() would do the >>trick. Opinions? > > I would have to

[Qemu-devel] [PATCH] Modify net/socket.c to use functions from include/qemu/sockets.h

2016-05-03 Thread Ashijeet Acharya
From: Ashijeet Replaced connect()/listen()/parse_host_port() in net/socket.c with inet_connect()/inet_listen/inet_parse() in include/qemu/sockets.h. Signed-off-by: Ashijeet Acharya --- net/socket.c | 19 +++ 1 file

Re: [Qemu-devel] [PATCH 02/19] block: Add BDS.backing_overridden

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 12:49 hat Max Reitz geschrieben: > On 02.05.2016 17:35, Kevin Wolf wrote: > > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > >> If the backing file is overridden, this most probably does change the > >> guest-visible data of a BDS. Therefore, we will need to consider this in

  1   2   >