Re: [Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-14 Thread Greg Kurz
On Wed, 13 Jan 2016 20:26:25 +0100 Laurent Vivier wrote: > commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991 >vhost-net: tell tap backend about the vnet endianness > > makes vhost net to set the endianness of the device, but only for > the first device. > > In case of multiqueue, we have

[Qemu-devel] [V3 0/4] AMD IOMMU

2016-01-14 Thread David Kiarie
David Kiarie (4): hw/core: Add AMD IO MMU to machine properties hw/i386: ACPI table for AMD IO MMU hw/pci-host: Emulate AMD IO MMU hw/core/machine.c | 17 +- hw/i386/Makefile.objs |1 + hw/i386/acpi-build.c| 96 +++ hw/i386/amd_iommu.c | 1420

[Qemu-devel] [V3 3/4] hw/i386: ACPI table for AMD IO MMU

2016-01-14 Thread David Kiarie
Add IVRS table for AMD IO MMU. Also reverve MMIO region for IO MMU via ACPI Signed-off-by: David Kiarie --- hw/i386/acpi-build.c| 96 + include/hw/acpi/acpi-defs.h | 55 ++ 2 files changed, 151 insertions(+) diff --git

[Qemu-devel] [V3 2/4] hw/core: Add AMD IO MMU to machine properties

2016-01-14 Thread David Kiarie
Add IO MMU as a string to machine properties which is used to control whether and they type of IO MMU to emulate Signed-off-by: David Kiarie --- hw/core/machine.c | 17 + include/hw/boards.h | 3 ++- qemu-options.hx | 6 +++--- util/qemu-config.c | 4 ++-- 4 files chang

[Qemu-devel] [V3 4/4] hw/pci-host: Emulate AMD IO MMU

2016-01-14 Thread David Kiarie
Support AMD IO MMU emulation in q35 and piix chipsets Signed-off-by: David Kiarie --- hw/pci-host/piix.c | 11 +++ hw/pci-host/q35.c | 16 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 924f0fa..19e2930 1006

[Qemu-devel] [V3 1/4] hw/i386: Introduce AMD IO MMU

2016-01-14 Thread David Kiarie
From: David Add AMD IO MMU emulation to Qemu in addition to Intel IO MMU. The IO MMU does basic translation, error checking and has a minimal IOTLB implementation. Signed-off-by: David Kiarie --- hw/i386/Makefile.objs |1 + hw/i386/amd_iommu.c | 1420 +

Re: [Qemu-devel] [PATCH] vnc: fix tls-creds error message

2016-01-14 Thread Gerd Hoffmann
On Mi, 2016-01-13 at 11:36 +0100, Wolfgang Bumiller wrote: > The parameter is called 'tls-creds', 'credid' is just the > variable name in the code. Added to patch queue. thanks, Gerd

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-14 Thread Laurent Vivier
Le 14/01/2016 07:24, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > After host_to_target_sock_type(), the length of val may be changed, so > calculate the related lv, too. > > Signed-off-by: Chen Gang > --- > linux-user/syscall.c | 1 + > 1 file changed, 1 insertion(+) > > diff --

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread Pavel Fedin
Hello! > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to > remap SynIC > event/message pages and to enable/disable SynIC messages/events processing > in userspace. > > +

[Qemu-devel] [PATCH v3 0/3] nbd: Async built-in server negotiation

2016-01-14 Thread Fam Zheng
v3: Rework previous patch 2 (fix the busy loop bug and split to two patches). [Paolo] During nbd_send_negotiate, if the client simply doesn't respond, the function will not return, and the whole event loop is blocked. Make the I/O effectively asynchronous by using coroutine read/write, so tha

[Qemu-devel] [PATCH v3 2/3] nbd: Split nbd.c

2016-01-14 Thread Fam Zheng
We have NBD server code and client code, all mixed in a file. Now split them into separate files under nbd/, and update MAINTAINERS. filter_nbd for iotest 083 is updated to keep the log filtered out. Signed-off-by: Fam Zheng --- MAINTAINERS | 5 +- Makefile.objs

[Qemu-devel] [PATCH v3 3/3] nbd-server: Coroutine based negotiation

2016-01-14 Thread Fam Zheng
Create a coroutine in nbd_client_new, so that nbd_send_negotiate doesn't need qemu_set_block(). Handlers need to be set temporarily for csock fd in case the coroutine yields during I/O. With this, if the other end disappears in the middle of the negotiation, we don't block the whole event loop.

[Qemu-devel] [PATCH v3 1/3] nbd: Always call "close_fn" in nbd_client_new

2016-01-14 Thread Fam Zheng
Rename the parameter "close" to "close_fn" to disambiguous with close(2). This unifies error handling paths of NBDClient allocation: nbd_client_new will shutdown the socket and call the "close_fn" callback if negotiation failed, so the caller don't need a different path than the normal close. The

[Qemu-devel] [RFC 3/5] scripts/dump-guest-memory.py: Improve python 3 compatibility

2016-01-14 Thread Janosch Frank
This commit does not make the script python 3 compatible, it is a preparation that fixes the easy and common incompatibilities. Print is a function in python 3 and therefore needs braces around its arguments. Range does not cast a gdb.Value object to int in python 3, we have to do it ourselves.

[Qemu-devel] [RFC 1/5] scripts/dump-guest-memory.py: Move constants to the top

2016-01-14 Thread Janosch Frank
The constants bloated the class definition and were therefore moved to the top. Signed-off-by: Janosch Frank --- scripts/dump-guest-memory.py | 126 +-- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/scripts/dump-guest-memory.py b/scripts/

[Qemu-devel] [RFC 4/5] scripts/dump-guest-memory.py: Cleanup functions

2016-01-14 Thread Janosch Frank
Increase readability by adding newlines and comments, as well as removing wrong whitespaces and C style braces around conditionals and loops. Signed-off-by: Janosch Frank --- scripts/dump-guest-memory.py | 71 +++- 1 file changed, 50 insertions(+), 21 dele

[Qemu-devel] [RFC 0/5] scripts/dump-guest-memory.py: Add multi-arch support

2016-01-14 Thread Janosch Frank
The dump guest memory script for extracting a Linux core from a qemu core is currently limited to amd64 and python 2. With this series we add support for python 3 (while maintaining python 2 support) and add the possibility to extract dumps from VMs with the most common architectures. This was te

[Qemu-devel] [RFC 2/5] scripts/dump-guest-memory.py: Make methods functions

2016-01-14 Thread Janosch Frank
The functions dealing with qemu components rarely used parts of the class, so they were moved out of the class. As the uintptr_t variable is needed both within and outside the class, it was made a constant and moved to the top. Signed-off-by: Janosch Frank --- scripts/dump-guest-memory.py | 184

[Qemu-devel] [RFC 5/5] scripts/dump-guest-memory.py: Introduce multi-arch support

2016-01-14 Thread Janosch Frank
By modelling the ELF with ctypes we not only gain full python 3 support but can also create dumps for different architectures more easily. Signed-off-by: Janosch Frank --- scripts/dump-guest-memory.py | 484 --- 1 file changed, 321 insertions(+), 163 delet

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-14 Thread Chen Gang
On 2016年01月14日 16:15, Laurent Vivier wrote: > Le 14/01/2016 07:24, cheng...@emindsoft.com.cn a écrit : >> From: Chen Gang >> >> After host_to_target_sock_type(), the length of val may be changed, so >> calculate the related lv, too. >> >> Signed-off-by: Chen Gang >> --- >> linux-user/syscall.c |

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-14 Thread Laurent Vivier
Le 14/01/2016 10:01, Chen Gang a écrit : > On 2016年01月14日 16:15, Laurent Vivier wrote: >> Le 14/01/2016 07:24, cheng...@emindsoft.com.cn a écrit : >>> From: Chen Gang >>> >>> After host_to_target_sock_type(), the length of val may be changed, so >>> calculate the related lv, too. >>> >>> Signed-

[Qemu-devel] about the 'mptable' issue

2016-01-14 Thread Li, Liang Z
Hi Kevin, We just found when starting QEMU with the '-smp 20 -no-acpi' option, the centos6.6 or rhel 7.2 guest failed to boot. By debugging, I found it's your seabios patch, the commit id '9ee2e26255661a' caused the failure. I don't know what issue your patch tried to fix, assuming it's the r

Re: [Qemu-devel] [PATCH] intel_iommu: large page support

2016-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2016 at 12:47:24AM -0500, Jason Wang wrote: > Current intel_iommu only supports 4K page which may not be sufficient > to cover guest working set. This patch tries to enable 2M and 1G mapping > for intel_iommu. This is also useful for future device IOTLB > implementation to have a be

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-14 Thread Chen Gang
On 2016年01月14日 17:10, Laurent Vivier wrote: > > Le 14/01/2016 10:01, Chen Gang a écrit : >> >> I am not quite sure whether kernel always returns sizeof(int) (I guess, >> it should be). > > it can be 1 only if len is 1, but this is managed below. > Excuse me, I do not quite understand your mean

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-14 Thread Laurent Vivier
Le 14/01/2016 10:37, Chen Gang a écrit : > > On 2016年01月14日 17:10, Laurent Vivier wrote: >> >> Le 14/01/2016 10:01, Chen Gang a écrit : >>> >>> I am not quite sure whether kernel always returns sizeof(int) (I guess, >>> it should be). >> >> it can be 1 only if len is 1, but this is managed below

[Qemu-devel] [PATCH] cadence_gem: fix buffer overflow

2016-01-14 Thread Michael S. Tsirkin
gem_receive copies a packet received from network into an rxbuf[2048] array on stack, with size limited by descriptor length set by guest. If guest is malicious and specifies a descriptor length that is too large, and should packet size exceed array size, this results in a buffer overflow. Report

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-14 Thread Chen Gang
On 2016年01月14日 17:41, Laurent Vivier wrote: > > Le 14/01/2016 10:37, Chen Gang a écrit : >> >> On 2016年01月14日 17:10, Laurent Vivier wrote: >>> >>> Le 14/01/2016 10:01, Chen Gang a écrit : I am not quite sure whether kernel always returns sizeof(int) (I guess, it should be). >>> >>>

Re: [Qemu-devel] [V3 3/4] hw/i386: ACPI table for AMD IO MMU

2016-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2016 at 11:04:27AM +0300, David Kiarie wrote: > Add IVRS table for AMD IO MMU. Also reverve MMIO > region for IO MMU via ACPI > > Signed-off-by: David Kiarie > --- > hw/i386/acpi-build.c| 96 > + > include/hw/acpi/acpi-defs.h |

Re: [Qemu-devel] [PATCH V6 2/8] introduce aux-bus

2016-01-14 Thread KONRAD Frederic
Le 13/01/2016 22:02, Peter Crosthwaite a écrit : On Mon, Jan 4, 2016 at 10:25 AM, wrote: From: KONRAD Frederic This introduces a new bus: aux-bus. It contains an address space for aux slaves devices and a bridge to an I2C bus for I2C through AUX transactions. Signed-off-by: KONRAD Freder

Re: [Qemu-devel] [Qemu-arm] [PATCH] cadence_gem: fix buffer overflow

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 09:43, Michael S. Tsirkin wrote: > gem_receive copies a packet received from network into an rxbuf[2048] > array on stack, with size limited by descriptor length set by guest. If > guest is malicious and specifies a descriptor length that is too large, > and should packet si

Re: [Qemu-devel] [PATCH 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-14 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 02:36:53AM +0100, Laszlo Ersek wrote: > This matters mostly for Win7 installations that were converted with p2v. > Testing feedback from such environments would be appreciated. Just to note first that no RHEL customer has ever reported this bug to us. To test this is going

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 06:03, wrote: > From: Chen Gang > > Guest may allocate a readable, writable, and executable page, then write > data on the page, and execute data as code on the page too, then write > anther data still within the page. > > So remove this feature from linux-user: it not only

Re: [Qemu-devel] [PATCH 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-14 Thread Alex
Richard, I just posted HW test results to https://bugzilla.redhat.com/show_bug.cgi?id=1248758. Should I do it here instead? I'm not a RHEL customer, but I am semi-responsible for raising this fuss :) *From:* Richard W.m. J

Re: [Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-14 Thread Cornelia Huck
On Thu, 14 Jan 2016 09:01:49 +0100 Greg Kurz wrote: > On Wed, 13 Jan 2016 20:26:25 +0100 > Laurent Vivier wrote: > > > commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991 > >vhost-net: tell tap backend about the vnet endianness > > > > makes vhost net to set the endianness of the device, b

Re: [Qemu-devel] [V3 3/4] hw/i386: ACPI table for AMD IO MMU

2016-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2016 at 11:04:27AM +0300, David Kiarie wrote: > Add IVRS table for AMD IO MMU. Also reverve MMIO reserve? > region for IO MMU via ACPI It does not look like you reserve anything. Pls add a link to hardware spec (in the device implementation) so we can check what does real hardw

Re: [Qemu-devel] [Qemu-arm] [PATCH] cadence_gem: fix buffer overflow

2016-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2016 at 10:03:15AM +, Peter Maydell wrote: > On 14 January 2016 at 09:43, Michael S. Tsirkin wrote: > > gem_receive copies a packet received from network into an rxbuf[2048] > > array on stack, with size limited by descriptor length set by guest. If > > guest is malicious and

Re: [Qemu-devel] [PATCH v1 06/15] crypto: implement the LUKS block encryption format

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 04:43:15PM -0700, Eric Blake wrote: > On 01/12/2016 11:56 AM, Daniel P. Berrange wrote: > > Provide a block encryption implementation that follows the > > LUKS/dm-crypt specification. > > > > This supports all combinations of hash, cipher algorithm, > > cipher mode and iv g

Re: [Qemu-devel] Question regarding self-modifying code.

2016-01-14 Thread farmdve
Sorry about that. Somehow Google decided it should reply to you, rather than the mailing list. It was an honest mistake. Original question is below I am unable to get this part here if (!(tb_end <= start || tb_start >= end)) in tb_invalidate_phys_page_range What would happen if code forward mod

Re: [Qemu-devel] [PATCH v1 08/15] block: add generic full disk encryption driver

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 04:47:47PM -0700, Eric Blake wrote: > On 01/12/2016 11:56 AM, Daniel P. Berrange wrote: > > Add a block driver that is capable of supporting any full disk > > encryption format. This utilizes the previously added block > > encryption code, and at this time supports the LUKS

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread 'Roman Kagan'
On Thu, Jan 14, 2016 at 11:30:43AM +0300, Pavel Fedin wrote: > > --- a/Documentation/virtual/kvm/api.txt > > +++ b/Documentation/virtual/kvm/api.txt > > @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to > > remap SynIC > > event/message pages and to enable/disable SynIC m

Re: [Qemu-devel] [PATCH 3/4] acpi: stash the OEM ID and OEM Table ID fields from an external SLIC table

2016-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2016 at 02:36:56AM +0100, Laszlo Ersek wrote: > The SLIC table is not generated by QEMU. If the user specifies an external > one however, then board-specific code might want to adapt other, > auto-generated tables to it. This patch saves the OEM ID and OEM Table ID > fields from the

Re: [Qemu-devel] [PATCH 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-14 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 01:06:05PM +0300, Alex wrote: > Richard, I just posted HW test results to > https://bugzilla.redhat.com/show_bug.cgi?id=1248758. > Should I do it here instead? I saw that. Testing a virt-p2v conversion is a lot more involved. It would involve something like this: (1) Ins

Re: [Qemu-devel] [PATCH] cadence_gem: fix buffer overflow

2016-01-14 Thread P J P
+-- On Thu, 14 Jan 2016, Michael S. Tsirkin wrote --+ | gem_receive copies a packet received from network into an rxbuf[2048] | array on stack, with size limited by descriptor length set by guest. If | guest is malicious and specifies a descriptor length that is too large, | and should packet size

Re: [Qemu-devel] [PATCH 4/4] pc: set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-14 Thread Michael S. Tsirkin
On Thu, Jan 14, 2016 at 02:36:57AM +0100, Laszlo Ersek wrote: > The Microsoft spec about the SLIC and MSDM ACPI tables at > requires the OEM ID and > OEM Table ID fields to be consistent between the SLIC and the RSDT/XSDT. > That further affects the

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Chen Gang
On 2016年01月14日 18:05, Peter Maydell wrote: > On 14 January 2016 at 06:03, wrote: >> From: Chen Gang >> >> Guest may allocate a readable, writable, and executable page, then write >> data on the page, and execute data as code on the page too, then write >> anther data still within the page. >> >>

Re: [Qemu-devel] Question regarding self-modifying code.

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 10:15, farmdve wrote: > Sorry about that. Somehow Google decided it should reply to you, rather than > the mailing list. It was an honest mistake. > > Original question is below > > > I am unable to get this part here if (!(tb_end <= start || tb_start >= end)) > in tb_invalid

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 10:26, Chen Gang wrote: > On 2016年01月14日 18:05, Peter Maydell wrote: >> If we don't mark the page as non-writeable when we generate a TB >> from it, how do we detect when guest code later writes to that >> page (which means we need to invalidate the TB) ? >> > > For me, what

Re: [Qemu-devel] about the 'mptable' issue

2016-01-14 Thread Li, Liang Z
Correct something. The actual parameter for QEMU in our test case is: 'qemu-systerm-x86_64 -enable-kvm -smp 20 -m 2048 -no-acpi -monitor stdio -drive file=/mnt/centos6u6.qcow, if=none, id=foo -device virtio-blk-pci, drive=foo' if there is no virtio-blk device: ' qemu-systerm-x86_64 -enable

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Chen Gang
On 2016年01月14日 18:30, Peter Maydell wrote: > On 14 January 2016 at 10:26, Chen Gang wrote: >> On 2016年01月14日 18:05, Peter Maydell wrote: >>> If we don't mark the page as non-writeable when we generate a TB >>> from it, how do we detect when guest code later writes to that >>> page (which means we

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread Pavel Fedin
Hello! > We thought reusing KVM_EXIT_HYPERCALL was a bad idea exactly because of > that. Hypercalls are not universal, the calling and return conventions > are hypervisor-specific. Treatment of them is hypervisor-specific, but from CPUs point of view they are the same. You load something into

Re: [Qemu-devel] [PULL 0/6] migration fixes

2016-01-14 Thread Peter Maydell
On 13 January 2016 at 10:40, Amit Shah wrote: > The following changes since commit 649a1bbaf95adb228f1030ab0618a932bc26aa8b: > > Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' > into staging (2016-01-12 17:37:22 +) > > are available in the git repository at: > >

Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors

2016-01-14 Thread Peter Maydell
On 5 November 2015 at 20:05, John Snow wrote: > > > On 10/01/2015 09:38 AM, Paolo Bonzini wrote: >> >> >> On 01/10/2015 12:47, Peter Maydell wrote: >>> On 29 May 2015 at 12:12, Paolo Bonzini wrote: On 29/05/2015 12:56, Peter Maydell wrote: > Paolo: ping^2, since we're out o

Re: [Qemu-devel] [PATCH v2 09/10] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property

2016-01-14 Thread Stefan Hajnoczi
On Thu, Jan 07, 2016 at 07:44:13PM +0100, Lluís Vilanova wrote: > Stefan Hajnoczi writes: > > > On Tue, Nov 24, 2015 at 06:09:36PM +0100, Lluís Vilanova wrote: > >> @@ -227,6 +228,17 @@ void cpu_dump_statistics(CPUState *cpu, FILE *f, > >> fprintf_function cpu_fprintf, > >> void cpu_reset(CPUStat

Re: [Qemu-devel] Minutes from the "Stuttgart block Gipfele"

2016-01-14 Thread Stefan Hajnoczi
On Mon, Jan 11, 2016 at 04:10:12PM +0100, Kevin Wolf wrote: > Am 23.12.2015 um 09:33 hat Stefan Hajnoczi geschrieben: > > On Fri, Dec 18, 2015 at 02:15:38PM +0100, Markus Armbruster wrote: > > Another problem is that the backup block job and other operations that > > require a single command today

[Qemu-devel] [PATCH 5/8] qmp: create QMP implementation of loadvm command

2016-01-14 Thread Denis V. Lunev
Unfortunately load_vmstate has a return code (int) and this code is checked in the other places. Thus we could not just rename it to qmp_loadvm as returns void. Signed-off-by: Denis V. Lunev CC: Juan Quintela CC: Amit Shah CC: Markus Armbruster CC: Eric Blake --- migration/savevm.c | 10

[Qemu-devel] [PATCH 3/8] qmp: create qmp_delvm command

2016-01-14 Thread Denis V. Lunev
The patch also moves hmp_delvm implementation into hmp.c. This function is just a simple wrapper now and does not have knowledge about migration internals. Signed-off-by: Denis V. Lunev CC: Juan Quintela CC: Amit Shah CC: Markus Armbruster CC: Eric Blake --- hmp.c | 11 +

[Qemu-devel] [PATCH 4/8] migration: improve error reporting for load_vmstate

2016-01-14 Thread Denis V. Lunev
The patch adds Error ** parameter to load_vmstate call and fills error inside. The caller after that properly reports error either through monitor or via local stderr facility during VM start. This helper will be useful too for qmp_loadvm implementation. Signed-off-by: Denis V. Lunev CC: Juan Qu

[Qemu-devel] [PATCH 1/8] migration: split hmp_savevm to migrate_savevm and hmp_savevm wrapper

2016-01-14 Thread Denis V. Lunev
This would be useful in the next step when QMP version of this call will be introduced. The patch also moves snapshot name generation to the hmp specific code as QMP version of this code will require the name on the protocol level. Addition of migration_savevm to migration/migration.h is temporary

[Qemu-devel] [PATCH 7/8] migration, qmp: add optional argument to specify BDS to save VM state to

2016-01-14 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Juan Quintela CC: Amit Shah CC: Markus Armbruster CC: Eric Blake --- block/snapshot.c | 40 ++-- hmp.c| 2 +- include/block/snapshot.h | 2 +- migration/savevm.c | 11

[Qemu-devel] [PATCH v5 0/8] QMP wrappers for VM snapshot operations

2016-01-14 Thread Denis V. Lunev
EFI based VM with pflash storage for NVRAM could not be snapshoted as libvirt configures storage as 'raw' and writable. OK, this is a libvirt problem. Another problem is that libvirt can not detect this failure at all as it uses HMP for this operation. This create snapshot/delete snapshot sequence

[Qemu-devel] [PATCH 8/8] block: allow to skip block driver in selection of one for VM state saving

2016-01-14 Thread Denis V. Lunev
Some block drives like PFLASH ones in OVFM setup are not suitable for VM state saving. Allow option to ban them in this selection. Signed-off-by: Denis V. Lunev CC: Kevin Wolf --- block.c | 7 +++ block/snapshot.c | 10 ++ include/block/block_int.h | 3 +

[Qemu-devel] [PATCH 2/8] qmp: create qmp_savevm command

2016-01-14 Thread Denis V. Lunev
'name' attribute is made mandatory in distinction with HMP command. The patch also moves hmp_savevm implementation into hmp.c. This function is just a simple wrapper now and does not have knowledge about migration internals. Signed-off-by: Denis V. Lunev CC: Juan Quintela CC: Amit Shah CC: Mar

[Qemu-devel] [PATCH 6/8] migration, block: better select BDS for VM state loading

2016-01-14 Thread Denis V. Lunev
This patch does 2 things: - it merges all snapshot validity checks for load_vmstate into one function - it now selects BDS to load VM state by availability of the state in the snapshot This commit is preparatory to allow to select BDS to save snapshot for QMP. Signed-off-by: Denis V. Lunev CC:

Re: [Qemu-devel] [PATCH 1/1] RESUME blk: do not select PFLASH device for internal snapshot

2016-01-14 Thread Denis V. Lunev
On 01/12/2016 09:03 AM, Denis V. Lunev wrote: There is a long-long story. OVMF VMs can not be snapsotted using 'virsh snapshot' as they have "pflash" device which is configured as "raw" image. There was a discussion in the past about that. results of the discussion are available in this submiss

Re: [Qemu-devel] [PATCH v7] spec: add qcow2 bitmaps extension specification

2016-01-14 Thread Denis V. Lunev
On 01/12/2016 03:30 AM, John Snow wrote: On 01/11/2016 08:05 AM, Vladimir Sementsov-Ogievskiy wrote: The new feature for qcow2: storing bitmaps. This patch adds new header extension to qcow2 - Bitmaps Extension. It provides an ability to store virtual disk related bitmaps in a qcow2 image. For

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread 'Roman Kagan'
On Thu, Jan 14, 2016 at 01:50:20PM +0300, Pavel Fedin wrote: > > We thought reusing KVM_EXIT_HYPERCALL was a bad idea exactly because of > > that. Hypercalls are not universal, the calling and return conventions > > are hypervisor-specific. > > Treatment of them is hypervisor-specific, but from

Re: [Qemu-devel] [Qemu-block] [PATCH v1 10/15] qcow2: convert QCow2 to use QCryptoBlock for encryption

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 07:42:20PM +0100, Kevin Wolf wrote: > Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > > This converts the qcow2 driver to make use of the QCryptoBlock > > APIs for encrypting image content. As well as continued support > > for the legacy QCow2 encryption format,

Re: [Qemu-devel] [V3 3/4] hw/i386: ACPI table for AMD IO MMU

2016-01-14 Thread David kiarie
On Thu, Jan 14, 2016 at 1:09 PM, Michael S. Tsirkin wrote: > On Thu, Jan 14, 2016 at 11:04:27AM +0300, David Kiarie wrote: >> Add IVRS table for AMD IO MMU. Also reverve MMIO > > reserve? Yeah, typo. > >> region for IO MMU via ACPI > > > It does not look like you reserve anything. > > Pls add a

Re: [Qemu-devel] [PATCH v1 05/15] crypto: add block encryption framework

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 04:40:31PM -0700, Eric Blake wrote: > On 01/12/2016 11:56 AM, Daniel P. Berrange wrote: > > Add a generic framework for support different block encryption > > formats. Upon instantiating a QCryptoBlock object, it will read > > the encryption header and extract the encryption

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-14 Thread Kevin Wolf
Am 06.01.2016 um 17:30 hat Max Reitz geschrieben: > On 06.01.2016 17:28, Eric Blake wrote: > > On 01/06/2016 09:20 AM, Max Reitz wrote: > > > >>> If I take a snapshot while the guest sees a 1G disk, then resize the > >>> disk to 2G, then roll back to the point in time of the snapshot, I'd > >>> ex

Re: [Qemu-devel] [PATCH v1 02/15] crypto: add support for PBKDF2 algorithm

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 01:53:27PM +0800, Fam Zheng wrote: > On Tue, 01/12 18:56, Daniel P. Berrange wrote: > > +#if defined CONFIG_NETTLE > > +#include "crypto/pbkdf-nettle.c" > > +#elif defined CONFIG_GCRYPT > > +#include "crypto/pbkdf-gcrypt.c" > > +#else /* ! CONFIG_GCRYPT */ > > +#include "cry

[Qemu-devel] [PATCH v3 2/2] change type of pci_bridge_initfn() to void

2016-01-14 Thread Cao jin
Since it can`t fail. Also modify the callers. Signed-off-by: Cao jin Reviewed-by: Markus Armbruster --- hw/pci-bridge/i82801b11.c | 5 + hw/pci-bridge/ioh3420.c| 6 +- hw/pci-bridge/pci_bridge_dev.c | 8 +++- hw/pci-bridge/xio3130_downstream.c | 6 +- hw

[Qemu-devel] [PATCH v3 0/2] change type of pci_bridge_initfn()

2016-01-14 Thread Cao jin
v3 changelog: 1. Just tweaked the commit message. Test: 1. Compiled. 2. Did a hack to test dec bridge realization, prove it is ok after patch. Will reply this mail to attach the screenshot. Cao jin (2): dec: convert to realize() change type of pci_bridge_initfn() to void hw/pci-bridge/de

[Qemu-devel] [PATCH v3 1/2] dec: convert to realize()

2016-01-14 Thread Cao jin
Also because pci_bridge_initfn() can`t fail. Signed-off-by: Cao jin Reviewed-by: Markus Armbruster --- hw/pci-bridge/dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index 28d0ff9..be0fc46 100644 --- a/hw/pci-bridge/dec.c

Re: [Qemu-devel] [PATCH] hw/pci: do not update the PCI mappings while Decode (I/O or memory) bit is not set in the Command register

2016-01-14 Thread Marcel Apfelbaum
On 01/11/2016 08:57 PM, Marcel Apfelbaum wrote: On 01/11/2016 08:44 PM, Laszlo Ersek wrote: On 01/11/16 19:01, Marcel Apfelbaum wrote: On 01/11/2016 07:15 PM, Laszlo Ersek wrote: On 01/11/16 17:34, Marcel Apfelbaum wrote: On 01/11/2016 06:11 PM, Laszlo Ersek wrote: On 01/11/16 13:24, Marcel

Re: [Qemu-devel] [V3 3/4] hw/i386: ACPI table for AMD IO MMU

2016-01-14 Thread David kiarie
On Thu, Jan 14, 2016 at 1:09 PM, Michael S. Tsirkin wrote: > On Thu, Jan 14, 2016 at 11:04:27AM +0300, David Kiarie wrote: >> Add IVRS table for AMD IO MMU. Also reverve MMIO > > reserve? > >> region for IO MMU via ACPI > > > It does not look like you reserve anything. > > Pls add a link to hardwa

Re: [Qemu-devel] [PULL 0/1] virtio-serial qom'ification fix

2016-01-14 Thread Peter Maydell
On 13 January 2016 at 10:44, Amit Shah wrote: > The following changes since commit 649a1bbaf95adb228f1030ab0618a932bc26aa8b: > > Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' > into staging (2016-01-12 17:37:22 +) > > are available in the git repository at: > >

Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors

2016-01-14 Thread Paolo Bonzini
On 14/01/2016 12:15, Peter Maydell wrote: > On 5 November 2015 at 20:05, John Snow wrote: >> >> >> On 10/01/2015 09:38 AM, Paolo Bonzini wrote: >>> >>> >>> On 01/10/2015 12:47, Peter Maydell wrote: On 29 May 2015 at 12:12, Paolo Bonzini wrote: > > > On 29/05/2015 12:56, Peter M

Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 12:44, Paolo Bonzini wrote: > On 14/01/2016 12:15, Peter Maydell wrote: >> Not that I saw -- ping again, Paolo. This is the only warning >> that clang's sanitizer currently produces for me, and arithmetic >> overflows on addition seem genuinely worth investigation... > > It h

Re: [Qemu-devel] [Qemu-block] [PATCH v1 10/15] qcow2: convert QCow2 to use QCryptoBlock for encryption

2016-01-14 Thread Kevin Wolf
Am 14.01.2016 um 13:14 hat Daniel P. Berrange geschrieben: > On Wed, Jan 13, 2016 at 07:42:20PM +0100, Kevin Wolf wrote: > > Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > > > +static ssize_t qcow2_fde_header_read_func(QCryptoBlock *block, > > > +

Re: [Qemu-devel] [PATCH 06/10] qemu-img: Prepare for locked images

2016-01-14 Thread Markus Armbruster
Kevin Wolf writes: > Am 13.01.2016 um 09:44 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 12.01.2016 um 16:20 hat Markus Armbruster geschrieben: >> >> Kevin Wolf writes: >> >> >> >> > Am 11.01.2016 um 16:49 hat Markus Armbruster geschrieben: >> >> >> Eric Blake writes:

Re: [Qemu-devel] [PULL 0/9] First set of s390x patches for 2.6

2016-01-14 Thread Peter Maydell
On 13 January 2016 at 15:01, Cornelia Huck wrote: > The following changes since commit 649a1bbaf95adb228f1030ab0618a932bc26aa8b: > > Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' > into staging (2016-01-12 17:37:22 +) > > are available in the git repository at: >

Re: [Qemu-devel] Status of my hacks on the MTTCG WIP branch

2016-01-14 Thread Alex Bennée
Alex Bennée writes: > Pranith Kumar writes: > >> Hi Alex, >> >> On Tue, Jan 12, 2016 at 12:29 PM, Alex Bennée >> wrote: >> >>> >> https://github.com/stsquad/qemu/tree/mttcg/multi_tcg_v8_wip_ajb_fix_locks >>> >> >> I built this branch and ran an arm64 guest. It seems to be failing >> similarly

Re: [Qemu-devel] Status of my hacks on the MTTCG WIP branch

2016-01-14 Thread KONRAD Frederic
Le 14/01/2016 14:10, Alex Bennée a écrit : Alex Bennée writes: Pranith Kumar writes: Hi Alex, On Tue, Jan 12, 2016 at 12:29 PM, Alex Bennée wrote: https://github.com/stsquad/qemu/tree/mttcg/multi_tcg_v8_wip_ajb_fix_locks I built this branch and ran an arm64 guest. It seems to be failin

[Qemu-devel] [PATCH 08/51] coreaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio_legacy.c | 10 ++ audio/coreaudio.c| 47 ++- 2 files changed, 20 insertions(+), 37 deletions(-) diff --git a/audio/audio_legacy.c b/audio/audio_legacy.c index bc830c5..4be972e 100644 --- a/audio

[Qemu-devel] [PATCH 03/51] qapi: qapi for audio backends

2016-01-14 Thread Kővágó, Zoltán
This patch adds structures into qapi to replace the existing configuration structures used by audio backends currently. This qapi will be the base of the -audiodev command line parameter (that replaces the old environment variables based config). This is not a 1:1 translation of the old options, I

[Qemu-devel] [PATCH 01/51] qapi: support implicit structs in OptsVisitor

2016-01-14 Thread Kővágó, Zoltán
They are required for flat unions (you still have to allocate the structs). Signed-off-by: Kővágó, Zoltán --- qapi/opts-visitor.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index ef5fb8b..1820d54 100644 --- a/qapi/opts-visitor.c

[Qemu-devel] [PATCH 00/51] audio 5.1 patches

2016-01-14 Thread Kővágó, Zoltán
Hi, Sorry guys, I've disappeared for a while... But anyways, I've updated my 5.1 audio patches to git master. About qapi flattening. That didn't really work last time, so now I've modified OptsVisitor to support both the old way of operation (ignoring structs) and the new way (requiring fully q

[Qemu-devel] [PATCH 02/51] qapi: support nested structs in OptsVisitor

2016-01-14 Thread Kővágó, Zoltán
From: Kővágó, Zoltán The current OptsVisitor flattens the whole structure, if there are same named fields under different paths (like `in' and `out' in `Audiodev'), the current visitor can't cope with them (for example setting `frequency=44100' will set the in's frequency to 44100 and leave out's

[Qemu-devel] [PATCH 04/51] audio: use qapi AudioFormat instead of audfmt_e

2016-01-14 Thread Kővágó, Zoltán
I had to include an enum for audio sampling formats into qapi, but that meant duplicating the audfmt_e enum. This patch replaces audfmt_e and associated values with the qapi generated AudioFormat enum. This patch is mostly a search-and-replace, except for switches where the qapi generated AUDIO_F

[Qemu-devel] [PATCH 14/51] spiceaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/spiceaudio.c | 5 - 1 file changed, 5 deletions(-) diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index e6da29a..a9b9a1d 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -371,10 +371,6 @@ static int line_in_ctl (HWVoiceIn *hw, int cmd,

[Qemu-devel] [PATCH 10/51] noaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/noaudio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/audio/noaudio.c b/audio/noaudio.c index 108b02d..4c94a26 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -161,7 +161,6 @@ static struct audio_pcm_ops no_pcm_ops = { struct audio_driver no_a

[Qemu-devel] [PATCH 05/51] audio: -audiodev command line option: documentation

2016-01-14 Thread Kővágó, Zoltán
This patch adds documentation of an -audiodev command line option, that deprecates the old QEMU_* environment variables for audio backend configuration. It's syntax is similar to existing options (-netdev, -device, etc): -audiodev driver_name,property=value,... Although now it's possible to sp

[Qemu-devel] [PATCH 22/51] paaudio: properly disconnect streams in fini_*

2016-01-14 Thread Kővágó, Zoltán
Currently this needs a workaround due to bug #74624 in pulseaudio. Reviewed-by: Marc-André Lureau Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 53561dd..c9b2f

[Qemu-devel] [PATCH 07/51] alsaaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c| 310 ++- audio/audio_legacy.c | 64 +++ 2 files changed, 148 insertions(+), 226 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index e545766..67060f8 100644 --- a/au

[Qemu-devel] [PATCH 09/51] dsoundaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio_legacy.c| 12 ++ audio/dsound_template.h | 6 ++--- audio/dsoundaudio.c | 59 ++--- 3 files changed, 32 insertions(+), 45 deletions(-) diff --git a/audio/audio_legacy.c b/audio/audio_legacy

[Qemu-devel] [PATCH 11/51] ossaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio_legacy.c | 17 ++ audio/ossaudio.c | 153 ++- 2 files changed, 59 insertions(+), 111 deletions(-) diff --git a/audio/audio_legacy.c b/audio/audio_legacy.c index bcf87ff..3d9f212 100644 --- a/au

[Qemu-devel] [PATCH 13/51] sdlaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio_legacy.c | 7 +++ audio/sdlaudio.c | 22 -- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/audio/audio_legacy.c b/audio/audio_legacy.c index 3eab2b9..4d8e2b9 100644 --- a/audio/audio_legacy.c +++ b/audio/

[Qemu-devel] [PATCH 20/51] audio: audiodev= parameters no longer optional when -audiodev present

2016-01-14 Thread Kővágó, Zoltán
Reviewed-by: Marc-André Lureau Signed-off-by: Kővágó, Zoltán --- Changes from v1: * (probably) more clear error messages --- audio/audio.c | 19 +++- audio/paaudio.c | 297 2 files changed, 185 insertions(+), 131 deletions(-) diff --

[Qemu-devel] [PATCH 15/51] wavaudio: port to -audiodev config

2016-01-14 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio_legacy.c | 10 + audio/wavaudio.c | 58 2 files changed, 19 insertions(+), 49 deletions(-) diff --git a/audio/audio_legacy.c b/audio/audio_legacy.c index 4d8e2b9..2004097 100644 --- a/a

  1   2   3   >