[Qemu-devel] [PATCH v3 1/4] vl: improve/fix documentation related to RTC function

2018-10-18 Thread Artem Pisarenko
Documentation describing -rtc option updated to better match current implementation and highlight some important specifics. Signed-off-by: Artem Pisarenko --- qemu-options.hx | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx inde

[Qemu-devel] [PATCH v3 0/4] Fix and improve core RTC function and documentation

2018-10-18 Thread Artem Pisarenko
Modifications are motivated by bug https://bugs.launchpad.net/qemu/+bug/1797033 I've encountered recently. Trying to fix it and analyzing its effect on all use cases (not covered in bug report) revealed much deeper problems. This is my first patch to QEMU and I'm not sure whether the way I addre

[Qemu-devel] [PATCH v3 2/4] vl: refactor -rtc option references

2018-10-18 Thread Artem Pisarenko
Improve code readability and prepare for fixing bug #1797033 Signed-off-by: Artem Pisarenko --- Notes: v2: fixed compiler warning vl.c | 85 ++-- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/vl.c b/vl.c inde

[Qemu-devel] [PATCH v3 3/4] Fixes RTC bug with base datetime shifts in clock=vm

2018-10-18 Thread Artem Pisarenko
This makes all current "-rtc" option parameters combinations produce fixed/unambiguous RTC timedate reference for hardware emulation frontends. It restores determinism of guest execution when used with clock=vm and specified base value. Buglink: https://bugs.launchpad.net/qemu/+bug/1797033 Signed

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

2018-10-18 Thread Frediano Ziglio
> > Adds two functions to let QEMU provide information to identify graphics > devices and their monitors in the guest: > > * device address - The path identifying the device on the system (e.g. PCI > path): > spice_qxl_set_device_address(...) > > * device display ID - The index of the monito

[Qemu-devel] [PATCH v3 4/4] vl, qapi: offset calculation in RTC_CHANGE event reverted

2018-10-18 Thread Artem Pisarenko
Return value of qemu_timedate_diff(), used for calculation offset in QAPI 'RTC_CHANGE' event, restored to keep compatibility. Since it wasn't documented that difference is relative to host clock advancement, this change also adds important note to 'RTC_CHANGE' event description to highlight establi

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: Modern shellscripting(use $() instead of ``)

2018-10-18 Thread maozy
Hi, Eric On 10/18/18 11:28 AM, Eric Blake wrote: On 10/17/18 10:17 PM, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. `pwd` and `basename $0` are in 231 files under directory tests/qemu-iotests, so r

Re: [Qemu-devel] [RFC PATCH qemu v2 2/2] spice: set device address and device display ID in QXL interface

2018-10-18 Thread Frediano Ziglio
> > Calls new SPICE QXL interface functions to set: > > * The hardware address of the graphics device represented by the QXL > interface (e.g. a PCI path): > spice_qxl_set_device_address(...) > > * The device display IDs (the IDs of the device's monitors that belong > to this QXL interface

Re: [Qemu-devel] [PATCH v2] ssi-sd: Make devices picking up backends unavailable with -device

2018-10-18 Thread Markus Armbruster
Peter, would you be willing to take this through your ARM tree? Markus Armbruster writes: > Device models aren't supposed to go on fishing expeditions for > backends. They should expose suitable properties for the user to set. > For onboard devices, board code sets them. > > Device ssi-sd picks

Re: [Qemu-devel] [PATCH V6 3/5] target-i386: add rtc 0x70 port as coalesced_pio

2018-10-18 Thread peng.hao2
>On 17/10/2018 18:52, Peng Hao wrote: >> +/* register rtc 0x70 port as coalesced_pio */ >> +memory_region_set_flush_coalesced(&s->io); >> +memory_region_init_io(&s->coalesced_io, OBJECT(s), &cmos_ops, >> + s, "rtc1", 1); >> +isa_register_ioport(isadev, &s->c

Re: [Qemu-devel] [PATCH] Xen PCI passthrough: fix passthrough failure when irq map failure

2018-10-18 Thread Zhao, Yan Y
Hi The background for this patch is that: for some pci device, even it's PCI_INTERRUPT_PIN is not 0, it actually does not support INTx mode, so we should just report error, disable INTx mode and continue the passthrough. However, the commit 5a11d0f7 regards this as error condition and let qemu qu

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

2018-10-18 Thread Gerd Hoffmann
> > + * supported address at the moment, other identifiers can be introduced > > later. > > + * is the PCI domain, followed by . of any PCI > > bridges > > + * in the chain leading to the device. The last . is the > > + * graphics device. > > Maybe better to specify also the encoding, like decima

[Qemu-devel] [PATCH 1/2] quorum: Forbid adding children in blkverify mode

2018-10-18 Thread Alberto Garcia
The blkverify mode of Quorum only works when the number of children is exactly two, so any attempt to add a new one must return an error. quorum_del_child() on the other hand doesn't need any additional check because decreasing the number of children would make it go under the vote threshold. Sig

[Qemu-devel] [PATCH 2/2] iotest: Test x-blockdev-change on a Quorum

2018-10-18 Thread Alberto Garcia
This patch tests that you can add and remove drives from a Quorum using the x-blockdev-change command. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/081 | 86 ++ tests/qemu-iotests/081.out | 54 + 2 files changed,

[Qemu-devel] [PATCH 0/2] Forbid adding children to a Quorum in blkverify mode

2018-10-18 Thread Alberto Garcia
Hi, as pointed out by Kevin, the Quorum driver should not allow adding new children when running in blkverify mode. This series fixes that and also adds a couple of basic iotests for the x-blockdev-change QMP command. Berto Alberto Garcia (2): quorum: Forbid adding children in blkverify mode

Re: [Qemu-devel] [RFC PATCH v1 1/4] VFIO KABI for migration interface

2018-10-18 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > > > On 10/17/2018 3:39 PM, Dr. David Alan Gilbert wrote: > > * Kirti Wankhede (kwankh...@nvidia.com) wrote: > >> - Added vfio_device_migration_info structure to use interact with vendor > >> driver. > >> - Different flags are used to get or set m

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-18 Thread Stefan Hajnoczi
On Wed, Oct 17, 2018 at 01:24:28PM +0200, Paolo Bonzini wrote: > On 17/10/2018 12:57, Artem Pisarenko wrote: > >> Further down in this patch the notation is QEMU_TIMER_ATTR_, which I > >> think is clearer because QEMU_TIMER_ATTR(id) looks like a (non-existent) > >> macro.  Please use the QEMU_TIMER

Re: [Qemu-devel] [PATCH 2/4] migration: introduce lockless multithreads model

2018-10-18 Thread Xiao Guangrong
On 10/17/2018 06:10 PM, Paolo Bonzini wrote: An idea: the total number of requests is going to be very small, and a PtrRing is not the nicest data structure for multiple producer/single consumer. So you could instead: - add the size of one request to the ops structure. Move the allocation

Re: [Qemu-devel] [PATCH RFC v11 0/2] add support for VCPU event states

2018-10-18 Thread gengdongjiu
Hi peter, Thanks very much for this comments and very sorry for my late response due to business trave. Yes, the reason that tag the patchset to RFC is that it just hasn't been tested on 32-bit. if someone else can test it on 32-bit platform, it will be great. I do not have 32-b

Re: [Qemu-devel] [PATCH] call HotplugHandler->plug() as the last step in device realization

2018-10-18 Thread Igor Mammedov
On Wed, 17 Oct 2018 13:40:00 +0200 Paolo Bonzini wrote: > On 16/10/2018 15:33, Igor Mammedov wrote: > > TODO: > > remove usage of Error** from plug() callback, we need to factor out > > pre_plug part from plug() callbacks, before proceeding with it. > > DavidH has recently finished it for pc-d

Re: [Qemu-devel] [PATCH V6 3/5] target-i386: add rtc 0x70 port as coalesced_pio

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 10:03, peng.h...@zte.com.cn wrote: >>> +/* register rtc 0x70 port as coalesced_pio */ >>> +memory_region_set_flush_coalesced(&s->io); >>> +memory_region_init_io(&s->coalesced_io, OBJECT(s), &cmos_ops, >>> + s, "rtc1", 1); >>> +isa_register_iopo

Re: [Qemu-devel] [PATCH v6 12/14] target/arm: PMU: Set PMCR.N to 4

2018-10-18 Thread Peter Maydell
On 17 October 2018 at 22:14, Richard Henderson wrote: > On 10/17/18 1:25 PM, Aaron Lindsay wrote: >> I suppose pmcrn (the local variable) should've been set to 0 before this >> patch and updated here to be 4. > > That's plausible. > >> Anyway, by splitting these patches apart, my intention was to

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-18 Thread Andrea Bolognani
On Wed, 2018-10-17 at 12:01 -0300, Eduardo Habkost wrote: > On Wed, Oct 17, 2018 at 12:43:02PM +0200, Andrea Bolognani wrote: > > The proposal doesn't directly address the interaction between virtio > > protocol version and slot type. [...] > > It does. See the interface names added to each devic

Re: [Qemu-devel] [PATCH] virtio: Provide version-specific variants of virtio PCI devices

2018-10-18 Thread Daniel P . Berrangé
On Thu, Oct 18, 2018 at 12:25:12PM +0200, Andrea Bolognani wrote: > On Wed, 2018-10-17 at 12:01 -0300, Eduardo Habkost wrote: > > On Wed, Oct 17, 2018 at 12:43:02PM +0200, Andrea Bolognani wrote: > > > The proposal doesn't directly address the interaction between virtio > > > protocol version and s

Re: [Qemu-devel] [PATCH] qga: fix an off-by-one issue

2018-10-18 Thread Philippe Mathieu-Daudé
Missed in a3ef3b2272d. On 18/10/2018 04:10, Li Qiang wrote: > Signed-off-by: Li Qiang Nice catch btw. Reviewed-by: Philippe Mathieu-Daudé > --- > qga/commands-win32.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qga/commands-win32.c b/qga/commands-win32.c > index

Re: [Qemu-devel] [RFC v2 00/28] vSMMUv3/pSMMUv3 2 stage VFIO integration

2018-10-18 Thread Liu, Yi L
Hi Eric, > From: Eric Auger [mailto:eric.au...@redhat.com] > Sent: Friday, September 21, 2018 4:18 PM > Subject: [RFC v2 00/28] vSMMUv3/pSMMUv3 2 stage VFIO integration > > Up to now vSMMUv3 has not been integrated with VFIO. VFIO > integration requires to program the physical IOMMU consistently

Re: [Qemu-devel] [PULL 00/21] tcg patch queue

2018-10-18 Thread Peter Maydell
On 16 October 2018 at 18:48, Richard Henderson wrote: > The following changes since commit ff56877e911782dedc9a424233fd3f62369c258c: > > Merge remote-tracking branch > 'remotes/kraxel/tags/vga-20181015-pull-request' into staging (2018-10-15 > 15:03:45 +0100) > > are available in the Git reposi

Re: [Qemu-devel] [PATCH 2/4] migration: introduce lockless multithreads model

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 11:30, Xiao Guangrong wrote: > Beside that... i think we get the chance to remove ptr_ring gracefully, > as the bitmap can indicate the ownership of the request as well. If > the bit is 1 (supposing all bits are 1 on default), only the user can > operate it, the bit will be cleared af

Re: [Qemu-devel] [PATCH V6 3/5] target-i386: add rtc 0x70 port as coalesced_pio

2018-10-18 Thread peng.hao2
>On 18/10/2018 10:03, peng.h...@zte.com.cn wrote: +/* register rtc 0x70 port as coalesced_pio */ +memory_region_set_flush_coalesced(&s->io); +memory_region_init_io(&s->coalesced_io, OBJECT(s), &cmos_ops, + s, "rtc1", 1); +isa_registe

Re: [Qemu-devel] [PATCH] bt: use size_t type for length parameters instead of signed int

2018-10-18 Thread Paolo Bonzini
On 17/10/2018 22:58, P J P wrote: > From: Prasad J Pandit > > The length parameter values are not negative, thus use an unsigned > type 'size_t' for them. Many routines pass 'len' values to memcpy(3) > calls. If it was negative, it could lead to memory corruption issues. You are not fixing anyth

[Qemu-devel] [PATCH v3 2/4] Introduce attributes to qemu timer subsystem

2018-10-18 Thread Artem Pisarenko
Attributes are simple flags, associated with individual timers for their whole lifetime. They intended to be used to mark individual timers for special handling by various qemu features which have integration into qemu-timer. New/init functions family in timer interface updated and refactored (ne

[Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- Notes: v3: - fixed com

[Qemu-devel] [PATCH v3 3/4] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-18 Thread Artem Pisarenko
Adds EXTERNAL attribute definition to qemu timers subsystem and assigns it to virtual clock timers, used in slirp (ICMP IPv6) and ui (key queue). Virtual clock processing in rr mode reimplemented using this attribute. Fixes: 87f4fe7653baf55b5c2f2753fe6003f473c07342 Fixes: 775a412bf83f6bc0c5c02091

[Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-18 Thread Artem Pisarenko
Recent patches from series [PATCH v6] "Fixing record/replay and adding reverse debugging" introduced new clock type QEMU_CLOCK_VIRTUAL_EXT and replaced virtual timers in some external subsystems with it. This resulted in small change to existing behavior, which I consider to be unacceptable. Pro

[Qemu-devel] [PATCH v3 1/4] Revert some patches from recent [PATCH v6] "Fixing record/replay and adding reverse debugging"

2018-10-18 Thread Artem Pisarenko
That patch series introduced new virtual clock type for use in external subsystems. It breaks desired behavior in non-record/replay usage scenarios. This reverts commit 87f4fe7653baf55b5c2f2753fe6003f473c07342. This reverts commit 775a412bf83f6bc0c5c02091ee06cf649b34c593. This reverts commit 9888

Re: [Qemu-devel] [PATCH v4 03/38] block: Use warn_report() & friends to report warnings

2018-10-18 Thread Kevin Wolf
Am 17.10.2018 um 19:29 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 17.10.2018 um 10:26 hat Markus Armbruster geschrieben: > >> Calling error_report() in a function that takes an Error ** argument > >> is suspicious. Convert a few that are actually warnings to > >> warn_repor

[Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- Oops, forgot to commit this fi

Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-18 Thread Artem Pisarenko
Sorry, I forgot to fix long lines in commit messages. Do I need to submit v4 ? -- С уважением, Артем Писаренко

Re: [Qemu-devel] [PATCH] bt: use size_t type for length parameters instead of signed int

2018-10-18 Thread P J P
+-- On Thu, 18 Oct 2018, Paolo Bonzini wrote --+ | So you have to first find out all places where something is subtracted | from the length, and ensure it's okay or add assertions. | | Then you have to check a much more important issue: places that use a | fixed-size buffer such as vhci_host_send

Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 14:00, Artem Pisarenko wrote: > Sorry, I forgot to fix long lines in commit messages. Do I need to > submit v4 ? > No need, don't worry. Paolo

[Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- Oops and again oops. Now it fi

Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 13:16, Artem Pisarenko wrote: > Removes redundant checkpoints in replay log when there are no expired timers > in timers list, associated with corresponding clock (i.e. no rr events > associated with current clock value). > This also improves performance in rr mode. > > Signed-off-

qemu-devel@nongnu.org

2018-10-18 Thread Fernando Casas Schössow
Hi Stefan, I hope this email finds you well and I apologize in advance for resurrecting this thread. I'm currently running on qemu 2.12.1 and I'm still having this issue every few days but now I managed to get a core dump generated (without including the guest memory). Would you take a look at

[Qemu-devel] [PATCH] target-i386: kvm: do not initialize padding fields

2018-10-18 Thread Paolo Bonzini
The exception.pad field is going to be renamed to pending in an upcoming header file update. Remove the unnecessary initialization. Signed-off-by: Paolo Bonzini --- linux-headers/asm-x86/kvm.h | 5 + target/i386/kvm.c | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff -

Re: [Qemu-devel] [PULL 2/7] tests/migration: Enable the migration test on s390x, too

2018-10-18 Thread Thomas Huth
On 2018-10-17 21:28, Emilio G. Cota wrote: > On Thu, Oct 11, 2018 at 20:25:08 +0100, Dr. David Alan Gilbert (git) wrote: >> From: Thomas Huth >> >> We can re-use the s390-ccw bios code to implement a small firmware >> for a s390x guest which prints out the "A" and "B" characters and >> modifies th

qemu-devel@nongnu.org

2018-10-18 Thread Kevin Wolf
Hi Fernando, Am 18.10.2018 um 14:25 hat Fernando Casas Schössow geschrieben: > I hope this email finds you well and I apologize in advance for resurrecting > this thread. > I'm currently running on qemu 2.12.1 and I'm still having this issue every > few days but now I managed to get a core dump

Re: [Qemu-devel] [PATCH v2 2/2] i386/kvm: add support for Hyper-V IPI send

2018-10-18 Thread Paolo Bonzini
On 09/10/2018 15:08, Vitaly Kuznetsov wrote: > Hyper-V PV IPI support is merged to KVM, enable the feature in Qemu. When > enabled, this allows Windows guests to send IPIs to other vCPUs with a > single hypercall even when there are >64 vCPUs in the request. > > Signed-off-by: Vitaly Kuznetsov >

Re: [Qemu-devel] [PULL 0/1] target/hppa patch queue

2018-10-18 Thread Peter Maydell
On 16 October 2018 at 23:47, Richard Henderson wrote: > The following changes since commit 09558375a634e17cea6cfbfec883ac2376d2dc7f: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 > 17:42:56 +0100) > > are available in the Git rep

Re: [Qemu-devel] [PULL 2/7] tests/migration: Enable the migration test on s390x, too

2018-10-18 Thread Emilio G. Cota
On Thu, Oct 18, 2018 at 14:38:01 +0200, Thomas Huth wrote: > On 2018-10-17 21:28, Emilio G. Cota wrote: > > Can anyone reproduce this? Otherwise, let me know what other info > > I could provide. > > I've finally been able to reproduce it - seems like it only happens here > when the host is under h

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: Modern shellscripting(use $() instead of ``)

2018-10-18 Thread Eric Blake
[adding Jeff] On 10/18/18 2:14 AM, maozy wrote: Hi, Eric On 10/18/18 11:28 AM, Eric Blake wrote: On 10/17/18 10:17 PM, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. `pwd` and `basename $0` are in

Re: [Qemu-devel] [PATCH] target/arm : add pvpanic mmio device

2018-10-18 Thread Philippe Mathieu-Daudé
On 18/10/2018 02:55, peng.h...@zte.com.cn wrote: >> Hi Peng, >> >> On 17/10/2018 11:23, Peng Hao wrote: >>> Add pvpanic mmio device that is similar to x86's pvpanic device. >> >>> >>> Signed-off-by: Peng Hao >>> --- >>> default-configs/arm-softmmu.mak | 2 +- >>> hw/arm/virt.c

Re: [Qemu-devel] [PATCH v2] target/arm : add pvpanic mmio device

2018-10-18 Thread Philippe Mathieu-Daudé
On 17/10/2018 12:26, Peng Hao wrote: > Add pvpanic mmio device that is similar to x86's pvpanic device. > > v1 ---> v2 add copyright and license for new files. > This comment is not useful in the git history. Everything put below the next '---' line will be ignore from the patch description, you

Re: [Qemu-devel] [PULL] First RISC-V Patch Set for the 3.1 Soft Freeze

2018-10-18 Thread Michael Clark
Any patches intended for the RISC-V port should go through the maintainer tree. I have been pretty clear that I would like to run regression tests. I do not wish to pull surprises in via master. I also do not agree with this random patch approach. It's all well and good for inactive maintainers to

Re: [Qemu-devel] [RFC v3 00/15] ARM virt: PCDIMM/NVDIMM at 2TB

2018-10-18 Thread Auger Eric
Hi Igor, On 7/18/18 4:08 PM, Igor Mammedov wrote: > On Tue, 3 Jul 2018 09:19:43 +0200 > Eric Auger wrote: > >> This series aims at supporting PCDIMM/NVDIMM intantiation in >> machvirt at 2TB guest physical address. >> >> This is achieved in 3 steps: >> 1) support more than 40b IPA/GPA > will it

Re: [Qemu-devel] [PATCH] target-i386: kvm: do not initialize padding fields

2018-10-18 Thread Peter Maydell
On 18 October 2018 at 13:33, Paolo Bonzini wrote: > The exception.pad field is going to be renamed to pending in an upcoming > header > file update. Remove the unnecessary initialization. > > Signed-off-by: Paolo Bonzini > --- > linux-headers/asm-x86/kvm.h | 5 + > target/i386/kvm.c

[Qemu-devel] [PATCH v3 1/4] hw/misc/pvpanic: Build the pvpanic device in $(common-obj)

2018-10-18 Thread Philippe Mathieu-Daudé
The 'pvpanic' ISA device can be use by any machine with an ISA bus. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs index 6d50b03cfd..74e7300f30 100644 --- a/hw/misc/

[Qemu-devel] [PATCH v3 0/4] hw/misc: Add a MMIO interface to the pvpanic device

2018-10-18 Thread Philippe Mathieu-Daudé
Hi, this series takes Peng Hao's previous work but rather than adding yet another device, simply add the MMIO interface to the current device (which only implements the I/O port access). The first patches are simple cleanups: - patch 1 move the pvpanic device with the 'ocmmon objects' so we compi

[Qemu-devel] [PATCH v3 2/4] hw/misc/pvpanic: Cosmetic renaming

2018-10-18 Thread Philippe Mathieu-Daudé
To ease the MMIO device addition in the next patch, rename: - ISA_PVPANIC_DEVICE -> PVPANIC (this just returns a generic Object), - ISADevice parent_obj -> isadev, - MemoryRegion io -> mr. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/pvpanic.c | 16 +--- 1 file changed, 9 insert

Re: [Qemu-devel] When it's okay to treat OOM as fatal?

2018-10-18 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Oct 16, 2018 at 03:01:29PM +0200, Markus Armbruster wrote: >> We sometimes use g_new() & friends, which abort() on OOM, and sometimes >> g_try_new() & friends, which can fail, and therefore require error >> handling. >> >> HACKING points out the difference, b

[Qemu-devel] [PATCH v3 3/4] hw/misc/pvpanic: Add the MMIO interface

2018-10-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Peng Hao Signed-off-by: Philippe Mathieu-Daudé [PMD: Use TYPE_PVPANIC definition, split in 2 patches] --- Peng: I hope this is now more obvious how you could reuse the pvpanic device. hw/misc/pvpanic.c | 52 ++- 1 file changed, 51 inser

Re: [Qemu-devel] [PATCH v3 3/4] hw/misc/pvpanic: Add the MMIO interface

2018-10-18 Thread Peter Maydell
On 18 October 2018 at 14:04, Philippe Mathieu-Daudé wrote: > Signed-off-by: Peng Hao > Signed-off-by: Philippe Mathieu-Daudé > [PMD: Use TYPE_PVPANIC definition, split in 2 patches] > --- > Peng: I hope this is now more obvious how you could reuse the pvpanic device. > > hw/misc/pvpanic.c | 52

Re: [Qemu-devel] [PATCH 2/2] iotest: Test x-blockdev-change on a Quorum

2018-10-18 Thread Kevin Wolf
Am 18.10.2018 um 10:59 hat Alberto Garcia geschrieben: > This patch tests that you can add and remove drives from a Quorum > using the x-blockdev-change command. > > Signed-off-by: Alberto Garcia > --- a/tests/qemu-iotests/081 > +++ b/tests/qemu-iotests/081 > @@ -198,6 +198,92 @@ quorum="$quorum

[Qemu-devel] [PATCH v3 4/4] hw/arm/virt: Use the pvpanic device

2018-10-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Peng Hao Signed-off-by: Philippe Mathieu-Daudé [PMD: Use TYPE_PVPANIC definition, split in 2 patches] --- default-configs/arm-softmmu.mak | 2 +- hw/arm/virt.c | 21 + include/hw/arm/virt.h | 1 + 3 files changed, 23 insertions(+),

Re: [Qemu-devel] [PATCH v3 0/4] hw/misc: Add a MMIO interface to the pvpanic device

2018-10-18 Thread Philippe Mathieu-Daudé
On 18/10/2018 15:04, Philippe Mathieu-Daudé wrote: > Hi, this series takes Peng Hao's previous work but rather than adding yet > another device, simply add the MMIO interface to the current device (which > only implements the I/O port access). > > The first patches are simple cleanups: > - patch

Re: [Qemu-devel] [PATCH v3 3/4] hw/misc/pvpanic: Add the MMIO interface

2018-10-18 Thread Philippe Mathieu-Daudé
On 18/10/2018 15:08, Peter Maydell wrote: > On 18 October 2018 at 14:04, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Peng Hao >> Signed-off-by: Philippe Mathieu-Daudé >> [PMD: Use TYPE_PVPANIC definition, split in 2 patches] >> --- >> Peng: I hope this is now more obvious how you could reuse

Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
> We can also move the switch statement to a separate function, it > simplifies the code: > ... When I prepared this patch my intuition said me to add note in advance: "Paolo, please, don't try to move this to a separate function. I've tried it already. It cannot be done correct, look nice and not

Re: [Qemu-devel] [PATCH v3 3/9] block: Require auto-read-only for existing fallbacks

2018-10-18 Thread Kevin Wolf
Am 17.10.2018 um 20:53 hat Eric Blake geschrieben: > On 10/17/18 11:41 AM, Kevin Wolf wrote: > > 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 r

Re: [Qemu-devel] [PATCH v3 3/4] hw/misc/pvpanic: Add the MMIO interface

2018-10-18 Thread Peter Maydell
On 18 October 2018 at 14:19, Philippe Mathieu-Daudé wrote: > On 18/10/2018 15:08, Peter Maydell wrote: >> This field is the parent-type for the QOM object, so I don't >> think it makes sense for it to be a union. Any one QOM object >> should have a single distinct parent type. (There are other >>

Re: [Qemu-devel] [PATCH v3 4/4] hw/arm/virt: Use the pvpanic device

2018-10-18 Thread Peter Maydell
On 18 October 2018 at 14:04, Philippe Mathieu-Daudé wrote: > Signed-off-by: Peng Hao > Signed-off-by: Philippe Mathieu-Daudé > [PMD: Use TYPE_PVPANIC definition, split in 2 patches] > --- > default-configs/arm-softmmu.mak | 2 +- > hw/arm/virt.c | 21 + >

qemu-devel@nongnu.org

2018-10-18 Thread Fernando Casas Schössow
Hi Kevin, Not at the moment. This is a production system and pretty much up to date but can't upgrade to 3.0 yet. If the dump can be of any use, I can upload it somewhere for analysis. BR, Fernando On jue, oct 18, 2018 at 2:38 PM, Kevin Wolf wrote: Hi Fernando, Am 18.10.2018 um 14:25 hat Fern

Re: [Qemu-devel] [PATCH v2] piix_pci: change the i440fx data sheet link

2018-10-18 Thread Marcel Apfelbaum
On 10/11/18 7:18 PM, Li Qiang wrote: Seems the intel link is unavailable, change it to qemu site. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daudé --- hw/pci-host/piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c

[Qemu-devel] [PATCH] i386: hvf: Fix register refs if REX is present

2018-10-18 Thread Roman Bolshakov
According to Intel(R)64 and IA-32 Architectures Software Developer's Manual, the following one-byte registers should be fetched when REX prefix is present (sorted by reg encoding index): AL, CL, DL, BL, SPL, BPL, SIL, DIL, R8L - R15L The first 8 are fetched if REX.R is zero, the last 8 if non-zero

Re: [Qemu-devel] [PATCH v2 0/4] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-10-18 Thread Laszlo Ersek
On 10/11/18 09:59, Laszlo Ersek wrote: > Michael, > > On 09/27/18 23:24, Laszlo Ersek wrote: >> This is v2 of the series previously posted at >> . >> >> Changes are noted on every patch. > > can you please merge this series? >

Re: [Qemu-devel] No more chameleon devices

2018-10-18 Thread Marcel Apfelbaum
Hi Eduardo, On 10/17/18 6:56 PM, Eduardo Habkost wrote: (CCing Marcel, in case he has extra details on the complex Conventional/Express bus/device plugging rules) On Wed, Oct 17, 2018 at 07:57:39AM +0200, Markus Armbruster wrote: Laine Stump writes: [...] In the end, having a device that ch

Re: [Qemu-devel] No more chameleon devices

2018-10-18 Thread Peter Maydell
On 18 October 2018 at 15:11, Marcel Apfelbaum wrote: > Maybe would be a step toward a clean "socket-device" modeling (what goes > where) > and also QEMU emulation would be cleaner since in bare metal you cannot > plug a PCIe device into a PCI slot and vice-versa or have the same device ID > for bo

[Qemu-devel] [PATCH] blockdev: report error on block latency histogram set error

2018-10-18 Thread zhenwei pi
Function block_latency_histogram_set may return error, but qapi ignore this. This can be reproduced easily by qmp command: virsh qemu-monitor-command INSTANCE '{"execute":"x-block-latency-histogram-set", "arguments":{"device":"drive-virtio-disk1","boundaries":[10,200,40]}}' In fact this command do

[Qemu-devel] [PATCH] hw/arm/boot: introduce fdt_add_memory_node helper

2018-10-18 Thread Eric Auger
From: Shameer Kolothum We introduce an helper to create a memory node. Signed-off-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/boot.c | 54 --- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/b

Re: [Qemu-devel] When it's okay to treat OOM as fatal?

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 15:06, Markus Armbruster wrote: > Device "qxl" creates a memory region "qxl.vgavram" with a size taken > from uint32_t property "ram_size", silently rounded up to the next power > of two. It uses &error_fatal for error handling. That's good to some extent---it means that the core co

[Qemu-devel] [PATCH] i386: hvf: Remove hvf_disabled

2018-10-18 Thread Roman Bolshakov
accel_init_machine sets *(acc->allowed) to true if acc->init_machine(ms) succeeds. There's no need to have both hvf_allowed and hvf_disabled. Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 4 ++-- target/i386/hvf/hvf.c | 9 + 2 files changed, 3 insertions(+), 10 deletions(-)

Re: [Qemu-devel] [PATCH] target-i386: kvm: do not initialize padding fields

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 15:03, Peter Maydell wrote: > * these initializers were added by commit 7e680753cfa2 >in order to suppress a valgrind warning > * they were rendered unnecessary by the later commit 076796f8fd27f4d, >which added the "= {}" initializer to the declaration of "events", >thus

Re: [Qemu-devel] [PATCH] hw/arm/boot: introduce fdt_add_memory_node helper

2018-10-18 Thread Peter Maydell
On 18 October 2018 at 15:27, Eric Auger wrote: > From: Shameer Kolothum > > We introduce an helper to create a memory node. Hi; this seems to be missing the rationale for doing this ? > Signed-off-by: Eric Auger > Signed-off-by: Shameer Kolothum thanks -- PMM

[Qemu-devel] [RFC v4 01/16] hw/arm/boot: introduce fdt_add_memory_node helper

2018-10-18 Thread Eric Auger
From: Shameer Kolothum We introduce an helper to create a memory node. Signed-off-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/boot.c | 54 --- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/b

[Qemu-devel] [RFC v4 02/16] linux-headers: header update for KVM/ARM KVM_ARM_GET_MAX_VM_PHYS_SHIFT

2018-10-18 Thread Eric Auger
This is a header update against kvmarm next branch git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm kvmarm/next to get the KVM_ARM_GET_MAX_VM_PHYS_SHIFT ioctl. This allows to retrieve the IPA address range KVM supports. Signed-off-by: Eric Auger --- v3 -> v4: - update against kvmar

[Qemu-devel] [RFC v4 00/16] ARM virt: PCDIMM/NVDIMM at 2TB

2018-10-18 Thread Eric Auger
This series aims at supporting PCDIMM/NVDIMM intantiation in mach-virt at 2TB guest physical address. This is not material for 3.1. Although there is another implementation alternative under discussion on the ML, consisting in having a single device memory region with a floating base, I continue

[Qemu-devel] [RFC v4 04/16] kvm: add kvm_arm_get_max_vm_phys_shift

2018-10-18 Thread Eric Auger
Add the kvm_arm_get_max_vm_phys_shift() helper that returns the log of the maximum IPA size supported by KVM. This capability needs to be known to create the VM with a specific IPA max size (kvm_type passed along KVM_CREATE_VM ioctl. Signed-off-by: Eric Auger --- v3 -> v4: - s/s/ms in kvm_arm_ge

[Qemu-devel] [RFC v4 06/16] hw/arm/virt: Add virt-3.2 machine type

2018-10-18 Thread Eric Auger
Add virt-3.2 machine type. Signed-off-by: Eric Auger --- hw/arm/virt.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9f677825f9..f920ef247b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1796,7 +1796,7 @@ static voi

[Qemu-devel] [RFC v4 11/16] acpi: move build_srat_hotpluggable_memory to generic ACPI source

2018-10-18 Thread Eric Auger
We plan to reuse build_srat_hotpluggable_memory() for ARM so let's move the function to aml-build. Signed-off-by: Eric Auger --- hw/acpi/aml-build.c | 51 + include/hw/acpi/aml-build.h | 3 +++ 2 files changed, 54 insertions(+) diff --git a/hw/acpi/a

[Qemu-devel] [RFC v4 03/16] hw/boards: Add a MachineState parameter to kvm_type callback

2018-10-18 Thread Eric Auger
On ARM, the kvm_type will be resolved by querying the KVMState. Let's add the MachineState handle to the callback so that we can retrieve the KVMState handle. in kvm_init, when the callback is called, the kvm_state variable is not yet set. Signed-off-by: Eric Auger Acked-by: David Gibson [ppc p

[Qemu-devel] [RFC v4 08/16] hw/arm/virt: Allocate device_memory

2018-10-18 Thread Eric Auger
We define a device memory region stating at 2TB and max 4TB. This requires support of more than 40b IPA on host (CPU, kernel config and FW). IPA needs are adjusted according to maxram_size - ram_size value. This is largely inspired of device memory initialization in pc machine code. Signed-off-by

[Qemu-devel] [RFC v4 05/16] vl: Set machine ram_size, maxram_size and ram_slots earlier

2018-10-18 Thread Eric Auger
The machine RAM attributes will need to be analyzed during the configure_accelerator() process. especially kvm_type() arm64 machine callback will use them to know how many IPA/GPA bits are needed to model the whole RAM range. So let's assign those machine state fields before calling configure_accel

[Qemu-devel] [RFC v4 15/16] hw/arm/boot: Expose the pmem nodes in the DT

2018-10-18 Thread Eric Auger
In case of NV-DIMM slots, let's add /pmem DT nodes. Signed-off-by: Eric Auger --- hw/arm/boot.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 81d621ce14..50acf0abd4 100644 --- a/hw/arm/boot.c +++ b/hw/arm

[Qemu-devel] [RFC v4 07/16] hw/arm/virt: Implement kvm_type function for 3.2 machine

2018-10-18 Thread Eric Auger
This patch computes the requested IPA bits according to the requested maxram value. The machine class kvm_type() callback is implemented and fills the kvm_type[7-0] bits with the computed max IPA shift (0 default value corresponds to 40b IPA). The kvm_type is passed to the KVM_CREATE_VM ioctl. Th

[Qemu-devel] [RFC v4 10/16] hw/arm/boot: Expose the PC-DIMM nodes in the DT

2018-10-18 Thread Eric Auger
From: Shameer Kolothum This patch add memory nodes corresponding to PC-DIMM regions. NV_DIMM and ACPI_NVDIMM configs are not yet set for ARM so we don't need to care about NV-DIMM at this stage. Signed-off-by: Shameer Kolothum Signed-off-by: Eric Auger --- v3 -> v4: - git rid of @base and @l

[Qemu-devel] [RFC v4 13/16] nvdimm: use configurable ACPI IO base and size

2018-10-18 Thread Eric Auger
From: Kwangwoo Lee This patch uses configurable IO base and size to create NPIO AML for ACPI NFIT. Since a different architecture like AArch64 does not use port-mapped IO, a configurable IO base is required to create correct mapping of ACPI IO address and size. Signed-off-by: Kwangwoo Lee Signe

[Qemu-devel] [RFC v4 14/16] hw/arm/virt: Add nvdimm hot-plug infrastructure

2018-10-18 Thread Eric Auger
From: Kwangwoo Lee Pre-plug and plug handlers are prepared for NVDIMM support. Signed-off-by: Eric Auger Signed-off-by: Kwangwoo Lee --- default-configs/arm-softmmu.mak | 2 ++ hw/arm/virt-acpi-build.c| 6 ++ hw/arm/virt.c | 22 ++ include/h

Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 15:23, Artem Pisarenko wrote: >> We can also move the switch statement to a separate function, it >> simplifies the code: >> ... > > When I prepared this patch my intuition said me to add note in advance: > "Paolo, please, don't try to move this to a separate function. I've > tried i

Re: [Qemu-devel] [PATCH] i386: hvf: Remove hvf_disabled

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 16:30, Roman Bolshakov wrote: > accel_init_machine sets *(acc->allowed) to true if acc->init_machine(ms) > succeeds. There's no need to have both hvf_allowed and hvf_disabled. > > Signed-off-by: Roman Bolshakov > --- > include/sysemu/hvf.h | 4 ++-- > target/i386/hvf/hvf.c | 9 +--

[Qemu-devel] [RFC v4 16/16] hw/arm/virt: Add nvdimm and nvdimm-persistence options

2018-10-18 Thread Eric Auger
Machine option nvdimm allows to turn NVDIMM support on. Signed-off-by: Eric Auger --- hw/arm/virt.c | 59 +-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d84d5a5841..02fb62595e 100644 --- a/hw/

[Qemu-devel] [RFC v4 09/16] hw/arm/virt: Add memory hotplug framework

2018-10-18 Thread Eric Auger
From: Shameer Kolothum This patch adds the the memory hot-plug/hot-unplug infrastructure in machvirt. Signed-off-by: Eric Auger Signed-off-by: Shameer Kolothum Signed-off-by: Kwangwoo Lee --- v3 -> v4: - check the memory device is not hotplugged v2 -> v3: - change in pc_dimm_plug()'s signat

Re: [Qemu-devel] [PATCH] i386: hvf: Fix register refs if REX is present

2018-10-18 Thread Paolo Bonzini
On 18/10/2018 15:44, Roman Bolshakov wrote: > According to Intel(R)64 and IA-32 Architectures Software Developer's > Manual, the following one-byte registers should be fetched when REX > prefix is present (sorted by reg encoding index): > AL, CL, DL, BL, SPL, BPL, SIL, DIL, R8L - R15L > > The firs

  1   2   3   4   5   >