Re: [Qemu-devel] [PATCH] target/m68k: add monitor.c

2017-12-21 Thread Thomas Huth
On 21.12.2017 08:56, Laurent Vivier wrote: > Le 20/12/2017 à 22:22, Thomas Huth a écrit : >> Am Wed, 20 Dec 2017 21:35:28 +0100 >> schrieb Laurent Vivier : >> >>> This allows to use registers content in the monitor. >>> >>> Example: >>> >>> BEFORE: >>> (qemu) print $d0 >>> unknown register >>>

[Qemu-devel] [PATCHv3 00/16] sun4u: tidy-up CPU, APB and ebus

2017-12-21 Thread Mark Cave-Ayland
This patchset for 2.12 continues with tidying up the sun4u CPU, APB and ebus devices by encapsulating the ebus ISA bus within the ebus QOM device, allowing APB and ebus devices to be instantiated directly via QOM, and formally wiring up the device IRQs using qdev GPIOs rather than passing around ar

[Qemu-devel] [PATCHv3 03/16] sun4u: move ISABus inside of EBusState

2017-12-21 Thread Mark Cave-Ayland
Since the EBus is effectively a PCI-ISA bridge then the underlying ISA bus should be contained within the PCI bridge itself. Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 7 +-- 1 file changed, 5 insertions(+), 2

[Qemu-devel] [PATCHv3 04/16] sun4u: remove pci_ebus_init() function

2017-12-21 Thread Mark Cave-Ayland
This is initialisation that should really take place in the ebus realize function. As part of this we also rework the ebus IRQ mapping so that instead of having to pass in the array of pbm_irqs, we obtain a reference to them by looking up the APB device during ebus realize. Signed-off-by: Mark Cav

[Qemu-devel] [PATCHv3 06/16] apb: APB QOMify tidy-up

2017-12-21 Thread Mark Cave-Ayland
Use DeviceClass rather than SysBusDeviceClass in pbm_host_class_init() and adjust pci_pbm_init_device() accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/apb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw

[Qemu-devel] [PATCHv3 07/16] apb: return APBState from pci_apb_init() rather than PCIBus

2017-12-21 Thread Mark Cave-Ayland
This is a first step towards removing pci_apb_init() completely. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/apb.c | 8 hw/sparc64/sun4u.c| 6 -- include/hw/pci-host/apb.h | 6 +++--- 3 files changed, 11 insertions(+), 9 delet

[Qemu-devel] [PATCHv3 05/16] sun4u: move initialisation of all ISABus devices into ebus_realize()

2017-12-21 Thread Mark Cave-Ayland
This belongs in the PCI-ISA bridge rather than at the machine level. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 78 -- 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/hw/sparc64

[Qemu-devel] [PATCHv3 09/16] apb: move the two secondary PCI bridges objects into APBState

2017-12-21 Thread Mark Cave-Ayland
This enables us to remove these parameters from pci_apb_init(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/apb.c | 14 +- hw/sparc64/sun4u.c| 5 - include/hw/pci-host/apb.h | 5 +++-- 3 fil

[Qemu-devel] [PATCHv3 08/16] apb: use gpios to wire up the apb device to the SPARC CPU IRQs

2017-12-21 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/apb.c | 6 ++ hw/sparc64/sparc64.c | 2 ++ hw/sparc64/sun4u.c | 12 include/hw/pci-host/apb.h | 6 -- include/hw/sparc/sparc64.h | 2 ++ 5 files changed, 18 insert

[Qemu-devel] [PATCHv3 13/16] ebus: wire up OBIO interrupts to APB pbm via qdev GPIOs

2017-12-21 Thread Mark Cave-Ayland
This enables us to remove the static array mapping in the ISA IRQ handler (and the embedded reference to the APB device) by formalising the interrupt wiring via the qdev GPIO API. For more clarity we replace the APB OBIO interrupt numbers with constants designating the interrupt source, and rename

[Qemu-devel] [PATCHv3 02/16] sun4u: ebus QOMify tidy-up

2017-12-21 Thread Mark Cave-Ayland
The main change here is to introduce the proper TYPE_EBUS/EBUS QOM macros and remove the use of DO_UPCAST. Alongside this there are some a couple of minor cosmetic changes and a rename of pci_ebus_realize() to ebus_realize() since the ebus device is always what is effectively a PCI-ISA bridge. Si

[Qemu-devel] [PATCHv3 15/16] sparc64: introduce trace-events for hw/sparc64

2017-12-21 Thread Mark Cave-Ayland
This is in preparation for switching code in hw/sparc64 from DPRINTF over to trace events. Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daudé --- Makefile.objs | 1 + hw/sparc64/trace-events | 1 + 2 files changed, 2 insertions(+) creat

[Qemu-devel] [PATCHv3 10/16] apb: remove pci_apb_init() and instantiate APB device using qdev

2017-12-21 Thread Mark Cave-Ayland
By making the special_base and mem_base values qdev properties, we can move the remaining parts of pci_apb_init() into the pbm init() and realize() functions. This finally allows us to instantiate the APB directly using standard qdev create/init functions in sun4u.c. Signed-off-by: Mark Cave-Ayla

[Qemu-devel] [PATCHv3 01/16] apb: move QOM macros and typedefs from apb.c to apb.h

2017-12-21 Thread Mark Cave-Ayland
This also includes the related IOMMUState typedef and defines. Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/apb.c | 85 -- include/hw/pci-host/apb.h | 86 +++

[Qemu-devel] [PATCHv3 16/16] sun4u: switch from EBUS_DPRINTF() macro to trace-events

2017-12-21 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 12 ++-- hw/sparc64/trace-events | 3 +++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 1456c3370d..5d802bdfde 100644 --- a/h

[Qemu-devel] [PATCHv3 14/16] apb: replace OBIO interrupt numbers in pci_pbmA_map_irq() with constants

2017-12-21 Thread Mark Cave-Ayland
Following on from the previous commit, we can also do the same with with legacy OBIO interrupts in pci_pbmA_map_irq(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/apb.c | 4 ++-- include/hw/pci-host/apb.h | 2 ++ 2 f

[Qemu-devel] [PATCHv3 11/16] apb: split pci_pbm_map_irq() into separate functions for bus A and bus B

2017-12-21 Thread Mark Cave-Ayland
After the previous refactoring it is now possible to use separate functions to improve the clarity of the interrupt paths. Signed-off-by: Mark Cave-Ayland --- hw/pci-host/apb.c | 45 - 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/hw/

[Qemu-devel] [PATCHv3 12/16] apb: remove busA property from PBMPCIBridge state

2017-12-21 Thread Mark Cave-Ayland
Since the previous commit the only remaining use of the qdev busA property is to configure the PCI bridge in front of the onboard ebus devices differently to allow early OpenBIOS serial console access. Instead we can now manually update the PCI configuration for bridge A in pci_pbm_reset() and thu

Re: [Qemu-devel] [PATCH v2] Split adb.c into adb.c, adb-mouse.c and adb-kbd.c

2017-12-21 Thread Mark Cave-Ayland
On 20/12/17 12:14, Laurent Vivier wrote: It makes the code clearer to separate the bus implementation from the devices one. Replace ADB_DPRINTF() with trace events (and adding new ones in adb-kbd.c). Some minor changes to make checkpatch.pl happy. Signed-off-by: Laurent Vivier --- v2: move in

[Qemu-devel] [PULL 41/41] chardev: convert the socket server to QIONetListener

2017-12-21 Thread Paolo Bonzini
From: "Daniel P. Berrange" Instead of creating a QIOChannelSocket directly for the chardev server socket, use a QIONetListener. This provides the ability to listen on multiple sockets at the same time, so enables full support for IPv4/IPv6 dual stack. Signed-off-by: Daniel P. Berrange Message-I

[Qemu-devel] [PULL v2 00/41] First batch of misc patches for QEMU 2.12

2017-12-21 Thread Paolo Bonzini
The following changes since commit 200780a3a3ed067dfb2e0d2210b0ed09e748ba26: Merge remote-tracking branch 'remotes/armbru/tags/pull-cmdline-2017-12-18-v2' into staging (2017-12-20 13:20:48 +) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstream fo

Re: [Qemu-devel] [PATCH v2] Split adb.c into adb.c, adb-mouse.c and adb-kbd.c

2017-12-21 Thread Laurent Vivier
Le 21/12/2017 à 09:26, Mark Cave-Ayland a écrit : > On 20/12/17 12:14, Laurent Vivier wrote: > >> It makes the code clearer to separate the bus implementation >> from the devices one. >> >> Replace ADB_DPRINTF() with trace events (and adding new ones in >> adb-kbd.c). >> Some minor changes to make

[Qemu-devel] [PATCH v2] target/m68k: add monitor.c

2017-12-21 Thread Laurent Vivier
This allows to use registers content in the monitor. Example: BEFORE: (qemu) print $d0 unknown register AFTER: (qemu) print $d0 0 (qemu) print $sr 0x2000 (qemu) x/10i $pc 0x40010a2a: movew %sr,%d0 0x40010a2c: oril #1792,%d0 0x40010a32: movew %d0,%sr 0x40010a34: movel

[Qemu-devel] [PULL 02/41] qemu-thread: fix races on threads that exit very quickly

2017-12-21 Thread Paolo Bonzini
From: linzhecheng If we create a thread with QEMU_THREAD_DETACHED mode, QEMU may get a segfault with low probability. The backtrace is: #0 0x7f46c60291d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x7f46c602a8c8 in __GI_abort () at abort.c:

[Qemu-devel] [PULL 37/41] chardev: fix backend events regression with mux chardev

2017-12-21 Thread Paolo Bonzini
From: Marc-André Lureau Kirill noticied that on recent versions on QEMU he was not able to trigger SysRq to invoke debug capabilites of Linux Kernel. He tracked it down to qemu_chr_be_event() ignoring CHR_EVENT_BREAK due s->be being NULL. The bug was introduced in 2.8, commit a4afa548fc6d ("char

Re: [Qemu-devel] [PULL 00/14] ppc-for-2.12 queue 20171219

2017-12-21 Thread David Gibson
On Thu, Dec 21, 2017 at 12:45:50AM +1100, David Gibson wrote: > On Wed, Dec 20, 2017 at 11:29:36AM +, Peter Maydell wrote: > > On 19 December 2017 at 04:29, David Gibson > > wrote: > > > The following changes since commit > > > eaefea537b476cb853e2edbdc68e969ec777e4bb: > > > > > > Merge re

[Qemu-devel] [PULL v2 00/19] Initial support for Hypervisor.framework

2017-12-21 Thread Paolo Bonzini
The following changes since commit 200780a3a3ed067dfb2e0d2210b0ed09e748ba26: Merge remote-tracking branch 'remotes/armbru/tags/pull-cmdline-2017-12-18-v2' into staging (2017-12-20 13:20:48 +) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstream-hvf

Re: [Qemu-devel] [RESEND PATCH 2/6] memory: introduce AddressSpaceOps and IOMMUObject

2017-12-21 Thread Liu, Yi L
On Wed, Dec 20, 2017 at 10:18:16PM +1100, David Gibson wrote: > On Wed, Dec 20, 2017 at 02:47:30PM +0800, Liu, Yi L wrote: > > On Mon, Dec 18, 2017 at 10:35:31PM +1100, David Gibson wrote: > > > On Wed, Nov 15, 2017 at 03:16:32PM +0800, Peter Xu wrote: > > > > On Tue, Nov 14, 2017 at 10:52:54PM +01

[Qemu-devel] STOP Re: [PULL 4/4] qmp: add nbd-server-remove

2017-12-21 Thread Vladimir Sementsov-Ogievskiy
no, I've updated it, we discussed with Kevin that this approach is bad 21.12.2017 04:36, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Add command for export removing. It is needed for cases when we don't want to keep export after the operation on it was completed. The other example is

Re: [Qemu-devel] STOP Re: [PULL 4/4] qmp: add nbd-server-remove

2017-12-21 Thread Vladimir Sementsov-Ogievskiy
look at "[PATCH v2 0/6] nbd export qmp interface" 21.12.2017 12:07, Vladimir Sementsov-Ogievskiy wrote: no, I've updated it, we discussed with Kevin that this approach is bad 21.12.2017 04:36, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Add command for export removing. It is needed

Re: [Qemu-devel] [PATCH 0/4] cryptodev: add vhost support

2017-12-21 Thread Paolo Bonzini
On 21/12/2017 01:51, Gonglei (Arei) wrote: > Sorry, Michael. This makes me confused. Because the Qemu part about > vhost-user crypto > doesn't do this assumption. The main controversial point is whether session > operations > should be added in the vhost-user protocol, raised by Paolo. And we ma

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-21 Thread Cédric Le Goater
On 12/21/2017 01:12 AM, Benjamin Herrenschmidt wrote: > On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: >> >> As you've suggested in yourself, I think we might need to more >> explicitly model the different components of the XIVE system. As part >> of that, I think you need to be clearer in

Re: [Qemu-devel] [RFC v6 10/27] monitor: allow to use IO thread for parsing

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > For each Monitor, add one field "use_io_thr" to show whether it will be > using the dedicated monitor IO thread to handle input/output. When set, > monitor IO parsing work will be offloaded to dedicated monitor IO > thread, rather than the original main loop

Re: [Qemu-devel] [RFC v6 11/27] qmp: introduce QMPCapability

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > diff --git a/monitor.c b/monitor.c > index 4b2bee773f..81fb0a42b4 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -3943,12 +3943,18 @@ void monitor_resume(Monitor *mon) > > static QObject *get_qmp_greeting(void) > { > +QList *cap_list = qlist_new(); >

Re: [Qemu-devel] [PATCH v3 7/7] linux-user: Activate armeb handler registration

2017-12-21 Thread Laurent Vivier
Le 20/12/2017 à 22:23, Michael Weiser a écrit : > armeb is missing from the target list in qemu-binfmt-conf.sh. Add it so > the handler for those binaries gets registered by the script. > > Signed-off-by: Michael Weiser > --- > scripts/qemu-binfmt-conf.sh | 2 +- > 1 file changed, 1 insertion(+)

Re: [Qemu-devel] [PATCH v3 6/7] linux-user: Separate binfmt arm CPU families

2017-12-21 Thread Laurent Vivier
Le 20/12/2017 à 22:23, Michael Weiser a écrit : > Give big-endian arm and aarch64 CPUs their own family in > qemu-binfmt-conf.sh to make sure we register qemu-user for binaries of > the opposite endianness on arm and aarch64. Apart from the family > assignments of the magic vales, qemu_get_family()

Re: [Qemu-devel] [RFC v6 12/27] qmp: negotiate QMP capabilities

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > After this patch, we will allow QMP clients to enable QMP capabilities > when sending the first "qmp_capabilities" command. Originally we are > starting QMP session with no arguments like: > > { "execute": "qmp_capabilities" } > > Now we can enable some Q

Re: [Qemu-devel] [PATCH v3 5/7] linux-user: Add aarch64_be magic numbers to qemu-binfmt-conf.sh

2017-12-21 Thread Laurent Vivier
Le 20/12/2017 à 22:23, Michael Weiser a écrit : > As we now have a linux-user aarch64_be target, we can add it to the list > of supported targets in qemu-binfmt-conf.sh > > Signed-off-by: Michael Weiser > --- > scripts/qemu-binfmt-conf.sh | 6 +- > 1 file changed, 5 insertions(+), 1 deletion

Re: [Qemu-devel] [PATCH v3 4/7] configure: Add aarch64_be-linux-user target

2017-12-21 Thread Laurent Vivier
Le 20/12/2017 à 22:23, Michael Weiser a écrit : > Add target aarch64_be-linux-user. This allows a qemu-aarch64_be binary > to be built that will run big-endian aarch64 binaries. > > Signed-off-by: Michael Weiser > Reviewed-by: Richard Henderson > --- > configure

Re: [Qemu-devel] [PATCH v3 2/7] linux-user: Add separate aarch64_be uname

2017-12-21 Thread Laurent Vivier
Le 20/12/2017 à 22:23, Michael Weiser a écrit : > Make big-endian aarch64 systems identify as aarch64_be as expected by > big-endian userland and toolchains. > > Signed-off-by: Michael Weiser > Reviewed-by: Richard Henderson > --- > linux-user/aarch64/target_syscall.h | 4 > 1 file changed

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-21 Thread Cédric Le Goater
On 12/21/2017 10:16 AM, Cédric Le Goater wrote: > On 12/21/2017 01:12 AM, Benjamin Herrenschmidt wrote: >> On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: >>> >>> As you've suggested in yourself, I think we might need to more >>> explicitly model the different components of the XIVE system.

Re: [Qemu-devel] [PATCHv3 12/16] apb: remove busA property from PBMPCIBridge state

2017-12-21 Thread Artyom Tarasenko
On Thu, Dec 21, 2017 at 9:20 AM, Mark Cave-Ayland wrote: > Since the previous commit the only remaining use of the qdev busA property is > to configure the PCI bridge in front of the onboard ebus devices differently > to allow early OpenBIOS serial console access. > > Instead we can now manually u

Re: [Qemu-devel] [PATCHv3 11/16] apb: split pci_pbm_map_irq() into separate functions for bus A and bus B

2017-12-21 Thread Artyom Tarasenko
On Thu, Dec 21, 2017 at 9:20 AM, Mark Cave-Ayland wrote: > After the previous refactoring it is now possible to use separate functions > to improve the clarity of the interrupt paths. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko > --- > hw/pci-host/apb.c | 45

Re: [Qemu-devel] [PATCHv3 16/16] sun4u: switch from EBUS_DPRINTF() macro to trace-events

2017-12-21 Thread Artyom Tarasenko
On Thu, Dec 21, 2017 at 9:20 AM, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko > --- > hw/sparc64/sun4u.c | 12 ++-- > hw/sparc64/trace-events | 3 +++ > 2 files changed, 5 insertions(+), 10 deletio

Re: [Qemu-devel] [PATCHv3 08/16] apb: use gpios to wire up the apb device to the SPARC CPU IRQs

2017-12-21 Thread Artyom Tarasenko
On Thu, Dec 21, 2017 at 9:20 AM, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko > --- > hw/pci-host/apb.c | 6 ++ > hw/sparc64/sparc64.c | 2 ++ > hw/sparc64/sun4u.c | 12

Re: [Qemu-devel] [PATCHv3 07/16] apb: return APBState from pci_apb_init() rather than PCIBus

2017-12-21 Thread Artyom Tarasenko
On Thu, Dec 21, 2017 at 9:20 AM, Mark Cave-Ayland wrote: > This is a first step towards removing pci_apb_init() completely. > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko > --- > hw/pci-host/apb.c | 8 > hw/sparc64/sun

Re: [Qemu-devel] [PATCHv3 05/16] sun4u: move initialisation of all ISABus devices into ebus_realize()

2017-12-21 Thread Artyom Tarasenko
On Thu, Dec 21, 2017 at 9:20 AM, Mark Cave-Ayland wrote: > This belongs in the PCI-ISA bridge rather than at the machine level. > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko > --- > hw/sparc64/sun4u.c | 78 > +

Re: [Qemu-devel] [PATCH v7 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-12-21 Thread Marc-André Lureau
Hi On Thu, Dec 21, 2017 at 1:21 AM, Michael S. Tsirkin wrote: > On Wed, Dec 20, 2017 at 04:47:13PM +0100, Marc-André Lureau wrote: >> Hi >> >> On Wed, Dec 13, 2017 at 3:29 AM, Changpeng Liu >> wrote: >> > Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be >> > used for live m

[Qemu-devel] [PATCH] char: don't silently skip tn3270 protocol init when TLS is enabled

2017-12-21 Thread Daniel P. Berrange
Even if common tn3270 implementations do not support TLS, it is trivial to have them proxied over a proxy like stunnel which adds TLS at the sockets layer. We should thus not silently skip tn3270 protocol initialization when TLS is enabled. Signed-off-by: Daniel P. Berrange --- chardev/char-sock

Re: [Qemu-devel] vhost-user graceful connect/disconnect

2017-12-21 Thread Marc-André Lureau
Hi - Original Message - > Hi, > Vhost-user implementations assume the slave is already running before > the master starts. The slave is required during virtio device > initialization (e.g. feature bit negotiation) and so it is simplest to > assume that the master is already available and

Re: [Qemu-devel] [RFC v6 15/27] monitor: let suspend/resume work even with QMPs

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > One thing to mention is that for QMPs that are using IOThreads, we need > an explicit kick for the IOThread in case it is sleeping. > > Since at it, add traces for the operations. > > Signed-off-by: Peter Xu > --- > monitor.c| 26 +-

Re: [Qemu-devel] [RFC v6 17/27] qmp: add new event "command-dropped"

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > This event will be emitted if one QMP command is dropped. Along, > declare an enum for the reasons. > > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC v6 16/27] monitor: separate QMP parser and dispatcher

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > Originally QMP goes throw these steps: > > JSON Parser --> QMP Dispatcher --> Respond > /|\(2)(3) | >(1) | \|/ (4) >+- main thread + > > This patch does this: > >

Re: [Qemu-devel] [RFC v6 18/27] monitor: send event when command queue full

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > Set maximum QMP command queue length to 8. If queue full, instead of > queue the command, we directly return a "command-dropped" event, telling > client that specific command is dropped. > > Note that this flow control mechanism is only valid if OOB is enabl

Re: [Qemu-devel] [RFC v6 19/27] qapi: introduce new cmd option "allow-oob"

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > Here "oob" stands for "Out-Of-Band". When "allow-oob" is set, it means > the command allows out-of-band execution. > > The "oob" idea is proposed by Markus Armbruster in following thread: > > https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg02057.

Re: [Qemu-devel] [RFC v6 20/27] qmp: export qmp_dispatch_check_obj and allow "id"

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > We need this for earlier check for OOB, before reaching > do_qmp_dispatch(). Meanwhile, a small touch-up to allow "id" field, > after all we allow that for sure in the spec (in any form). > > Signed-off-by: Peter Xu Reviewed-by: Fam Zheng

[Qemu-devel] ping Re: [PATCH v2 0/6] nbd export qmp interface

2017-12-21 Thread Vladimir Sementsov-Ogievskiy
Hi, what about this? 07.12.2017 18:50, Vladimir Sementsov-Ogievskiy wrote: Here: 1. separate export name from device name 1.1 several exports per device possible 2. add nbd-server-remove v2: 01: add r-bs by Max and Eric, add comment to code (hope you don't mind) 03: address expor

Re: [Qemu-devel] [RFC v6 21/27] qmp: support out-of-band (oob) execution

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > Having "allow-oob" to true for a command does not mean that this command > will always be run in out-of-band mode. The out-of-band quick path will > only be executed if we specify the extra "run-oob" flag when sending the > QMP request: > > { "execute":

Re: [Qemu-devel] [Qemu-block] Raw notes from a small block layer/QAPI/something pre-christmas meeting

2017-12-21 Thread Peter Krempa
On Wed, Dec 20, 2017 at 13:40:18 +, Daniel Berrange wrote: > On Wed, Dec 20, 2017 at 02:33:54PM +0100, Kevin Wolf wrote: > > Am 20.12.2017 um 11:57 hat Daniel P. Berrange geschrieben: > > > On Wed, Dec 20, 2017 at 11:44:36AM +0100, Kashyap Chamarthy wrote: > > > > On Mon, Dec 18, 2017 at 11:11:

Re: [Qemu-devel] [PATCH v20 0/7] Virtio-balloon Enhancement

2017-12-21 Thread Matthew Wilcox
On Thu, Dec 21, 2017 at 10:49:44AM +0800, Wei Wang wrote: > On 12/21/2017 01:10 AM, Matthew Wilcox wrote: > One more question is about the return value, why would it be ambiguous? I > think it is the same as find_next_bit() which returns the found bit or size > if not found. Because find_next_bit

Re: [Qemu-devel] out of bounds in set_cc_op() (was: [PULL 00/46] First batch of misc patches for QEMU 2.12)

2017-12-21 Thread Thomas Huth
On 20.12.2017 22:56, Paolo Bonzini wrote: > On 20/12/2017 20:20, Peter Maydell wrote: >> On the x86/sanitizer build, new runtime errors: >> GTESTER check-qtest-m68k >> /home/petmay01/linaro/qemu-for-merges/target/m68k/translate.c:230:12: >> runtime error: index -1 out of bounds for type 'const ui

Re: [Qemu-devel] [RFC v6 22/27] qmp: isolate responses into io thread

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > For those monitors who has enabled IO thread, we'll offload the s/has/have/ > responding procedure into IO thread. The main reason is that chardev is > not thread safe, and we need to do all the read/write IOs in the same > thread. For use_io_thr=true moni

Re: [Qemu-devel] [RFC v6 23/27] monitor: enable IO thread for (qmp & !mux) typed

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > Start to use dedicate IO thread for QMP monitors that are not using > MUXed chardev. > > Signed-off-by: Peter Xu > --- > monitor.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/monitor.c b/monitor.c > index 0c6403bc65..718306

Re: [Qemu-devel] [RFC v6 24/27] qmp: add command "x-oob-test"

2017-12-21 Thread Fam Zheng
On Tue, 12/19 16:45, Peter Xu wrote: > This command is only used to test OOB functionality. It should not be > used for any other purposes. > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Peter Xu > --- > qapi-schema.json | 18 ++ > qmp.c| 16 > 2

Re: [Qemu-devel] [PATCH v20 0/7] Virtio-balloon Enhancement

2017-12-21 Thread Tetsuo Handa
Wei Wang wrote: > Thanks for the effort. That's actually caused by the previous "!node" > path, which incorrectly changed "index = (index | RADIX_TREE_MAP_MASK) + > 1". With the change below, it will run pretty well with the test cases. > > if (!node && !bitmap) > return size; > > Would yo

Re: [Qemu-devel] out of bounds in set_cc_op()

2017-12-21 Thread Laurent Vivier
Le 21/12/2017 à 13:49, Thomas Huth a écrit : > On 20.12.2017 22:56, Paolo Bonzini wrote: >> On 20/12/2017 20:20, Peter Maydell wrote: >>> On the x86/sanitizer build, new runtime errors: >>> GTESTER check-qtest-m68k >>> /home/petmay01/linaro/qemu-for-merges/target/m68k/translate.c:230:12: >>> runt

Re: [Qemu-devel] [PULL 00/14] ppc-for-2.12 queue 20171219

2017-12-21 Thread Peter Maydell
On 21 December 2017 at 08:40, David Gibson wrote: > On Thu, Dec 21, 2017 at 12:45:50AM +1100, David Gibson wrote: >> Oh :(. I ran make check SPEED=slow in a 32-bit x86 container before >> sending the pull request, and I just retried it now, so that doesn't >> appear to be the case. >> >> I haven'

Re: [Qemu-devel] STOP Re: [PULL 4/4] qmp: add nbd-server-remove

2017-12-21 Thread Peter Maydell
On 21 December 2017 at 09:07, Vladimir Sementsov-Ogievskiy wrote: > no, I've updated it, we discussed with Kevin that this approach is bad To say that a pullreq is bad you need to reply to the cover letter, there's no guarantee I'll notice a followup to one of the individual patches in it. (As it

Re: [Qemu-devel] [PULL 0/4] NBD patches through 20 Dec

2017-12-21 Thread Peter Maydell
On 21 December 2017 at 01:35, Eric Blake wrote: > The following changes since commit 4da5c51cac8363f86ec92dc99c38f9382d617647: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-12-20' > into staging (2017-12-20 20:38:36 +) > > are available in the Git repository at: > >

Re: [Qemu-devel] Hi, where can i get a latest full version of QAPI ?

2017-12-21 Thread Markus Armbruster
Luiz Capitulino writes: > On Wed, 20 Dec 2017 18:37:37 +0800 > "那个秀才" wrote: > >> Hi, >>     Dear master.    Where can i get a latest full verson of QAPI ?    I >> wanna read some file in VMs by qemu-quest-agent, since then, i found things >> below: >> https://wiki.qemu.org/QMPhttps://

[Qemu-devel] [PATCH v1 0/2] Enable passing pre-opened chardev socket FDs

2017-12-21 Thread Daniel P. Berrange
This fixes a long standing problem that libvirt has with starting up QEMU. We have to busy-wait retrying connect() on the QMP monitor socket until QEMU finally creates & listens on it, but at same time must be careful to not wait forever if QEMU exits. This this patch series, libvirt can simply p

Re: [Qemu-devel] [PATCH v2] target/m68k: add monitor.c

2017-12-21 Thread Thomas Huth
On 21.12.2017 09:30, Laurent Vivier wrote: > This allows to use registers content in the monitor. > > Example: > > BEFORE: > (qemu) print $d0 > unknown register > > AFTER: > (qemu) print $d0 > 0 > (qemu) print $sr > 0x2000 > (qemu) x/10i $pc > 0x40010a2a: movew %sr,%d0 > 0x4

[Qemu-devel] [PATCH v1 1/2] io: move fd_is_socket() into common sockets code

2017-12-21 Thread Daniel P. Berrange
The fd_is_socket() helper method is useful in a few places, so put it in the common sockets code. Signed-off-by: Daniel P. Berrange --- include/qemu/sockets.h | 1 + io/channel-util.c | 13 - util/qemu-sockets.c| 13 + 3 files changed, 14 insertions(+), 13 delet

[Qemu-devel] [PATCH v1 2/2] char: allow passing pre-opened socket file descriptor at startup

2017-12-21 Thread Daniel P. Berrange
When starting QEMU management apps will usually setup a monitor socket, and then open it immediately after startup. If not using QEMU's own -daemonize arg, this process can be troublesome to handle correctly. The mgmt app will need to repeatedly call connect() until it succeeds, because it does not

Re: [Qemu-devel] out of bounds in set_cc_op()

2017-12-21 Thread Laurent Vivier
Le 21/12/2017 à 14:07, Laurent Vivier a écrit : > Le 21/12/2017 à 13:49, Thomas Huth a écrit : >> On 20.12.2017 22:56, Paolo Bonzini wrote: >>> On 20/12/2017 20:20, Peter Maydell wrote: On the x86/sanitizer build, new runtime errors: GTESTER check-qtest-m68k /home/petmay01/linaro/q

Re: [Qemu-devel] [PATCH v1 2/2] char: allow passing pre-opened socket file descriptor at startup

2017-12-21 Thread Marc-André Lureau
H On Thu, Dec 21, 2017 at 2:27 PM, Daniel P. Berrange wrote: > When starting QEMU management apps will usually setup a monitor socket, and > then open it immediately after startup. If not using QEMU's own -daemonize > arg, this process can be troublesome to handle correctly. The mgmt app will > n

Re: [Qemu-devel] [PATCH v1 1/2] io: move fd_is_socket() into common sockets code

2017-12-21 Thread Marc-André Lureau
Hi On Thu, Dec 21, 2017 at 2:27 PM, Daniel P. Berrange wrote: > The fd_is_socket() helper method is useful in a few places, so put it in > the common sockets code. > > Signed-off-by: Daniel P. Berrange Reviewed-by: Marc-André Lureau > --- > include/qemu/sockets.h | 1 + > io/channel-util.c

Re: [Qemu-devel] [PATCH] linux-user: Implement renameat2 when defined

2017-12-21 Thread Bastian Koppelmann
On 12/20/2017 01:29 AM, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > The RISC-V Linux port was recently accept upstream and will be released > as part of 4.15. While working on our glibc port I discovered that > qemu's user-mode emulation doesn't support renameat2, which has replaced > renam

Re: [Qemu-devel] STOP Re: [PULL 4/4] qmp: add nbd-server-remove

2017-12-21 Thread Eric Blake
On 12/21/2017 03:10 AM, Vladimir Sementsov-Ogievskiy wrote: look at "[PATCH v2 0/6] nbd export qmp interface" 21.12.2017 12:07, Vladimir Sementsov-Ogievskiy wrote: no, I've updated it, we discussed with Kevin that this approach is bad I'll respin the pull request with the updated series; tha

Re: [Qemu-devel] [PATCH 0/3] Vhost: no more leak QEMU virtual addresses to user backend

2017-12-21 Thread Maxime Coquelin
On 12/21/2017 04:53 AM, Michael S. Tsirkin wrote: On Wed, Dec 20, 2017 at 04:07:41PM +, Stefan Hajnoczi wrote: On Tue, Dec 19, 2017 at 07:11:26PM +0100, Maxime Coquelin wrote: Before this series, QEMU process virtual addresses are sent to the user backend as user addresses. Passing these

Re: [Qemu-devel] [PATCH] linux-user: Implement renameat2 when defined

2017-12-21 Thread Peter Maydell
On 20 December 2017 at 00:29, Palmer Dabbelt wrote: > +#if defined(TARGET_NR_renameat2) && defined(__NR_renameat2) > +case TARGET_NR_renameat2: > +{ > +void *p2; > +p = lock_user_string(arg2); > +p2 = lock_user_string(arg4); > +if (!p ||

Re: [Qemu-devel] [PATCH v2] msix: don't mask already masked vectors on reset

2017-12-21 Thread Michael S. Tsirkin
On Fri, Dec 08, 2017 at 09:09:06AM -0500, Marcel Apfelbaum wrote: > > > - Original Message - > > From: "Ladi Prosek" > > To: qemu-devel@nongnu.org > > Cc: mar...@redhat.com, ge...@hostfission.com, m...@redhat.com, "alex > > williamson" > > Sent: Friday, December 8, 2017 8:31:13 AM > >

Re: [Qemu-devel] out of bounds in set_cc_op()

2017-12-21 Thread Paolo Bonzini
On 21/12/2017 14:32, Laurent Vivier wrote: > Le 21/12/2017 à 14:07, Laurent Vivier a écrit : >> Le 21/12/2017 à 13:49, Thomas Huth a écrit : >>> On 20.12.2017 22:56, Paolo Bonzini wrote: On 20/12/2017 20:20, Peter Maydell wrote: > On the x86/sanitizer build, new runtime errors: > GTE

Re: [Qemu-devel] [PATCH v3 03/13] tpm_tis: remove TPMSizeBuffer usage

2017-12-21 Thread Marc-André Lureau
On Fri, Nov 10, 2017 at 3:11 PM, Stefan Berger wrote: > Remove usage of TPMSizeBuffer. The size of the buffers is limited now > by s->be_buffer_size, which is the size of the buffer the TIS has > negotiated with the backend. > > Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau > --

Re: [Qemu-devel] [PATCH v3 04/13] tpm_tis: move buffers from localities into common location

2017-12-21 Thread Marc-André Lureau
Hi On Fri, Nov 10, 2017 at 3:11 PM, Stefan Berger wrote: > One read buffer and one write buffer is sufficient for all localities. > The localities cannot all be active at the same time, and only the active > locality can use the r/w buffers. Inactive localities will require the > COMMAND_READY fl

Re: [Qemu-devel] [PATCH v3 02/13] tpm_tis: limit size of buffer from backend

2017-12-21 Thread Marc-André Lureau
On Fri, Nov 10, 2017 at 3:11 PM, Stefan Berger wrote: > This is a preparatory patch for the subsequent ones where we > get rid of the flexibility of supporting any kind of buffer size > that the backend may support. We keep the size at 4096, which is > also the size the external emulator supports.

Re: [Qemu-devel] out of bounds in set_cc_op()

2017-12-21 Thread Laurent Vivier
Le 21/12/2017 à 15:10, Paolo Bonzini a écrit : > On 21/12/2017 14:32, Laurent Vivier wrote: >> Le 21/12/2017 à 14:07, Laurent Vivier a écrit : >>> Le 21/12/2017 à 13:49, Thomas Huth a écrit : On 20.12.2017 22:56, Paolo Bonzini wrote: > On 20/12/2017 20:20, Peter Maydell wrote: >> On th

Re: [Qemu-devel] [PATCH v3 01/13] tpm_tis: convert uint32_t to size_t

2017-12-21 Thread Marc-André Lureau
On Fri, Nov 10, 2017 at 3:11 PM, Stefan Berger wrote: > Signed-off-by: Stefan Berger > --- > hw/tpm/tpm_tis.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c > index dd43630..69fe531 100644 > --- a/hw/tpm/tpm_tis.c > +++ b/hw/tpm/tpm_t

Re: [Qemu-devel] [PATCH 0/3] Vhost: no more leak QEMU virtual addresses to user backend

2017-12-21 Thread Maxime Coquelin
On 12/21/2017 03:01 PM, Maxime Coquelin wrote: On 12/21/2017 04:53 AM, Michael S. Tsirkin wrote: On Wed, Dec 20, 2017 at 04:07:41PM +, Stefan Hajnoczi wrote: On Tue, Dec 19, 2017 at 07:11:26PM +0100, Maxime Coquelin wrote: Before this series, QEMU process virtual addresses are sent to

Re: [Qemu-devel] out of bounds in set_cc_op()

2017-12-21 Thread Paolo Bonzini
On 21/12/2017 15:13, Laurent Vivier wrote: > Le 21/12/2017 à 15:10, Paolo Bonzini a écrit : >> On 21/12/2017 14:32, Laurent Vivier wrote: >>> Le 21/12/2017 à 14:07, Laurent Vivier a écrit : Le 21/12/2017 à 13:49, Thomas Huth a écrit : > On 20.12.2017 22:56, Paolo Bonzini wrote: >> On 2

Re: [Qemu-devel] [PATCH v20 3/7 RESEND] xbitmap: add more operations

2017-12-21 Thread Matthew Wilcox
First of all, the test-suite doesn't build, so I don't know whether you ran it or not. Then I added the xb_find_set() call below, and it fails the assert, so you should probably fix that. diff --git a/lib/xbitmap.c b/lib/xbitmap.c index f03a0f9f9e29..b29af08a7597 100644 --- a/lib/xbitmap.c +++ b

Re: [Qemu-devel] [PATCH v1 2/2] char: allow passing pre-opened socket file descriptor at startup

2017-12-21 Thread Eric Blake
On 12/21/2017 07:48 AM, Marc-André Lureau wrote: ChardevSocket *sock; +int num = 0; + +if (path) { +num++; +} +if (fd) { +num++; +} +if (fdset) { +num++; +} +if (host) { +num++; +} +if (num != 1) { +error_setg(

Re: [Qemu-devel] [PATCH v2 3/4] hw/pci-host/xilinx: QOM'ify the AXI-PCIe host bridge

2017-12-21 Thread Michael S. Tsirkin
On Mon, Dec 18, 2017 at 12:12:43PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > v2: use 'pci_dev' variable, replaced hw_error() -> error_setg() > > hw/pci-host/xilinx-pcie.c | 20 +--- > 1 file changed, 9 insertions(+), 11 deletions(-) > >

Re: [Qemu-devel] [PATCH v1 2/2] char: allow passing pre-opened socket file descriptor at startup

2017-12-21 Thread Daniel P. Berrange
On Thu, Dec 21, 2017 at 01:27:17PM +, Daniel P. Berrange wrote: > When starting QEMU management apps will usually setup a monitor socket, and > then open it immediately after startup. If not using QEMU's own -daemonize > arg, this process can be troublesome to handle correctly. The mgmt app wil

[Qemu-devel] [PATCH v2 01/19] block: Remove unused bdrv_requests_pending

2017-12-21 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- include/block/block_int.h | 1 - block/io.c| 18 -- 2 files changed, 19 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index a5482775ec..e107163594 100644 -

[Qemu-devel] [PATCH v2 06/19] blockjob: Pause job on draining any job BDS

2017-12-21 Thread Kevin Wolf
Block jobs already paused themselves when their main BlockBackend entered a drained section. This is not good enough: We also want to pause a block job and may not submit new requests if, for example, the mirror target node should be drained. This implements .drained_begin/end callbacks in child_j

[Qemu-devel] [PATCH v2 03/19] block: Make bdrv_drain() driver callbacks non-recursive

2017-12-21 Thread Kevin Wolf
bdrv_drained_begin() doesn't increase bs->quiesce_counter recursively and also doesn't notify other parent nodes of children, which both means that the child nodes are not actually drained, and bdrv_drained_begin() is providing useful functionality only on a single node. To keep things consistent,

Re: [Qemu-devel] [PATCH V2 0/5] hw/pvrdma: PVRDMA device implementation

2017-12-21 Thread Michael S. Tsirkin
On Thu, Dec 21, 2017 at 09:27:51AM +0200, Yuval Shaia wrote: > > > > > > > What happens if guest attempts to register all its memory? > > > > > > > > > > Then we loose, is not different from bare metal, reg_mr will pin all the > > > RAM. > > > > We need to find a way to communicate to guests a

[Qemu-devel] [PATCH v2 05/19] test-bdrv-drain: Test bs->quiesce_counter

2017-12-21 Thread Kevin Wolf
This is currently only working correctly for bdrv_drain(), not for bdrv_drain_all(). Leave a comment for the drain_all case, we'll address it later. Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 45 + 1 file changed, 45 insertions(+) diff --

[Qemu-devel] [PATCH v2 07/19] test-bdrv-drain: Test drain vs. block jobs

2017-12-21 Thread Kevin Wolf
Block jobs must be paused if any of the involved nodes are drained. Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 121 1 file changed, 121 insertions(+) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 2aa2b9aa43..01

  1   2   3   4   >