[Qemu-devel] [PULL 65/73] iotests: Drop vpc from 004's and 104's format list

2015-03-09 Thread Kevin Wolf
From: Max Reitz Both tests require the test image to have a specific size; this cannot be guaranteed by vpc (unless tuning the test specifically for that format). It is safe to exclude vpc from 004 because what is tested there is implemented in a generic part in the block layer and not format-sp

[Qemu-devel] [PULL 72/73] iotests: add O_DIRECT alignment probing test

2015-03-09 Thread Kevin Wolf
From: Stefan Hajnoczi This test case checks that image files can be opened even if I/O produces EIO errors. QEMU should not refuse opening failed disks since the guest may be configured for multipath I/O where accessing failed disks is expected. Signed-off-by: Stefan Hajnoczi Signed-off-by: Ke

[Qemu-devel] [PULL 68/73] Add testcase for scsi-hd devices without drive property

2015-03-09 Thread Kevin Wolf
From: Christian Borntraeger Lets add a test for scsi devices without a drive. This was broken by a recent block patch, thus indicating that we need a testcase. Suggested-by: Kevin Wolf Signed-off-by: Christian Borntraeger Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Kev

[Qemu-devel] [PULL 66/73] block/vdi: Add locking for parallel requests

2015-03-09 Thread Kevin Wolf
From: Max Reitz When allocating a new cluster, the first write to it must be the one doing the allocation, because that one pads its write request to the cluster size; if another write to that cluster is executed before it, that write will be overwritten due to the padding. See https://bugs.laun

[Qemu-devel] [PULL 00/73] Block patches

2015-03-09 Thread Kevin Wolf
Hi Peter, I hope this fixes the build problems in Stefan's pull request. I'm only posting those patches that are new compared to Stefan's version, or that have actual differences (the fixed build errors; not reposting for my added Signed-off-by). Kevin The following changes since commit 6608c7e

[Qemu-devel] [PULL 71/73] block/raw-posix: fix launching with failed disks

2015-03-09 Thread Kevin Wolf
From: Stefan Hajnoczi Since commit c25f53b06eba1575d5d0e92a0132455c97825b83 ("raw: Probe required direct I/O alignment") QEMU has failed to launch if image files produce I/O errors. Previously, QEMU would launch successfully and the guest would see the errors when attempting I/O. This is a regr

Re: [Qemu-devel] [PATCH v2 7/8] qtest/ahci: add qcow2 support to ahci-test

2015-03-09 Thread John Snow
On 03/09/2015 10:27 AM, Kevin Wolf wrote: Am 26.02.2015 um 00:06 hat John Snow geschrieben: This will enable the testing of high offsets without wasting a lot of disk space, and does not impact the previous tests. mkimg and mkqcow2 are added to libqos for other tests. Signed-off-by: John Sno

Re: [Qemu-devel] [PATCH RFC] Makefile.target: prepend $libs_softmmu to $LIBS

2015-03-09 Thread Stefano Stabellini
On Mon, 9 Mar 2015, Wei Liu wrote: > On Tue, Mar 10, 2015 at 12:11:44AM +0900, Peter Maydell wrote: > > On 9 March 2015 at 23:54, Wei Liu wrote: > > > I discovered a problem when trying to build QEMU statically with gcc. > > > libm is an element of LIBS while libpixman-1 is an element in > > > lib

Re: [Qemu-devel] [PATCH RFC] Makefile.target: prepend $libs_softmmu to $LIBS

2015-03-09 Thread Paolo Bonzini
On 09/03/2015 15:54, Wei Liu wrote: > I discovered a problem when trying to build QEMU statically with gcc. > libm is an element of LIBS while libpixman-1 is an element in > libs_softmmu. Libpixman references functions in libm, so the original > ordering makes linking fail. > > This fix is to re

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

2015-03-09 Thread Alex Bennée
Peter Maydell writes: > On 9 March 2015 at 21:56, Christoffer Dall > wrote: >> this function, however, is not used only when migration, but should >> generally cover the case where you want to synchronize QEMU's state into >> KVM's state, right? So while it may not be harmful in currently >>

Re: [Qemu-devel] [PATCH v2 7/8] qtest/ahci: add qcow2 support to ahci-test

2015-03-09 Thread Kevin Wolf
Am 09.03.2015 um 17:03 hat John Snow geschrieben: > On 03/09/2015 10:27 AM, Kevin Wolf wrote: > >Am 26.02.2015 um 00:06 hat John Snow geschrieben: > >>+void mkimg(const char *file, const char *fmt, unsigned size_mb) > >>+{ > >>+gchar *cli; > >>+bool ret; > >>+int rc; > >>+GError *er

Re: [Qemu-devel] [PATCH v4 for-2.3 00/25] hw/pc: implement multiple primary busses for pc machines

2015-03-09 Thread Marcel Apfelbaum
On 03/09/2015 04:19 PM, Gerd Hoffmann wrote: Hi, My series is based on commit 09d219a. Try please on top of this commit. Ok, that works. Going to play with that now ;) Good luck! ... and tell me what you think :) If you need any help with the command line of the pxb device, let me know,.

Re: [Qemu-devel] [PATCH] iscsi: Fix check for username

2015-03-09 Thread Paolo Bonzini
On 07/03/2015 10:14, Stefan Weil wrote: > The variable user in struct iscsi_url is a character array, not a pointer. > Therefore its address will never be NULL. > > clang reports this error: > > block/iscsi.c:1329:20: warning: > comparison of array 'iscsi_url->user' not equal to a null pointer

Re: [Qemu-devel] [PATCH v2 7/8] qtest/ahci: add qcow2 support to ahci-test

2015-03-09 Thread Markus Armbruster
John Snow writes: > On 03/09/2015 10:27 AM, Kevin Wolf wrote: >> Am 26.02.2015 um 00:06 hat John Snow geschrieben: >>> This will enable the testing of high offsets without >>> wasting a lot of disk space, and does not impact the >>> previous tests. >>> >>> mkimg and mkqcow2 are added to libqos fo

Re: [Qemu-devel] [PATCH RFC] Makefile.target: prepend $libs_softmmu to $LIBS

2015-03-09 Thread Peter Maydell
On 10 March 2015 at 00:23, Wei Liu wrote: > On Tue, Mar 10, 2015 at 12:11:44AM +0900, Peter Maydell wrote: >> Maybe we should actively stop configure allowing a static build >> of the softmmu and tools binaries, rather than having configs which >> nobody really tests? Or is there a genuine use cas

Re: [Qemu-devel] [PATCH RFC] Makefile.target: prepend $libs_softmmu to $LIBS

2015-03-09 Thread Wei Liu
On Tue, Mar 10, 2015 at 01:36:49AM +0900, Peter Maydell wrote: > On 10 March 2015 at 00:23, Wei Liu wrote: > > On Tue, Mar 10, 2015 at 12:11:44AM +0900, Peter Maydell wrote: > >> Maybe we should actively stop configure allowing a static build > >> of the softmmu and tools binaries, rather than hav

Re: [Qemu-devel] [PATCH v4 for-2.3 00/25] hw/pc: implement multiple primary busses for pc machines

2015-03-09 Thread Gerd Hoffmann
On Mo, 2015-03-09 at 18:26 +0200, Marcel Apfelbaum wrote: > On 03/09/2015 04:19 PM, Gerd Hoffmann wrote: > >Hi, > > > >> My series is based on commit 09d219a. Try please on top of this commit. > > > > Ok, that works. Going to play with that now ;) > Good luck! ... and tell me what you think :)

Re: [Qemu-devel] [PULL v6 0/3] pci, pc, virtio fixes and cleanups

2015-03-09 Thread Markus Armbruster
Michael, I noticed only now that you applied my "[PATCH v2 0/2] pci: Bury dead legacy commands pci_add, pci_del" *backwards*: 2/2 before 1/2. Happens to be harmless, but please check your workflow.

Re: [Qemu-devel] [PATCH v2 7/8] qtest/ahci: add qcow2 support to ahci-test

2015-03-09 Thread John Snow
On 03/09/2015 12:27 PM, Kevin Wolf wrote: Am 09.03.2015 um 17:03 hat John Snow geschrieben: On 03/09/2015 10:27 AM, Kevin Wolf wrote: Am 26.02.2015 um 00:06 hat John Snow geschrieben: +void mkimg(const char *file, const char *fmt, unsigned size_mb) +{ +gchar *cli; +bool ret; +int

[Qemu-devel] [PATCH 0/8] Remove more unused functions

2015-03-09 Thread Thomas Huth
Here are some more patches to remove completely unused functions from QEMU. Please review carefully, some of the functions might still get usefull in the future again, so if you discover one, please let me know, then I'll remove it from the patch series again. Thomas Huth (8): migration: Remove

[Qemu-devel] [PATCH 3/8] pci: Remove unused functions

2015-03-09 Thread Thomas Huth
The functions pcie_ari_init(), pcie_cap_is_arifwd_enabled() and ich9_d2pbr_init() are completely unused and thus can be deleted. Signed-off-by: Thomas Huth Cc: Michael S. Tsirkin Cc: Anthony Liguori --- hw/pci-bridge/i82801b11.c | 21 - hw/pci/pcie.c | 25 --

[Qemu-devel] [PATCH 1/8] migration: Remove unused functions

2015-03-09 Thread Thomas Huth
migrate_rdma_pin_all(), qsb_clone() and qsb_set_length() are completely unused and thus can be deleted. Signed-off-by: Thomas Huth Cc: Juan Quintela Cc: Amit Shah --- include/migration/migration.h |1 - include/migration/qemu-file.h |2 - migration/migration.c |9 --- m

[Qemu-devel] [PATCH 4/8] monitor: Remove unused functions

2015-03-09 Thread Thomas Huth
The functions ringbuf_read_completion() and monitor_get_rs() are not used anywhere anymore, so let's remove them. Signed-off-by: Thomas Huth Cc: Luiz Capitulino --- hmp.h |1 - include/monitor/monitor.h |1 - monitor.c | 13 - 3 files ch

[Qemu-devel] [PATCH 2/8] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()

2015-03-09 Thread Thomas Huth
The function is not used anymore and thus can be deleted. Signed-off-by: Thomas Huth Cc: Dmitry Fleytman --- hw/net/vmxnet_rx_pkt.c |7 --- hw/net/vmxnet_rx_pkt.h |9 - 2 files changed, 0 insertions(+), 16 deletions(-) diff --git a/hw/net/vmxnet_rx_pkt.c b/hw/net/vmxnet_rx_

[Qemu-devel] [PATCH 6/8] usb: Remove unused functions

2015-03-09 Thread Thomas Huth
Delete set_usb_string(), usb_ep_get_ifnum(), usb_ep_get_max_packet_size() usb_ep_get_max_streams() and usb_ep_set_pipeline() since they are not used anymore. Signed-off-by: Thomas Huth Cc: Gerd Hoffmann --- hw/usb/core.c| 41 - include/hw/usb.h |

[Qemu-devel] [PATCH 8/8] Remove various unused functions

2015-03-09 Thread Thomas Huth
The functions tpm_backend_thread_tpm_reset(), serial_set_frequency() and iothread_find() are completely unused, let's remove them. Signed-off-by: Thomas Huth --- backends/tpm.c | 11 --- hw/char/serial.c |7 --- include/hw/char/serial.h

[Qemu-devel] [PATCH 5/8] ioport: Remove unused functions

2015-03-09 Thread Thomas Huth
The functions portio_list_destroy() and portio_list_del() are not used anywhere, so let's remove them. Signed-off-by: Thomas Huth Cc: Paolo Bonzini --- include/exec/ioport.h |2 -- ioport.c | 24 2 files changed, 0 insertions(+), 26 deletions(-) diff

[Qemu-devel] [PATCH 7/8] util: Remove unused functions

2015-03-09 Thread Thomas Huth
Delete the unused functions qemu_signalfd_available(), qemu_send_full() and qemu_recv_full(). Signed-off-by: Thomas Huth Cc: Markus Armbruster --- include/qemu-common.h |4 --- include/qemu/compatfd.h |1 - util/compatfd.c | 19 - util/osdep.c| 66 -

[Qemu-devel] Modeling a platform in QEMU for beginners

2015-03-09 Thread Arthur Krieger
Dear QEMU developers, I currently have problems getting started with the development in QEMU. What I want to know is where I start, if I want to emulate my own hardware with QEMU. It seems to me there is no real guide or tutorial for this? I started looking into the implementation of the versat

[Qemu-devel] [PATCH RFC] Implement GIC-500 from GICv3 family for arm64

2015-03-09 Thread shlomo.pongratz
From: Shlomo Pongratz This patch is a first step toward 128 cores support for arm64. At first only 64 cores are supported for two reasons: First the largest integer type has the size of 64 bits and modifying essential data structures in order to support 128 cores will require the usage of bitops

[Qemu-devel] Modeling a platform in QEMU

2015-03-09 Thread Arthur Krieger
Dear QEMU developers, I currently have problems getting started with the development in QEMU. What I want to know is where I start, if I want to emulate my own hardware with QEMU. It seems to me there is no real guide or tutorial for this? I started looking into the implementation of the versat

[Qemu-devel] [PATCH RFC] Implement GIC-500 from GICv3 family for arm64

2015-03-09 Thread shlomo.pongratz
From: Shlomo Pongratz This patch is a first step toward 128 cores support for arm64. At first only 64 cores are supported for two reasons: First the largest integer type has the size of 64 bits and modifying essential data structures in order to support 128 cores will require the usage of bitops

Re: [Qemu-devel] [PATCH 0/4] ucb: Convert remaining PCI HCDs to realize

2015-03-09 Thread Markus Armbruster
Gerd Hoffmann writes: > On Di, 2015-02-17 at 14:28 +0100, Markus Armbruster wrote: >> This series requires my "[PATCH 00/10] pci: Partial conversion to >> realize" and my "[PATCH 0/9] Clean up around error_get_pretty(), >> qerror_report_err()". >> >> Markus Armbruster (4): >> usb: Propagate er

[Qemu-devel] help parsing qemu options

2015-03-09 Thread Gabriel L. Somlo
Hi, Assuming I'm trying to add a new command line option to qemu in vl.c: ... static QemuOptsList qemu_foo_opts = { .name = "foo", .implied_opt_name = "name", .head = QTAILQ_HEAD_INITIALIZER(qemu_foo_opts.head), .desc = { { .name = "name", .type =

[Qemu-devel] [PATCH v2 3/4] scsi: Improve error reporting for invalid drive property

2015-03-09 Thread Markus Armbruster
When setting "realized" fails, scsi_bus_legacy_add_drive() passes the error to qerror_report_err(), then returns an unspecific "Setting drive property failed" error, which is reported further up the call chain. Example: $ qemu-system-x86_64 -nodefaults -S -display none \ > -drive if=scsi,

[Qemu-devel] [PATCH v2 2/4] hw: Propagate errors through qdev_prop_set_drive()

2015-03-09 Thread Markus Armbruster
Three kinds of callers: 1. On failure, report the error and abort Passing &error_abort does the job. No functional change. 2. On failure, report the error and exit() This is qdev_prop_set_drive_nofail(). Error reporting moves from qdev_prop_set_drive() to its caller. Because hiding

[Qemu-devel] [PATCH v2 4/4] scsi: Convert remaining PCI HBAs to realize()

2015-03-09 Thread Markus Armbruster
These are "am53c974", "dc390", "lsi53c895a", "lsi53c810", "megasas", "megasas-gen2". Signed-off-by: Markus Armbruster Reviewed-by: Peter Crosthwaite --- hw/scsi/esp-pci.c| 30 +++--- hw/scsi/lsi53c895a.c | 14 +++--- hw/scsi/megasas.c| 14 +++---

[Qemu-devel] [PATCH v2 0/4] scsi: Error reporting cleanups, realize()

2015-03-09 Thread Markus Armbruster
Applies cleanly on master now, and passes make check with my "[PATCH RFC 1/1] qtest: Add generic PCI device test" applied on top. v2: - Rebase: PATCH 01 loses the spapr_vscsi.c hunk, because commit 28b07e7 converted it to realize(). Commit message updated. PATCH 03 commit message updated to

[Qemu-devel] [PATCH v2 1/4] scsi: Clean up duplicated error in legacy if=scsi code

2015-03-09 Thread Markus Armbruster
Commit a818a4b changed scsi_bus_legacy_handle_cmdline() to report errors from scsi_bus_legacy_add_drive() with error_report() in addition to returning them. That's inappropriate. Two kinds of callers: 1. realize methods (devices "esp", "virtio-scsi-device" and "spapr-vscsi") The error obj

Re: [Qemu-devel] [PATCH] macio: Convert to realize()

2015-03-09 Thread Markus Armbruster
Alexander Graf writes: > On 27.02.15 13:43, Markus Armbruster wrote: >> Convert device models "macio-oldworld" and "macio-newworld". >> >> Signed-off-by: Markus Armbruster >> --- >> Depends on my "[PATCH 00/10] pci: Partial conversion to realize", >> which is in Michael's latest pull request. >

Re: [Qemu-devel] [PATCH] virtio-pci: Convert to realize()

2015-03-09 Thread Markus Armbruster
Markus Armbruster writes: > Signed-off-by: Markus Armbruster > --- > Depends on my "[PATCH 00/10] pci: Partial conversion to realize", > which is in Michael's latest pull request. Applies cleanly to master now (commit 277263e).

Re: [Qemu-devel] [PATCH] pci: Convert pci_nic_init() to Error to avoid qdev_init()

2015-03-09 Thread Markus Armbruster
Markus Armbruster writes: > qdev_init() is deprecated, and will be removed when its callers have > been weaned off it. > > Signed-off-by: Markus Armbruster > --- > Depends on my "[PATCH 00/10] pci: Partial conversion to realize", > which is in Michael's latest pull request, and on my "[PATCH v2

Re: [Qemu-devel] [PATCH v4 for-2.3 00/25] hw/pc: implement multiple primary busses for pc machines

2015-03-09 Thread Marcel Apfelbaum
On 03/09/2015 06:55 PM, Gerd Hoffmann wrote: On Mo, 2015-03-09 at 18:26 +0200, Marcel Apfelbaum wrote: On 03/09/2015 04:19 PM, Gerd Hoffmann wrote: Hi, My series is based on commit 09d219a. Try please on top of this commit. Ok, that works. Going to play with that now ;) Good luck! ...

Re: [Qemu-devel] [PATCH v2 0/4] scsi: Error reporting cleanups, realize()

2015-03-09 Thread Paolo Bonzini
On 09/03/2015 19:17, Markus Armbruster wrote: > Applies cleanly on master now, and passes make check with my "[PATCH > RFC 1/1] qtest: Add generic PCI device test" applied on top. > > v2: > - Rebase: PATCH 01 loses the spapr_vscsi.c hunk, because commit > 28b07e7 converted it to realize(). Co

Re: [Qemu-devel] [PATCH 5/8] ioport: Remove unused functions

2015-03-09 Thread Paolo Bonzini
On 09/03/2015 18:30, Thomas Huth wrote: > The functions portio_list_destroy() and portio_list_del() > are not used anywhere, so let's remove them. > > Signed-off-by: Thomas Huth > Cc: Paolo Bonzini I think it's better to provide a complete API, mimicking memory_region_* as much as possible, s

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

2015-03-09 Thread Christoffer Dall
On Mon, Mar 09, 2015 at 10:31:19PM +0900, Peter Maydell wrote: > On 9 March 2015 at 21:56, Christoffer Dall > wrote: > > this function, however, is not used only when migration, but should > > generally cover the case where you want to synchronize QEMU's state into > > KVM's state, right? So whi

Re: [Qemu-devel] [RFC v4 3/9] vfio: add pcie extanded capability support

2015-03-09 Thread Alex Williamson
On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote: > For vfio pcie device, we could expose the extanded capability on s/extanded/extended/ > PCIE bus. in order to avoid config space broken, we introduce > a copy config for parsing extended caps. and rebuild the pcie > extended config space. > >

Re: [Qemu-devel] [RFC v4 6/9] vfio: add 'x-aer' option to disable aer capability

2015-03-09 Thread Alex Williamson
On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote: > add 'x-aer' option to disable aer capability if user > want. I'm generally one to favor using the x- flag, but we need to figure out if we need to make this be a supported option or not. We also need to decide whether we should include your pre

Re: [Qemu-devel] [RFC v4 4/9] aer: impove pcie_aer_init to support vfio device

2015-03-09 Thread Alex Williamson
On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote: > extend pcie_aer_init arguments to adjust vfio device. Some discussion of why vfio wants this would be useful. > Signed-off-by: Chen Fan > --- > hw/pci-bridge/ioh3420.c| 3 ++- > hw/pci-bridge/xio3130_downstream.c | 3 ++- > hw/pc

Re: [Qemu-devel] [RFC v4 8/9] vfio-pci: pass the aer error to guest

2015-03-09 Thread Alex Williamson
On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote: > when the vfio device encounters an uncorrectable error in host, > the vfio_pci driver will signal the eventfd registered by this > vfio device, the results in the qemu eventfd handler getting > invoked. > > this patch is to pass the error to gue

Re: [Qemu-devel] [RFC v4 0/9] pass aer error to guest for vfio device

2015-03-09 Thread Alex Williamson
On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote: > For now, for vfio pci passthough devices when qemu receives > an error from host aer report, there just terminate the guest, > but usually user want to know what error occurred but stop the > guest, so this patches add aer capability support for

Re: [Qemu-devel] [PATCH v2 7/8] qtest/ahci: add qcow2 support to ahci-test

2015-03-09 Thread John Snow
On 03/09/2015 10:27 AM, Kevin Wolf wrote: Am 26.02.2015 um 00:06 hat John Snow geschrieben: This will enable the testing of high offsets without wasting a lot of disk space, and does not impact the previous tests. mkimg and mkqcow2 are added to libqos for other tests. Signed-off-by: John Sno

Re: [Qemu-devel] qemu crash in coroutine bdrv_co_do_rw

2015-03-09 Thread Christian Borntraeger
Am 06.03.2015 um 18:23 schrieb Stefan Hajnoczi: > On Thu, Feb 26, 2015 at 10:29:57AM +0100, Christian Borntraeger wrote: >> is this some know issue? Under heavy load with lots of dataplane devices I >> sometimes get a segfault in the bdrc_co_do_rw routine: >> >> #0 bdrv_co_do_rw (opaque=0x0) at /

[Qemu-devel] [PULL 2/7] target-i386: Simplify listflags() function

2015-03-09 Thread Eduardo Habkost
listflags() had lots of unnecessary complexity. Instead of printing to a buffer that will be immediately printed, simply call the printing function directly. Also, remove the fbits and flags arguments that were always set to the same value. Also, there's no need to list the flags in reverse order.

[Qemu-devel] [PULL 1/7] target-i386: Move topology.h to include/hw/i386

2015-03-09 Thread Eduardo Habkost
This will allow the PC code to use the header, and lets us eliminate the QEMU_INCLUDES hack inside tests/Makefile. Reviewed-by: Paolo Bonzini Reviewed-by: Andreas Färber Signed-off-by: Eduardo Habkost --- {target-i386 => include/hw/i386}/topology.h | 6 +++--- target-i386/cpu.c

[Qemu-devel] [PULL 6/7] target-i386: Move APIC ID compatibility code to pc.c

2015-03-09 Thread Eduardo Habkost
The APIC ID compatibility code is required only for PC, and now that x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that code can be moved to pc.c. Reviewed-by: Paolo Bonzini Reviewed-by: Andreas Färber Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 35 +

[Qemu-devel] [PULL 0/7] X86 patches

2015-03-09 Thread Eduardo Habkost
The following changes since commit 277263e1b320d759a760ba6c5ea75ec268f929e5: Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging (2015-03-09 14:04:14 +) are available in the git repository at: https://github.com/ehabkost/qemu.git tags/x86-pull-request

[Qemu-devel] [PULL 3/7] target-i386: Eliminate unnecessary get_cpuid_vendor() function

2015-03-09 Thread Eduardo Habkost
The function was used in only two places. In one of them, the function made the code less readable by requiring temporary te[bcd]x variables. In the other one we can simply inline the existing code. Reviewed-by: Andreas Färber Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 20 ++

[Qemu-devel] [PULL 4/7] target-i386: Remove unused APIC ID default code

2015-03-09 Thread Eduardo Habkost
The existing apic_id = cpu_index code has no visible effect: the PC code already initializes the APIC ID according to the topology on pc_new_cpu(), and linux-user memcpy()s the CPU state (including cpuid_apic_id) on cpu_copy(). Remove the dead code and simply let APIC ID to to be 0 by default. Thi

[Qemu-devel] [PULL 7/7] target-i386: Require APIC ID to be explicitly set before CPU realize

2015-03-09 Thread Eduardo Habkost
On softmuu, instead of setting APIC ID automatically when creating a X86CPU, require the property to be set before realizing the object (which is already done by the CPU creation code on PC). Keep apic_id = 0 by default on *-user so it can simply create a new CPU object and realize it without extr

[Qemu-devel] [PULL 5/7] target-i386: Move CPUX86State::cpuid_apic_id to X86CPU::apic_id

2015-03-09 Thread Eduardo Habkost
The field doesn't need to be inside CPUX86State, and it is not specific for the CPUID instruction, so move and rename it. Reviewed-by: Paolo Bonzini Reviewed-by: Andreas Färber Signed-off-by: Eduardo Habkost --- target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 15 +++ target-i

[Qemu-devel] Crash when using -daemonize

2015-03-09 Thread Stefan Berger
Since an upgrade to Fedora 21, I get crashes with QEMU when using -daemonize. I noticed this since libvirt could not QMP probe QEMU. This is the command line used: x86_64-softmmu/qemu-system-x86_64 -S -no-user-config -nodefaults -nographic -M none -pidfile /tmp/foo -daemonize Here's the back

Re: [Qemu-devel] Crash when using -daemonize

2015-03-09 Thread Christian Borntraeger
Am 09.03.2015 um 22:03 schrieb Stefan Berger: > Since an upgrade to Fedora 21, I get crashes with QEMU when using -daemonize. > I noticed this since libvirt could not QMP probe QEMU. > > This is the command line used: > > x86_64-softmmu/qemu-system-x86_64 -S -no-user-config -nodefaults -nographi

[Qemu-devel] Fix for incorrect SYSRET instruction implementation -- anyone looked at this yet?

2015-03-09 Thread Bill Paul
Nobody has commented on this yet. According to my reading of the Intel documentation, the SYSRET instruction is supposed to force the RPL bits of the %ss register to 3 when returning to user mode. The actual sequence is: SS.Selector <-- (IA32_STAR[63:48]+8) OR 3; (* RPL forced to 3 *) However,

Re: [Qemu-devel] Fix for incorrect SYSRET instruction implementation -- anyone looked at this yet?

2015-03-09 Thread Stefan Weil
Hi Bill, sending text only e-mails might help. Usually git send-email is better than using KMail or other mail software. Use tools like git gui to get a correct signature. Any optional personal comments should come directly after the line with ---. Could you please re-send your patch? Check it

[Qemu-devel] [RFC 1/2] macio: move unaligned DMA read code into separate pmac_dma_read() function

2015-03-09 Thread Mark Cave-Ayland
This considerably helps simplify the complexity of the macio read routines and by switching macio CDROM accesses to use the new code, fixes the issue with the CDROM device being detected intermittently by Darwin/OS X. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c | 252

[Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-03-09 Thread Mark Cave-Ayland
This patchset attempts to separate out the IDE/ATAPI logic from the unaligned DMA access logic for macio which provides the following benefits: 1) Reduced code complexity The existing macio IDE/ATAPI functions were becoming extremely difficult to follow through the various callbacks. By splitting

[Qemu-devel] [RFC 2/2] macio: move unaligned DMA write code into separate pmac_dma_write() function

2015-03-09 Thread Mark Cave-Ayland
Similarly switch the macio IDE routines over to use the new function and tidy-up the remaining code as required. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c | 267 include/hw/ppc/mac_dbdma.h |4 - 2 files changed, 124 insertion

Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2015-03-09 Thread John Snow
On 02/26/2015 05:02 PM, Paolo Bonzini wrote: On 26/02/2015 22:31, Jordan Hargrave wrote: My OS initializes DMAR page tables and then enables the IOMMU translation. Then OS initializes AHCI driver. Writes VIRTUAL DMA to FIS registers. eg. FIS DMA address is 0x1 (maps to some hardware ph

Re: [Qemu-devel] Fix for incorrect SYSRET instruction implementation -- anyone looked at this yet?

2015-03-09 Thread Bill Paul
Of all the gin joints in all the towns in all the world, Stefan Weil had to walk into mine at 15:23:36 on Monday 09 March 2015 and say: > Hi Bill, > > sending text only e-mails might help. Usually git send-email is better > than using KMail or other mail software. You know, I thought I was send

[Qemu-devel] Fix for incorrect SYSRET instruction implementation -- anyone looked at this yet?

2015-03-09 Thread Bill Paul
I'm certain I'm sending this in plain text mode this time. According to my reading of the Intel documentation, the SYSRET instruction is supposed to force the RPL bits of the %ss register to 3 when returning to user mode. The actual sequence is: SS.Selector <-- (IA32_STAR[63:48]+8) OR 3; (* RPL

Re: [Qemu-devel] Crash when using -daemonize

2015-03-09 Thread Stefan Berger
On 03/09/2015 05:34 PM, Christian Borntraeger wrote: Am 09.03.2015 um 22:03 schrieb Stefan Berger: Since an upgrade to Fedora 21, I get crashes with QEMU when using -daemonize. I noticed this since libvirt could not QMP probe QEMU. This is the command line used: x86_64-softmmu/qemu-system-x86

[Qemu-devel] [PATCH] tpm: Move memory initialization into realize function

2015-03-09 Thread Stefan Berger
From: Stefan Berger Move the memory initialization into the DeviceClass realize function due to isa_address_space crashing if called in the instance init function. A recent change must have changed the order in which structures are initialized so that this move is now necessary. Signed-off-by: S

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

2015-03-09 Thread Chen, Tiejun
On 2015/3/9 18:17, Wei Liu wrote: On Mon, Mar 09, 2015 at 02:45:36PM +0800, Chen, Tiejun wrote: [...] +exit (1); +} +} else if (!xlu_cfg_get_string(config, "gfx_passthru", &buf, 0)) { +if (libxl_gfx_passthru_kind_from_string(buf, &b_info->u.hvm.

Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to track dirty sector

2015-03-09 Thread Fam Zheng
On Mon, 03/09 16:14, Zhang Haoyu wrote: > Hi John, Vladimir > We can using active block commit to implement incremental backup without > guest disruption, > e.g., > origin <= A <= B <= C <= current BDS, > a new external snapshot will be produced before every time backup, > we can migrate A, B, C

[Qemu-devel] OVMF whitepaper released

2015-03-09 Thread Laszlo Ersek
http://people.redhat.com/~lersek/ovmf-whitepaper-c770f8c.txt (An official Red Hat whitepaper PDF edition, for graphical displays, is in the works. As time and technical hurdles allow, both the plain text and the PDF editions shall appear under too, replacing th

Re: [Qemu-devel] [PATCH v5 01/45] Start documenting how postcopy works.

2015-03-09 Thread David Gibson
On Thu, Mar 05, 2015 at 09:21:39AM +, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > On Wed, Feb 25, 2015 at 04:51:24PM +, Dr. David Alan Gilbert > (git) wrote: [snip] > > > +=== Enabling postcopy === > > > + > > > +To enable postcopy (prior to the s

Re: [Qemu-devel] [PATCH RFC] Implement GIC-500 from GICv3 family for arm64

2015-03-09 Thread Shannon Zhao
On 2015/3/9 22:41, shlomo.pongr...@toganetworks.com wrote: > From: Shlomo Pongratz > > This patch is a first step toward 128 cores support for arm64. > > At first only 64 cores are supported for two reasons: > First the largest integer type has the size of 64 bits and modifying > essential data

Re: [Qemu-devel] [PATCH v5 04/45] Add qemu_get_counted_string to read a string prefixed by a count byte

2015-03-09 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:27PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > and use it in loadvm_state and ram_load. > > Signed-off-by: Dr. David Alan Gilbert Pure cleanup, no change to migration stream. Reviewed-by: David Gibson -- David Gibson

Re: [Qemu-devel] [PATCH v5 02/45] Split header writing out of qemu_save_state_begin

2015-03-09 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:25PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Split qemu_save_state_begin to: > qemu_save_state_header That writes the initial file header. > qemu_save_state_beginThat sets up devices and does the first >

Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirty sector

2015-03-09 Thread Zhang Haoyu
On 2015-03-10 08:29:19, Fam Zheng wrote: > On Mon, 03/09 16:14, Zhang Haoyu wrote: > > Hi John, Vladimir > > We can using active block commit to implement incremental backup without > > guest disruption, > > e.g., > > origin <= A <= B <= C <= current BDS, > > a new external snapshot will be pro

Re: [Qemu-devel] [RFC v4 0/9] pass aer error to guest for vfio device

2015-03-09 Thread Chen Fan
On 03/10/2015 04:34 AM, Alex Williamson wrote: On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote: For now, for vfio pci passthough devices when qemu receives an error from host aer report, there just terminate the guest, but usually user want to know what error occurred but stop the guest, so t

Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirty sector

2015-03-09 Thread Fam Zheng
On Tue, 03/10 09:30, Zhang Haoyu wrote: > > On 2015-03-10 08:29:19, Fam Zheng wrote: > > On Mon, 03/09 16:14, Zhang Haoyu wrote: > > > Hi John, Vladimir > > > We can using active block commit to implement incremental backup without > > > guest disruption, > > > e.g., > > > origin <= A <= B <= C

[Qemu-devel] [PATCH 0/3] fix pci related code typos

2015-03-09 Thread Chen Fan
Chen Fan (3): pcie_aer: fix typos in pcie_aer_inject_error comment aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register pci: fix several trivial typos in comment hw/pci/pcie_aer.c | 8 include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_aer.h | 2 +- 3 files cha

[Qemu-devel] [PATCH 2/3] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register

2015-03-09 Thread Chen Fan
>From pcie spec, the bits attributes are RW1CS in Correctable Error Status Register, so this patch fix a wrong definition for PCI_ERR_COR_STATUS register with w1cmask type. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pc

[Qemu-devel] [PATCH 1/3] pcie_aer: fix typos in pcie_aer_inject_error comment

2015-03-09 Thread Chen Fan
Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 1f4be16..7ca077a 100644

[Qemu-devel] [PATCH 3/3] pci: fix several trivial typos in comment

2015-03-09 Thread Chen Fan
Signed-off-by: Chen Fan --- include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_aer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index bdee464..b82de15 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -137,7

Re: [Qemu-devel] [PATCH 0/3] fix pci related code typos

2015-03-09 Thread Chen Fan
Cc: qemu-trivial On 03/10/2015 09:49 AM, Chen Fan wrote: Chen Fan (3): pcie_aer: fix typos in pcie_aer_inject_error comment aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register pci: fix several trivial typos in comment hw/pci/pcie_aer.c | 8 include/hw/pci

Re: [Qemu-devel] question about live migration with storage

2015-03-09 Thread Zhang Haoyu
On 2015-01-15 18:08:39, Paolo Bonzini wrote: > > On 15/01/2015 10:56, Zhang Haoyu wrote: > > I see, when waiting the completion of drive_mirror IO, the coroutine will be > > switched back to main-thread to poll and process other events, like qmp > > request, > > then after the IO completed, coro

Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirtysector

2015-03-09 Thread Zhang Haoyu
On 2015-03-10 09:54:47, Fam Zheng wrote: > On Tue, 03/10 09:30, Zhang Haoyu wrote: > > > > On 2015-03-10 08:29:19, Fam Zheng wrote: > > > On Mon, 03/09 16:14, Zhang Haoyu wrote: > > > > Hi John, Vladimir > > > > We can using active block commit to implement incremental backup > > > > without gu

[Qemu-devel] [PATCH] Revert "timer: replace time() with QEMU_CLOCK_HOST"

2015-03-09 Thread Alexey Kardashevskiy
This reverts commit 2ed1ebcf65edf6757d8904000889ce52cc0a9d1b as it breaks compile when configured with --enable-profiler: /home/alexey/p/qemu/vl.c:710:15: error: 'qemu_time' redeclared as different kind of symbol static time_t qemu_time(void) ^ In file included from /home/alexey/p

Re: [Qemu-devel] [PATCH v5 05/45] Create MigrationIncomingState

2015-03-09 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:28PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There are currently lots of pieces of incoming migration state scattered > around, and postcopy is adding more, and it seems better to try and keep > it together. > > allocate MIS i

Re: [Qemu-devel] [PATCH v5 06/45] Provide runtime Target page information

2015-03-09 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:29PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The migration code generally is built target-independent, however > there are a few places where knowing the target page size would > avoid artificially moving stuff into arch_init.

Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit to trackdirtysector

2015-03-09 Thread Fam Zheng
> Is it worthy to implement it? Maybe, I think once we start to assign node-name to each BDS in the tree, this will be natural to implement. > And does qemu support commit any external snapshot to its backing file? Yes.

Re: [Qemu-devel] [PATCH v5 07/45] Return path: Open a return path on QEMUFile for sockets

2015-03-09 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:30PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Postcopy needs a method to send messages from the destination back to > the source, this is the 'return path'. > > Wire it up for 'socket' QEMUFile's using a dup'd fd. > > Signed-o

Re: [Qemu-devel] [PATCH v5 08/45] Return path: socket_writev_buffer: Block even on non-blocking fd's

2015-03-09 Thread David Gibson
On Wed, Feb 25, 2015 at 04:51:31PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The return path uses a non-blocking fd so as not to block waiting > for the (possibly broken) destination to finish returning a message, > however we still want outbound data to beha

Re: [Qemu-devel] [RFC] introduce bitmap to bdrv_commit totrackdirtysector

2015-03-09 Thread Zhang Haoyu
On 2015-03-10 10:58:44, Fam Zheng wrote: > > Is it worthy to implement it? > > Maybe, I think once we start to assign node-name to each BDS in the tree, this > will be natural to implement. > Once implemented, to be honest, I really don't see much advantages of incremental backup over aforement

Re: [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows

2015-03-09 Thread Alexey Kardashevskiy
On 02/23/2015 07:33 PM, Alexey Kardashevskiy wrote: These I have in my DDW working tree for quite a while, while I am polishing others, there could go to some tree already. Please comment. Thanks! Alex, ping. "spapr_pci: Make find_phb()/find_dev() public" won't apply after Gavin's EEH patche

Re: [Qemu-devel] [PATCH 2/3] ppc64-softmmu: Remove unsupported FDC from config

2015-03-09 Thread Alexey Kardashevskiy
On 03/10/2015 01:39 AM, Alexey Kardashevskiy wrote: On 03/09/2015 11:31 PM, Alexander Graf wrote: On 02.03.15 00:46, Alexey Kardashevskiy wrote: This removes floppy disks support as it is not supported by any PPC64 system anyway as the only way to have floppy disk on such systems would be an

Re: [Qemu-devel] [PATCH 2/3] ppc64-softmmu: Remove unsupported FDC from config

2015-03-09 Thread David Gibson
On Tue, Mar 10, 2015 at 02:52:48PM +1100, Alexey Kardashevskiy wrote: > On 03/10/2015 01:39 AM, Alexey Kardashevskiy wrote: > >On 03/09/2015 11:31 PM, Alexander Graf wrote: > >> > >> > >>On 02.03.15 00:46, Alexey Kardashevskiy wrote: > >>>This removes floppy disks support as it is not supported by

<    1   2   3   >