Re: [Qemu-devel] [PATCH] disas/libvixl: Really suppress gcc 4.6.3 sign-compare warnings

2016-01-14 Thread Alex Bennée
Peter Maydell writes: > Commit 8acc216b956 attempted to silence some sign-compare > warnings in libvixl by adding -Wno-sign-compare to the CFLAGS > for the relevant objects. Unfortunately it was ineffective > because it was placed before $(QEMU_CFLAGS), so the -Wall in

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/14/2016 04:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 14, 2016 at 03:30:41PM +0100, Laszlo Ersek wrote: 2. The same as with pxb, disable Integrated End points for pxb-pcie. My vote, without a doubt. Yea, me too. On a related note: I wonder whether enough resources will be

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

2016-01-14 Thread Kővágó Zoltán
Hi, 2016-01-14 15:34 keltezéssel, Victor Toso írta: Hi, On Thu, Jan 14, 2016 at 02:45:13PM +0100, Kővágó, Zoltán wrote: 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,

Re: [Qemu-devel] [PATCH] block: acquire in bdrv_query_image_info

2016-01-14 Thread Max Reitz
On 23.12.2015 11:48, Paolo Bonzini wrote: > NFS calls aio_poll inside bdrv_get_allocated_size. This requires > acquiring the AioContext. > > Signed-off-by: Paolo Bonzini > --- > block/qapi.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Thanks, applied

Re: [Qemu-devel] [RFC] target-i386: Display i386 CPUID properties

2016-01-14 Thread Valentin Rakush
On Tue, Jan 12, 2016 at 5:50 PM, Daniel P. Berrange wrote: > On Tue, Jan 12, 2016 at 05:36:27PM +0300, Valentin Rakush wrote: > > This is RFC because implementation depends on the upcoming class > > properties > >

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 Michael S. Tsirkin
On Thu, Jan 14, 2016 at 05:23:27PM +0200, Marcel Apfelbaum wrote: > On 01/14/2016 04:49 PM, Michael S. Tsirkin wrote: > >On Thu, Jan 14, 2016 at 03:30:41PM +0100, Laszlo Ersek wrote: > >>>2. The same as with pxb, disable Integrated End points for pxb-pcie. > >> > >>My vote, without a doubt. > > >

Re: [Qemu-devel] [Qemu-block] [PATCH v3 2/2] iotests: Test that negative and large throttle values are rejected

2016-01-14 Thread Max Reitz
On 14.01.2016 05:08, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/051| 12 > tests/qemu-iotests/051.out| 24 > tests/qemu-iotests/051.pc.out | 24 > 3 files changed, 60

Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/2] blockdev: Error out on negative throttling option values

2016-01-14 Thread Max Reitz
On 14.01.2016 05:08, Fam Zheng wrote: > The implicit casting from unsigned int to double changes negative values > into large positive numbers and accepts them. We should instead print > an error. > > Check the number range so this case is caught and reported. > > Signed-off-by: Fam Zheng

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

2016-01-14 Thread Kevin O'Connor
CC'ing the seabios mailing list. On Thu, Jan 14, 2016 at 10:36:07AM +, Li, Liang Z wrote: > 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,

Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/2] blockdev: Error out on negative throttling option values

2016-01-14 Thread Max Reitz
On 14.01.2016 16:46, Max Reitz wrote: > On 14.01.2016 05:08, Fam Zheng wrote: >> The implicit casting from unsigned int to double changes negative values >> into large positive numbers and accepts them. We should instead print >> an error. >> >> Check the number range so this case is caught and

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

2016-01-14 Thread Jan Kiszka
On 2016-01-14 16:39, Michael S. Tsirkin wrote: > On Thu, Jan 14, 2016 at 03:15:38PM +0300, David kiarie wrote: >> 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

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

2016-01-14 Thread Laszlo Ersek
On 01/14/16 09:48, Janosch Frank wrote: > 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 >

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

2016-01-14 Thread Laszlo Ersek
On 01/14/16 09:48, Janosch Frank wrote: > 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

Re: [Qemu-devel] [PATCH] block: Fix .bdrv_open flags

2016-01-14 Thread Stefan Hajnoczi
On Mon, Jan 11, 2016 at 07:32:36PM +0100, Kevin Wolf wrote: > bdrv_common_open() modified bs->open_flags after inferring the set of > options to pass to the driver's .bdrv_open callback. This means that the > cache options were correctly set in bs->open_flags (and therefore > correctly displayed

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

2016-01-14 Thread Kevin O'Connor
On Thu, Jan 14, 2016 at 07:29:40PM +0300, David kiarie wrote: > On Thu, Jan 14, 2016 at 7:19 PM, Jan Kiszka wrote: > > On 2016-01-14 17:09, David kiarie wrote: > >> On Thu, Jan 14, 2016 at 6:42 PM, Jan Kiszka wrote: > >>> On 2016-01-14 16:39, Michael S.

Re: [Qemu-devel] [PATCH v5 0/5] Xen PCI passthru: Convert to realize()

2016-01-14 Thread Stefano Stabellini
Eric, I'll wait for your reviewed-by on the whole series before committing. Thanks, Stefano On Wed, 13 Jan 2016, Cao jin wrote: > v5 changelog: > 1. tweaked the commit message of patch 1/5 as sugguested. > 2. xen_host_pci_sysfs_path() modification as sugguested. > 3. remove local 'value'

Re: [Qemu-devel] [PATCH v2] target-arm: raise exception on misaligned LDREX operands

2016-01-14 Thread alvise rigo
Forcing an unaligned LDREX access in aarch32, QEMU fails the following assert: target-arm/helper.c:5921:regime_el: code should not be reached Running this snippet both baremetal and on top of Linux will trigger the problem: static inline int cmpxchg(volatile void *ptr, unsigned int old,

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/14/2016 05:37 PM, Michael S. Tsirkin wrote: On Thu, Jan 14, 2016 at 05:23:27PM +0200, Marcel Apfelbaum wrote: On 01/14/2016 04:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 14, 2016 at 03:30:41PM +0100, Laszlo Ersek wrote: 2. The same as with pxb, disable Integrated End points for

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

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 04:41:01PM +0800, Fam Zheng wrote: > 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

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

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 04:41:02PM +0800, Fam Zheng wrote: > 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

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 Michael S. Tsirkin
On Thu, Jan 14, 2016 at 07:20:32PM +0200, Marcel Apfelbaum wrote: > On 01/14/2016 05:37 PM, Michael S. Tsirkin wrote: > >On Thu, Jan 14, 2016 at 05:23:27PM +0200, Marcel Apfelbaum wrote: > >>On 01/14/2016 04:49 PM, Michael S. Tsirkin wrote: > >>>On Thu, Jan 14, 2016 at 03:30:41PM +0100, Laszlo

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

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 04:41:03PM +0800, Fam Zheng wrote: > 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

Re: [Qemu-devel] [PATCH v2] target-arm: raise exception on misaligned LDREX operands

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 18:00, alvise rigo wrote: > Forcing an unaligned LDREX access in aarch32, QEMU fails the following assert: > target-arm/helper.c:5921:regime_el: code should not be reached > > Running this snippet both baremetal and on top of Linux will trigger

[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

[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

[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

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

[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

[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 +

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 > --- >

[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

[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 +-

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

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 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.

[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

[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

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

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] [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

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)

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

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 >=

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

[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,

[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

[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 ---

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

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

[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.

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

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 > + >

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.

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

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

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, >

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

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

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

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

[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

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

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.

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

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

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:

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

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

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

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] 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

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,

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

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

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 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

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

[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

[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

[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

[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

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 > >>>

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

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

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

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:

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] 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: >

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] 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

[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

[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

[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

[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

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.

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

[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

  1   2   3   >