[Qemu-devel] [PATCH v2] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-11 Thread Michael Tokarev
Omit one unnecessary memory allocation for components of the path and create the resulting path directly given lengths of the components. Do not use basename(3) because there are 2 versions of this function which differs when argument ends with slash character, use strrchr() instead so we have con

Re: [Qemu-devel] [PATCH] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-11 Thread Michael Tokarev
10.03.2015 20:30, Aneesh Kumar K.V wrote: > Michael Tokarev writes: > >> Omit one unnecessary memory allocation for components of the path >> and create the resulting path directly given lengths of the components. >> >> This uses (char*) cast because basename() accepts a char* without const, >> f

[Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-11 Thread Fam Zheng
Currently we could leave PCI IRQ asserted even after reset, it is safer to clear it. In the case that a buggy driver has disabled MSI-X unintentially, we may have already injected IRQ in previous virtio_pci_notify, which will not be cleared by guest because it doesn't expect it (i.e. no irq handle

Re: [Qemu-devel] wrong size for virtio-scsi headers

2015-03-11 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 03:24:40AM +, Gonglei (Arei) wrote: > Hi, > > Today I start a vm failed, and get the following log: > > qemu-system-x86_64: wrong size for virtio-scsi headers > > 1) The Qemu command line: > > ./qemu-system-x86_64 -enable-kvm -m 4096 -smp 4 -name suse -device > virt

[Qemu-devel] [PATCH v2] 9pfs-proxy: tiny cleanups in proxy_pwritev and proxy_preadv

2015-03-11 Thread Michael Tokarev
Don't compare syscall return with -1, use "<0" condition. Don't introduce useless local variables when we already have similar variable Rename local variable to be consistent with other usages Finally make the two methods, read and write, to be similar to each other Signed-off-by: Michael Tokarev

Re: [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu.

2015-03-11 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 11:34:35AM +1030, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > On Wed, Mar 11, 2015 at 10:06:40PM +1030, Rusty Russell wrote: > >> Each entry in the ring is a pair: \field{id} indicates the head > >> entry of the descriptor chain describing the bu

Re: [Qemu-devel] [PATCH] 9pfs-proxy: tiny cleanups in proxy_pwritev and proxy_preadv

2015-03-11 Thread Michael Tokarev
10.03.2015 20:23, Aneesh Kumar K.V wrote: []> > I am not sure this is needed, whether to use int err or int ret as the > variable name is simply a matter of preference for the author. We have 2 filesystem methods in here, read and write, one near another, which are written by the same author (but

[Qemu-devel] configure: enable kvm on x32

2015-03-11 Thread Michael Tokarev
Here's a trivial change to enable kvm on x32 architecture. I'm not 100% sure the result works correctly in all cases, but this is a good start and in theory everything should work. Signed-off-by: Adam Borowski Signed-off-by: Michael Tokarev diff --git a/configure b/configure index 47048f0..d2e6

[Qemu-devel] Coverity model of g_malloc_n & Co.

2015-03-11 Thread Jan Kiszka
Hi Markus, due to a lack of publicly available documentation on the Coverity modeling language (or my blindness to find it), I was about to steal some patterns from QEMU (to improve the kmalloc model for the kernel). I think I stumbled over some inconsistency: Don't we need to allocate the calcula

Re: [Qemu-devel] [Qemu-Dev-QUERY] Related to Live Migration source Code or API for NUMA Node specific

2015-03-11 Thread Arkajit Ghosh
Hi Team, Can anyone please provide their point of views related to my below query. Thanks & Regards Arkajit Ghosh -Arkajit Ghosh/DEL/TCS wrote: - To: qemu-devel@nongnu.org From: Arkajit Ghosh/DEL/TCS Date: 03/11/2015 09:49PM Subject: Re: [Qem

[Qemu-devel] [PATCH] vnc: fix segmentation fault when invalid vnc parameters are specified

2015-03-11 Thread arei.gonglei
From: Gonglei Reproducer: #./qemu-system-x86_64 -vnc :0,ip qemu-system-x86_64: -vnc :1,ip: Invalid parameter 'ip' Segmentation fault (core dumped) Signed-off-by: Gonglei --- This patch bases on Gerd's vnc queue. --- ui/vnc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -

Re: [Qemu-devel] wrong size for virtio-scsi headers

2015-03-11 Thread Gonglei
On 2015/3/12 11:31, Fam Zheng wrote: > On Thu, 03/12 03:24, Gonglei (Arei) wrote: >> qemu-system-x86_64: wrong size for virtio-scsi headers > > qemu-devel is already filled with report/discussion/fix/pull on this :) > Oh, good, thanks for reminder. :) Regards, -Gonglei > ctrl-f "virtio-scsi" >

Re: [Qemu-devel] wrong size for virtio-scsi headers

2015-03-11 Thread Fam Zheng
On Thu, 03/12 03:24, Gonglei (Arei) wrote: > qemu-system-x86_64: wrong size for virtio-scsi headers qemu-devel is already filled with report/discussion/fix/pull on this :) ctrl-f "virtio-scsi" http://lists.gnu.org/archive/html/qemu-devel/2015-03/threads.html Fam

[Qemu-devel] wrong size for virtio-scsi headers

2015-03-11 Thread Gonglei (Arei)
Hi, Today I start a vm failed, and get the following log: qemu-system-x86_64: wrong size for virtio-scsi headers 1) The Qemu command line: ./qemu-system-x86_64 -enable-kvm -m 4096 -smp 4 -name suse -device virtio-scsi-pci,id=scsi0 -drive file=/home/suse11_sp3_32_2, \ if=none,id=drive-scsi0-0-0

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-11 Thread Chen, Tiejun
+ +if (b_info->u.hvm.gfx_passthru_kind == +LIBXL_GFX_PASSTHRU_KIND_DEFAULT) { +if (libxl__is_igd_vga_passthru(gc, guest_config)) +machinearg = GCSPRINTF("%s,igd-passthru=on", machinearg); +} else if (b_info->u.hvm.gfx_passthru_kind == +

Re: [Qemu-devel] [PATCH v2] vnc: switch to inet_listen_opts

2015-03-11 Thread Gonglei
On 2015/3/11 21:21, Gerd Hoffmann wrote: > Use inet_listen_opts instead of inet_listen. Allows us to drop some > pointless indirection: Format strings just to parse them again later on. > > Signed-off-by: Gerd Hoffmann > --- > ui/vnc.c | 75 > +++---

Re: [Qemu-devel] [PATCH 2/3] VFIO: Clear INTx pending state on EEH reset

2015-03-11 Thread Gavin Shan
On Thu, Mar 12, 2015 at 12:48:16PM +1100, David Gibson wrote: >On Wed, Mar 11, 2015 at 05:11:53PM +1100, Gavin Shan wrote: >> When Linux guest recovers from EEH error on the following Emulex >> adapter, the MSIx interrupts are disabled and the INTx emulation >> is enabled. One INTx interrupt is inj

Re: [Qemu-devel] [PATCH 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-11 Thread Gavin Shan
On Thu, Mar 12, 2015 at 12:04:59PM +1100, David Gibson wrote: >On Wed, Mar 11, 2015 at 05:11:52PM +1100, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should be cleared accordingly. Ot

Re: [Qemu-devel] [PATCH] SeaBios/vTPM: Enable Xen stubdom vTPM for HVM virtual machine

2015-03-11 Thread Xu, Quan
> -Original Message- > From: Kevin O'Connor [mailto:ke...@koconnor.net] > Sent: Thursday, March 12, 2015 3:49 AM > To: Xu, Quan; seab...@seabios.org > Cc: stefano.stabell...@eu.citrix.com; stef...@linux.vnet.ibm.com; > qemu-devel@nongnu.org; xen-de...@lists.xen.org > Subject: Re: [PATCH]

Re: [Qemu-devel] [PATCH RFC v3 13/27] COLO RAM: Flush cached RAM into SVM's memory

2015-03-11 Thread zhanghailiang
On 2015/3/12 4:07, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We only need to flush RAM that is both dirty on PVM and SVM since last checkpoint. Besides, we must ensure flush RAM cache before load device state. Actually with a follow up to my previous

Re: [Qemu-devel] [PATCH RFC v3 13/27] COLO RAM: Flush cached RAM into SVM's memory

2015-03-11 Thread zhanghailiang
On 2015/3/12 3:08, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We only need to flush RAM that is both dirty on PVM and SVM since last checkpoint. Besides, we must ensure flush RAM cache before load device state. Signed-off-by: zhanghailiang a Signed-off

Re: [Qemu-devel] [PATCH 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-11 Thread David Gibson
On Wed, Mar 11, 2015 at 05:11:52PM +1100, Gavin Shan wrote: > The PCI device MSIx table is cleaned out in hardware after EEH PE > reset. However, we still hold the stale MSIx entries in QEMU, which > should be cleared accordingly. Otherwise, we will run into another > (recursive) EEH error and the

Re: [Qemu-devel] [PATCH 2/3] VFIO: Clear INTx pending state on EEH reset

2015-03-11 Thread David Gibson
On Wed, Mar 11, 2015 at 05:11:53PM +1100, Gavin Shan wrote: > When Linux guest recovers from EEH error on the following Emulex > adapter, the MSIx interrupts are disabled and the INTx emulation > is enabled. One INTx interrupt is injected to the guest by host > because of detected pending INTx inte

Re: [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu.

2015-03-11 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Mar 11, 2015 at 10:06:40PM +1030, Rusty Russell wrote: >> Each entry in the ring is a pair: \field{id} indicates the head >> entry of the descriptor chain describing the buffer (this >> matches an entry placed in the available ring by

Re: [Qemu-devel] [PATCH] virtio_rpmsg: set DRIVER_OK before using device

2015-03-11 Thread Rusty Russell
Ohad Ben-Cohen writes: > On Mon, Mar 9, 2015 at 10:41 AM, Michael S. Tsirkin wrote: >> On Sat, Mar 07, 2015 at 08:06:56PM +0100, Michael S. Tsirkin wrote: >>> virtio spec requires that all drivers set DRIVER_OK >>> before using devices. While rpmsg isn't yet >>> included in the virtio 1 spec, pre

Re: [Qemu-devel] [PATCH v4 0/4] Convert 'status' of MigrationInfo from open-coded 'str' to enum type

2015-03-11 Thread zhanghailiang
ping... Should this series be merged in 2.3 version? I noticed that 3.17 is hardfreeze time. On 2015/3/9 14:45, zhanghailiang wrote: Hi, This series converts open-coded 'str' type to enum type for 'status'. This conversion will be more convenient for future extensibility. Actually, I will ad

Re: [Qemu-devel] 2.3 schedule (HARDFREEZE 2014-03-17)

2015-03-11 Thread zhanghailiang
On 2015/3/11 22:25, Peter Maydell wrote: Hi; since I was on holiday the 2.3 schedule got a bit lost/delayed. Discussion on IRC suggests: 2014-03-17: hardfreeze and rc0 2014-03-24: rc1 2014-03-31: rc2 2014-04-07: rc3 2014-04-14: final release s/2014/2015 ;) wiki is right. (I've updated http:

[Qemu-devel] [Bug 1431084] [NEW] improve configure error message "ERROR: User requested feature nptl"

2015-03-11 Thread Karl-Philipp Richter
Public bug reported: Running `./configure` on Ubuntu 14.10 amd64 with Linux 3.19.1 causes the error ERROR: User requested feature nptl configure was not able to find it. Install glibc and linux kernel headers. Both linux kernel headers and `libglib2.0-dev` are installed

Re: [Qemu-devel] Migration auto-converge problem

2015-03-11 Thread John Snow
On 03/02/2015 04:04 PM, Jason J. Herne wrote: We have a test case that dirties memory very very quickly. When we run this test case in a guest and attempt a migration, that migration never converges even when done with auto-converge on. The auto converge behavior of Qemu functions differently

Re: [Qemu-devel] [Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Greg Kurz
On Thu, 12 Mar 2015 09:18:38 +1100 Benjamin Herrenschmidt wrote: > On Wed, 2015-03-11 at 23:03 +0100, Greg Kurz wrote: > > > /* The host notifier will be swapped in adjust_endianness() according to the > > * target default endianness. We need to negate this swap if the device uses > > * an end

Re: [Qemu-devel] [Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Benjamin Herrenschmidt
On Wed, 2015-03-11 at 23:03 +0100, Greg Kurz wrote: > /* The host notifier will be swapped in adjust_endianness() according to the > * target default endianness. We need to negate this swap if the device uses > * an endianness that is not the default (ppc64le for example). > */ > > > > +static

Re: [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Greg Kurz
On Wed, 11 Mar 2015 21:06:05 +0100 "Michael S. Tsirkin" wrote: > On Wed, Mar 11, 2015 at 07:04:38PM +0100, Greg Kurz wrote: > > vhost is seriously broken with ppc64le guests, even in the supposedly > > supported case where the host is ppc64le and we don't need cross-endian > > support. > > > > T

Re: [Qemu-devel] fw_cfg specification ?

2015-03-11 Thread Laszlo Ersek
On 03/11/15 21:45, Gabriel L. Somlo wrote: > On Wed, Mar 11, 2015 at 07:50:40PM +0100, Laszlo Ersek wrote: >> On 03/11/15 16:27, Gabriel L. Somlo wrote: >>> Hi, >>> >>> I'm looking for the closest thing to an official spec for qemu's >>> fw_cfg device, and so far I have found this: >>> >>> http://l

Re: [Qemu-devel] [PATCH v3] block/null: Latency simulation by adding new option "latency-ns"

2015-03-11 Thread Eric Blake
On 03/10/2015 11:42 PM, Fam Zheng wrote: > Aio context switch should just work because the requests will be > drained, so the scheduled timer(s) on the old context will be freed. > > Signed-off-by: Fam Zheng > > --- > v3: latency_ns -> latency-ns; Add documentation in qapi json. [Eric] > v2: Che

Re: [Qemu-devel] [PATCH v4 1/5] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2015-03-11 Thread Eric Blake
On 03/10/2015 06:14 AM, Quan Xu wrote: > --Changes in v4: > -qapi schema enhancement. > -remove no need code. Patch history belongs... > > Signed-off-by: Quan Xu > --- ...here. It is useful to reviewers to know what changed since your last submission, but not useful for the actual git histo

Re: [Qemu-devel] fw_cfg specification ?

2015-03-11 Thread Gabriel L. Somlo
On Wed, Mar 11, 2015 at 07:50:40PM +0100, Laszlo Ersek wrote: > On 03/11/15 16:27, Gabriel L. Somlo wrote: > > Hi, > > > > I'm looking for the closest thing to an official spec for qemu's > > fw_cfg device, and so far I have found this: > > > > http://lists.gnu.org/archive/html/qemu-devel/2011-04

[Qemu-devel] [PULL 14/25] machine: query mem-merge machine property

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Running qemu-bin ... -machine pc,mem-merge=on leads to crash: x86_64-softmmu/qemu-system-x86_64 -machine pc,dump-guest-core=on qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL

[Qemu-devel] [PULL 13/25] machine: query dump-guest-core machine property

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Running qemu-bin ... -machine pc,dump-guest-core=on leads to crash: x86_64-softmmu/qemu-system-x86_64 -machine pc,dump-guest-core=on qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OP

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Andrey Korolyov
On Wed, Mar 11, 2015 at 10:59 PM, Dr. David Alan Gilbert wrote: > * Andrey Korolyov (and...@xdel.ru) wrote: >> On Wed, Mar 11, 2015 at 10:33 PM, Dr. David Alan Gilbert >> wrote: >> > * Kevin O'Connor (ke...@koconnor.net) wrote: >> >> On Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote:

Re: [Qemu-devel] [PATCH 1/3] 9pfs-proxy: simplify error handling

2015-03-11 Thread Michael Tokarev
11.03.2015 23:05, Michael Tokarev wrote: > I sent a v3 (last) with correct version number, it has just 3 (rather > big) patches: http://thread.gmane.org/gmane.comp.emulators.qemu/324157 . And this is what I think should be done (part of that thread), at least for the proxy code: http://article.gma

Re: [Qemu-devel] [PATCH RFC v3 13/27] COLO RAM: Flush cached RAM into SVM's memory

2015-03-11 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We only need to flush RAM that is both dirty on PVM and SVM since > last checkpoint. Besides, we must ensure flush RAM cache before load > device state. Actually with a follow up to my previous question, can you explain the 'both' in that d

Re: [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Michael S. Tsirkin
On Wed, Mar 11, 2015 at 07:04:38PM +0100, Greg Kurz wrote: > vhost is seriously broken with ppc64le guests, even in the supposedly > supported case where the host is ppc64le and we don't need cross-endian > support. > > The TX virtqueue fails to be handled by vhost and falls back to QEMU. > Despit

Re: [Qemu-devel] [PATCH] windows build: -lssp added to qga-vss.dll libraries list

2015-03-11 Thread Stefan Weil
Am 11.03.2015 um 18:10 schrieb Joseph Hindin: When building qga-bss.dll with 64-bit mingw toolchain v. 4.9.2, the Typo: qga-vss.dll qga-vss.dll linking fails with unresolved symbols from libssp, stack protection support, like the following message: .../qga/vss-win32/install.cpp:52: undefined

Re: [Qemu-devel] [PATCH 1/3] 9pfs-proxy: simplify error handling

2015-03-11 Thread Michael Tokarev
11.03.2015 11:46, Aneesh Kumar K.V wrote: [] > ... Rather than saying > >"Oh well. I've no idea how this code has been accepted. >It is absolute crap." > > it would be nice if we take up specific issues, w.r.t the os/cpu > combination where we are running into issues, we may be able to f

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Dr. David Alan Gilbert
* Andrey Korolyov (and...@xdel.ru) wrote: > On Wed, Mar 11, 2015 at 10:33 PM, Dr. David Alan Gilbert > wrote: > > * Kevin O'Connor (ke...@koconnor.net) wrote: > >> On Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote: > >> > On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote:

[Qemu-devel] [PULL 25/25] virtio-scsi: remove empty wrapper for cmd

2015-03-11 Thread Michael S. Tsirkin
The anonymous struct only has a single field now, drop the wrapper structure. Suggested-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin Acked-by: Paolo Bonzini --- include/hw/virtio/virtio-scsi.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/virtio/virti

[Qemu-devel] [PULL 19/25] acpi: specify format for build_append_namestring

2015-03-11 Thread Michael S. Tsirkin
Will catch users if we misused it. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ace180b..6242908 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c

[Qemu-devel] [PULL 24/25] virtio-scsi: clean out duplicate cdb field

2015-03-11 Thread Michael S. Tsirkin
cdb is now part of cmd, drop it from req. There's also nothing to check using build assert now. Signed-off-by: Michael S. Tsirkin Acked-by: Paolo Bonzini --- include/hw/virtio/virtio-scsi.h | 7 +-- hw/scsi/virtio-scsi.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) di

[Qemu-devel] [PULL 18/25] MAINTAINERS: drop aligu...@amazon.com

2015-03-11 Thread Michael S. Tsirkin
It's sad when a friend leaves, but we have to move on. Drop Anthony's email from MAINTAINERS so he stops getting irrelevant email. Got Anthony's ack off-list. Signed-off-by: Michael S. Tsirkin Acked-by: Anthony Liguori --- MAINTAINERS | 9 - 1 file changed, 9 deletions(-) diff --git

[Qemu-devel] [PULL 22/25] uapi/virtio_scsi: allow overriding CDB/SENSE size

2015-03-11 Thread Michael S. Tsirkin
QEMU wants to use virtio scsi structures with a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, let's add ifdefs to allow overriding them. Keep the old defines under new names: VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE, since that's what these values really are: defaults f

[Qemu-devel] [PULL 23/25] virtio-scsi: fix cdb/sense size

2015-03-11 Thread Michael S. Tsirkin
Commit "virtio-scsi: use standard-headers" added cdb and sense into req/rep structures, which breaks uses of sizeof for these structures, since qemu adds its own arrays on top. To fix, redefine CDB/sense field size to 0. Reported-by: Fam Zheng Signed-off-by: Michael S. Tsirkin --- include/hw/v

[Qemu-devel] [PULL 21/25] virtio-scsi: drop duplicate CDB/SENSE SIZE

2015-03-11 Thread Michael S. Tsirkin
This is duplicated from the kernel header, drop our copy. Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-scsi.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index de2c739..e4b531e 100644 --- a/include/hw/vi

[Qemu-devel] [PULL 15/25] pci: Convert pci_nic_init() to Error to avoid qdev_init()

2015-03-11 Thread Michael S. Tsirkin
From: Markus Armbruster qdev_init() is deprecated, and will be removed when its callers have been weaned off it. Signed-off-by: Markus Armbruster Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pci.c | 18 ++ 1 file changed, 14 insertions(+), 4 delet

[Qemu-devel] [PULL 20/25] exec: don't include hw/boards for linux-user

2015-03-11 Thread Michael S. Tsirkin
As noted by Andreas, hw/boards.h shouldn't be used outside softmmu code. Include it conditionally, and drop the (now unnecessary) ifdef guards in hw/boards.h Reported-by: Andreas Färber Cc: Peter Maydell Signed-off-by: Michael S. Tsirkin Reviewed-by: Andreas Färber --- include/hw/boards.h | 4

[Qemu-devel] [PULL 17/25] tpm: Move memory subregion function into realize function

2015-03-11 Thread Michael S. Tsirkin
From: Stefan Berger Move the memory subregion function into the DeviceClass realize function due to isa_address_space (now) crashing if called in the instance init function. Signed-off-by: Stefan Berger Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini

[Qemu-devel] [PULL 09/25] kvm: add machine state to kvm_arch_init

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Needed to query machine's properties. Signed-off-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini --- include/sysemu/kvm.h | 2 +- kvm-all.c| 2 +- target-arm/kvm.c | 2 +- target-i386/kvm.c

[Qemu-devel] [PULL 07/25] machine: allowed/required kernel-irqchip support

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The code using kernel-irqchip property requires 'allowed/required' functionality. Replace machine's kernel_irqchip field with two fields representing the new functionality and expose them through wrappers. Signed-off-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Sign

[Qemu-devel] [PULL 08/25] machine: query kernel-irqchip property

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Running x86_64-softmmu/qemu-system-x86_64 -machine pc,kernel_irqchip=on -enable-kvm leads to crash: qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. Aborted (core du

[Qemu-devel] [PULL 16/25] virtio-pci: Convert to realize()

2015-03-11 Thread Michael S. Tsirkin
From: Markus Armbruster Signed-off-by: Markus Armbruster Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.h | 2 +- hw/virtio/virtio-pci.c | 88 -- 2 files changed, 36 insertions(+), 54 deletions(-) diff

[Qemu-devel] [PULL 11/25] machine: query phandle-start machine property

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Query phandle-start by accessing machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum Acked

[Qemu-devel] [PULL 04/25] acpi-test: update expected files

2015-03-11 Thread Michael S. Tsirkin
commit ecdc7bab095a2cf29d9e9d4a7e1494f586a8b270 "acpi: fix aml_equal term implementation" dropped a useless Zero in generated code, update expected files appropriately. Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/SSDT | Bin 2476 -> 2475 bytes tests/acpi-test-data/p

[Qemu-devel] [PULL 03/25] acpi: fix aml_equal term implementation

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The DefLEqual op does not have a target operand. Remove it. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/

[Qemu-devel] [PULL 10/25] machine: query kvm-shadow-mem machine property

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed the global option descriptions and moved them to MachineState's QOM properties. Query kvm-shadow-mem by accessing machine properties through designated wrappers. Signed-off-by: Marcel Apfelbaum Acke

[Qemu-devel] [PULL 12/25] hw/boards: make it safe to include for linux-user

2015-03-11 Thread Michael S. Tsirkin
Make it safe to include hw/boards.h in exec.c for linux-user configurations. We don't need any of its contents though. Signed-off-by: Michael S. Tsirkin --- include/hw/boards.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 1f21bdf..0bf00f

[Qemu-devel] [PULL 02/25] aml-build: append opcodes using build_append_byte

2015-03-11 Thread Michael S. Tsirkin
Opcodes are raw bytes, they shouldn't be added using build_append_int. This only happens to work with 0 and 1 opcodes. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/acpi/aml-build

[Qemu-devel] [PULL 06/25] machine: replace qemu opts with iommu property

2015-03-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Fixes a QEMU crash when passing iommu parameter in command line. Running x86_64-softmmu/qemu-system-x86_64 -machine pc,iommu=on -enable-kvm leads to crash: qemu-system-x86_64: qemu/util/qemu-option.c:387: qemu_opt_get_bool_helper: Assertion `opt->desc && opt->de

[Qemu-devel] [PULL 05/25] pci/shpc: fix signed integer overflow

2015-03-11 Thread Michael S. Tsirkin
clang undefined behaviour sanitizer reports: > hw/pci/shpc.c:162:27: runtime error: left shift of 1 by 31 places > cannot be represented in type 'int' Caused by the usual lack of a 'U' qualifier on a constant 1 being shifted left. Fix it up. Reported-by: Peter Maydell Signed-off-by: Michael S. T

[Qemu-devel] [PULL 01/25] aml-build: don't modify child

2015-03-11 Thread Michael S. Tsirkin
this code: aml_append(foo, bar); might, non-intuitively, modify bar, which means that e.g. the following might not DTRT: c = ; aml_append(a, c); aml_append(b, c); to fix, simply allocate an intermediate array, and always modify that. Signed-off-by: Michael S. Tsirkin Review

[Qemu-devel] [PULL 00/25] misc fixes and cleanups

2015-03-11 Thread Michael S. Tsirkin
OK, doing a pull request now before it grows up to be another >100 patch monster. And the virtio scsi bug at least blocks some testers, so there's some urgency. Pls pull. The following changes since commit 8437f7be3b1c49631e435c652707f2cee477149d: Merge remote-tracking branch 'remotes/mjt/tags

Re: [Qemu-devel] [PATCH] SeaBios/vTPM: Enable Xen stubdom vTPM for HVM virtual machine

2015-03-11 Thread Kevin O'Connor
On Tue, Mar 10, 2015 at 08:16:03AM -0400, Quan Xu wrote: > This patch series are only the SeaBios part to enable stubdom vTPM for HVM > virtual machine. It will work with Qemu patch series and Xen patch series. > > > *INTRODUCTION* > > The goal

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Andrey Korolyov
On Wed, Mar 11, 2015 at 10:33 PM, Dr. David Alan Gilbert wrote: > * Kevin O'Connor (ke...@koconnor.net) wrote: >> On Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote: >> > On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote: >> > > For what it's worth, I can't seem to trigger

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Bandan Das
"Dr. David Alan Gilbert" writes: > * Kevin O'Connor (ke...@koconnor.net) wrote: >> On Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote: >> > On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote: >> > > For what it's worth, I can't seem to trigger the problem if I move the >>

Re: [Qemu-devel] Migration auto-converge problem

2015-03-11 Thread Jason J. Herne
On 03/02/2015 04:04 PM, Jason J. Herne wrote: We have a test case that dirties memory very very quickly. When we run this test case in a guest and attempt a migration, that migration never converges even when done with auto-converge on. The auto converge behavior of Qemu functions differently pu

Re: [Qemu-devel] [PATCH v2 5/6] target-arm: kvm64 fix save/restore of SPSR regs

2015-03-11 Thread Greg Bellows
On Mon, Mar 9, 2015 at 8:26 AM, Christoffer Dall wrote: > On Wed, Mar 04, 2015 at 02:35:52PM +, Alex Bennée wrote: >> From: Christoffer Dall >> >> The current code was negatively indexing the cpu state array and not >> synchronizing banked spsr register state with the current mode's spsr >> s

Re: [Qemu-devel] [PATCH 0/2] virtio-s390: Convert to realize()

2015-03-11 Thread Markus Armbruster
Christian Borntraeger writes: > Am 27.02.2015 um 14:55 schrieb Markus Armbruster: >> Markus Armbruster (2): >> virtio-s390: s390_virtio_device_init() can't fail, simplify >> virtio-s390: Convert to realize() >> >> hw/s390x/s390-virtio-bus.c | 97 >> ++---

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Dr. David Alan Gilbert
* Kevin O'Connor (ke...@koconnor.net) wrote: > On Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote: > > On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote: > > > For what it's worth, I can't seem to trigger the problem if I move the > > > cmos read above the SIPI/LAPIC code (

Re: [Qemu-devel] [PATCH 0/2] virtio-s390: Convert to realize()

2015-03-11 Thread Markus Armbruster
Markus Armbruster writes: > Christian Borntraeger writes: > >> Am 27.02.2015 um 14:55 schrieb Markus Armbruster: >>> Markus Armbruster (2): >>> virtio-s390: s390_virtio_device_init() can't fail, simplify >>> virtio-s390: Convert to realize() >>> >>> hw/s390x/s390-virtio-bus.c | 97 >>> +++

Re: [Qemu-devel] [PATCH 0/1] Get the list of arguments from a QMP command

2015-03-11 Thread Markus Armbruster
Alberto Garcia writes: > On Wed, Mar 11, 2015 at 11:21:43AM +0100, Markus Armbruster wrote: > >> > I can actually try to implement full introspection support, but I >> > would like to know what API you would like. Something like this? >> > >> >'query-commands' >> >'query-enums' >> >'q

Re: [Qemu-devel] [RFC/WIP PATCH 6/6] memory: add clear_cache_to_poc

2015-03-11 Thread Andrew Jones
On Fri, Mar 06, 2015 at 01:53:38PM -0500, Andrew Jones wrote: > Add a function that flushes the cache to PoC. We need a new > function because __builtin___clear_cache only flushes to > PoU. Call this function each time an address in a memory > region that has been flagged as having an incoherent ca

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Kevin O'Connor
On Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote: > On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote: > > For what it's worth, I can't seem to trigger the problem if I move the > > cmos read above the SIPI/LAPIC code (see patch below). > > Ugh! > > That's a seabios bug

Re: [Qemu-devel] fw_cfg specification ?

2015-03-11 Thread Laszlo Ersek
On 03/11/15 16:27, Gabriel L. Somlo wrote: > Hi, > > I'm looking for the closest thing to an official spec for qemu's > fw_cfg device, and so far I have found this: > > http://lists.gnu.org/archive/html/qemu-devel/2011-04/msg00238.html > > but it apparently never got committed to qemu (any idea

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Kevin O'Connor
On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote: > For what it's worth, I can't seem to trigger the problem if I move the > cmos read above the SIPI/LAPIC code (see patch below). Ugh! That's a seabios bug. Main processor modifies the rtc index (rtc_read()) while APs try to clear t

[Qemu-devel] [PATCH v4 2/3] target-arm: fix get_phys_addr_v6/SCTLR_AFE access check

2015-03-11 Thread Andrew Jones
Introduce simple_ap_to_rw_prot(), which has the same behavior as ap_to_rw_prot(), but takes the 2-bit simple AP[2:1] instead of the 3-bit AP[2:0]. Use this in get_phys_addr_v6 when SCTLR_AFE is set, as that bit indicates we should be using the simple AP format. It's unlikely this path is getting u

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Kevin O'Connor
On Wed, Mar 11, 2015 at 05:59:04PM +, Dr. David Alan Gilbert wrote: > * Kevin O'Connor (ke...@koconnor.net) wrote: > > On Wed, Mar 11, 2015 at 04:52:03PM +, Dr. David Alan Gilbert wrote: > > > * Kevin O'Connor (ke...@koconnor.net) wrote: > > > > So, I couldn't get this to fail on my older A

[Qemu-devel] [PATCH v4 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
This patch makes the following changes to the determination of whether an address is executable, when translating addresses using LPAE. 1. No longer assumes that PL0 can't execute when it can't read. It can in AArch64, a difference from AArch32. 2. Use va_size == 64 to determine we're in AArch6

[Qemu-devel] [PATCH v4 1/3] target-arm: convert check_ap to ap_to_rw_prot

2015-03-11 Thread Andrew Jones
Instead of mixing access permission checking with access permissions to page protection flags translation, just do the translation, and leave it to the caller to check the protection flags against the access type. Also rename to ap_to_rw_prot to better describe the new behavior. Signed-off-by: And

[Qemu-devel] [PATCH v4 0/3] tcg-arm: LPAE: fix and extend xn control

2015-03-11 Thread Andrew Jones
This series fixes and extends the determination of whether or not an address is executable for LPAE translations. The main patch is 3/3, and describes the details in its commit message. Patch 1/3 prepares for patch 2/3, which is prep for 3/3, and also fixes a potential problem with checking access

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 18:30, Andrew Jones wrote: > My interpretation of SCTLR_EL1.WXN was just wrong. There is > talks about "EL1&0" That's just the name of the translation regime (ie there's a shared set of page tables that handle translation for both EL1 and EL0). > and I assumed it meant that w

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
On Wed, Mar 11, 2015 at 06:15:47PM +, Peter Maydell wrote: > On 11 March 2015 at 18:10, Andrew Jones wrote: > > On Wed, Mar 11, 2015 at 05:49:39PM +, Peter Maydell wrote: > >> Still confused. If the page isn't readable or writable > >> then WXN isn't going to kick in anyway because WXN onl

Re: [Qemu-devel] seabios stable release

2015-03-11 Thread Kevin O'Connor
On Wed, Mar 11, 2015 at 02:48:18PM +0100, Gerd Hoffmann wrote: > Hi, > > Looks like we need a stable release branch for 1.8 and roll out a 1.8.1 > release with some fixes for qemu. > > Issue #1: support for multiple pci roots. > > Issue #2: There is a (not-yet fixed) emulation failure with new

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-11 Thread Bandan Das
"Dr. David Alan Gilbert" writes: > * Kevin O'Connor (ke...@koconnor.net) wrote: >> On Wed, Mar 11, 2015 at 04:52:03PM +, Dr. David Alan Gilbert wrote: >> > * Kevin O'Connor (ke...@koconnor.net) wrote: >> > > So, I couldn't get this to fail on my older AMD machine at all with >> > > the defaul

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 14:18, Peter Maydell wrote: > target-arm queue: mostly bug fixes, but also the Netduino 2 > machine model. I'm letting that in (even though it's nearly > hardfreeze) since a new board model isn't going to impact > other existing uses, and the patches were posted well before > s

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 18:10, Andrew Jones wrote: > On Wed, Mar 11, 2015 at 05:49:39PM +, Peter Maydell wrote: >> Still confused. If the page isn't readable or writable >> then WXN isn't going to kick in anyway because WXN only >> affects writable pages. I don't see what the case is >> where this

Re: [Qemu-devel] [PATCH v3 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 18:06, Andrew Jones wrote: > +if (is_aa64) { > +switch (regime_el(env, mmu_idx)) { > +case 1: > +if (is_user && !(user_rw & PAGE_READ)) { > +wxn = 0; I still can't figure out the point of this. This conditional will only be true

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
On Wed, Mar 11, 2015 at 05:49:39PM +, Peter Maydell wrote: > On 11 March 2015 at 17:42, Andrew Jones wrote: > > On Wed, Mar 11, 2015 at 05:02:00PM +, Peter Maydell wrote: > > >> > +if (is_aa64) { > >> > +switch (regime_el(env, mmu_idx)) { > >> > +case 1: > >> > +

[Qemu-devel] [PATCH v3 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
This patch makes the following changes to the determination of whether an address is executable, when translating addresses using LPAE. 1. No longer assumes that PL0 can't execute when it can't read. It can in AArch64, a difference from AArch32. 2. Use va_size == 64 to determine we're in AArch6

[Qemu-devel] [PATCH v3 2/3] target-arm: fix get_phys_addr_v6/SCTLR_AFE access check

2015-03-11 Thread Andrew Jones
Introduce simple_ap_to_rw_prot(), which has the same behavior as ap_to_rw_prot(), but takes the 2-bit simple AP[2:1] instead of the 3-bit AP[2:0]. Use this in get_phys_addr_v6 when SCTLR_AFE is set, as that bit indicates we should be using the simple AP format. It's unlikely this path is getting u

[Qemu-devel] [PATCH v3 0/3] tcg-arm: LPAE: fix and extend xn control

2015-03-11 Thread Andrew Jones
This series fixes and extends the determination of whether or not an address is executable for LPAE translations. The main patch is 3/3, and describes the details in its commit message. Patch 1/3 prepares for patch 2/3, which is prep for 3/3, and also fixes a potential problem with checking access

[Qemu-devel] [PATCH v3 1/3] target-arm: convert check_ap to ap_to_rw_prot

2015-03-11 Thread Andrew Jones
Instead of mixing access permission checking with access permissions to page protection flags translation, just do the translation, and leave it to the caller to check the protection flags against the access type. Also rename to ap_to_rw_prot to better describe the new behavior. Signed-off-by: And

[Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Greg Kurz
vhost is seriously broken with ppc64le guests, even in the supposedly supported case where the host is ppc64le and we don't need cross-endian support. The TX virtqueue fails to be handled by vhost and falls back to QEMU. Despite this unexpected scenario where RX is vhost and TX is QEMU, the guest

  1   2   3   4   >