Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > v1->v2: fixed TCG debug failures > > target-ppc/translate.c | 61 > +++--- > 1 file changed, 43 insertions(+), 18 deletions(-) > > diff --git a/target-ppc/transl

Re: [Qemu-devel] [PATCH 07/14] ppc: reorganize gen_compute_fprf

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > v1->v2: fixed leak of temporaries > > target-ppc/translate.c | 25 - > 1 file changed, 12 insertions(+), 13 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translat

Re: [Qemu-devel] [PATCH 04/14] ppc: introduce ppc_get_cr and ppc_set_cr

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > New functions to put together all 32 CR bits. Avoids easy > off-by-one mistakes such as the one fixed by commit f13f529 > (ppc: fix monitor access to CR, 2014-08-28). > > Signed-off-by: Paolo Bonzini > --- > v1->v2: replaces "ppc: use ARRAY_SIZ

Re: [Qemu-devel] [PATCH 06/14] ppc: introduce helpers for mfocrf/mtocrf

2014-09-18 Thread Tom Musta
On 9/15/2014 10:03 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > v1->v2: used ARRAY_SIZE and ppc_get_cr > > target-ppc/helper.h | 3 +++ > target-ppc/int_helper.c | 17 + > target-ppc/translate.c | 31 --- > 3 files change

[Qemu-devel] [PULL v3 01/15] hw/machine: Free old values of string properties

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Reviewed-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Amos Kong Cc: qemu-sta...@nongnu.org --- hw/core/machine.c | 8 1 file changed, 8 insertion

[Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master

2014-09-18 Thread Michael S. Tsirkin
Current support for bus master (clearing OK bit) together with the need to support guests which do not enable PCI bus mastering, leads to extra state in VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust in case of cross-version migration for the case when guests use the device before setting D

[Qemu-devel] [PULL v3 12/15] virtio-pci: enable bus master for old guests

2014-09-18 Thread Michael S. Tsirkin
commit cc943c36faa192cd4b32af8fe5edb31894017d35 pci: Use bus master address space for delivering MSI/MSI-X messages breaks virtio-net for rhel6.[56] x86 guests because they don't enable bus mastering for virtio PCI devices. For the same reason, rhel6.[56] ppc64 guests cannot boot on a virtio-bl

[Qemu-devel] [PULL v3 11/15] Revert "virtio: don't call device on !vm_running"

2014-09-18 Thread Michael S. Tsirkin
This reverts commit a1bc7b827e422e1ff065640d8ec5347c4aadfcd8. virtio: don't call device on !vm_running It turns out that virtio net assumes that vm_running is updated before device status callback in many places, so this change leads to asserts. Previous commit fixes the root issue that motivat

[Qemu-devel] [PULL v3 15/15] pc: leave more space for BIOS allocations

2014-09-18 Thread Michael S. Tsirkin
Since QEMU 2.1, we are allocating more space for ACPI tables, so no space is left after initrd for the BIOS to allocate memory. Besides ACPI tables, there are a few other uses of high memory in SeaBIOS: SMBIOS tables and USB drivers use it in particular. These uses allocate a very small amount of

[Qemu-devel] [PULL v3 13/15] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation

2014-09-18 Thread Michael S. Tsirkin
From: Damjan Marion Header length check should happen only if backend is kernel. For user backend there is no reason to reset this bit. vhost-user code does not define .has_vnet_hdr_len so VIRTIO_NET_F_MRG_RXBUF cannot be negotiated even if both sides support it. Signed-off-by: Damjan Marion R

[Qemu-devel] [PULL v3 08/15] qdev: Move global validation to a single function

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Currently GlobalProperty.not_used=false has multiple meanings: * It may be a property for a hotpluggable device, which may or may not have been used by a device; * It may be a machine-type-provided property, which may or may not have been used by a device. * It may be a

[Qemu-devel] [PULL v3 04/15] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost There are multiple reasons for running the global property tests on a subprocess: * We need the global_props lists to be empty for each test case, so global properties from the previous test won't affect the next one; * We don't want the qdev_prop_check_global() warnings

[Qemu-devel] [PULL v3 06/15] test-qdev-global-props: Test handling of hotpluggable and non-device types

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Ensure no warning will be printed for hotpluggable types, and warnings will be printed for non-device types. Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 55 +++

[Qemu-devel] [PULL v3 10/15] virtio-net: drop assert on vm stop

2014-09-18 Thread Michael S. Tsirkin
On vm stop, vm_running state set to stopped before device is notified, so callbacks can get envoked with vm_running = false; and this is not an error. Cc: qemu-sta...@nongnu.org Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 2 -- 1 file changed, 2 deletions(-)

[Qemu-devel] [PULL v3 09/15] Revert "rng-egd: remove redundant free"

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost This reverts commit 5e490b6a504912225dff0e520e1c6af68295d238. Cc: qemu-sta...@nongnu.org Reviewed-by: Markus Armbruster Signed-off-by: Eduardo Habkost Signed-off-by: Michael S. Tsirkin --- backends/rng-egd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/r

[Qemu-devel] [PULL v3 02/15] test-qdev-global-props: Trivial comment fix

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c index 2bef

[Qemu-devel] [PULL v3 07/15] qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals()

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties.c | 2 +- tests/test-qdev-global-props.c | 2 +- vl.c | 2 +- 4 files changed,

[Qemu-devel] [PULL v3 05/15] test-qdev-global-props: Initialize not_used=true for all props

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost This will ensure we are actually testing the code which sets not_used=false when the property is used. Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 7 +-- 1 file changed, 5 inserti

[Qemu-devel] [PULL v3 00/15] pci, pc, virtio, misc bugfixes

2014-09-18 Thread Michael S. Tsirkin
The following changes since commit 4c24f4004089a308c5de8ed720cf6bd1746aedd8: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140912' into staging (2014-09-12 15:12:26 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags

[Qemu-devel] [PULL v3 03/15] tests: disable global props test for old glib

2014-09-18 Thread Michael S. Tsirkin
follow-up patch moves global property tests to subprocesses. Unfortunately with old glib this causes: tests/test-qdev-global-props.c: In function ‘test_static_prop’: tests/test-qdev-global-props.c:80:5: error: implicit declaration of function ‘g_test_trap_subprocess’ [-Werror=implicit-function-dec

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 19:15, Markus Armbruster ha scritto: > > Thanks for doing this work. If you can do a bit more of the same, here > are a few more device model init() methods I'd love to have converted, > because they use qerror_report_err(): > > hw/char/serial-pci.cserial_pci_init() >

Re: [Qemu-devel] [PATCH] exec.c: fix setting 1-byte-long watchpoints

2014-09-18 Thread Peter Maydell
On 17 September 2014 22:03, Max Filippov wrote: > With commit 05068c0dfb5b 'exec.c: Relax restrictions on watchpoint length > and alignment' it's no longer possible to set 1-byte-long watchpoint > because of incorrect address range check. > Fix that by changing condition that checks for address wr

Re: [Qemu-devel] [PULL v2 00/15] pci, pc, virtio, misc bugfixes

2014-09-18 Thread Peter Maydell
On 18 September 2014 11:18, Michael S. Tsirkin wrote: > The following changes since commit 4c24f4004089a308c5de8ed720cf6bd1746aedd8: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20140912' into staging (2014-09-12 > 15:12:26 +0100) > > are available in the git repos

Re: [Qemu-devel] [PULL 0/2] vnc patch queue

2014-09-18 Thread Peter Maydell
iver() > (2014-09-16 23:36:32 +0100) > > are available in the git repository at: > > git://git.kraxel.org/qemu tags/pull-vnc-20140918-1 > > for you to fetch changes up to 9d64fab42274fb50a39bab184f79d0239596ba4a: > > vnc-tls: Clean up dead store i

[Qemu-devel] "make check" random hangs

2014-09-18 Thread Peter Maydell
I've noticed recently that "make check" is prone to random hangs (you can see this in Travis results but also I've caught it occurring on my local machine). Looking at one recent example: petmay01 30042 0.0 0.0 24892 14208 pts/13 S+ 17:09 0:00 \_ make -C build/clang check petmay01

[Qemu-devel] [PULL v2 15/15] tests: disable global props test for old glib

2014-09-18 Thread Michael S. Tsirkin
tests/test-qdev-global-props.c: In function ‘test_static_prop’: tests/test-qdev-global-props.c:80:5: error: implicit declaration of function ‘g_test_trap_subprocess’ [-Werror=implicit-function-declaration] tests/test-qdev-global-props.c:80:5: error: nested extern declaration of ‘g_test_trap_subproc

[Qemu-devel] [PULL v2 14/15] pc: leave more space for BIOS allocations

2014-09-18 Thread Michael S. Tsirkin
Since QEMU 2.1, we are allocating more space for ACPI tables, so no space is left after initrd for the BIOS to allocate memory. Besides ACPI tables, there are a few other uses of high memory in SeaBIOS: SMBIOS tables and USB drivers use it in particular. These uses allocate a very small amount of

[Qemu-devel] [PULL v2 09/15] virtio-net: drop assert on vm stop

2014-09-18 Thread Michael S. Tsirkin
On vm stop, vm_running state set to stopped before device is notified, so callbacks can get envoked with vm_running = false; and this is not an error. Cc: qemu-sta...@nongnu.org Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 2 -- 1 file changed, 2 deletions(-)

[Qemu-devel] [PULL v2 12/15] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation

2014-09-18 Thread Michael S. Tsirkin
From: Damjan Marion Header length check should happen only if backend is kernel. For user backend there is no reason to reset this bit. vhost-user code does not define .has_vnet_hdr_len so VIRTIO_NET_F_MRG_RXBUF cannot be negotiated even if both sides support it. Signed-off-by: Damjan Marion R

[Qemu-devel] [PULL v2 13/15] virtio-pci: fix migration for pci bus master

2014-09-18 Thread Michael S. Tsirkin
Current support for bus master (clearing OK bit) together with the need to support guests which do not enable PCI bus mastering, leads to extra state in VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust in case of cross-version migration for the case when guests use the device before setting D

[Qemu-devel] [PULL v2 11/15] virtio-pci: enable bus master for old guests

2014-09-18 Thread Michael S. Tsirkin
commit cc943c36faa192cd4b32af8fe5edb31894017d35 pci: Use bus master address space for delivering MSI/MSI-X messages breaks virtio-net for rhel6.[56] x86 guests because they don't enable bus mastering for virtio PCI devices. For the same reason, rhel6.[56] ppc64 guests cannot boot on a virtio-bl

[Qemu-devel] [PULL v2 08/15] Revert "rng-egd: remove redundant free"

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost This reverts commit 5e490b6a504912225dff0e520e1c6af68295d238. Cc: qemu-sta...@nongnu.org Reviewed-by: Markus Armbruster Signed-off-by: Eduardo Habkost Signed-off-by: Michael S. Tsirkin --- backends/rng-egd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/r

[Qemu-devel] [PULL v2 10/15] Revert "virtio: don't call device on !vm_running"

2014-09-18 Thread Michael S. Tsirkin
This reverts commit a1bc7b827e422e1ff065640d8ec5347c4aadfcd8. virtio: don't call device on !vm_running It turns out that virtio net assumes that vm_running is updated before device status callback in many places, so this change leads to asserts. Previous commit fixes the root issue that motivat

[Qemu-devel] [PULL v2 07/15] qdev: Move global validation to a single function

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Currently GlobalProperty.not_used=false has multiple meanings: * It may be a property for a hotpluggable device, which may or may not have been used by a device; * It may be a machine-type-provided property, which may or may not have been used by a device. * It may be a

[Qemu-devel] [PULL v2 01/15] hw/machine: Free old values of string properties

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Reviewed-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Amos Kong Cc: qemu-sta...@nongnu.org --- hw/core/machine.c | 8 1 file changed, 8 insertion

[Qemu-devel] [PULL v2 06/15] qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals()

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties.c | 2 +- tests/test-qdev-global-props.c | 2 +- vl.c | 2 +- 4 files changed,

[Qemu-devel] [PULL v2 05/15] test-qdev-global-props: Test handling of hotpluggable and non-device types

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Ensure no warning will be printed for hotpluggable types, and warnings will be printed for non-device types. Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 55 +++

[Qemu-devel] [PULL v2 02/15] test-qdev-global-props: Trivial comment fix

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c index 2bef

[Qemu-devel] [PULL v2 03/15] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost There are multiple reasons for running the global property tests on a subprocess: * We need the global_props lists to be empty for each test case, so global properties from the previous test won't affect the next one; * We don't want the qdev_prop_check_global() warnings

[Qemu-devel] [PULL v2 04/15] test-qdev-global-props: Initialize not_used=true for all props

2014-09-18 Thread Michael S. Tsirkin
From: Eduardo Habkost This will ensure we are actually testing the code which sets not_used=false when the property is used. Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/test-qdev-global-props.c | 7 +-- 1 file changed, 5 inserti

[Qemu-devel] [PULL v2 00/15] pci, pc, virtio, misc bugfixes

2014-09-18 Thread Michael S. Tsirkin
The following changes since commit 4c24f4004089a308c5de8ed720cf6bd1746aedd8: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140912' into staging (2014-09-12 15:12:26 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags

[Qemu-devel] [RFC v2 1/3] blockdev: Add function to search for orphaned drives

2014-09-18 Thread John Snow
Signed-off-by: John Snow --- blockdev.c| 19 +++ include/sysemu/blockdev.h | 1 + vl.c | 5 + 3 files changed, 25 insertions(+) diff --git a/blockdev.c b/blockdev.c index b361fbb..5e7c93a 100644 --- a/blockdev.c +++ b/blockdev.c @@ -166,

[Qemu-devel] [RFC v2 3/3] ahci: implement -cdrom and -hd[a-d]

2014-09-18 Thread John Snow
Signed-off-by: John Snow --- hw/i386/pc_q35.c | 3 +++ hw/ide/ahci.c| 31 +++ hw/ide/ahci.h| 3 +++ 3 files changed, 37 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index fd26fe1..0f33696 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c

[Qemu-devel] [RFC v2 2/3] Add units-per-idebus property

2014-09-18 Thread John Snow
Signed-off-by: John Snow --- blockdev.c| 10 -- device-hotplug.c | 2 +- hw/i386/pc_q35.c | 3 ++- include/hw/boards.h | 3 ++- include/sysemu/blockdev.h | 2 +- vl.c | 19 +++ 6 files changed, 25 insertions(

[Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-18 Thread John Snow
This is an extremely rough/quick sketch of a -cdrom/-hda desugaring fix for Q35/AHCI. Before I spent any time on it, I wanted feedback from Markus or anyone else who had concerns about how this problem would get fixed. This is, then, rough approach #2. Highlights: (1) Add a board property (inste

Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Michael Roth
Quoting Eduardo Habkost (2014-09-18 12:27:12) > On Thu, Sep 18, 2014 at 11:29:47AM -0500, Michael Roth wrote: > > Quoting Michael S. Tsirkin (2014-09-14 13:41:23) > > > From: Eduardo Habkost > > > > > > There are multiple reasons for running the global property tests on a > > > subprocess: > > >

Re: [Qemu-devel] [PATCH for-2.1.2] pc: add more padding between the end of the initrd and the end of memory

2014-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2014 at 06:05:46PM +0200, Paolo Bonzini wrote: > Besides ACPI tables, there are a few other uses of high memory in SeaBIOS: > SMBIOS tables and USB drivers use it in particular. These uses allocate > a very small amount of memory. Malloc metadata also lives there. So we > need _s

Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2014 at 07:06:16PM +0200, Paolo Bonzini wrote: > Il 18/09/2014 18:29, Michael Roth ha scritto: > > > > > >> > int main(int argc, char **argv) > >> > { > >> > g_test_init(&argc, &argv, NULL); > >> > @@ -174,9 +200,20 @@ int main(int argc, char **argv) > >> > type_regist

Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Eduardo Habkost
On Thu, Sep 18, 2014 at 11:29:47AM -0500, Michael Roth wrote: > Quoting Michael S. Tsirkin (2014-09-14 13:41:23) > > From: Eduardo Habkost > > > > There are multiple reasons for running the global property tests on a > > subprocess: > > > > * We need the global_props lists to be empty for each t

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Markus Armbruster
writes: > From: Gonglei > > DeviceClass->init is the old interface, let's convert usb > devices to the new realize API. In this way, all the > implementations now use error_setg instead of > qerror_report/error_report for reporting error. [...] Thanks for doing this work. If you can do a bit

Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 18:29, Michael Roth ha scritto: > > >> > int main(int argc, char **argv) >> > { >> > g_test_init(&argc, &argv, NULL); >> > @@ -174,9 +200,20 @@ int main(int argc, char **argv) >> > type_register_static(&static_prop_type); >> > type_register_static(&dynamic_prop_type

Re: [Qemu-devel] [PULL 00/12] pci, pc, virtio, misc bugfixes

2014-09-18 Thread Michael Roth
Quoting Michael S. Tsirkin (2014-09-16 09:52:25) > On Tue, Sep 16, 2014 at 04:07:35PM +0200, Paolo Bonzini wrote: > > Il 16/09/2014 16:43, Michael S. Tsirkin ha scritto: > > >> > > > >> > /root/qemu/tests/test-qdev-global-props.c: In function > > >> > ‘test_static_prop’: > > >> > /root/qemu/tests

Re: [Qemu-devel] [PATCH] virtio-scsi: clean up virtio_scsi_parse_cdb

2014-09-18 Thread Laszlo Ersek
On 09/18/14 16:58, Paolo Bonzini wrote: > The command direction according to the guest-passed buffers > is already stored in the VirtIOSCSIReq. We can use it instead > of computing it again from req->elem. > > Cc: Laszlo Ersek > Signed-off-by: Paolo Bonzini > --- > hw/scsi/virtio-scsi.c | 8 +-

Re: [Qemu-devel] [PULL 03/12] test-qdev-global-props: Run tests on subprocess

2014-09-18 Thread Michael Roth
Quoting Michael S. Tsirkin (2014-09-14 13:41:23) > From: Eduardo Habkost > > There are multiple reasons for running the global property tests on a > subprocess: > > * We need the global_props lists to be empty for each test case, so > global properties from the previous test won't affect the n

[Qemu-devel] [PATCH 6/6] pc: clean up pre-2.1 compatibility code

2014-09-18 Thread Paolo Bonzini
Now that the alignment is parameterized, we can share the call to acpi_align_size between all three (1.7-2.0/2.1/2.2+) sizing algorithms. Also, with the new rule that SSDT cannot change except with machine-type compat code, the magic 97 constant for a CPU's AML size is not anymore "legacy", so ren

[Qemu-devel] [PATCH 4/6] pc: introduce new ACPI table sizing algorithm

2014-09-18 Thread Paolo Bonzini
Add padding after the DSDT. Tables that vary depending on the command-line arguments will have to be byte-equivalent across QEMU versions >= 2.2, while fixed tables (including the DSDT) can be changed freely. This new algorithm will let us present smaller ACPI blobs to the guest, which avoids bug

[Qemu-devel] [PATCH 3/6] pc: redo sizing of reserved high memory area for -kernel/-initrd

2014-09-18 Thread Paolo Bonzini
The initrd is loaded close to the top of memory, with some extra padding on top to account for memory that the BIOS could reserve in the memory map (for ACPI tables and the like). This reserved high memory area can get quite big. We currently force a 128k size for 2.1+ machine types, but even tha

[Qemu-devel] [PATCH 2/6] pc: load the kernel after ACPI tables are built

2014-09-18 Thread Paolo Bonzini
The initrd is placed at the top of RAM, just below some space left for the ACPI tables. In order to allow for large ACPI tables, we need to delay loading of the initrd until after the ACPI tables are built. We can use the existing pc_guest_info_machine_done notifier, and also subsume xen_load_lin

[Qemu-devel] [PATCH 5/6] pc: go back to smaller ACPI tables

2014-09-18 Thread Paolo Bonzini
The new algorithm introduced by the previous patch lets us make tables smaller and avoid bugs due to large tables. Use it for 2.2+ machine types by tweaking the default fixed_table_align and acpi_table_align values. At the same time, preserve backwards-compatible logic for pc-i440fx-2.1. Signed-

[Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-18 Thread Paolo Bonzini
In the emergency last-minute patches of QEMU 2.1 we did two things: - fixed migration problems from 1.7 or 2.0 to 2.1 due to changes in ACPI table sizes - ensured that future versions will not break migration compatibility with 2.2 for reasonable configurations (with ACPI tables smaller tha

[Qemu-devel] [PATCH 1/6] pc: initialize fw_cfg earlier

2014-09-18 Thread Paolo Bonzini
Notifiers are called in LIFO order. In our case, we want fw_cfg to use the output of the machine-specific notifier: we will process the -kernel command-line option there, and this will modify the boot order which fw_cfg's notifier processes. Because fw_cfg's notifier has to run last, we have to c

[Qemu-devel] [PATCH] target-arm: Don't handle c15_cpar changes via tb_flush()

2014-09-18 Thread Peter Maydell
At the moment we try to handle c15_cpar with the strategy of: * emit generated code which makes assumptions about its value * when the register value changes call tb_flush() to throw away the now-invalid generated code This works because XScale CPUs are always uniprocessor, but it's confusing

[Qemu-devel] [PATCH for-2.1.2] pc: add more padding between the end of the initrd and the end of memory

2014-09-18 Thread Paolo Bonzini
Besides ACPI tables, there are a few other uses of high memory in SeaBIOS: SMBIOS tables and USB drivers use it in particular. These uses allocate a very small amount of memory. Malloc metadata also lives there. So we need _some_ extra padding there to avoid initrd breakage, but not much. John

Re: [Qemu-devel] [Qemu-stable] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages

2014-09-18 Thread Greg Kurz
On Thu, 28 Aug 2014 09:39:30 -0500 Michael Roth wrote: > Quoting Greg Kurz (2014-08-28 05:18:06) > > On Wed, 27 Aug 2014 12:36:03 -0500 > > Michael Roth wrote: > > > From: Jan Kiszka > > > > > > The spec says (and real HW confirms this) that, if the bus master bit > > > is 0, the device will no

Re: [Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases

2014-09-18 Thread Kevin Wolf
Am 18.09.2014 um 16:06 hat Markus Armbruster geschrieben: > Eric Blake writes: > > > On 09/18/2014 03:57 AM, Kevin Wolf wrote: > >> While thinking about precedence of conflicting block device options from > >> different sources, I noticed that you can specify both an option and its > >> legacy al

Re: [Qemu-devel] [PATCH 0/2] vfio: Another try to fix ROM BAR endianness

2014-09-18 Thread Alex Williamson
On Thu, 2014-09-18 at 23:55 +1000, Alexey Kardashevskiy wrote: > On 09/12/2014 11:30 AM, Alexey Kardashevskiy wrote: > > On 09/12/2014 07:20 AM, Alex Williamson wrote: > >> On Tue, 2014-09-09 at 21:34 +1000, Alexey Kardashevskiy wrote: > >>> I did some tests on LE/BE guest/host combinations and cam

[Qemu-devel] [PATCH] virtio-scsi: clean up virtio_scsi_parse_cdb

2014-09-18 Thread Paolo Bonzini
The command direction according to the guest-passed buffers is already stored in the VirtIOSCSIReq. We can use it instead of computing it again from req->elem. Cc: Laszlo Ersek Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-)

Re: [Qemu-devel] [PATCH] Prevent segmentation fault in case of relative resolve of uri

2014-09-18 Thread Markus Armbruster
Markus Armbruster writes: > Stefan Hajnoczi writes: > >> On Tue, Sep 09, 2014 at 09:45:06AM +0200, mreza...@redhat.com wrote: >>> From: Miroslav Rezanina >>> >>> It was possible to call strcmp with NULL argument, that can cause >>> segmentation fault. Properly checking parameters to prevent th

Re: [Qemu-devel] [PATCH] Prevent segmentation fault in case of relative resolve of uri

2014-09-18 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Tue, Sep 09, 2014 at 09:45:06AM +0200, mreza...@redhat.com wrote: >> From: Miroslav Rezanina >> >> It was possible to call strcmp with NULL argument, that can cause >> segmentation fault. Properly checking parameters to prevent this >> situation. >> >> Signed-off-b

Re: [Qemu-devel] [PATCH v3 01/23] block: Split bdrv_new_root() off bdrv_new()

2014-09-18 Thread Kevin Wolf
Am 16.09.2014 um 20:12 hat Markus Armbruster geschrieben: > Creating an anonymous BDS can't fail. Make that obvious. > > Signed-off-by: Markus Armbruster > Reviewed-by: Max Reitz > Reviewed-by: Benoît Canet Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 16:16, Peter Lieven ha scritto: >> >>> As you can see from the multiwrite_merge trace the merging has never >>> been stopped because of >>> the max_transfer_length. The question is, why are the I/O requests >>> not coming in as specified? >> I think that's because of the filesystem.

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-18 Thread Peter Lieven
On 18.09.2014 16:12, Paolo Bonzini wrote: Il 12/09/2014 13:43, Peter Lieven ha scritto: As you can see from the multiwrite_merge trace the merging has never been stopped because of the max_transfer_length. The question is, why are the I/O requests not coming in as specified? I think that's be

Re: [Qemu-devel] [PATCH 4/4] block: avoid creating oversized writes in multiwrite_merge

2014-09-18 Thread Paolo Bonzini
Il 05/09/2014 18:51, Peter Lieven ha scritto: > Signed-off-by: Peter Lieven > --- > block.c |5 + > 1 file changed, 5 insertions(+) > > diff --git a/block.c b/block.c > index fa4c34b..db3f842 100644 > --- a/block.c > +++ b/block.c > @@ -4554,6 +4554,11 @@ static int multiwrite_merge(Bloc

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-18 Thread Paolo Bonzini
Il 12/09/2014 13:43, Peter Lieven ha scritto: > > As you can see from the multiwrite_merge trace the merging has never been > stopped because of > the max_transfer_length. The question is, why are the I/O requests not coming > in as specified? I think that's because of the filesystem. Try writ

Re: [Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases

2014-09-18 Thread Markus Armbruster
Eric Blake writes: > On 09/18/2014 03:57 AM, Kevin Wolf wrote: >> While thinking about precedence of conflicting block device options from >> different sources, I noticed that you can specify both an option and its >> legacy alias at the same time (e.g. readonly=on,read-only=off). Rather >> than

Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency

2014-09-18 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 10:53:32PM +0200, Walid Nouri wrote: > >Writing data safely to disk can take milliseconds. Not sure how that > >figures into your commit step, but I guess commit needs to be fast. > > > We have no time to waste ;) but the disk semantic at the primary should be > kept as exp

Re: [Qemu-devel] [PATCH 0/2] vfio: Another try to fix ROM BAR endianness

2014-09-18 Thread Alexey Kardashevskiy
On 09/12/2014 11:30 AM, Alexey Kardashevskiy wrote: > On 09/12/2014 07:20 AM, Alex Williamson wrote: >> On Tue, 2014-09-09 at 21:34 +1000, Alexey Kardashevskiy wrote: >>> I did some tests on LE/BE guest/host combinations and came up with >>> these 2 patches. Please comment. Thanks. >> >> Have you t

Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread Gonglei (Arei)
> >>> Can we use qerror_report_err still in realize function? > >>> Just report this error but not propagate to the caller. Thanks! > >> > >> No, I think propagating the error is fine. In fact I suggested checking > >> for the error more aggressively, so that it can better propagate to the > >> ca

Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 15:35, Gonglei (Arei) ha scritto: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> Sent: Thursday, September 18, 2014 9:31 PM >> To: Gonglei (Arei); qemu-devel@nongnu.org >> Cc: kra...@redhat.com; Huangweidong (C); arm...@redhat.com; Huangpeng >> (Peter); Luonengjun >> Subject:

Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, September 18, 2014 9:31 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: kra...@redhat.com; Huangweidong (C); arm...@redhat.com; Huangpeng > (Peter); Luonengjun > Subject: Re: [PATCH v2 12/19] dev-serial: convert init to reali

Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 15:26, Gonglei (Arei) ha scritto: > Yes, we can. > > Can we use qerror_report_err still in realize function? > Just report this error but not propagate to the caller. Thanks! No, I think propagating the error is fine. In fact I suggested checking for the error more aggressively, s

Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, September 18, 2014 8:59 PM > Subject: Re: [PATCH v2 12/19] dev-serial: convert init to realize > > Il 18/09/2014 14:47, arei.gong...@huawei.com ha scritto: > > if (s->cs->be_open && !dev->attached) { > > -usb_device_

[Qemu-devel] [PATCH v4] pci-hotplug-old: avoid losing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() produces an error, we will lose the error message. Using error_report to report it. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake --- v4: fix typo in the subject (Eric), Thanks. v3: fix som

Re: [Qemu-devel] [PATCH v3] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Gonglei (Arei)
> From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Thursday, September 18, 2014 9:01 PM > Subject: Re: [PATCH v3] pci-hotplug-old: avoid lossing error message > > On 09/18/2014 06:58 AM, arei.gong...@huawei.com wrote: > > From: Gonglei > > s/lossing/losing/ in the subject (still) > > > > > W

Re: [Qemu-devel] [PATCH v3] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Eric Blake
On 09/18/2014 06:58 AM, arei.gong...@huawei.com wrote: > From: Gonglei s/lossing/losing/ in the subject (still) > > When scsi_bus_legacy_add_drive() produces an error, > we will lose the error message. Using error_report > to report it. > > Cc: Markus Armbruster > Signed-off-by: Gonglei > Re

Re: [Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 14:47, arei.gong...@huawei.com ha scritto: > if (s->cs->be_open && !dev->attached) { > -usb_device_attach(dev, &local_err); > -if (local_err) { > -qerror_report_err(local_err); > -error_free(local_err); > -} > +usb_device_at

[Qemu-devel] [PATCH v3] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() produces an error, we will lose the error message. Using error_report to report it. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake --- v3: fix some typos/grammar issues (Eric) and add 'R-by'

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Eric Blake
On 09/18/2014 05:53 AM, Kevin Wolf wrote: > Am 18.09.2014 um 13:04 hat Markus Armbruster geschrieben: >> Before this patch, QAPI type BlockdevCacheOptions is used only as a >> member of BlockdevOptionsBase. >> >> BlockdevOptionsBase is a collection configuration settings. >> Consequently, it's a co

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 14:47, arei.gong...@huawei.com ha scritto: > From: Gonglei > > DeviceClass->init is the old interface, let's convert usb > devices to the new realize API. In this way, all the > implementations now use error_setg instead of > qerror_report/error_report for reporting error. > > Cc:

Re: [Qemu-devel] [PATCH] qga: Fix possible freed memory accessing

2014-09-18 Thread Eric Blake
On 09/18/2014 06:42 AM, zhanghailiang wrote: > On 2014/9/18 20:17, Eric Blake wrote: >> On 09/17/2014 09:33 PM, zhanghailiang wrote: >>> If readdir_r fails, error_setg_errno will reference the freed >>> pointer *dirpath*. >>> >>> Signed-off-by: zhanghailiang >>> --- >>> qga/commands-posix.c | 10

[Qemu-devel] [PATCH v2 19/19] usb-bus: remove "init" from USBDeviceClass struct

2014-09-18 Thread arei.gonglei
From: Gonglei All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/bus.c | 2 -- include/hw/usb.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bu

[Qemu-devel] [PATCH v2 18/19] usb-mtp: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-mtp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 0820046..108ece8 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -1060,7 +1060,7 @@ st

Re: [Qemu-devel] vhost-user: VHOST_SET_MEM_TABLE, VHOST_SET_VRING_CALL need a reply?

2014-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2014 at 08:39:57PM +0800, Linhaifeng wrote: > > > On 2014/9/18 13:16, Michael S. Tsirkin wrote: > > On Thu, Sep 18, 2014 at 08:45:37AM +0800, Linhaifeng wrote: > >> > >> > >> On 2014/9/17 17:56, Michael S. Tsirkin wrote: > >>> On Wed, Sep 17, 2014 at 05:39:04PM +0800, Linhaifeng w

[Qemu-devel] [PATCH v2 15/19] dev-wacom: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-wacom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 1b73fd0..217d48e 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -335,14 +33

[Qemu-devel] [PATCH v2 16/19] usb-audio: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 7b9957b..83ebe83 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -628,7 +628

[Qemu-devel] [PATCH v2 17/19] usb-redir: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of qerror_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/redirect.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/usb/redirect.c b/h

[Qemu-devel] [PATCH v2 05/19] libusb: using error_report instead of fprintf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/host-libusb.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 863be64..0650910 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c

[Qemu-devel] [PATCH v2 14/19] dev-hid: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/dev-hid.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c i

[Qemu-devel] [PATCH v2 10/19] dev-uas: using error_report instead of fprintf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-uas.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 884c003..1508064 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -13,6 +13,7 @@

[Qemu-devel] [PATCH v2 07/19] dev-storage: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-storage.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/usb/dev-s

<    1   2   3   4   >