Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Markus Armbruster
Peter Maydell writes: > On 4 February 2015 at 16:33, Markus Armbruster wrote: >> Peter Maydell writes: >>> On 4 February 2015 at 13:49, Markus Armbruster wrote: Remind me: what GLib version are we targeting, and why? >>> >>> Our current minimum is 2.12 (or 2.20 in Windows specific code),

[Qemu-devel] [PULL 4/9] qmp: Clean up qmp_query_spice() #ifndef !CONFIG_SPICE dummy

2015-02-04 Thread Markus Armbruster
QMP command query-spice exists only #ifdef CONFIG_SPICE. Due to QAPI limitations, we need a dummy function anyway, but it's unreachable. Our current dummy function goes out of its way to produce the exact same error as the QMP core does for unknown commands. Cute, but both unclean and unnecessar

[Qemu-devel] [PULL 8/9] balloon: Factor out common "is balloon active" test

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- balloon.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/balloon.c b/balloon.c index 2884c2d..728bb70 100644 --- a/balloon.c +++ b/balloon.c @@ -36,6 +36,19 @@ static QEMUBalloonEven

[Qemu-devel] [PULL 7/9] balloon: Inline qemu_balloon(), qemu_balloon_status()

2015-02-04 Thread Markus Armbruster
... and simplify a bit. Permits factoring out common error checks in the next commit. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- balloon.c | 42 +- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/balloon.c b/balloon.c in

[Qemu-devel] [PULL 0/9] qmp hmp balloon: Cleanups around error reporting

2015-02-04 Thread Markus Armbruster
Luiz asked me to request a pull rather than going through his tree. The following changes since commit 83761b9244ad2ed39d3cfabe8a0e901ab906f7bf: Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20150127' into staging (2015-01-27 22:25:56 +) are available in the git reposito

[Qemu-devel] [PULL 1/9] qmp hmp: Factor out common "using spice" test

2015-02-04 Thread Markus Armbruster
Into qemu_using_spice(). For want of a better place, put it next the existing monitor command handler dummies in qemu-spice.h. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gerd Hoffmann --- include/ui/qemu-spice.h | 10 ++ monitor.c | 5 +++-- q

[Qemu-devel] [PULL 6/9] qmp: Eliminate silly QERR_COMMAND_NOT_FOUND macro

2015-02-04 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean this one up. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qap

[Qemu-devel] [PULL 9/9] balloon: Eliminate silly QERR_ macros

2015-02-04 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean up the balloon ones. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-o

[Qemu-devel] [PULL 2/9] qmp hmp: Improve error messages when SPICE is not in use

2015-02-04 Thread Markus Armbruster
Commit 7572150 adopted QERR_DEVICE_NOT_ACTIVE for the purpose, probably because adding another error seemed cumbersome overkill. Produces "No spice device has been activated", which is awkward. We've since abandoned our quest for "rich" error objects. Time to undo the damage to this error message

[Qemu-devel] [PULL 3/9] hmp: Compile hmp_info_spice() only with CONFIG_SPICE

2015-02-04 Thread Markus Armbruster
It's dead code when CONFIG_SPICE is off. If it wasn't, it would crash dereferencing the null pointer returned by the qmp_query_spice() dummy in qmp.c. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gerd Hoffmann --- hmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --

[Qemu-devel] [PULL 5/9] qmp: Simplify recognition of capability negotiation command

2015-02-04 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- monitor.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/monitor.c b/monitor.c index 8323de3..2ac40c9 100644 --- a/monitor.c +++ b/monitor.c @@ -4783,9 +4783,9 @@ static int monitor_can_read(void *opaqu

[Qemu-devel] [PATCH v6 05/10] pci: add network device class 'other' for network switches

2015-02-04 Thread sfeldma
From: Scott Feldman Rocker is an ethernet switch device, so add 'other' network device class as defined by PCI to cover these types of devices. Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- include/hw/pci/pci_ids.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/hw

[Qemu-devel] [PATCH v6 03/10] rocker: add register programming guide

2015-02-04 Thread sfeldma
From: Scott Feldman This is the register programming guide for the Rocker device. It's intended for driver writers and device writers. It covers the device's PCI space, the register set, DMA interface, and interrupts. Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- docs/specs/roc

[Qemu-devel] [PATCH v6 10/10] rocker: timestamp on the debug logs helps correlate with events in the VM

2015-02-04 Thread sfeldma
From: David Ahern Signed-off-by: David Ahern Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- hw/net/rocker/rocker.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/net/rocker/rocker.h b/hw/net/rocker/rocker.h index ef77487..5ae8aff 100644 --- a/

[Qemu-devel] [PATCH v6 09/10] MAINTAINERS: add rocker

2015-02-04 Thread sfeldma
From: Scott Feldman Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 430688d..8b6f8d4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -736,6 +736,12 @@ S: Maintained F: hw/net/vmxn

[Qemu-devel] [PATCH v6 07/10] qmp: add rocker device support

2015-02-04 Thread sfeldma
From: Scott Feldman Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples: (qemu) info rocker sw1 name: sw1 id: 0x013512005452 ports: 4 (qemu) info rocker-ports sw1 ena/speed/

[Qemu-devel] [PATCH v6 01/10] net: add MAC address string printer

2015-02-04 Thread sfeldma
From: Scott Feldman We can use this in virtio-net code as well as new Rocker driver code, so up-level this. Signed-off-by: Scott Feldman Reviewed-by: Eric Blake --- include/net/net.h |1 + net/net.c |7 +++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b

[Qemu-devel] [PATCH v6 08/10] rocker: add tests

2015-02-04 Thread sfeldma
From: Scott Feldman Add some basic test for rocker to test L2/L3/L4 functionality. Requires an external test environment, simp, located here: https://github.com/scottfeldman/simp To run tests, simp environment must be installed and a suitable VM image built and installed with a Linux 3.18 (or

[Qemu-devel] [PATCH v6 02/10] virtio-net: use qemu_mac_strdup_printf

2015-02-04 Thread sfeldma
From: Scott Feldman Signed-off-by: Scott Feldman Reviewed-by: Eric Blake --- hw/net/virtio-net.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 45da34a..698156f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/vir

[Qemu-devel] [PATCH v6 04/10] pci: add rocker device ID

2015-02-04 Thread sfeldma
From: Scott Feldman Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- docs/specs/pci-ids.txt |1 + include/hw/pci/pci.h |1 + 2 files changed, 2 insertions(+) diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt index c6732fe..e4a4490 100644 --- a/docs/specs/pci-ids

[Qemu-devel] [PATCH v6 00/10] rocker: add new rocker ethernet switch device

2015-02-04 Thread sfeldma
From: Scott Feldman v6: - Per Stefan Hajnoczi review: - Move tests to tests/rocker - Fix some mem leaks - Fix doc grammer/spelling - Per Eric Blake review: - Add #optional to optional args comments in qmp interface - Add "query-" prefix to qmp cmds - Fix doc gramm

Re: [Qemu-devel] [PATCH v5 03/10] rocker: add register programming guide

2015-02-04 Thread Scott Feldman
On Mon, Feb 2, 2015 at 8:19 AM, Stefan Hajnoczi wrote: > On Thu, Jan 22, 2015 at 12:03:52AM -0800, sfel...@gmail.com wrote: >> +SECTION 7: Switch Control >> += >> + >> +This section covers switch-wide register settings. >> + >> +Control >> +--- >> + >> +This register is

Re: [Qemu-devel] [PATCH v5 03/10] rocker: add register programming guide

2015-02-04 Thread Scott Feldman
On Tue, Feb 3, 2015 at 8:40 AM, Eric Blake wrote: > On 01/22/2015 01:03 AM, sfel...@gmail.com wrote: >> From: Scott Feldman >> >> This is the register programming guide for the Rocker device. It's intended >> for driver writers and device writers. It covers the device's PCI space, >> the regist

Re: [Qemu-devel] [PATCH 5/9] exec: protect mru_block with RCU

2015-02-04 Thread Fam Zheng
On Tue, 02/03 13:52, Paolo Bonzini wrote: > Hence, freeing a RAMBlock has to be switched to call_rcu. > > Signed-off-by: Paolo Bonzini > --- > exec.c | 60 > +++--- > include/exec/cpu-all.h | 2 ++ > 2 files changed, 44 insertions(+),

Re: [Qemu-devel] [PATCH v5 07/10] qmp: add rocker device support

2015-02-04 Thread Scott Feldman
On Tue, Feb 3, 2015 at 7:10 AM, Eric Blake wrote: > On 01/22/2015 01:03 AM, sfel...@gmail.com wrote: >> From: Scott Feldman >> >> Add QMP/HMP support for rocker devices. This is mostly for debugging >> purposes >> to see inside the device's tables and port configurations. Some examples: >> > >

Re: [Qemu-devel] [PATCH v16 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-02-04 Thread Gavin Shan
On Thu, Feb 05, 2015 at 02:26:16PM +1100, David Gibson wrote: >On Wed, Feb 04, 2015 at 01:27:36PM +1100, Gavin Shan wrote: >> The patch implements sPAPRPHBClass::eeh_handler so that the >> EEH RTAS requests can be routed to VFIO for further handling. >> >> Signed-off-by: Gavin Shan >> --- >> hw/

Re: [Qemu-devel] [PATCH RFC v4 1/6] qemu-iotests: run qemu with -nodefaults

2015-02-04 Thread chen xiao guang
On 02/05/2015 11:52 AM, Fam Zheng wrote: On Thu, 02/05 11:44, Xiao Guang Chen wrote: This patch fixes an io test suite issue that was introduced with the commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only a single "stdio" character device'. The option supresses the creation

Re: [Qemu-devel] [PATCH v16 1/2] sPAPR: Implement EEH RTAS calls

2015-02-04 Thread Gavin Shan
On Thu, Feb 05, 2015 at 02:19:49PM +1100, David Gibson wrote: >On Wed, Feb 04, 2015 at 01:27:35PM +1100, Gavin Shan wrote: >> The emulation for EEH RTAS requests from guest isn't covered >> by QEMU yet and the patch implements them. >> >> The patch defines constants used by EEH RTAS calls and adds

Re: [Qemu-devel] Intel X86 hardware transactional memory

2015-02-04 Thread Patrick Williams III
>I think one possible way is to clear the software tlb on entry to the>transaction and disable (not install any translations) the software>TLB till the end of the transaction. >In the softmmu helper functions, the memory addresses as well as>value can then be tracked in a hashtable and committed to

Re: [Qemu-devel] [PATCH v4 18/18] vfio: Enable in-kernel acceleration via VFIO KVM device

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:30PM +1100, Alexey Kardashevskiy wrote: > TCE hypercalls (H_PUT_TCE, H_PUT_TCE_INDIRECT, H_STUFF_TCE) use a logical bus > number (LIOBN) to identify which TCE table the request is addressed to. > However VFIO kernel driver operates with IOMMU group IDs and has no idea

Re: [Qemu-devel] [PATCH v4 17/18] target-ppc: kvm: make use of KVM_CREATE_SPAPR_TCE_64

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:29PM +1100, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy Needs a commit message, in particular explaining what KVM_CREATE_SPAPR_TCE_64 is and why we want it. I mean, I can guess, but I wrote the original KVM_CREATE_SPAPR_TCE, so I'm hardly typic

Re: [Qemu-devel] [PATCH v4 16/18] spapr_rtas_ddw: Workaround broken LE guests

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:28PM +1100, Alexey Kardashevskiy wrote: > Recent kernels do parse results of what DDW RTAS calls return incorrectly > if compiled with LITTLE_ENDIAN=yes. > > This adds special handling for such guests. I don't really follow this commit message. You need to justify i

Re: [Qemu-devel] [PATCH v4 15/18] spapr_pci_vfio: Enable multiple groups per container

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:27PM +1100, Alexey Kardashevskiy wrote: > This enables multiple IOMMU groups in one VFIO container which means > that multiple devices from different groups can share the same IOMMU table > and locked pages counting can be done once as there is no need to have > severa

Re: [Qemu-devel] [PATCH v4 13/18] spapr_pci: Advertise dynamic DMA windows to guest

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:25PM +1100, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy Needs a commit message. > --- > hw/ppc/spapr.c | 5 + > hw/ppc/spapr_pci.c | 25 + > 2 files changed, 30 insertions(+) > > diff --git a/hw/ppc/spapr.c b/

Re: [Qemu-devel] [PATCH v4 11/18] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:23PM +1100, Alexey Kardashevskiy wrote: > This implements DDW for emulated and VFIO PHB. > > This removes all DMA windows on reset and creates the default window, > same is done on the "ibm,reset-pe-dma-window" call. > This converts sPAPRPHBClass::finish_realize to sP

Re: [Qemu-devel] [PATCH v4 12/18] spapr_rtas: Add Dynamic DMA windows (DDW) RTAS handlers

2015-02-04 Thread David Gibson
On Thu, Jan 29, 2015 at 08:27:24PM +1100, Alexey Kardashevskiy wrote: > This adds support for Dynamic DMA Windows (DDW) option defined by > the SPAPR specification which allows to have additional DMA window(s) > which can support page sizes other than 4K. > > The existing implementation of DDW in

Re: [Qemu-devel] [PATCH RFC v4 1/6] qemu-iotests: run qemu with -nodefaults

2015-02-04 Thread Fam Zheng
On Thu, 02/05 11:44, Xiao Guang Chen wrote: > This patch fixes an io test suite issue that was introduced with the > commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only > a single "stdio" character device'. The option supresses the creation of > default devices. > > Reviewed-by

[Qemu-devel] [PATCH RFC v4 6/6] qemu-iotests: s390x: fix test 055

2015-02-04 Thread Xiao Guang Chen
There is no such device 'ide-cd' defined on the s390 platform, so test_medium_not_found() test is skipped. Reviewed-by: Michael Mueller Signed-off-by: Xiao Guang Chen --- tests/qemu-iotests/055 | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/qemu-iotests/055 b/tests/qemu-io

[Qemu-devel] [PATCH RFC v4 2/6] qemu-iotests: qemu machine type support

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li This patch adds qemu machine type support to the io test suite. Based on the qemu default machine type the reference output file can now vary from the default to a machine specific output file if necessary. That shall allow all platforms to use this test suite. Reviewed-by:

[Qemu-devel] [PATCH RFC v4 3/6] qemu-iotests: fix tests 067, 071 and 087

2015-02-04 Thread Xiao Guang Chen
Update the output files for test case 067, 071 and 087 because qemu option -nodefaults was used to start a guest so there are no default floppy and cdrom for guests any more. Use virtio-blk instead of virtio-blk-pci as the device driver for test case 067. For virtio-blk-pci is the same with virtio-

[Qemu-devel] [PATCH RFC v4 1/6] qemu-iotests: run qemu with -nodefaults

2015-02-04 Thread Xiao Guang Chen
This patch fixes an io test suite issue that was introduced with the commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only a single "stdio" character device'. The option supresses the creation of default devices. Reviewed-by: Michael Mueller Signed-off-by: Xiao Guang Chen ---

[Qemu-devel] [PATCH RFC v4 5/6] qemu-iotests: s390x: fix test 051

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li The tests for device type "ide_cd" are skipped for the s390 platform. The default device id of hard disk on the s390 platform differs to that of the x86 platform. A new variable device_id is defined and "virtio0" set for the s390 platform. A s390 platform specific output file i

[Qemu-devel] [PATCH RFC v4 4/6] qemu-iotests: s390x: fix test 041

2015-02-04 Thread Xiao Guang Chen
From: Mao Chuan Li There is no such device 'ide-cd' defined on the s390 platform, so test_medium_not_found() test is skipped. Reviewed-by: Michael Mueller Signed-off-by: Mao Chuan Li --- tests/qemu-iotests/041 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/041

[Qemu-devel] [PATCH RFC v4 0/6] Update tests/qemu-iotests failing cases for the s390 platform

2015-02-04 Thread Xiao Guang Chen
v4: 1. Generate all patches based on the latest master branch. 2. Rearrange patches v3: 1. Fix a typo in v2. v2: 1. Drop the patches for test 039 for it has been fixed in upstream. 2. Integrate patches for test 071, 067 and 087. 3. Keep the other patches. v1: 1. updated the test suite to be def

Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-04 Thread David Gibson
On Thu, Feb 05, 2015 at 01:54:39AM +0100, Alexander Graf wrote: > > > On 05.02.15 01:48, David Gibson wrote: > > On Wed, Feb 04, 2015 at 04:19:14PM +0100, Alexander Graf wrote: > >> > >> > >> On 04.02.15 02:32, David Gibson wrote: > >>> On Wed, Feb 04, 2015 at 08:19:06AM +1100, Paul Mackerras wro

Re: [Qemu-devel] [PATCH v16 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 01:27:36PM +1100, Gavin Shan wrote: > The patch implements sPAPRPHBClass::eeh_handler so that the > EEH RTAS requests can be routed to VFIO for further handling. > > Signed-off-by: Gavin Shan > --- > hw/ppc/spapr_pci_vfio.c | 58 >

Re: [Qemu-devel] [PATCH v16 1/2] sPAPR: Implement EEH RTAS calls

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 01:27:35PM +1100, Gavin Shan wrote: > The emulation for EEH RTAS requests from guest isn't covered > by QEMU yet and the patch implements them. > > The patch defines constants used by EEH RTAS calls and adds > callback sPAPRPHBClass::eeh_handler, which is going to be used >

[Qemu-devel] Intel X86 hardware transactional memory

2015-02-04 Thread Xin Tong
If i want to implement Intel X86 hardware transactional memory (HTM) in QEMU. what would be a good way to track the memory accesses. I think one possible way is to clear the software tlb on entry to the transaction and disable (not install any translations) the software TLB till the end of the tra

Re: [Qemu-devel] [PATCH 4/9] rcu: introduce RCU-enabled QLIST

2015-02-04 Thread Fam Zheng
On Wed, 02/04 13:46, Paolo Bonzini wrote: > > > On 04/02/2015 04:42, Fam Zheng wrote: > > On Tue, 02/03 13:52, Paolo Bonzini wrote: > >> From: Mike Day > >> > >> Add RCU-enabled variants on the existing bsd DQ facility. Each > >> operation has the same interface as the existing (non-RCU) > >> ve

Re: [Qemu-devel] [PATCH v2 07/12] qcow2/overlaps: Protect active L1 table

2015-02-04 Thread Eric Blake
On 11/24/2014 08:56 AM, Max Reitz wrote: > Keep track of the active L1 table in the metadata list to protect it > against accidental modifications. > > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 11 +++ > block/qcow2-snapshot.c | 10 ++ > block/qcow2.c |

Re: [Qemu-devel] [PATCH v2 06/12] qcow2/overlaps: Protect refcount blocks

2015-02-04 Thread Eric Blake
On 11/24/2014 08:56 AM, Max Reitz wrote: > Keep track of the refcount blocks in the metadata list to protect them > against accidental modifications. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 38 +- > 1 file changed, 37 insertions(+), 1 del

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-04 Thread Chen, Tiejun
On 2015/2/4 18:41, Ian Campbell wrote: On Wed, 2015-02-04 at 09:34 +0800, Chen, Tiejun wrote: "-machine xxx,igd-passthru=on", to enable/disable that feature. And we also remove that old option, "-gfx_passthru", just from the case of LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN sinc

Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-04 Thread Alexander Graf
On 05.02.15 01:48, David Gibson wrote: > On Wed, Feb 04, 2015 at 04:19:14PM +0100, Alexander Graf wrote: >> >> >> On 04.02.15 02:32, David Gibson wrote: >>> On Wed, Feb 04, 2015 at 08:19:06AM +1100, Paul Mackerras wrote: On Tue, Feb 03, 2015 at 05:10:51PM +1100, David Gibson wrote: > qem

Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-04 Thread David Gibson
On Wed, Feb 04, 2015 at 04:19:14PM +0100, Alexander Graf wrote: > > > On 04.02.15 02:32, David Gibson wrote: > > On Wed, Feb 04, 2015 at 08:19:06AM +1100, Paul Mackerras wrote: > >> On Tue, Feb 03, 2015 at 05:10:51PM +1100, David Gibson wrote: > >>> qemu currently implements the hypercalls H_LOGI

Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Add 32/64-bit register sync

2015-02-04 Thread Greg Bellows
On Tue, Feb 3, 2015 at 12:54 PM, Peter Maydell wrote: > On 27 January 2015 at 23:58, Greg Bellows wrote: > > Add AArch32 to AArch64 register sychronization functions. > > Replace manual register synchronization with new functions in > > aarch64_cpu_do_interrupt() and HELPER(exception_return)().

Re: [Qemu-devel] [PATCH 0/3] rcu: add option to use upstream liburcu

2015-02-04 Thread Emilio G. Cota
On Wed, Feb 04, 2015 at 22:17:44 +0100, Paolo Bonzini wrote: > > What I'm investigating now is how to do this in a manner that is palatable > > to upstream. For this as it's well known we need a multi-threaded TCG, > > and I believe quite a few bits from liburcu(-cds) might help to > > get there. >

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other

2015-02-04 Thread Chen Gang S
On 1/29/15 09:37, Chen Gang S wrote: > On 1/29/15 06:36, Peter Maydell wrote: >> On 28 January 2015 at 22:09, Chen Gang S wrote: >>> - Is what I said above really correct (e.g. is linux-user really mainly >>>for cpu emulation)?. >> >> Not really. linux-user is mainly for running single Linux

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 22:35 schrieb Marcel Apfelbaum: [...] >> Would a function there that does gets >> S390_CCW_MACHINE(current_machine)->aes_key_wrap >> considered ok, or do we need to pollute hw/core/machine.c with architecture >> specific >> options? > We surely don't add this to hw/core/machine.

Re: [Qemu-devel] [PATCH] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-04 Thread Eric Blake
On 02/04/2015 02:59 PM, Eric Blake wrote: >> qcow2_alloc_bytes() is a function with insufficient error handling and >> an unnecessary goto. This patch rewrites it. >> - redo: >> + >> free_in_cluster = s->cluster_size - >> offset_into_cluster(s, s->free_byte_offset); > > Based on [0]

Re: [Qemu-devel] [PATCH] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-04 Thread Eric Blake
On 02/04/2015 12:53 PM, Max Reitz wrote: My review jumps around a bit; try to follow the numbers to learn my stream of consciousness on reviewing it. tl;dr: It looks like this is functionally correct (you won't break behavior), but that you have a pessimization bug (see [7]), so you ought to spin

Re: [Qemu-devel] Network Migration in QEMU during Live Migration

2015-02-04 Thread Gary R Hook
On 2/4/15 2:02 PM, Eric Blake wrote: On 02/04/2015 12:01 PM, Azizul Hakim wrote: Does QEMU support network migration so that the migration process is transparent to users? For example if my VM has a web server, I would like my user still be able to send request to the server after the migration

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 09:45 PM, Christian Borntraeger wrote: Am 04.02.2015 um 16:43 schrieb Marcel Apfelbaum: Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed option descriptions from the -machine QemuOptsList to avoid repeating MachineState's QOM properties. This results in a

Re: [Qemu-devel] [PATCH 0/3] rcu: add option to use upstream liburcu

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 22:01, Emilio G. Cota wrote: >> You're right, I was imprecise---I meant they are interoperable. You can >> use atomic_rcu_read/write together with liburcu, you do not need to use >> the liburcu-provided rcu_dereference/rcu_assign_pointer. > > It's true that they can coexist. I'm j

Re: [Qemu-devel] [PATCH v3 1/8] tcg: Move some opcode generation functions out of line

2015-02-04 Thread Bastian Koppelmann
On 02/03/2015 03:35 PM, Richard Henderson wrote: Some of these functions are really quite large. We have a number of things that ought to be circularly dependent, but we duplicated code to break that chain for the inlines. This saved 25% of the code size of one of the translators I examined.

Re: [Qemu-devel] [PATCH v3 7/8] tcg: Implement insert_op_before

2015-02-04 Thread Bastian Koppelmann
On 02/03/2015 03:35 PM, Richard Henderson wrote: Rather reserving space in the op stream for optimization, let the optimizer add ops as necessary. Signed-off-by: Richard Henderson --- tcg/optimize.c | 57 +++-- tcg/tcg-op.c | 21

Re: [Qemu-devel] [PATCH v3 5/8] tcg: Put opcodes in a linked list

2015-02-04 Thread Bastian Koppelmann
On 02/03/2015 03:35 PM, Richard Henderson wrote: The previous setup required ops and args to be completely sequential, and was error prone when it came to both iteration and optimization. Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 22 ++- tcg/optimize.c| 2

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 21:41, Peter Maydell wrote: > That suggests to me that we could reasonably advance to > 2.22 or 2.24 if it seemed beneficial, but not beyond that. > Is there anything particularly worthwhile that would get us? 2.22 is the first version to have GIO. 2.28 would give us TLS support i

Re: [Qemu-devel] [PATCH 0/3] rcu: add option to use upstream liburcu

2015-02-04 Thread Emilio G. Cota
On Wed, Feb 04, 2015 at 11:32:57 +0100, Paolo Bonzini wrote: > On 03/02/2015 23:08, Emilio G. Cota wrote: > > * The first two patches bring back the RCU API to exactly > > match that of liburcu. > > Bringing over rcu_dereference/rcu_assign_pointer is unnecessary, I > think. The names do not con

Re: [Qemu-devel] [PATCH] vl.c: fixed QEMU crash if no display was selected in command line

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 10:40 PM, Don Slutz wrote: A proper fix for this is the thread: I suspected I don't have the whole picture, good to know it is fixed! Thanks! Marcel Subject: [PATCH v2 0/3] fix qemu crash about vnc Date: Fri, 30 Jan 2015 10:14:33 +0800 Message-ID: <1422584076-5728-1-git-send-em

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 16:33, Markus Armbruster wrote: > Peter Maydell writes: >> On 4 February 2015 at 13:49, Markus Armbruster wrote: >>> Remind me: what GLib version are we targeting, and why? >> >> Our current minimum is 2.12 (or 2.20 in Windows specific code), >> and the reason is RHEL5/Cent

Re: [Qemu-devel] [PATCH] vl.c: fixed QEMU crash if no display was selected in command line

2015-02-04 Thread Don Slutz
A proper fix for this is the thread: Subject: [PATCH v2 0/3] fix qemu crash about vnc Date: Fri, 30 Jan 2015 10:14:33 +0800 Message-ID: <1422584076-5728-1-git-send-email-arei.gong...@huawei.com> This also has a bug: https://bugs.launchpad.net/qemu/+bug/1414222 Xen expects this to be working.

Re: [Qemu-devel] [Bug 1216845] Re: qemu-system-arm semihosting always calls exit(0)

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 15:56, Karl Zimmerman wrote: > Had a similar problem with my emulation environment. However, I did > some inspection of the assembly code generated by newlib for ARM semi- > hosting. While it initially appears that exit() and _exit() discard the > status code, upon careful

Re: [Qemu-devel] [PATCH] Fix emulation of splice syscall

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 16:37, Andreas Schwab wrote: > The second and fourth argument are in/out parameters, store them back > after the syscall. Also, the fourth argument was mishandled, and EFAULT > handling was missing. > > Signed-off-by: Andreas Schwab > --- > linux-user/syscall.c | 16 ++

Re: [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback

2015-02-04 Thread Paolo Bonzini
On 04/02/2015 19:22, Alex Williamson wrote: > On Wed, 2015-02-04 at 13:11 +0100, Paolo Bonzini wrote: >> With the next patch vfio_put_base_device will be called unconditionally at >> instance_finalize time, which will mean calling it twice if >> vfio_populate_device >> fails. This works, but it

Re: [Qemu-devel] Network Migration in QEMU during Live Migration

2015-02-04 Thread Eric Blake
On 02/04/2015 12:01 PM, Azizul Hakim wrote: > Hi all, > > Does QEMU support network migration so that the migration process is > transparent to users? For example if my VM has a web server, I would like > my user still be able to send request to the server after the migration > process is complete

[Qemu-devel] [PATCH] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-04 Thread Max Reitz
qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 77 +- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/block/q

Re: [Qemu-devel] [PATCH 0/8] machine: query machine properties rather than qemu opts

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 16:43 schrieb Marcel Apfelbaum: > Commit e79d5a6 ("machine: remove qemu_machine_opts global list") removed > option > descriptions from the -machine QemuOptsList to avoid repeating MachineState's > QOM properties. > > This results in a Qemu crash if a non string option is querie

Re: [Qemu-devel] [PATCH 1/8] machine: query iommu machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
On 02/04/2015 06:47 PM, Markus Armbruster wrote: Marcel Apfelbaum writes: Fixes a QEMU crash when passing iommu parameter in command line. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 5 + hw/pci-host/q35.c | 2 +- include/hw/boards.h | 1 + 3 files changed, 7 inserti

[Qemu-devel] [PULL 2/2] vfio-pci: Fix missing unparent of dynamically allocated MemoryRegion

2015-02-04 Thread Alex Williamson
Commit d8d95814609e added explicit object_unparent() calls for dynamically allocated MemoryRegions. The VFIOMSIXInfo structure also contains such a MemoryRegion, covering the mmap'd region of a PCI BAR above the MSI-X table. This structure is freed as part of the class exit function and therefore

[Qemu-devel] [PULL 0/2] vfio fixes

2015-02-04 Thread Alex Williamson
The following changes since commit ec6f25e788ef57ce1e9f734984ef8885172fd9e2: Merge remote-tracking branch 'remotes/rth/tags/pull-tg-s390-20150203' into staging (2015-02-03 21:37:16 +) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-update-201502

[Qemu-devel] [PULL 1/2] vfio: fix wrong initialize vfio_group_list

2015-02-04 Thread Alex Williamson
From: Chen Fan Signed-off-by: Chen Fan Signed-off-by: Alex Williamson --- hw/vfio/common.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index cf483ff..e71385e 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -32,7 +32,7 @@ #

[Qemu-devel] Network Migration in QEMU during Live Migration

2015-02-04 Thread Azizul Hakim
Hi all, Does QEMU support network migration so that the migration process is transparent to users? For example if my VM has a web server, I would like my user still be able to send request to the server after the migration process is completed. But since migration causes a change of the physical m

Re: [Qemu-devel] [PATCH v3 3/4] target-arm: Add 32/64-bit register sync

2015-02-04 Thread Greg Bellows
On Tue, Feb 3, 2015 at 12:54 PM, Peter Maydell wrote: > On 27 January 2015 at 23:58, Greg Bellows wrote: > > Add AArch32 to AArch64 register sychronization functions. > > Replace manual register synchronization with new functions in > > aarch64_cpu_do_interrupt() and HELPER(exception_return)().

Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels

2015-02-04 Thread Eric Blake
On 02/04/2015 07:02 AM, Daniel P. Berrange wrote: >> >> I think fixing this for migration might simplify stuff for users a lot as >> well; >> the choice of whether libvirt does tunneling or not and what it means >> for how block migration happens etc can get very confusing. > > Yes, and not help

Re: [Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback

2015-02-04 Thread Alex Williamson
On Wed, 2015-02-04 at 13:11 +0100, Paolo Bonzini wrote: > With the next patch vfio_put_base_device will be called unconditionally at > instance_finalize time, which will mean calling it twice if > vfio_populate_device > fails. This works, but it is slightly harder to follow. > > Change vfio_get_

[Qemu-devel] [Bug 1216845] Re: qemu-system-arm semihosting always calls exit(0)

2015-02-04 Thread Karl Zimmerman
Had a similar problem with my emulation environment. However, I did some inspection of the assembly code generated by newlib for ARM semi- hosting. While it initially appears that exit() and _exit() discard the status code, upon careful inspection one finds that it is pushed on the stack, with th

Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c

2015-02-04 Thread Eric Blake
On 02/04/2015 11:01 AM, Eric Blake wrote: > On 02/04/2015 10:51 AM, Eric Blake wrote: >> From: Stefan Hajnoczi >> >> The block.c file has grown to over 6000 lines. It is time to split this >> file so there are fewer conflicts and the code is easier to maintain. >> >> This patch produces identica

Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c

2015-02-04 Thread Eric Blake
On 02/04/2015 10:51 AM, Eric Blake wrote: > From: Stefan Hajnoczi > > The block.c file has grown to over 6000 lines. It is time to split this > file so there are fewer conflicts and the code is easier to maintain. > > Extract I/O request processing code: > * Read > * Write > * Flush > * Dis

[Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c

2015-02-04 Thread Eric Blake
From: Stefan Hajnoczi The block.c file has grown to over 6000 lines. It is time to split this file so there are fewer conflicts and the code is easier to maintain. Extract I/O request processing code: * Read * Write * Flush * Discard * ioctl * Tracked requests and queuing * Throttling an

Re: [Qemu-devel] [PATCH RFC v3 1/6] qemu-iotests: fix tests 067, 071 and 087

2015-02-04 Thread Max Reitz
On 2015-02-04 at 04:32, Xiao Guang Chen wrote: From: Xiao Guang Chen Update the output files for test case 067, 071 and 087 because qemu option -nodefaults was used to start a guest so there are no default floppy and cdrom for guests any more. Use virtio-blk instead of virtio-blk-pci as the dev

[Qemu-devel] [PATCH 8/8] machine: query mem-merge machine property rather than qemu opts

2015-02-04 Thread Marcel Apfelbaum
Fixes a QEMU crash when passing mem_merge parameter in command line. Signed-off-by: Marcel Apfelbaum --- exec.c | 2 +- hw/core/machine.c | 6 ++ include/hw/boards.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index bfca528..becd122 100

[Qemu-devel] [PATCH 6/8] serial: serial_hds_isa_init() shouldn't fail

2015-02-04 Thread Markus Armbruster
It shouldn't fail, and no caller checks for failure. Make failure fatal. Maintainers of affected machines cc'ed. Cc: Richard Henderson Cc: Anthony Liguori Cc: "Michael S. Tsirkin" Cc: Aurelien Jarno Cc: Leon Alrae Cc: Blue Swirl Signed-off-by: Markus Armbruster --- hw/char/serial-isa.c |

[Qemu-devel] [PATCH 7/8] parallel: Factor out common parallel_hds_isa_init()

2015-02-04 Thread Markus Armbruster
Maintainers of affected machines cc'ed. Cc: Anthony Liguori Cc: "Michael S. Tsirkin" Cc: Aurelien Jarno Cc: Leon Alrae Cc: Blue Swirl Signed-off-by: Markus Armbruster --- hw/char/parallel.c | 31 +++ hw/i386/pc.c| 7 +-- hw/mips/mips_fulong2

[Qemu-devel] [PATCH 5/8] serial: Factor out common serial_hds_isa_init()

2015-02-04 Thread Markus Armbruster
It's the same old loop copied five times, plus another instance where it's clipped to two iterations and unrolled. No external users of serial_isa_init() are left, so give it internal linkage. Maintainers of affected machines cc'ed. Cc: Richard Henderson Cc: Anthony Liguori Cc: "Michael S. Tsi

[Qemu-devel] [PATCH 3/8] leon3: Replace unchecked qdev_init() by qdev_init_nofail()

2015-02-04 Thread Markus Armbruster
grlib_irqmp_create(), grlib_gptimer_create() and grlib_apbuart_create() are helpers to create and realize GRLIB devices. Their only caller leon3_generic_hw_init() doesn't check for failure. Only the first can actually fail, and only when the caller fails to set up a pointer property, which is a p

[Qemu-devel] [PATCH 0/8] Cleanups around unchecked qdev_init()

2015-02-04 Thread Markus Armbruster
Board setup should normally use qdev_init_nofail(), not qdev_init(), because inability to create an onboard device is normally fatal. Board setup should certainly not ignore qdev_init() failure. Even when we know that realization can't actually fail now, qdev_init_nofail() is clearer and more robu

[Qemu-devel] [PATCH 4/8] etsec: Replace qdev_init() by qdev_init_nofail()

2015-02-04 Thread Markus Armbruster
etsec_create() is a helper to create and realize the eTSEC. It's currently unused. Similar helpers for other NICs use qdev_init_nofail(). Match that. Signed-off-by: Markus Armbruster --- hw/net/fsl_etsec/etsec.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/net/fs

[Qemu-devel] [PATCH 2/8] ide/isa: Replace unchecked qdev_init() by qdev_init_nofail()

2015-02-04 Thread Markus Armbruster
isa_ide_init()'s callers don't check for failure. isa_ide_init() looks like it could fail, but since isa_ide_realizefn() can't fail, it actually can't. Replace its qdev_init() by qdev_init_nofail() to make it obvious. Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Markus Armbruster --- hw

[Qemu-devel] [PATCH 8/8] parallel: parallel_hds_isa_init() shouldn't fail

2015-02-04 Thread Markus Armbruster
It shouldn't fail, and no caller checks for failure. Make failure fatal. Maintainers of affected machines cc'ed. Cc: Anthony Liguori Cc: "Michael S. Tsirkin" Cc: Aurelien Jarno Cc: Leon Alrae Cc: Blue Swirl Signed-off-by: Markus Armbruster --- hw/char/parallel.c | 12 +++- 1 file

[Qemu-devel] [PATCH 1/8] qdev: Improve qdev_init_nofail()'s error reporting

2015-02-04 Thread Markus Armbruster
We get two error messages: a specific one from qdev_init(), and a generic one from qdev_init_nofail(). The specific one gets suppressed in QMP context. qdev_init_nofail() failing there is a bug, though. Cut out the qdev_init() middle-man: realize the device, and on error exit with a single error

  1   2   3   >