Re: [Qemu-devel] [PATCH] gdbstub: Remove unused include

2018-10-12 Thread Thomas Huth
On 2018-10-12 02:21, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > gdbstub.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/gdbstub.c b/gdbstub.c > index c8478de8f5..c4e4f9f082 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -20,7 +20,6 @@ > #include "qa

[Qemu-devel] [PATCH] MAINTAINERS: update block/sheepdog maintainers

2018-10-12 Thread Liu Yuan
From: Liu Yuan E-mail to one of block/sheepdog maintainers Mitake Hitoshi bounces : unknown user: "mitake.hitoshi" and no current address is known. So just remove it. Signed-off-by: Liu Yuan --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 32

Re: [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-10-12 Thread David Hildenbrand
On 12/10/2018 05:24, David Gibson wrote: > When the balloon is inflated, we discard memory place in it using madvise() > with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which > sounds like it makes sense but is actually unnecessary. > > The misleadingly named MADV_DONTNEED just d

Re: [Qemu-devel] [RFC 2/5] virtio-balloon: Corrections to address verification

2018-10-12 Thread David Hildenbrand
On 12/10/2018 05:24, David Gibson wrote: > The virtio-balloon device's verification of the address given to it by the > guest has a number of faults: > * The addresses here are guest physical addresses, which should be > 'hwaddr' rather than 'ram_addr_t' (the distinction is admittedly >

Re: [Qemu-devel] [RFC 3/5] virtio-balloon: Rework ballon_page() interface

2018-10-12 Thread David Hildenbrand
On 12/10/2018 05:24, David Gibson wrote: > This replaces the balloon_page() internal interface with > ballon_inflate_page(), with a slightly different interface. The new > interface will make future alterations simpler. > > Signed-off-by: David Gibson > --- > hw/virtio/virtio-balloon.c | 17 +++

Re: [Qemu-devel] [PATCH RFC v5 1/7] Fix segmentation fault when qemu_signal_init fails

2018-10-12 Thread Markus Armbruster
Fei Li writes: > On 10/11/2018 06:02 PM, Markus Armbruster wrote: >> Fei Li writes: >> >>> Currently, when qemu_signal_init() fails it only returns a non-zero >>> value but without propagating any Error. But its callers need a >>> non-null err when runs error_report_err(err), or else 0->msg occu

Re: [Qemu-devel] [PATCH v2 11/11] chardev: FDChardev::max_size be unsigned

2018-10-12 Thread Paolo Bonzini
On 12/10/2018 02:22, Philippe Mathieu-Daudé wrote: > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > chardev/char-fd.c | 2 +- > include/chardev/char-fd.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/chardev/char-fd.c b/chardev/

Re: [Qemu-devel] [RFC 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size

2018-10-12 Thread David Hildenbrand
On 12/10/2018 05:24, David Gibson wrote: > The virtio-balloon always works in units of 4kiB (BALLOON_PAGE_SIZE), but > on the host side, we can only actually discard memory in units of the host > page size. > > At present we handle this very badly: we silently ignore balloon requests > that aren't

Re: [Qemu-devel] [PATCH RFC v5 2/7] ui/vnc.c: polish vnc_init_func

2018-10-12 Thread Markus Armbruster
Fei Li writes: > On 10/11/2018 09:13 PM, Markus Armbruster wrote: >> Fei Li writes: >> >>> Add a new Error parameter for vnc_display_init() to handle errors >>> in its caller: vnc_init_func(), just like vnc_display_open() does. >>> And let the call trace propagate the Error. >>> >>> Besides, mak

Re: [Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type

2018-10-12 Thread Daniel P . Berrangé
On Fri, Oct 12, 2018 at 02:22:06AM +0200, Philippe Mathieu-Daudé wrote: > Hi Paolo, > > Here are the changes you suggested in > https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html > > First two simple cleanups while here, > then slowly convert backends then frontends. > > Regards

Re: [Qemu-devel] [PATCH RFC v5 3/7] qemu_init_vcpu: add a new Error parameter to propagate

2018-10-12 Thread Markus Armbruster
Fei Li writes: > On 10/11/2018 09:19 PM, Markus Armbruster wrote: >> Fei Li writes: >> >>> The caller of qemu_init_vcpu() already passed the **errp to handle >> Which caller? There are many. Or do you mean "The callers"? > Oh, sorry, I mean "The callers" :) >> >>> errors. In view of this, add

Re: [Qemu-devel] [PATCH] spapr_pci: rename some structured types

2018-10-12 Thread Greg Kurz
On Fri, 12 Oct 2018 11:17:32 +1100 David Gibson wrote: > On Thu, Oct 11, 2018 at 03:04:08PM +0200, Greg Kurz wrote: > > On Thu, 11 Oct 2018 13:02:50 +0200 > > Philippe Mathieu-Daudé wrote: > > > > > Hi Greg, > > > > > > On 11/10/2018 09:00, Greg Kurz wrote: > > > > According to CODING_STYL

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-12 Thread Igor Mammedov
On Thu, 11 Oct 2018 10:50:13 +0200 David Hildenbrand wrote: > On 08/10/2018 16:12, Igor Mammedov wrote: > > On Mon, 8 Oct 2018 14:41:50 +0200 > > David Hildenbrand wrote: > > > >> On 08/10/2018 14:19, Igor Mammedov wrote: > >>> On Mon, 8 Oct 2018 13:47:53 +0200 > >>> David Hildenbrand wrot

Re: [Qemu-devel] [PATCH] MAINTAINERS: update block/sheepdog maintainers

2018-10-12 Thread Markus Armbruster
Liu Yuan writes: > From: Liu Yuan > > E-mail to one of block/sheepdog maintainers Mitake Hitoshi bounces > > : unknown user: "mitake.hitoshi" Yup, got that, too. > and no current address is known. So just remove it. > > Signed-off-by: Liu Yuan > --- > MAINTAINERS | 1 - > 1 file changed, 1 d

[Qemu-devel] [PATCH v2 1/3] audio: use TYPE_WM8750 instead of a hardcoded string

2018-10-12 Thread Mao Zhongyi
Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/musicpal.c

[Qemu-devel] [PATCH v2 0/3] use object link instead of qdev property

2018-10-12 Thread Mao Zhongyi
According to qdev-properties.h, properties of pointer type should be avoid, so convert qdev property to link, Whilst we are here, also update some hardcoded strings with already defineded macros. v2: -removed the patch1 -removed the TYPE_name in VMStateDescription.name Cc: Jan Kiszka Cc: Peter M

[Qemu-devel] [PATCH v2 2/3] audio: use object link instead of qdev property to pass wm8750 reference

2018-10-12 Thread Mao Zhongyi
According to qdev-properties.h, properties of pointer type should be avoided, it seems a link type property is a good substitution. Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c | 3 ++- hw/audio/marvell_

[Qemu-devel] [PATCH v2 3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

2018-10-12 Thread Mao Zhongyi
Cc: Jan Kiszka Cc: Philippe Mathieu-Daudé Cc: Peter Maydell To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index ac266f9253..9648b3af44 100644 --- a/hw/arm/music

Re: [Qemu-devel] [RFC 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size

2018-10-12 Thread David Hildenbrand
On 12/10/2018 05:24, David Gibson wrote: > The virtio-balloon always works in units of 4kiB (BALLOON_PAGE_SIZE), but > on the host side, we can only actually discard memory in units of the host > page size. > > At present we handle this very badly: we silently ignore balloon requests > that aren't

[Qemu-devel] [Bug 1790460] Re: -icount, sleep=off mode is broken (target slows down or hangs)

2018-10-12 Thread Artem Pisarenko
Long-term testing showed that my trivial adaptation didn't fixed issue and I sticked to modification from QBox. It didn't failed yet. And yes, issue still relevant to current master branch. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

Re: [Qemu-devel] [PATCH v2 2/2] hw/vfio/display: add ramfb support

2018-10-12 Thread Gerd Hoffmann
Hi, > > OnOffAuto display; > > +bool enable_ramfb; > > int32_t bootindex; > > uint32_t igd_gms; > > OffAutoPCIBAR msix_relo; > > Hi Gerd, > > One tiny nit here, we can move this new bool down in the struct with > the rest of the bools for better alignment. I can change

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-12 Thread David Hildenbrand
> > The correct order should be opposite to one that created a devices, > i.e. unplug -> unrealize -> delete. > Doing unplug stuff after device was unrealized looks outright wrong > (essentially device doesn't exists anymore except memory where it's > been located). pre_plug -> realize -> plug u

Re: [Qemu-devel] [PATCH] migration: avoid segmentfault when take a snapshot of a VM which being migrated

2018-10-12 Thread Dr. David Alan Gilbert
* jialina01 (jialin...@baidu.com) wrote: > During an active background migraion, snapshot will trigger a > segmentfault. As snapshot clears the "current_migration" struct > and updates "to_dst_file" before it finds out that there is a > migration task, Migration accesses the null pointer in > "curr

[Qemu-devel] [PATCH v2 0/2] spapr_pci: coding style fixes

2018-10-12 Thread Greg Kurz
As requested by David, two distinct patches and PCI still mentionned in the new type names. -- Greg --- Greg Kurz (2): spapr_pci: convert g_malloc() to g_new() spapr_pci: rename some structured types hw/ppc/spapr_pci.c | 22 +++--- include/hw/pci-host/sp

[Qemu-devel] [PATCH v2 2/2] spapr_pci: rename some structured types

2018-10-12 Thread Greg Kurz
According to CODING_STYLE, structured types names are expected to be in CamelCase but we have: typedef struct spapr_pci_msi { uint32_t first_irq; uint32_t num; } spapr_pci_msi; typedef struct spapr_pci_msi_mig { uint32_t key; spapr_pci_msi value; } spapr_pci_msi_mig; Acronyms are

[Qemu-devel] [PATCH v2 1/2] spapr_pci: convert g_malloc() to g_new()

2018-10-12 Thread Greg Kurz
When allocating an array, it is a recommended coding practice to call g_new(FooType, n) instead of g_malloc(n * sizeof(FooType)) because it takes care to avoid overflow when calculating the size of the allocated block and it returns FooType *, which allows the compiler to perform type checking. Si

[Qemu-devel] [PATCH] vhost-scsi: prevent using uninitialized vqs

2018-10-12 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There are 3 virtqueues (ctrl, event and cmd) for virtio scsi device, but seabios will only set the physical address for the 3rd one (cmd). Then in vhost_virtqueue_start(), virtio_queue_get_desc_addr() will be 0 for ctrl and event vq. In this case, ctrl and event vq are not initia

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Gerd Hoffmann
On Thu, Oct 11, 2018 at 05:37:46PM +0200, Lukáš Hrázký wrote: > On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > > Ok. We probably should fix interface_client_monitors_config() to use > > > > the channel_id instead of qemu_console_get_head() then. > > > > > > It's not that simple. Th

Re: [Qemu-devel] [PATCH] hw/display/cirrus_vga: Add CONFIG option for "isa-cirrus-vga"

2018-10-12 Thread Gerd Hoffmann
On Thu, Oct 11, 2018 at 05:21:45PM +0200, Thomas Huth wrote: > In downstream distros like RHEL we'd like to disable some of the "legacy" > devices of QEMU. The ISA version of the Cirrus VGA device is one of these > legacy devices. So let's make the build process a little bit more flexible > here by

Re: [Qemu-devel] [PATCH v1 0/5] Misc RISC-V patches

2018-10-12 Thread Peter Maydell
On 11 October 2018 at 21:52, Michael Clark wrote: > Peter, I have to pull in your remote wholesale. I don't cherry-pick from > your tree. I think this is truly dumb. This might serve the needs of some > folk running Linux but we have emulation fidelity fixes for the RISC-V > community as a whole.

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends

2018-10-12 Thread Daniel P . Berrangé
On Thu, Oct 11, 2018 at 04:48:34PM +0100, Daniel P. Berrangé wrote: > Adding Markus since we're talking about new CLI argument and capability > reporting standards. > > On Fri, Sep 14, 2018 at 05:52:30PM +0400, Marc-André Lureau wrote: > > As discussed during "[PATCH v4 00/29] vhost-user for input

Re: [Qemu-devel] [PATCH] hw/display/cirrus_vga: Add CONFIG option for "isa-cirrus-vga"

2018-10-12 Thread Thomas Huth
On 2018-10-12 11:31, Gerd Hoffmann wrote: > On Thu, Oct 11, 2018 at 05:21:45PM +0200, Thomas Huth wrote: >> In downstream distros like RHEL we'd like to disable some of the "legacy" >> devices of QEMU. The ISA version of the Cirrus VGA device is one of these >> legacy devices. So let's make the bui

Re: [Qemu-devel] [PATCH RFC v5 1/7] Fix segmentation fault when qemu_signal_init fails

2018-10-12 Thread Fei Li
On 10/12/2018 03:56 PM, Markus Armbruster wrote: Fei Li writes: On 10/11/2018 06:02 PM, Markus Armbruster wrote: Fei Li writes: Currently, when qemu_signal_init() fails it only returns a non-zero value but without propagating any Error. But its callers need a non-null err when runs erro

Re: [Qemu-devel] [PATCH v2 1/2] spapr_pci: convert g_malloc() to g_new()

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 11:05, Greg Kurz wrote: > When allocating an array, it is a recommended coding practice to call > g_new(FooType, n) instead of g_malloc(n * sizeof(FooType)) because > it takes care to avoid overflow when calculating the size of the > allocated block and it returns FooType *, which all

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends

2018-10-12 Thread Marc-André Lureau
Hi On Thu, Oct 11, 2018 at 7:49 PM Daniel P. Berrangé wrote: > > Adding Markus since we're talking about new CLI argument and capability > reporting standards. > > On Fri, Sep 14, 2018 at 05:52:30PM +0400, Marc-André Lureau wrote: > > As discussed during "[PATCH v4 00/29] vhost-user for input & G

Re: [Qemu-devel] [PATCH v2 1/3] audio: use TYPE_WM8750 instead of a hardcoded string

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 10:30, Mao Zhongyi wrote: > Cc: Jan Kiszka > Cc: Peter Maydell > Cc: Gerd Hoffmann > To: qemu-...@nongnu.org "To: qemu-...@nongnu.org" is probably not relevant in the commit message. The Linux kernel describes the 'Cc:' line in the "Submitting patches: the essential guide to gett

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead of qdev property to pass wm8750 reference

2018-10-12 Thread Philippe Mathieu-Daudé
Hi Mao, On 12/10/2018 10:30, Mao Zhongyi wrote: > According to qdev-properties.h, properties of pointer type should > be avoided, it seems a link type property is a good substitution. > > Cc: Jan Kiszka > Cc: Peter Maydell > Cc: Gerd Hoffmann > To: qemu-...@nongnu.org > > Signed-off-by: Mao Z

Re: [Qemu-devel] [PATCH v2 3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 10:30, Mao Zhongyi wrote: > Cc: Jan Kiszka > Cc: Philippe Mathieu-Daudé > Cc: Peter Maydell > To: qemu-...@nongnu.org > > Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé > --- > hw/arm/musicpal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Lukáš Hrázký
On Fri, 2018-10-12 at 11:27 +0200, Gerd Hoffmann wrote: > On Thu, Oct 11, 2018 at 05:37:46PM +0200, Lukáš Hrázký wrote: > > On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > > > Ok. We probably should fix interface_client_monitors_config() to use > > > > > the channel_id instead of qem

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends

2018-10-12 Thread Daniel P . Berrangé
On Fri, Oct 12, 2018 at 01:43:39PM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Oct 11, 2018 at 7:49 PM Daniel P. Berrangé > wrote: > > > > Adding Markus since we're talking about new CLI argument and capability > > reporting standards. > > > > On Fri, Sep 14, 2018 at 05:52:30PM +0400, Marc-

Re: [Qemu-devel] [PATCH] vfio-pci: make vfio-pci device more QOM conventional

2018-10-12 Thread Philippe Mathieu-Daudé
On 12/10/2018 05:40, Li Qiang wrote: > Define a TYPE_VFIO_PCI and drop DO_UPCAST. > > Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé > --- > hw/vfio/pci.c | 29 +++-- > 1 file changed, 15 insertions(+), 14 deletions(-) > > diff --git a/hw/vfio/pci.c b/hw/

Re: [Qemu-devel] [PATCH v2 3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

2018-10-12 Thread maozy
Sorry for the noise, there is something wrong with this patch, I will fix it and resend this patchset. Thanks, Mao On 10/12/18 4:30 PM, Mao Zhongyi wrote: Cc: Jan Kiszka Cc: Philippe Mathieu-Daudé Cc: Peter Maydell To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c

[Qemu-devel] [PULL 0/8] s390x updates

2018-10-12 Thread Cornelia Huck
The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) are available in the Git repository at: git://github.com/cohuck/qemu tags/s390x-20181012

[Qemu-devel] [PULL 3/8] s390x/cpumodel: Set up CPU model for AP device support

2018-10-12 Thread Cornelia Huck
From: Tony Krowiak A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The S390_FEAT_AP CPU model feature indicates whether AP instructions are available to the guest. This feature will be enabled only if th

[Qemu-devel] [PULL 4/8] s390x/kvm: enable AP instruction interpretation for guest

2018-10-12 Thread Cornelia Huck
From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is switched on for the guest, AP instructions must be interpreted by default; otherwise, they will be intercepted. This attribute set

[Qemu-devel] [PULL 5/8] s390x/ap: base Adjunct Processor (AP) object model

2018-10-12 Thread Cornelia Huck
From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak Tested-by: Pierre Morel Acked-by: David Hildenbrand Reviewed-by: Thomas Huth Reviewed-by: Halil Pasic Tested-by: Christian Borntraeger Message-Id: <20181010170309.12045-5-akrow...@l

[Qemu-devel] [PULL 1/8] target/s390x/excp_helper: Remove DPRINTF() macro

2018-10-12 Thread Cornelia Huck
From: Thomas Huth Debug macros that are disabled by default should be avoided (since the code bit-rots quite easily). Thus turn these debug prints into proper qemu_log_mask(CPU_LOG_xxx, ...) statements instead. The DPRINTF statements in do_[ext|io|mchk]_interrupt can even be removed completely si

[Qemu-devel] [PULL 2/8] linux-headers: update

2018-10-12 Thread Cornelia Huck
Update to kvm/next commit dd5bd0a65ff6 ("Merge tag 'kvm-s390-next-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD") Signed-off-by: Cornelia Huck --- include/standard-headers/linux/input.h | 9 + linux-headers/asm-arm/kvm.h| 13 +

[Qemu-devel] [PULL 6/8] s390x/vfio: ap: Introduce VFIO AP device

2018-10-12 Thread Cornelia Huck
From: Tony Krowiak Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated matrix device is created by the VFIO AP device driver by writing a UUID t

[Qemu-devel] [PULL 7/8] s390: doc: detailed specifications for AP virtualization

2018-10-12 Thread Cornelia Huck
From: Tony Krowiak This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak Reviewed-by: Pierre Morel Tes

[Qemu-devel] [PULL 8/8] hw/s390x: Include the tod-qemu also for builds with --disable-tcg

2018-10-12 Thread Cornelia Huck
From: Thomas Huth The device is required for running qtests, see hw/s390x/tod.c: void s390_init_tod(void) { Object *obj; if (kvm_enabled()) { obj = object_new(TYPE_KVM_S390_TOD); } else { obj = object_new(TYPE_QEMU_S390_TOD); } [...] } During qtests, we're

Re: [Qemu-devel] about qemu crash in scsi_handle_rw_error

2018-10-12 Thread Paolo Bonzini
On 12/10/2018 10:05, Wangguang wrote: > Hi > > qemu had a assert when we use scsi-3 reservation。 > > This happen when scsi sence is recoverd error。 > > And which lead scsi_req_complete twice. > >   > >   > > static bool scsi_handle_rw_error(SCSIDiskReq *r, int error, bool > acct_failed) > >

[Qemu-devel] [PATCH v2] hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file

2018-10-12 Thread Thomas Huth
In downstream distros like RHEL we'd like to disable some of the "legacy" devices of QEMU. The ISA version of the Cirrus VGA device is one of these legacy devices. So let's make the build process a little bit more flexible here by putting the Cirrus ISA code into a separate file which is only inclu

Re: [Qemu-devel] [PATCH v2 1/3] audio: use TYPE_WM8750 instead of ahardcoded string

2018-10-12 Thread maozy
Hi, Philippe On 10/12/18 5:50 PM, Philippe Mathieu-Daudé wrote: On 12/10/2018 10:30, Mao Zhongyi wrote: Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann To: qemu-...@nongnu.org "To: qemu-...@nongnu.org" is probably not relevant in the commit message. The Linux kernel describes the 'Cc:'

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Frediano Ziglio
> On Thu, Oct 11, 2018 at 05:37:46PM +0200, Lukáš Hrázký wrote: > > On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > > > Ok. We probably should fix interface_client_monitors_config() to use > > > > > the channel_id instead of qemu_console_get_head() then. > > > > > > > > It's not tha

Re: [Qemu-devel] [PATCH v5 3/9] qdev-monitor: print the device's clock with info qtree

2018-10-12 Thread Damien Hedde
Hi Philippe, On 10/3/18 12:42 AM, Philippe Mathieu-Daudé wrote: > Hi Damien, > > On 10/2/18 4:24 PM, Damien Hedde wrote: >> This prints the clocks attached to a DeviceState when using "info qtree" >> monitor >> command. For every clock, it displays the direction, the name and if the >> clock is

Re: [Qemu-devel] [PATCH RFC v5 2/7] ui/vnc.c: polish vnc_init_func

2018-10-12 Thread Fei Li
On 10/12/2018 04:18 PM, Markus Armbruster wrote: Fei Li writes: On 10/11/2018 09:13 PM, Markus Armbruster wrote: Fei Li writes: Add a new Error parameter for vnc_display_init() to handle errors in its caller: vnc_init_func(), just like vnc_display_open() does. And let the call trace pro

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends

2018-10-12 Thread Gerd Hoffmann
Hi, > Note, I can't remember what Markus had proposed for CLI arguments in > QAPI, so I invented something arbitary but plausible. Using qapi visitors to parse the command line. Used by -blockdev and -display (and maybe others meanwhile). See parse_display_qapi(). I think Daniels suggestion

Re: [Qemu-devel] [PATCH RFC v5 3/7] qemu_init_vcpu: add a new Error parameter to propagate

2018-10-12 Thread Fei Li
On 10/12/2018 04:24 PM, Markus Armbruster wrote: Fei Li writes: On 10/11/2018 09:19 PM, Markus Armbruster wrote: Fei Li writes: The caller of qemu_init_vcpu() already passed the **errp to handle Which caller? There are many. Or do you mean "The callers"? Oh, sorry, I mean "The calle

Re: [Qemu-devel] [PATCH v2] vhost-user: define conventions for vhost-user backends

2018-10-12 Thread Daniel P . Berrangé
On Fri, Oct 12, 2018 at 12:23:11PM +0200, Gerd Hoffmann wrote: > Hi, > > > Note, I can't remember what Markus had proposed for CLI arguments in > > QAPI, so I invented something arbitary but plausible. > > Using qapi visitors to parse the command line. Used by -blockdev and > -display (and may

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Gerd Hoffmann
Hi, > > When using qemu_console_get_head() it doesn't work correctly, it would > > use the qxl card's data. It would work if spice-server would filter the > > list to only include the entries for the given display channel before > > calling the ->client_monitors_config() callback. But it doesn

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Frediano Ziglio
> > Hi, > > > > When using qemu_console_get_head() it doesn't work correctly, it would > > > use the qxl card's data. It would work if spice-server would filter the > > > list to only include the entries for the given display channel before > > > calling the ->client_monitors_config() callback.

Re: [Qemu-devel] [PATCH RFC v5 2/7] ui/vnc.c: polish vnc_init_func

2018-10-12 Thread Fei Li
On 10/12/2018 06:23 PM, Fei Li wrote: On 10/12/2018 04:18 PM, Markus Armbruster wrote: Fei Li writes: On 10/11/2018 09:13 PM, Markus Armbruster wrote: Fei Li writes: Add a new Error parameter for vnc_display_init() to handle errors in its caller: vnc_init_func(), just like vnc_displa

Re: [Qemu-devel] [PULL 0/7] migration queue

2018-10-12 Thread Peter Maydell
On 11 October 2018 at 20:25, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' > into staging (2018-10-11 10:43:37 +01

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Gerd Hoffmann
On Fri, Oct 12, 2018 at 06:46:37AM -0400, Frediano Ziglio wrote: > > > > Hi, > > > > > > When using qemu_console_get_head() it doesn't work correctly, it would > > > > use the qxl card's data. It would work if spice-server would filter the > > > > list to only include the entries for the given d

Re: [Qemu-devel] [PULL 0/2] Block patches

2018-10-12 Thread Peter Maydell
On 12 October 2018 at 02:50, Fam Zheng wrote: > The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' > into staging (2018-10-11 10:43:37 +0100) > > are available in the Git repository at: > > g

[Qemu-devel] [PATCH] qxl: store channel id in qxl->id

2018-10-12 Thread Gerd Hoffmann
See qemu_spice_add_display_interface(), the console index is also used as channel id. So put that into the qxl->id field too. In typical use cases (one primary qxl-vga device, optionally one or more secondary qxl devices, no non-qxl display devices) this doesn't change anything. With this in pla

[Qemu-devel] [PATCH] spice: prepare for upcoming spice-server change

2018-10-12 Thread Gerd Hoffmann
Future spice-server versions will call the client_monitors_config callback with the monitors list filtered to only include the monitors of the given display channel (aka QXLInstance). Luckily this is easily detectable at runtime, so we can prepare for that in advance and also make qemu compatible

[Qemu-devel] [PATCH v2 2/7] qapi: use qemu_strtoi64() in parse_str_int64

2018-10-12 Thread David Hildenbrand
The qemu api claims to be easier to use, and the resulting code shows that. Signed-off-by: David Hildenbrand --- qapi/string-input-visitor.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c index af0a8

[Qemu-devel] [PATCH v2 1/7] qapi: correctly parse uint64_t values from strings

2018-10-12 Thread David Hildenbrand
Right now, we parse uint64_t values just like int64_t values, resulting in negative values getting accepted and certain valid large numbers only being representable as negative numbers. Also, reported errors indicate that an int64_t is expected. Parse uin64_t separately. Implementation inspired by

[Qemu-devel] [PATCH v2 4/7] range: add some more functions

2018-10-12 Thread David Hildenbrand
Add some more functions that will be used in memory-device context. range_init(): Init using lower bound and size, check for validity range_init_nofail(): Init using lower bound and size, validity asserted range_size(): Extract the size of a range range_overlaps_range(): Check for overlaps of two

[Qemu-devel] [PATCH v2 6/7] memory-device: avoid overflows on very huge devices

2018-10-12 Thread David Hildenbrand
Should not be a problem right now, but it could theoretically happen in the future. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index 996ad1490f..8be63c8032 10064

[Qemu-devel] [PATCH v2 0/7] qapi/range/memory-device: fixes and cleanups

2018-10-12 Thread David Hildenbrand
While working on memory device code, I noticed that specifiying an uint64_t on command line does not work in all cases as we always parse an int64_t. So I fix that and also cleanup the old int64_t parser. To be able to fix some overflows in memory-device code in a clean way, I am reusing the range

[Qemu-devel] [PATCH v2] ui/vnc.c: polish vnc_init_func

2018-10-12 Thread Fei Li
Add a new Error parameter for vnc_display_init() to handle errors in its caller: vnc_init_func(), just like vnc_display_open() does. And let its callees propagate the Error, like init_keyboard_layout(). Signed-off-by: Fei Li --- include/ui/console.h | 2 +- ui/curses.c | 4 +++- ui/ke

[Qemu-devel] [PATCH v2 7/7] memory-device: rewrite address assignment using ranges

2018-10-12 Thread David Hildenbrand
Let's rewrite it properly using ranges. This fixes certain overflows that are right now possible. E.g. qemu-system-x86_64 -m 4G,slots=20,maxmem=40G -M pc \ -object memory-backend-file,id=mem1,share,mem-path=/dev/zero,size=2G -device pc-dimm,memdev=mem1,id=dimm1,addr=-0x4000 Now proper

[Qemu-devel] [PATCH v2 3/7] range: pass const pointer where possible

2018-10-12 Thread David Hildenbrand
If there are no changes, let's use a const pointer. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: David Hildenbrand --- include/qemu/range.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/range.h b/include/qemu/range.h index f28f0c1825..7e75f4e655 10

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead ofqdev property to pass wm8750 reference

2018-10-12 Thread maozy
Hi, Philippe On 10/12/18 5:53 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 12/10/2018 10:30, Mao Zhongyi wrote: According to qdev-properties.h, properties of pointer type should be avoided, it seems a link type property is a good substitution. Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffm

[Qemu-devel] [PATCH v2 2/8] block: Add auto-read-only option

2018-10-12 Thread Kevin Wolf
If a management application builds the block graph node by node, the protocol layer doesn't inherit its read-only option from the format layer any more, so it must be set explicitly. Backing files should work on read-only storage, but at the same time, a block job like commit should be able to reo

[Qemu-devel] [PATCH v2 5/7] memory-device: use QEMU_IS_ALIGNED

2018-10-12 Thread David Hildenbrand
Shorter and easier to read. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index 7de1ccd497..996ad1490f 100644 --- a/hw/mem/

[Qemu-devel] [PATCH v2 1/8] block: Update flags in bdrv_set_read_only()

2018-10-12 Thread Kevin Wolf
To fully change the read-only state of a node, we must not only change bs->read_only, but also update bs->open_flags. Signed-off-by: Kevin Wolf --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index 0d6e5f1a76..d7bd6d29b4 100644 --- a/block.c +++ b/block.c

[Qemu-devel] [PATCH v2 4/8] nbd: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open a read-write NBD connection if the server provides a read-write export, but instead of erroring out for read-only exports, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/nbd-client.c | 10 +- 1 file changed, 5 inserti

[Qemu-devel] [PATCH v2 7/8] gluster: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/gluster.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/glus

[Qemu-devel] [PATCH v2 3/8] block: Require auto-read-only for existing fallbacks

2018-10-12 Thread Kevin Wolf
Some block drivers have traditionally changed their node to read-only mode without asking the user. This behaviour has been marked deprecated since 2.11, expecting users to provide an explicit read-only=on option. Now that we have auto-read-only=on, enable these drivers to make use of the option.

[Qemu-devel] [PATCH v2 0/8] block: Add auto-read-only option

2018-10-12 Thread Kevin Wolf
See patch 2 for an explanation of the motivation. v2: - Turn bdrv_set_read_only() into bdrv_apply_auto_read_only() - Support the option in a lot more block drivers Kevin Wolf (8): block: Update flags in bdrv_set_read_only() block: Add auto-read-only option block: Require auto-read-only for

[Qemu-devel] [PATCH v2 6/8] curl: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/curl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/curl.c b/block/curl.c index fabb2b4da7..db5d2bd8ef 100644 --- a/block/curl.c +++ b/block/curl.

[Qemu-devel] [PATCH v2 5/8] file-posix: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open the file read-write if we have the permissions, but instead of erroring out for read-only files, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/file-posix.c | 13 + 1 file changed, 13 insertions(+) diff --git a/b

[Qemu-devel] [PATCH v2 8/8] iscsi: Support auto-read-only option

2018-10-12 Thread Kevin Wolf
If read-only=off, but auto-read-only=on is given, open the volume read-write if we have the permissions, but instead of erroring out for read-only volumes, just degrade to read-only. Signed-off-by: Kevin Wolf --- block/iscsi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -

Re: [Qemu-devel] [PATCH v2] ui/vnc.c: polish vnc_init_func

2018-10-12 Thread Fei Li
On 10/12/2018 07:50 PM, Fei Li wrote: Add a new Error parameter for vnc_display_init() to handle errors in its caller: vnc_init_func(), just like vnc_display_open() does. And let its callees propagate the Error, like init_keyboard_layout(). Signed-off-by: Fei Li As this version do a big adj

[Qemu-devel] about qemu crash in scsi_handle_rw_error

2018-10-12 Thread Wangguang
Hi qemu had a assert when we use scsi-3 reservation。 This happen when scsi sence is recoverd error。 And which lead scsi_req_complete twice. static bool scsi_handle_rw_error(SCSIDiskReq *r, int error, bool acct_failed) { bool is_read = (r->req.cmd.mode == SCSI_XFER_FROM_DEV); SCSIDiskState

Re: [Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error

2018-10-12 Thread Max Reitz
On 12.10.18 07:44, Markus Armbruster wrote: > Copying Marc-André for a possible connection to his recent work on > improving help. Marc-André, search for "format=help". Just in case you > have further observations to offer. > > Max Reitz writes: > >> On 08.10.18 19:31, Markus Armbruster wrote:

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead ofqdev property to pass wm8750 reference

2018-10-12 Thread Philippe Mathieu-Daudé
Cc'ing Eduardo and Thomas. On 12/10/2018 13:51, maozy wrote: > Hi, Philippe > > On 10/12/18 5:53 PM, Philippe Mathieu-Daudé wrote: >> Hi Mao, >> >> On 12/10/2018 10:30, Mao Zhongyi wrote: >>> According to qdev-properties.h, properties of pointer type should >>> be avoided, it seems a link type pr

[Qemu-devel] [PULL 3/5] qxl: check qxl_phys2virt return value

2018-10-12 Thread Gerd Hoffmann
Fixes: CID 1395986 Fixes: 979f7ef8966bc4495a710ed9e4af42098f92ee79 Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181005134608.1251-1-kra...@redhat.com --- hw/display/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/d

[Qemu-devel] [PULL 4/5] i2c: switch ddc to use the new edid generator

2018-10-12 Thread Gerd Hoffmann
This also makes the default display resolution configurable, via xres and yres properties. The default is 1024x768. The old code had a hard-coded resolution of 1600x1200. Cc: Linus Walleij Cc: BALATON Zoltan Signed-off-by: Gerd Hoffmann Message-id: 20181005110837.28209-1-kra...@redhat.com ---

[Qemu-devel] [PULL 5/5] hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file

2018-10-12 Thread Gerd Hoffmann
From: Thomas Huth In downstream distros like RHEL we'd like to disable some of the "legacy" devices of QEMU. The ISA version of the Cirrus VGA device is one of these legacy devices. So let's make the build process a little bit more flexible here by putting the Cirrus ISA code into a separate file

[Qemu-devel] [PULL 2/5] bochs-display: wire up edid support

2018-10-12 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Message-id: 20181005160147.892-3-kra...@redhat.com --- hw/display/bochs-display.c | 13 + hw/display/Makefile.objs | 1 + 2 files changed, 14 insertions(+) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 09d8944a1b..3d439eb24

[Qemu-devel] [PULL 1/5] display: add separate config option for bochs-display

2018-10-12 Thread Gerd Hoffmann
This allows modern architectures which don't care about vga compatibility (risc-v for example) build bochs-display without including all vga emulation too. Signed-off-by: Gerd Hoffmann Reviewed-by: Alistair Francis Message-id: 20181005160147.892-2-kra...@redhat.com --- default-configs/pci.mak

[Qemu-devel] [PULL 0/5] Vga 20181012 patches

2018-10-12 Thread Gerd Hoffmann
The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/vga-20181012-pu

Re: [Qemu-devel] [PULL 0/8] s390x updates

2018-10-12 Thread Peter Maydell
ble in the Git repository at: > > git://github.com/cohuck/qemu tags/s390x-20181012 > > for you to fetch changes up to 0161215d435ef5680c4623bcbdfe89ce5b35cf42: > > hw/s390x: Include the tod-qemu also for builds wi

Re: [Qemu-devel] [PATCH v2] ui/vnc.c: polish vnc_init_func

2018-10-12 Thread Philippe Mathieu-Daudé
Hi Fei, On 12/10/2018 13:50, Fei Li wrote: > Add a new Error parameter for vnc_display_init() to handle errors > in its caller: vnc_init_func(), just like vnc_display_open() does. > And let its callees propagate the Error, like init_keyboard_layout(). > > Signed-off-by: Fei Li > --- > include/u

[Qemu-devel] QOM: Can devices having link properties be user-creatable?

2018-10-12 Thread Philippe Mathieu-Daudé
While looking at Mao's series (https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02519.html) I wondered if devices having link properties can be user-creatable. Using the following patch (I don't think this is correct to put qdev code into qobject, but I used this as PoC): -- >8 -- diff --

  1   2   3   >