[Qemu-devel] [PATCH] scripts/kvm/kvm_stat: define exit_reasons field in ArchPPC

2016-05-20 Thread Laurent Vivier
Otherwise kvm_stat fails with the following error: AttributeError: 'ArchPPC' object has no attribute 'exit_reasons' This has been introduced by: 068294a scripts/kvm/kvm_stat: Group arch specific data Set exit_reasons to 'None' (as it is done for ArchS390) for ArchPPC. Test this with "k

[Qemu-devel] [PATCH v19 04/10] Link backup into block core

2016-05-20 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2 +-

[Qemu-devel] [PATCH v19 00/10] Block replication for continuous checkpoints

2016-05-20 Thread Changlong Xie
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt You can get the patc

[Qemu-devel] [PATCH v19 06/10] auto complete active commit

2016-05-20 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h | 3 ++- qemu-img.c

[Qemu-devel] [PATCH v19 02/10] Backup: clear all bitmap when doing block checkpoint

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/backup.c | 18 ++ include/block/block_backup.h | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 include/block

[Qemu-devel] [PATCH v19 09/10] tests: add unit test case for replication

2016-05-20 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- tests/.gitignore | 1 + tests/Makefile | 4 + tests/test-replication.c | 523 +++ 3 files changed, 528 insertions(+) create mode 100644 tests/test-replication.c diff -

[Qemu-devel] [PATCH v19 01/10] unblock backup operations in backing file

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 1205ef8..8c4c2c2 100644 --- a/block.c +++ b/block.c @@ -1271,6 +1271,23 @@ void bdrv_set_backing_hd(BlockDriver

[Qemu-devel] [PATCH v19 05/10] docs: block replication's description

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode 100644 docs/block-replication.txt

[Qemu-devel] [PATCH v19 10/10] support replication driver in blockdev-add

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Eric Blake --- qapi/block-core.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/q

[Qemu-devel] [PATCH v19 07/10] Introduce new APIs to do replication operation

2016-05-20 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 105 ++ replication.h| 176

[Qemu-devel] [PATCH v19 03/10] Backup: export interfaces for extra serialization

2016-05-20 Thread Changlong Xie
Normal backup(sync='none') workflow: step 1. NBD peformance I/O write from client to server qcow2_co_writev bdrv_co_writev ... bdrv_aligned_pwritev notifier_with_return_list_notify -> backup_do_cow bdrv_driver_pwritev // write new contents step 2. drive-backup s

[Qemu-devel] [PATCH v19 08/10] Implement new driver for block replication

2016-05-20 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/Makefile.objs | 1 + block/replication.c | 666 2 files changed, 667 insertions(+) create mode 100

Re: [Qemu-devel] [PATCH 4/4] cpus: call the core nmi injection function

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 00:15, Bandan Das wrote: > void qmp_inject_nmi(Error **errp) > { > -#if defined(TARGET_I386) > -CPUState *cs; > - > -CPU_FOREACH(cs) { > -X86CPU *cpu = X86_CPU(cs); > - > -if (!cpu->apic_state) { > -cpu_interrupt(cs, CPU_INTERRUPT_NMI); > -

Re: [Qemu-devel] [PATCH 4/4] cpus: call the core nmi injection function

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 00:15, Bandan Das wrote: > void qmp_inject_nmi(Error **errp) > { > -#if defined(TARGET_I386) > -CPUState *cs; > - > -CPU_FOREACH(cs) { > -X86CPU *cpu = X86_CPU(cs); > - > -if (!cpu->apic_state) { > -cpu_interrupt(cs, CPU_INTERRUPT_NMI); > -

Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next()

2016-05-20 Thread Paolo Bonzini
On 19/05/2016 17:21, Kevin Wolf wrote: > We need to introduce a separate BdrvNextIterator struct that can keep > more state than just the current BDS in order to avoid using the bs->blk > pointer. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > --- > block.c|

Re: [Qemu-devel] [PULL v2 16/17] gtk: update grab code for gtk 3.20

2016-05-20 Thread Paolo Bonzini
On 13/05/2016 14:32, Gerd Hoffmann wrote: > @@ -1442,14 +1474,19 @@ static void gd_grab_pointer(VirtualConsole *vc, const > char *reason) > static void gd_ungrab_pointer(GtkDisplayState *s) > { > VirtualConsole *vc = s->ptr_owner; > +GdkDisplay *display = gtk_widget_get_display(vc->gf

[Qemu-devel] [PATCH] block: Fix memory leak in bdrv_next()

2016-05-20 Thread Kevin Wolf
When all BDSes have already been iterated and we return NULL, the iterator must be freed, too. Signed-off-by: Kevin Wolf --- block/block-backend.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index 6928d61..c5fb251 100644

Re: [Qemu-devel] [PATCH 1/3] blockdev-backup: Don't move target AioContext if it's attached

2016-05-20 Thread Kevin Wolf
Am 18.05.2016 um 10:24 hat Fam Zheng geschrieben: > If the BDS is attached, it will want to stay on the AioContext where its > BlockBackend is. Don't call bdrv_set_aio_context in this case. > > Signed-off-by: Fam Zheng > --- > blockdev.c | 12 +++- > 1 file changed, 11 insertions(+), 1 d

[Qemu-devel] [RFC PATCH qemu] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening

2016-05-20 Thread Alexey Kardashevskiy
The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - a guest view of the table and a hardware TCE table. If there is no VFIO presense in the address space, then just the guest view is used, if this is the case, it is allocated in the KVM. However since there is no support yet for VFIO

Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next()

2016-05-20 Thread Kevin Wolf
Am 20.05.2016 um 09:54 hat Paolo Bonzini geschrieben: > > > On 19/05/2016 17:21, Kevin Wolf wrote: > > We need to introduce a separate BdrvNextIterator struct that can keep > > more state than just the current BDS in order to avoid using the bs->blk > > pointer. > > > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next()

2016-05-20 Thread Kevin Wolf
Am 20.05.2016 um 10:05 hat Kevin Wolf geschrieben: > Am 20.05.2016 um 09:54 hat Paolo Bonzini geschrieben: > > > +/* Iterates over all top-level BlockDriverStates, i.e. BDSs that are > > > owned by > > > + * the monitor or attached to a BlockBackend */ > > > +BdrvNextIterator *bdrv_next(BdrvNextIt

Re: [Qemu-devel] [PATCH] block: Fix memory leak in bdrv_next()

2016-05-20 Thread Kevin Wolf
Am 20.05.2016 um 09:57 hat Kevin Wolf geschrieben: > When all BDSes have already been iterated and we return NULL, the > iterator must be freed, too. > > Signed-off-by: Kevin Wolf NACK, this doesn't fix cases where the caller exists loop prematurely. Kevin

Re: [Qemu-devel] [RHEL-7.3 qemu-kvm-rhev PATCH] qmp: Report drive_add error to monitor

2016-05-20 Thread Markus Armbruster
Fam Zheng writes: > BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1337100 > Brew: 11051815 > Upstream: N/A > > In other error cases of this function we use error_setg, the same should > be done with drive_new() failures. This is useful for libvirt to > correctly detect the failure and report pr

Re: [Qemu-devel] [PATCH] scripts/kvm/kvm_stat: define exit_reasons field in ArchPPC

2016-05-20 Thread Laurent Vivier
On 20/05/2016 09:07, Laurent Vivier wrote: > Otherwise kvm_stat fails with the following error: > > AttributeError: 'ArchPPC' object has no attribute 'exit_reasons' > > This has been introduced by: > > 068294a scripts/kvm/kvm_stat: Group arch specific data > > Set exit_reasons to 'Non

[Qemu-devel] [PATCH v2 01/15] pc-dimm: get memory region from ->get_memory_region()

2016-05-20 Thread Xiao Guangrong
Curretly, the memory region of backed memory is all directly mapped to guest's address space, however, it will be not true for nvdimm device if we introduce nvdimm label which only can be indirectly accessed by ACPI DSM method Also it improves the comments a bit to reflect this fact Signed-off-by

[Qemu-devel] [PATCH v2 05/15] acpi: add aml_object_type

2016-05-20 Thread Xiao Guangrong
Implement ObjectType which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ab89ca6..85c3ef7 1

[Qemu-devel] [PATCH v2 11/15] nvdimm acpi: check revision

2016-05-20 Thread Xiao Guangrong
Cuurently only revision 1 is supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 897d0a6..7af428f 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -483,6 +483,13 @@ nvdimm_dsm_wri

[Qemu-devel] [PATCH v2 07/15] nvdimm acpi: set HDLE properly

2016-05-20 Thread Xiao Guangrong
Now we pass HDLE to Qemu properly, use 0 for root device and use the handle for nvdimm devices Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9531340..586c02

[Qemu-devel] [PATCH v2 10/15] nvdimm acpi: abstract the operations for root & nvdimm devices

2016-05-20 Thread Xiao Guangrong
It separates the operations between root device and nvdimm devices in order to introducing label functions support for nvdimm device Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 74 ++-- 1 file changed, 56 insertions(+), 18 deletions(-)

[Qemu-devel] [PATCH v2 00/15] PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-05-20 Thread Xiao Guangrong
Changelog in v2: Thanks for Stefan's review, the changes in this version are: - rename nvdimm device parameter 'reserve-label' to 'label-size' to specify the size of label - add comment to explain why assert() used in nvdimm_assert_rw_label_data() is safe - follow the code style of 'foo() retur

[Qemu-devel] [PATCH v2 12/15] nvdimm acpi: support Get Namespace Label Size function

2016-05-20 Thread Xiao Guangrong
Function 4 is used to get Namespace label size Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 130 +-- 1 file changed, 127 insertions(+), 3 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 7af428f..94424a4 100644 --- a

[Qemu-devel] [PATCH v2 03/15] pc-dimm: keep the state of the whole backend memory

2016-05-20 Thread Xiao Guangrong
QEMU keeps the state of memory of dimm device during live migration, however, it is not enough for nvdimm device as its memory does not contain its label data, so that we should protect the whole backend memory instead Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 13 +++-- 1 file

[Qemu-devel] [PATCH v2 02/15] pc-dimm: introduce realize callback

2016-05-20 Thread Xiao Guangrong
nvdimm needs to check if the backend memory is large enough to contain label data and init its memory region when the device is realized, so introduce realize callback which is called after common dimm has been realize Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 5 + includ

[Qemu-devel] [PATCH v2 09/15] nvdimm acpi: check UUID

2016-05-20 Thread Xiao Guangrong
Check arg0 which indicates UUID to see if it is valid Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 38aba3d..4177227 100644 --- a/hw/acpi/nvdimm.c

[Qemu-devel] [PATCH v2 14/15] nvdimm acpi: support Set Namespace Label Data function

2016-05-20 Thread Xiao Guangrong
Function 6 is used to set Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 0c0b4bf..0e7a81f 100644 --- a/hw/acpi/nvdim

[Qemu-devel] [PATCH v2 08/15] nvdimm acpi: save arg3 of _DSM method

2016-05-20 Thread Xiao Guangrong
Check if the input Arg3 is valid then store it into ARG3 if it is needed Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 586c02a..38aba3d 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/

[Qemu-devel] [PATCH v2 13/15] nvdimm acpi: support Get Namespace Label Data function

2016-05-20 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 94424a4..0c0b4bf 100644 --- a/h

[Qemu-devel] [PATCH v2 04/15] nvdimm: support nvdimm label

2016-05-20 Thread Xiao Guangrong
Introduce a parameter, 'label-size', which is the size of nvdimm label data area which is reserved at the end of backend memory. It is required at least 128k Two callbacks, read_label_data() and write_label_data(), are used to operate the label area Signed-off-by: Xiao Guangrong --- hw/mem/nvdi

[Qemu-devel] [PATCH v2 06/15] acpi: add aml_call5

2016-05-20 Thread Xiao Guangrong
It will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 85c3ef7..1783216 100644 --- a/hw/acpi/aml-build.c

[Qemu-devel] [PATCH v2 15/15] docs: add NVDIMM ACPI documentation

2016-05-20 Thread Xiao Guangrong
It describes the basic concepts of NVDIMM ACPI and the interfaces between QEMU and the ACPI BIOS Signed-off-by: Xiao Guangrong --- docs/specs/acpi_nvdimm.txt | 132 + 1 file changed, 132 insertions(+) create mode 100644 docs/specs/acpi_nvdimm.txt dif

[Qemu-devel] [PATCH] scripts/kvm/kvm_stat: fix tracepoint provider

2016-05-20 Thread Laurent Vivier
tracepoint provider on ppc is broken since: fc116ef kvm_stat: Add RESET support for perf event ioctl because the value used with ioctl() to reset the event queue is not valid on ppc. This patch defines the good value for ppc. Signed-off-by: Laurent Vivier --- scripts/kvm/kvm_stat | 1 + 1

[Qemu-devel] [PATCH] bt: rewrite csrhci_write to avoid out-of-bounds writes

2016-05-20 Thread Paolo Bonzini
The usage of INT_MAX in this function confuses Coverity. I think the defect is bogus, however there is no protection against getting more than sizeof(s->inpkt) bytes from the character device backend. Rewrite the function to only fill in as much data as needed from buf into s->inpkt. The plen va

Re: [Qemu-devel] [PATCH v5 2/6] pc: Postpone SMBIOS table installation to post machine init

2016-05-20 Thread Igor Mammedov
On Thu, 19 May 2016 10:23:58 -0500 miny...@acm.org wrote: > From: Corey Minyard > > This is the same place that the ACPI SSDT table gets added, so that > devices can add themselves to the SMBIOS table. > > Signed-off-by: Corey Minyard > --- > hw/i386/pc.c | 11 ++- > 1 file changed, 6

[Qemu-devel] [PATCH] crypto: assert that qcrypto_hash_digest_len is in range

2016-05-20 Thread Paolo Bonzini
Otherwise unintended results could happen. For example, Coverity reports a division by zero in qcrypto_afsplit_hash. While this cannot really happen, it shows that the contract of qcrypto_hash_digest_len can be improved. Signed-off-by: Paolo Bonzini --- crypto/hash.c | 4 +--- 1 file changed, 1

Re: [Qemu-devel] [PATCH v5 4/6] ipmi: Add SMBIOS table entry

2016-05-20 Thread Igor Mammedov
On Thu, 19 May 2016 10:24:00 -0500 miny...@acm.org wrote: > From: Corey Minyard > > Add an IPMI table entry to the SMBIOS. > > Signed-off-by: Corey Minyard > Acked-by: Michael S. Tsirkin > --- > hw/smbios/Makefile.objs | 2 + > hw/smbios/ipmi.c | 114 > +++

Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next()

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 10:10, Kevin Wolf wrote: >> > Already posted a fix. I chose to keep the interface and free the >> > BdrvNextIterator inside bdrv_next(), when we return NULL after the last >> > element. > Oops, should have actually read your email... You're right about callers > that prematurely exi

[Qemu-devel] [PATCH] gtk: fix unchecked vc dereference

2016-05-20 Thread Gerd Hoffmann
Spotted by Coverity. Cc: Paolo Bonzini Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 7572cec..01b8216 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1477,13 +1477,14 @@ static void gd_grab_pointer(VirtualConso

Re: [Qemu-devel] [PATCH 0/6] virtio-gpu: scanout limit fixes

2016-05-20 Thread Marc-André Lureau
Hi On Fri, May 20, 2016 at 7:44 AM, Gerd Hoffmann wrote: > On Do, 2016-05-19 at 12:25 +0200, marcandre.lur...@redhat.com wrote: >> Here is a small series improving a bit the scanout limit handling. The >> first patch was sent previously but is also included in this series >> for convenience. > >

Re: [Qemu-devel] [PATCH v5 5/6] acpi: Add IPMI table entries

2016-05-20 Thread Igor Mammedov
On Thu, 19 May 2016 10:24:01 -0500 miny...@acm.org wrote: > From: Corey Minyard > > Use the new ACPI table construction tools to create an ACPI > entry for IPMI. This adds a function called from build_dsdt > to add an DSDT entry for IPMI if IPMI is compiled in and has > registered firmware. It

[Qemu-devel] [PATCH RFC QEMU] balloon: speed up inflating & deflating process

2016-05-20 Thread Liang Li
The implementation of the current virtio-balloon is not very efficient, Bellow is test result of time spends on inflating the balloon to 3GB of a 4GB idle guest: a. allocating pages (6.5%, 103ms) b. sending PFNs to host (68.3%, 787ms) c. address translation (6.1%, 96ms) d. madvise (19%, 300ms) It

[Qemu-devel] [PATCH RFC kernel] balloon: speed up inflating/deflating process

2016-05-20 Thread Liang Li
The implementation of the current virtio-balloon is not very efficient, Bellow is test result of time spends on inflating the balloon to 3GB of a 4GB idle guest: a. allocating pages (6.5%, 103ms) b. sending PFNs to host (68.3%, 787ms) c. address translation (6.1%, 96ms) d. madvise (19%, 300ms) It

Re: [Qemu-devel] [PATCH] vga: add sr_vbe register set

2016-05-20 Thread Gerd Hoffmann
Hi, > ./x86_64-softmmu/qemu-system-x86_64 -boot d -cdrom > W7SP1_PROFESSIONAL.iso -m 1024 -smp 2 -enable-kvm -cpu host -drive > if=pflash,format=raw,unit=0,readonly,file=OVMF_CODE-pure-efi.fd -drive > if=pflash,format=raw,unit=1,file=/tmp/OVMF_VARS.fd Still not reproduced. Installed win7, then

[Qemu-devel] [PATCH V2] block/iscsi: allow caching of the allocation map

2016-05-20 Thread Peter Lieven
until now the allocation map was used only as a hint if a cluster is allocated or not. If a block was not allocated (or Qemu had no info about the allocation status) a get_block_status call was issued to check the allocation status and possibly avoid a subsequent read of unallocated sectors. If a b

Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next()

2016-05-20 Thread Kevin Wolf
Am 20.05.2016 um 11:39 hat Paolo Bonzini geschrieben: > > > On 20/05/2016 10:10, Kevin Wolf wrote: > >> > Already posted a fix. I chose to keep the interface and free the > >> > BdrvNextIterator inside bdrv_next(), when we return NULL after the last > >> > element. > > Oops, should have actually

Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next()

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 12:26, Kevin Wolf wrote: > Hm, we have a few instances where an iterator variable is used for > multiple loops, so we need to be able to use it in an assignment, i.e. > it should be a compound literal. On the other hand, I seem to remember > that compound literals can't be used as i

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 04:41, xiaoqiang zhao wrote: > > It seems that qemu_char_get_next_serial() call the qemu_chr_fe_claim, > which is also called by > qdev_prop_set_chr ! This cause chr->avail_connectinos less than 1. as > the error message said: > "it's in use". > A stright fix is to call the qemu_c

Re: [Qemu-devel] [PATCH 0/6] virtio-gpu: scanout limit fixes

2016-05-20 Thread Gerd Hoffmann
On Fr, 2016-05-20 at 11:52 +0200, Marc-André Lureau wrote: > Hi > > On Fri, May 20, 2016 at 7:44 AM, Gerd Hoffmann wrote: > > On Do, 2016-05-19 at 12:25 +0200, marcandre.lur...@redhat.com wrote: > >> Here is a small series improving a bit the scanout limit handling. The > >> first patch was sent

Re: [Qemu-devel] [PATCH RFC kernel] balloon: speed up inflating/deflating process

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 11:59, Liang Li wrote: > + > + sg_init_table(sg, 5); > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > + sg_set_

Re: [Qemu-devel] [PATCH RFC kernel] balloon: speed up inflating/deflating process

2016-05-20 Thread Cornelia Huck
On Fri, 20 May 2016 17:59:46 +0800 Liang Li wrote: > The implementation of the current virtio-balloon is not very efficient, > Bellow is test result of time spends on inflating the balloon to 3GB of > a 4GB idle guest: > > a. allocating pages (6.5%, 103ms) > b. sending PFNs to host (68.3%, 787ms

[Qemu-devel] [PATCH] tci: do not include exec/exec-all.h

2016-05-20 Thread Paolo Bonzini
TCI does not need the runtime definition in exec-all.h. It only needs the host-side definitions in tcg/tcg.h. Now that cpu.h is not included everywhere, this caused a failure because exec-all.h does need cpu.h but does not include it itself. Fix by including the intended header. Signed-off-by:

[Qemu-devel] [PATCH] aspeed: include qemu/log.h

2016-05-20 Thread Paolo Bonzini
This is not visible with the default "log" trace backend. With other backends however trace.h does not include qemu/log.h, resulting in build failures. Signed-off-by: Paolo Bonzini --- hw/intc/aspeed_vic.c| 1 + hw/timer/aspeed_timer.c | 1 + 2 files changed, 2 insertions(+) diff --git a/h

Re: [Qemu-devel] [PATCH RFC kernel] balloon: speed up inflating/deflating process

2016-05-20 Thread Michael S. Tsirkin
On Fri, May 20, 2016 at 05:59:46PM +0800, Liang Li wrote: > The implementation of the current virtio-balloon is not very efficient, > Bellow is test result of time spends on inflating the balloon to 3GB of > a 4GB idle guest: > > a. allocating pages (6.5%, 103ms) > b. sending PFNs to host (68.3%,

Re: [Qemu-devel] [PATCH] aspeed: include qemu/log.h

2016-05-20 Thread Peter Maydell
On 20 May 2016 at 12:57, Paolo Bonzini wrote: > This is not visible with the default "log" trace backend. With other > backends however trace.h does not include qemu/log.h, resulting in > build failures. > > Signed-off-by: Paolo Bonzini > --- > hw/intc/aspeed_vic.c| 1 + > hw/timer/aspeed_t

Re: [Qemu-devel] vfio IGD assignment (was Re: [PATCH v6 0/8] Series short description)

2016-05-20 Thread Gerd Hoffmann
On Mi, 2016-05-18 at 12:45 -0600, Alex Williamson wrote: > On Wed, 18 May 2016 16:24:49 +0200 > Gerd Hoffmann wrote: > > > Hi, > > > > > I believe we're no longer blocked by SeaBIOS being willing to > > > consume the new fw_cfg entries, so barring feedback otherwise, my > > > plan will be to s

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices

2016-05-20 Thread xiaoqiang zhao
> 在 2016年5月20日,19:08,Paolo Bonzini 写道: > > > >> On 20/05/2016 04:41, xiaoqiang zhao wrote: >> >> It seems that qemu_char_get_next_serial() call the qemu_chr_fe_claim, >> which is also called by >> qdev_prop_set_chr ! This cause chr->avail_connectinos less than 1. as >> the error message sai

Re: [Qemu-devel] proposal: drop linux-user unicore32 support from QEMU

2016-05-20 Thread Riku Voipio
On torstaina 12. toukokuuta 2016 17.34.42 EEST, Peter Maydell wrote: QEMU has something that claims to be linux-user support for the unicore32 guest CPU. However the syscall numbers in linux-user/unicore32 are nothing like those actually implemented in the upstream kernel (which uses asm-generic

[Qemu-devel] GSoC 2016: Introductory email

2016-05-20 Thread Pranith Kumar
Hello all, I've been selected to participate in GSoC 2016 in the Qemu project. I will be mentored by Alex Bennée and will be working on solving memory consistency issues in the MTTCG project. In particular we are targeting to get ARM guests working on x86 hosts as a first step by adding TCG suppo

[Qemu-devel] [PATCH] gt64xxx: access right I/O port when activating byte swapping

2016-05-20 Thread Hervé Poussineau
Incidentally, this fixes YAMON on big endian guest. Signed-off-by: Hervé Poussineau --- hw/mips/gt64xxx_pci.c | 62 +-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index 3f4523d..c76e

Re: [Qemu-devel] [PATCH] tci: do not include exec/exec-all.h

2016-05-20 Thread Peter Maydell
On 20 May 2016 at 12:57, Paolo Bonzini wrote: > TCI does not need the runtime definition in exec-all.h. It only needs the > host-side definitions in tcg/tcg.h. Now that cpu.h is not included > everywhere, this caused a failure because exec-all.h does need cpu.h > but does not include it itself.

Re: [Qemu-devel] [PATCH v2 1/1] block: clarify error message for qmp-eject

2016-05-20 Thread Markus Armbruster
John Snow writes: > If you use HMP's eject but the CDROM tray is locked, you may get a > confusing error message informing you that the "tray isn't open." > > As this is the point of eject, we can do a little better and help > clarify that the tray was locked and that it (might) open up later, >

Re: [Qemu-devel] [PATCH 3/3] virtio-gpu: Warn if UI config will disable virgl

2016-05-20 Thread Cole Robinson
On 05/20/2016 01:53 AM, Gerd Hoffmann wrote: > On Mi, 2016-05-18 at 12:40 -0400, Cole Robinson wrote: >> Give users a hint if their config is wrong. >> >> Signed-off-by: Cole Robinson >> --- >> If virgl support is built into qemu, virgl=on is the default, so this >> could be noisy in cases where p

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices

2016-05-20 Thread Markus Armbruster
xiaoqiang zhao writes: > 在 2016年05月19日 21:45, mich...@walle.cc 写道: >> Am 2016-05-19 13:32, schrieb Paolo Bonzini: >>> Michael, can you test patches 3 and 4? >> >> Doesn't work for me: >> $ qemu-system-lm32 -kernel serial.bin -serial vc -serial vc >> Unexpected error in parse_chr() at >> /home/m

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices

2016-05-20 Thread Paolo Bonzini
On 20/05/2016 16:52, Markus Armbruster wrote: > xiaoqiang zhao writes: > >> 在 2016年05月19日 21:45, mich...@walle.cc 写道: >>> Am 2016-05-19 13:32, schrieb Paolo Bonzini: Michael, can you test patches 3 and 4? >>> >>> Doesn't work for me: >>> $ qemu-system-lm32 -kernel serial.bin -serial vc -

Re: [Qemu-devel] vfio IGD assignment (was Re: [PATCH v6 0/8] Series short description)

2016-05-20 Thread Alex Williamson
On Fri, 20 May 2016 14:19:19 +0200 Gerd Hoffmann wrote: > On Mi, 2016-05-18 at 12:45 -0600, Alex Williamson wrote: > > On Wed, 18 May 2016 16:24:49 +0200 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > I believe we're no longer blocked by SeaBIOS being willing to > > > > consume the

Re: [Qemu-devel] [RFC PATCH qemu] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening

2016-05-20 Thread Alex Williamson
On Fri, 20 May 2016 18:04:42 +1000 Alexey Kardashevskiy wrote: > The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - > a guest view of the table and a hardware TCE table. If there is no VFIO > presense in the address space, then just the guest view is used, if > this is the case, i

Re: [Qemu-devel] [PATCH] crypto: assert that qcrypto_hash_digest_len is in range

2016-05-20 Thread Eric Blake
On 05/20/2016 03:09 AM, Paolo Bonzini wrote: > Otherwise unintended results could happen. For example, > Coverity reports a division by zero in qcrypto_afsplit_hash. > While this cannot really happen, it shows that the contract > of qcrypto_hash_digest_len can be improved. > > Signed-off-by: Paol

Re: [Qemu-devel] GSoC 2016: Introductory email

2016-05-20 Thread Alex Bennée
Pranith Kumar writes: > Hello all, > > I've been selected to participate in GSoC 2016 in the Qemu project. I will be > mentored by Alex Bennée and will be working on solving memory consistency > issues in the MTTCG project. In particular we are targeting to get ARM guests > working on x86 hosts

[Qemu-devel] [PATCH v2 0/3] Minor nmi cleanups

2016-05-20 Thread Bandan Das
v2: 2/4: Remove inject_nmi and call nmi_monitor_handle() directly 3/4: rm -rf 4/4: Call nmi_monitor_handle and pass cpu index The primary change is a arch specific x86 nmi function which can be called by the core nmi handler. Bandan Das (3): target-i386: add a generic x86 nmi handler nmi: rem

[Qemu-devel] [PATCH v2 2/3] nmi: remove x86 specific nmi handling

2016-05-20 Thread Bandan Das
nmi_monitor_handle is wired to call the x86 nmi handler. So, we can directly use it at call sites. Signed-off-by: Bandan Das --- hw/core/nmi.c | 24 hw/watchdog/watchdog.c | 2 +- include/hw/nmi.h | 1 - 3 files changed, 1 insertion(+), 26 deletions(-)

[Qemu-devel] [PATCH] i2c: add aspeed i2c crontroller

2016-05-20 Thread Cédric Le Goater
The Aspeed AST2400 integrates a set of 14 I2C/SMBus bus controllers directly connected to ab APB bus which can be programmed as a master or slave. This patch offers a device model for the master mode only, slave mode is not supported. On the TODO list, we also have : - improve and harden the st

Re: [Qemu-devel] [PATCH 4/4] cpus: call the core nmi injection function

2016-05-20 Thread Bandan Das
Paolo Bonzini writes: > On 20/05/2016 00:15, Bandan Das wrote: >> void qmp_inject_nmi(Error **errp) >> { >> -#if defined(TARGET_I386) >> -CPUState *cs; >> - >> -CPU_FOREACH(cs) { >> -X86CPU *cpu = X86_CPU(cs); >> - >> -if (!cpu->apic_state) { >> -cpu_interrup

[Qemu-devel] [PATCH v2 1/3] target-i386: add a generic x86 nmi handler

2016-05-20 Thread Bandan Das
Instead of having x86 ifdefs in core nmi code, this change adds a arch specific handler that the nmi common code can call. Signed-off-by: Bandan Das --- hw/i386/pc.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 99437e0..e29ccc8 10064

[Qemu-devel] [PATCH v2 3/3] cpus: call the core nmi injection function

2016-05-20 Thread Bandan Das
We can call the common function here directly since x86 specific actions will be taken care of by the arch specific nmi handler Signed-off-by: Bandan Das --- cpus.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/cpus.c b/cpus.c index eb34b4f..481f78a 100644 --- a/cpus.c +++ b

[Qemu-devel] [PATCH 2/4] hw/misc: add a TMP42{1,2,3} device model

2016-05-20 Thread Cédric Le Goater
Largely inspired by the TMP105 temperature sensor, this patch brings to Qemu a model for TMP42{1,2,3} temperature sensors. Specs can be found here : http://www.ti.com/lit/gpn/tmp421 Signed-off-by: Cédric Le Goater --- hw/misc/Makefile.objs | 1 + hw/misc/tmp421.c | 395 +

Re: [Qemu-devel] [PATCH] crypto: assert that qcrypto_hash_digest_len is in range

2016-05-20 Thread Daniel P. Berrange
On Fri, May 20, 2016 at 09:52:36AM -0600, Eric Blake wrote: > On 05/20/2016 03:09 AM, Paolo Bonzini wrote: > > Otherwise unintended results could happen. For example, > > Coverity reports a division by zero in qcrypto_afsplit_hash. > > While this cannot really happen, it shows that the contract >

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-05-20 Thread kachaffeous
Here is my startup script. #!/bin/bash echo "Starting virtual machine..." cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd sudo \ qemu-system-x86_64 \ -name "Windows 10" \ -enable-kvm \ -m 12288 \ -cpu host,kvm=off \ -smp threads=2,cores=4,sockets=1 \ -vga no

[Qemu-devel] [PATCH v2] block: Fix bdrv_next() memory leak

2016-05-20 Thread Kevin Wolf
The bdrv_next() users all leaked the BdrvNextIterator after completing the iteration. Simply changing bdrv_next() to free the iterator before returning NULL at the end of list doesn't work because some callers exit the loop before looking at all BDSes. This patch moves the BdrvNextIterator from th

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-05-20 Thread Jimi
I should also post my "scripts" (libvirt XML files in my case): But, since the Windows VM and Linux VM are completely identical beyond the OS that's installed, I don't think our VM configurations have anything to do with this bug. I mean, they aren't completely identical right now because I remove

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-05-20 Thread Jimi
Also, yeah, the Linux one is called SteamOS, but it is actually just an almost identical install of Arch. SteamOS wasn't playing nice with most of my hardware when I tried to install it. ** Attachment added: "SteamOS.xml" https://bugs.launchpad.net/qemu/+bug/1580459/+attachment/4667053/+files/

[Qemu-devel] [Bug 1075272] Re: socket type mapping wrong for mips app-level emulation

2016-05-20 Thread Peter Maydell
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1075272 Title: socket type mapping wrong for mips app-level emulation Status in QEMU:

[Qemu-devel] [Bug 1287195] Re: validate_guest_space incorrectly enabled on AArch64

2016-05-20 Thread Peter Maydell
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1287195 Title: validate_guest_space incorrectly enabled on AArch64 Status in QEMU:

[Qemu-devel] [PATCH v3] block: Fix bdrv_next() memory leak

2016-05-20 Thread Kevin Wolf
The bdrv_next() users all leaked the BdrvNextIterator after completing the iteration. Simply changing bdrv_next() to free the iterator before returning NULL at the end of list doesn't work because some callers exit the loop before looking at all BDSes. This patch moves the BdrvNextIterator from th

[Qemu-devel] [PATCH] tests: avoid coroutine pool test crash

2016-05-20 Thread Stefan Hajnoczi
Skip the test_co_queue test case if the coroutine pool is not enabled. The test case does not work without the pool because it touches memory belonging to a freed coroutine (on purpose). Reported-by: Eduardo Habkost Signed-off-by: Stefan Hajnoczi --- tests/test-coroutine.c | 10 +- 1 fi

[Qemu-devel] [PATCH 2/2] linux-user: Use g_try_malloc() in do_msgrcv()

2016-05-20 Thread Peter Maydell
In do_msgrcv() we want to allocate a message buffer, whose size is passed to us by the guest. That means we could legitimately fail, so use g_try_malloc() and handle the error case, in the same way that do_msgsnd() does. Signed-off-by: Peter Maydell --- linux-user/syscall.c | 6 +- 1 file ch

[Qemu-devel] [PATCH 0/2] linux-user: fix some msgrcv edge cases

2016-05-20 Thread Peter Maydell
These patches fix a couple of issues with handling edge cases in our linux-user msgrcv implementation: * we weren't dealing with negative msgsz correctly (should fail EINVAL) * we were using g_malloc() rather than g_try_malloc() for an allocatino whose size is controlled by the guest (Both th

[Qemu-devel] [PATCH] virtio: drop duplicate virtio_queue_get_id() function

2016-05-20 Thread Stefan Hajnoczi
The virtio_queue_get_id() function is the lesser used duplicate of virtio_get_queue_index(). Use the latter instead. Signed-off-by: Stefan Hajnoczi --- hw/scsi/virtio-scsi.c | 2 +- hw/virtio/virtio.c | 7 --- include/hw/virtio/virtio.h | 1 - 3 files changed, 1 insertion(+), 9

[Qemu-devel] [PATCH 1/2] linux-user: Handle msgrcv error case correctly

2016-05-20 Thread Peter Maydell
The msgrcv ABI is a bit odd -- the msgsz argument is a size_t, which is unsigned, but it must fail EINVAL if the value is negative when cast to a long. We were incorrectly passing the value through an "unsigned int", which meant that if the guest was 32-bit longs and the host was 64-bit longs an in

[Qemu-devel] undefined symbol _nettle_cast5_set_key

2016-05-20 Thread Programmingkid
Noticed this bug after a 'git pull'. My repo is at commit 65603e2fc18b48e6e55a3dd693669413141694ec - tci: do not include exec/exec-all.h I am building QEMU on Mac OS 10.6 with GCC 4.9. Here is the full message: LINK qemu-nbd Undefined symbols for architecture x86_64: "_nettle_cast5_set_key"

Re: [Qemu-devel] [PATCH] gt64xxx: access right I/O port when activating byte swapping

2016-05-20 Thread Aurelien Jarno
On 2016-05-20 15:05, Hervé Poussineau wrote: > Incidentally, this fixes YAMON on big endian guest. > > Signed-off-by: Hervé Poussineau > --- > hw/mips/gt64xxx_pci.c | 62 > +-- > 1 file changed, 60 insertions(+), 2 deletions(-) > > diff --git a/h

[Qemu-devel] [PATCH v4 0/5] ADB improvements

2016-05-20 Thread Programmingkid
This patch series makes several improvements to the ADB code. To test this code, please implement the patches in the order below. John Arbuckle (5): adb-keys.h: initial commit adb.c: add support for QKeyCode adb.c: correct several key assignments adb.c: prevent NO_KEY value from going to g

  1   2   >