Re: [Qemu-devel] [PATCH 2/3] memory: Refactor common shifting code from accessors

2018-09-27 Thread Peter Maydell
On 27 September 2018 at 01:24, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > memory.c | 30 +- > 1 file changed, 21 insertions(+), 9 deletions(-) > NB that this patch will have a (fairly trivial) conflict with the "remove oldmmio acces

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

2018-09-27 Thread Igor Mammedov
On Thu, 27 Sep 2018 00:31:07 +0200 Laszlo Ersek wrote: > On 09/26/18 18:26, Alex Williamson wrote: > > On Wed, 26 Sep 2018 13:12:47 +0200 > > Laszlo Ersek wrote: > > > >> On 09/25/18 22:36, Alex Williamson wrote: > >>> On Tue, 25 Sep 2018 00:13:46 +0200 > >>> Laszlo Ersek wrote: > >>>

[Qemu-devel] [PULL 4/7] display/edid: add DEFINE_EDID_PROPERTIES

2018-09-27 Thread Gerd Hoffmann
Add a define for edid monitor properties. Signed-off-by: Gerd Hoffmann Message-id: 20180925075646.25114-5-kra...@redhat.com --- include/hw/display/edid.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h index b7fe56a958..bd51d26916 100

[Qemu-devel] [PULL 3/7] display/edid: add region helper.

2018-09-27 Thread Gerd Hoffmann
Create a io region for an EDID data block. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20180925075646.25114-4-kra...@redhat.com --- include/hw/display/edid.h | 4 hw/display/edid-region.c | 33 + hw/display/Makefile.objs |

[Qemu-devel] [PULL 2/7] display/edid: add qemu_edid_size()

2018-09-27 Thread Gerd Hoffmann
Helper function to figure the size of a edid blob, by checking how many extensions are present. Both the base edid blob and the extensions are 128 bytes in size. Signed-off-by: Gerd Hoffmann Message-id: 20180925075646.25114-3-kra...@redhat.com --- include/hw/display/edid.h | 1 + hw/display/e

[Qemu-devel] [PULL 1/7] display/edid: add edid generator to qemu.

2018-09-27 Thread Gerd Hoffmann
EDID is a metadata format to describe monitors. On physical hardware the monitor has an eeprom with that data block which can be read over i2c bus. On a linux system you can usually find the EDID data block in /sys/class/drm/$card/$connector/edid. xorg ships a edid-decode utility which you can u

[Qemu-devel] [PULL 7/7] qxl: support mono cursors with inverted colors

2018-09-27 Thread Gerd Hoffmann
From: Peter Wu Monochrome cursors are still used by Windows guests with the QXL-WDDM-DOD driver. Such cursor types have one odd feature, inversion of colors. GDK does not seem to support it, so implement an alternative solution: fill the inverted pixels and add an outline to make the cursor more

[Qemu-devel] [PULL 5/7] display/stdvga: add edid support.

2018-09-27 Thread Gerd Hoffmann
This patch adds edid support to the qemu stdvga. It is turned off by default and can be enabled with the new edid property. The patch also adds xres and yres properties to specify the video mode you want the guest use. Works only with edid enabled and updated guest driver. The mmio bar of the s

[Qemu-devel] [PULL 6/7] qxl: use guest_monitor_config for local renderer.

2018-09-27 Thread Gerd Hoffmann
When processing monitor config from guest store head0 width and height for single-head configurations. Use these when creating the DisplaySurface in the local renderer. This fixes a rendering issue with wayland. Wayland rounds up the framebuffer width and height to a multiple of 64, so with odd

Re: [Qemu-devel] [PATCH v2] qemu/compiler: Wrap __attribute__((flatten)) in a macro

2018-09-27 Thread Alex Bennée
Thomas Huth writes: > Older versions of Clang (before 3.5) and GCC (before 4.1) do not > support the "__attribute__((flatten))" yet. We don't care about > such old versions of GCC anymore, but since Clang 3.4 is still > used in EPEL for RHEL7 / CentOS 7, we should not use this attribute > direc

[Qemu-devel] [PULL 0/7] Vga 20180927 patches

2018-09-27 Thread Gerd Hoffmann
The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/vga-20180927-pu

[Qemu-devel] [PATCH] include/fpu/softfloat-macros: Get rid of old SOFTFLOAT_GNUC_PREREQ code

2018-09-27 Thread Thomas Huth
Our minimum required compiler for compiling QEMU is GCC 4.1 these days, so we can drop the support for compilers which do not provide the __builtin_clz*() functions yet. Signed-off-by: Thomas Huth --- include/fpu/softfloat-macros.h | 59 -- 1 file changed,

Re: [Qemu-devel] [PATCH v4 01/24] memory-device: fix alignment error message

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:41:56 +0200 David Hildenbrand wrote: > We're missing "x" after the leading 0. > > Signed-off-by: David Hildenbrand Reviewed-by: Igor Mammedov > --- > hw/mem/memory-device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/mem/memory-device.c

Re: [Qemu-devel] [PATCH] include/fpu/softfloat-macros: Get rid of old SOFTFLOAT_GNUC_PREREQ code

2018-09-27 Thread Peter Maydell
On 27 September 2018 at 08:16, Thomas Huth wrote: > Our minimum required compiler for compiling QEMU is GCC 4.1 these days, > so we can drop the support for compilers which do not provide the > __builtin_clz*() functions yet. > static inline int8_t countLeadingZeros32(uint32_t a) > { > -#if SOFT

Re: [Qemu-devel] [PATCH] util/hbitmaps: recalculate count on merge

2018-09-27 Thread Vladimir Sementsov-Ogievskiy
27.09.2018 00:28, John Snow wrote: We have been neglecting to do so, which results in wrong counts after merge. In the worst case, we may think the bitmap is empty when it has had new writes merged into it. Reported-by: Eric Blake Signed-off-by: John Snow --- util/hbitmap.c | 3 +++ 1 file

Re: [Qemu-devel] [PATCH v4 09/24] memory-device: add and use memory_device_get_region_size()

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:42:04 +0200 David Hildenbrand wrote: > We will factor out get_memory_region() from pc-dimm to memory device code > soon. Once that is done, get_region_size() can be implemented > generically and essentially be replaced by > memory_device_get_region_size (and work only on ge

[Qemu-devel] [PATCH 1/7] qga: group agent init/cleanup init separate routines

2018-09-27 Thread Bishara AbuHattoum
From: Michael Roth This patch better separates the init/cleanup routines out into separate functions to make make the start-up procedure a bit easier to follow. This will be useful when we eventually break out the actual start/stop of the agent's main loop into separates routines that can be call

[Qemu-devel] [PATCH 4/7] qga: add --retry-path option for re-initializing channel on failure

2018-09-27 Thread Bishara AbuHattoum
From: Michael Roth This adds an option to instruct the agent to periodically attempt re-opening the communication channel after a channel error has occurred. The main use-case for this is providing an OS-independent way of allowing the agent to survive situations like hotplug/unplug of the commun

[Qemu-devel] [PATCH 0/7] qga: add support for re-opening channel on error

2018-09-27 Thread Bishara AbuHattoum
A patch series was firstly introduced about a year ago which resolves an issue with qemu-ga and virtio-serial functionality. The issue was discussed in the following thread: https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg06256.html In short, Sameeh sent an implementation which uses ude

[Qemu-devel] [PATCH 3/7] qga: move w32 service handling out of run_agent()

2018-09-27 Thread Bishara AbuHattoum
From: Michael Roth Eventually we want a w32 service to be able to restart the qga main loop from within service_main(). To allow for this we move service handling out of run_agent() such that service_main() calls run_agent() instead of the reverse. Signed-off-by: Michael Roth Message-Id: <20171

[Qemu-devel] [PATCH 5/7] qga-win: install service with --retry-path set by default

2018-09-27 Thread Bishara AbuHattoum
From: Michael Roth It's nicer from a management perspective that the agent can survive hotplug/unplug of the channel device, or be started prior to the installation of the channel device's driver without and still be able to resume normal function afterward. On linux there are alternatives like s

[Qemu-devel] [PATCH 7/7] qga-win: changing --retry-path option behavior

2018-09-27 Thread Bishara AbuHattoum
Currently whenever the qemu-ga's service doesn't find the virtio-serial the run_agent() loops in a QGA_RETRY_INTERVAL (default 5 seconds) intervals and try to restart the qemu-ga which causes a synchronous loop. Changed to wait and listen for the serial events by registering for notifications a pro

[Qemu-devel] [PATCH 2/7] qga: hang GAConfig/socket_activation off of GAState global

2018-09-27 Thread Bishara AbuHattoum
From: Michael Roth For w32 services we rely on the global GAState to access resources associated with the agent within service_main(). Currently this is sufficient for starting the agent since we open the channel once prior to calling service_main(), and simply start the GMainLoop to start the ag

[Qemu-devel] [PATCH 6/7] qga-win: report specific error when failing to open channel

2018-09-27 Thread Bishara AbuHattoum
From: Michael Roth Useful in general, but especially now that errors might occur more frequently with --retry-path set. Signed-off-by: Michael Roth Message-Id: <20171026233054.21133-7-mdr...@linux.vnet.ibm.com> --- qga/channel-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

Re: [Qemu-devel] [PATCH v4 03/24] pc-dimm: pass PCDIMMDevice to pc_dimm_.*plug

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:41:58 +0200 David Hildenbrand wrote: > We're plugging/unplugging a PCDIMMDevice, so directly pass this type > instead of a more generic DeviceState. > > Signed-off-by: David Hildenbrand > --- > hw/i386/pc.c | 6 +++--- > hw/mem/pc-dimm.c | 16 +++

Re: [Qemu-devel] [PATCH v9 1/6] linux-headers: linux header updates for AP support

2018-09-27 Thread David Hildenbrand
On 27/09/2018 00:54, Tony Krowiak wrote: > Updates the linux header files in preparation for introduction > of the VFIO AP device: > > * Added a feature ID to indicate AP facilities are installed > > * Added device attributes to the KVM_S390_VM_CRYPTO group > to indicate whether AP instructions

Re: [Qemu-devel] [PATCH v9 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-27 Thread David Hildenbrand
On 27/09/2018 00:54, Tony Krowiak wrote: > 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 fea

Re: [Qemu-devel] [PATCH v9 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-09-27 Thread David Hildenbrand
On 27/09/2018 00:54, Tony Krowiak wrote: > 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; oth

Re: [Qemu-devel] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-27 Thread David Hildenbrand
On 27/09/2018 00:54, Tony Krowiak wrote: > From: Tony Krowiak > > Introduces the base object model for virtualizing AP devices. > > Signed-off-by: Tony Krowiak > --- > MAINTAINERS | 12 ++ > hw/s390x/Makefile.objs | 2 + > hw/s390x/ap-bridge.c | 81 +

Re: [Qemu-devel] [PATCH v9 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-09-27 Thread David Hildenbrand
> +static void vfio_ap_realize(DeviceState *dev, Error **errp) > +{ > +int ret; > +char *mdevid; > +Error *local_err = NULL; > +VFIOGroup *vfio_group; > +APDevice *apdev = DO_UPCAST(APDevice, parent_obj, dev); > +VFIOAPDevice *vapdev = DO_UPCAST(VFIOAPDevice, apdev, apdev)

Re: [Qemu-devel] [PATCH v4 04/24] memory-device: handle integer overflows properly

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:41:59 +0200 David Hildenbrand wrote: > Make address_space_end point at the real end, instead of end + 1, so we don't > have to handle special cases like it being 0. This will allow us to > place a memory device at the very end of the guest physical 64bit address > space (if

Re: [Qemu-devel] [PATCH v4 03/24] pc-dimm: pass PCDIMMDevice to pc_dimm_.*plug

2018-09-27 Thread David Hildenbrand
On 27/09/2018 09:40, Igor Mammedov wrote: > On Wed, 26 Sep 2018 11:41:58 +0200 > David Hildenbrand wrote: > >> We're plugging/unplugging a PCDIMMDevice, so directly pass this type >> instead of a more generic DeviceState. >> >> Signed-off-by: David Hildenbrand >> --- >> hw/i386/pc.c

Re: [Qemu-devel] [PATCH v4 08/24] memory-device: document MemoryDeviceClass

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:42:03 +0200 David Hildenbrand wrote: > Document the functions and when to not expect errors. > > Reviewed-by: David Gibson > Signed-off-by: David Hildenbrand Reviewed-by: Igor Mammedov > --- > include/hw/mem/memory-device.h | 16 > 1 file changed, 16

Re: [Qemu-devel] [PATCH] bitmap: Update count after a merge

2018-09-27 Thread Vladimir Sementsov-Ogievskiy
27.09.2018 06:11, Eric Blake wrote: We need an accurate count of the number of bits set in a bitmap after a merge. In particular, since the merge operation short-circuits a merge from an empty source, if you have bitmaps A, B, and C where B started empty, then merge C into B, and B into A, an ina

[Qemu-devel] finishing the transition away from SysBus init methods

2018-09-27 Thread Peter Maydell
I had a look at how many devices are still using the SysBus init method (rather than the instance-init/realize pair), and it turns out to be only 41, which I think is reasonably tractable for doing some more conversions and completing this API transation. The remaining devices are: --- hw/display

Re: [Qemu-devel] [PATCH v4 13/24] memory-device: complete factoring out pre_plug handling

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:42:08 +0200 David Hildenbrand wrote: > With all required memory device class functions in place, we can factor > out pre_plug handling of memory devices. Take proper care of errors. We > still have to carry along legacy_align required for pc compatibility > handling. > > W

Re: [Qemu-devel] [PATCH v4 04/24] memory-device: handle integer overflows properly

2018-09-27 Thread David Hildenbrand
On 27/09/2018 10:02, Igor Mammedov wrote: > On Wed, 26 Sep 2018 11:41:59 +0200 > David Hildenbrand wrote: > >> Make address_space_end point at the real end, instead of end + 1, so we don't >> have to handle special cases like it being 0. This will allow us to >> place a memory device at the very

Re: [Qemu-devel] [PATCH v4 17/24] memory-device: add class function get_device_id()

2018-09-27 Thread Igor Mammedov
On Wed, 26 Sep 2018 11:42:12 +0200 David Hildenbrand wrote: > When reporting the id of virtio-based memory devices, we always have to > take the one of the proxy device (parent), not the one of the memory > device directly. > > Let's generalize this by allowing memory devices to specify an optio

[Qemu-devel] [PATCH v3 1/3] hw/s390x/ipl: Fix alignment problems of S390IPLState members

2018-09-27 Thread Thomas Huth
The IplParameterBlock and QemuIplParameters structures are declared with QEMU_PACKED, so the compiler assumes that the structures do not need to be aligned in memory. Since the are listed after a "bool" within the S390IPLState, the IplParameterBlock and QemuIplParameters are also indeed mis-aligned

[Qemu-devel] [PATCH v3 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-27 Thread Thomas Huth
The uint16_t member cu_type of struct SenseId is not naturally aligned, and since the struct is marked with QEMU_PACKED, this can lead to unaligned memory accesses - which does not work on architectures like Sparc. Thus remove the QEMU_PACKED here and rather copy the struct byte by byte when we do

[Qemu-devel] [PATCH v3 0/3] Fix migration problems of s390x guests on Sparc hosts

2018-09-27 Thread Thomas Huth
The new migration test uncovered some alignment problems in the s390x code: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg03012.html Here are some patches to fix these issues (only tested with clang and -fsanitize=undefined, since I do not have access to a Sparc machine, but I hope tha

[Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-09-27 Thread Thomas Huth
struct SubchDev embeds several other structures which are marked with QEMU_PACKED. This causes the compiler to not care for proper alignment of these structures. When we later pass around pointers to the unaligned struct members during migration, this causes problems on host architectures like Spar

Re: [Qemu-devel] [PATCH v3 3/5] qga: win32: add debugging information

2018-09-27 Thread Marc-André Lureau
Hi On Fri, Sep 7, 2018 at 3:42 PM Tomáš Golembiovský wrote: > > The windows code generaly lacks debug information (compared to posix > code). This patch adds some related to HW info in guest-get-fsinfo > command. > > Signed-off-by: Tomáš Golembiovský > --- > qga/commands-win32.c | 15 ++

Re: [Qemu-devel] [PATCH v3 1/3] hw/s390x/ipl: Fix alignment problems of S390IPLState members

2018-09-27 Thread David Hildenbrand
On 27/09/2018 10:23, Thomas Huth wrote: > The IplParameterBlock and QemuIplParameters structures are declared with > QEMU_PACKED, so the compiler assumes that the structures do not need to > be aligned in memory. Since the are listed after a "bool" within the > S390IPLState, the IplParameterBlock a

Re: [Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-09-27 Thread David Hildenbrand
On 27/09/2018 10:23, Thomas Huth wrote: > struct SubchDev embeds several other structures which are marked with > QEMU_PACKED. This causes the compiler to not care for proper alignment > of these structures. When we later pass around pointers to the unaligned > struct members during migration, this

Re: [Qemu-devel] [PATCH] virtio: do not take address of packed members

2018-09-27 Thread Jason Wang
On 2018年09月27日 05:20, Paolo Bonzini wrote: The address of a packed member is not packed, which may cause accesses to unaligned pointers. Avoid this by reading the packed value before passing it to another function. Cc: Jason Wang Cc: Peter Maydell Reviewed-by: Eric Blake Cc: qemu-sta...@n

Re: [Qemu-devel] [PATCH v3 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-27 Thread David Hildenbrand
On 27/09/2018 10:23, Thomas Huth wrote: > The uint16_t member cu_type of struct SenseId is not naturally aligned, > and since the struct is marked with QEMU_PACKED, this can lead to > unaligned memory accesses - which does not work on architectures like > Sparc. Thus remove the QEMU_PACKED here and

Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation

2018-09-27 Thread Markus Armbruster
Peter Xu writes: > On Tue, Sep 25, 2018 at 01:09:57PM +0200, Wolfgang Bumiller wrote: >> >> > On September 25, 2018 at 12:31 PM Peter Xu wrote: >> > >> > >> > On Tue, Sep 25, 2018 at 10:15:07AM +0200, Wolfgang Bumiller wrote: >> > > Commit d32749deb615 moved the call to monitor_init_globals()

Re: [Qemu-devel] [PATCH v4 04/24] memory-device: handle integer overflows properly

2018-09-27 Thread Igor Mammedov
On Thu, 27 Sep 2018 10:13:07 +0200 David Hildenbrand wrote: > On 27/09/2018 10:02, Igor Mammedov wrote: > > On Wed, 26 Sep 2018 11:41:59 +0200 > > David Hildenbrand wrote: > > > >> Make address_space_end point at the real end, instead of end + 1, so we > >> don't > >> have to handle special

Re: [Qemu-devel] [PULL 00/13] Deprecation, qtests and some trivial doc updates

2018-09-27 Thread Peter Maydell
On 25 September 2018 at 17:03, Thomas Huth wrote: > Hi Peter, > > the following changes since commit 71fbecea0f725bc16aec32cf89cbf3aa78058826: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20180925-1' into staging (2018-09-25 > 15:24:04 +0100) > > are available in

[Qemu-devel] [PATCH RFC v11 1/2] linux-headers: Update to linux kernel 4.19-rc5

2018-09-27 Thread Dongjiu Geng
Update our kernel headers to upstream 4.19-rc5 (kernel commit 6bf4ca7fbc85d80446ac0) Signed-off-by: Dongjiu Geng --- include/standard-headers/linux/input.h | 9 + linux-headers/asm-arm/kvm.h| 13 + linux-headers/asm-arm64/kvm.h | 13 + linux-

[Qemu-devel] [PATCH RFC v11 2/2] target/arm: Add support for VCPU event states

2018-09-27 Thread Dongjiu Geng
This patch extends the qemu-kvm state sync logic with support for KVM_GET/SET_VCPU_EVENTS, giving access to yet missing SError exception. And also it can support the exception state migration. The SError exception states include SError pending state and ESR value, the kvm_put/get_vcpu_events() wil

Re: [Qemu-devel] [PATCH v3 4/5] qga: report disk serial number

2018-09-27 Thread Marc-André Lureau
Hi On Fri, Sep 7, 2018 at 3:42 PM Tomáš Golembiovský wrote: > > The feature is implemented for Windows and Linux. Reporting of serial > number on Linux depends on libudev. > > Example from Linux: > > { > "name": "dm-2", > "mountpoint": "/", > ... > "disk": [ >

Re: [Qemu-devel] QEMU and Kconfig

2018-09-27 Thread Paolo Bonzini
On 26/09/2018 21:57, Peter Maydell wrote: > On 26 September 2018 at 14:36, Paolo Bonzini wrote: >> Here is a minimal example: >> >> # hw/scsi/Kconfig >> config SCSI >> >> config ESP >> select SCSI >> >> config ESP_PCI >> default y >> select ESP >> depends on PCI >> >> # hw/pci/Kcon

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

2018-09-27 Thread Dongjiu Geng
Support KVM_GET/SET_VCPU_EVENTS to get/set the SError exception state, and support the state migration. Now the VCPU event only includes the SError exception status, it can be extended if needed. When do migration, If source machine has serror pending, the target machine is also needed to pend th

Re: [Qemu-devel] [PATCH v4 04/24] memory-device: handle integer overflows properly

2018-09-27 Thread David Hildenbrand
On 27/09/2018 10:47, Igor Mammedov wrote: > On Thu, 27 Sep 2018 10:13:07 +0200 > David Hildenbrand wrote: > >> On 27/09/2018 10:02, Igor Mammedov wrote: >>> On Wed, 26 Sep 2018 11:41:59 +0200 >>> David Hildenbrand wrote: >>> Make address_space_end point at the real end, instead of end +

Re: [Qemu-devel] [PATCH v3 5/5] qga: return disk device in guest-get-fsinfo

2018-09-27 Thread Marc-André Lureau
Hi On Fri, Sep 7, 2018 at 3:42 PM Tomáš Golembiovský wrote: > > Report device node of the disk. It is implemented for Linux (needs udev) > and Windows. The node is reported e.g. as "/dev/sda2" on Linux and as > "\\?\PhysicalDriveX" on Windows. > > As part of this effort the Windows code was chang

Re: [Qemu-devel] [PATCH v3 1/5] qga: win32: fix crashes when PCI info cannot be retrived

2018-09-27 Thread Tomáš Golembiovský
Hi Michael, thanks for looking into this. My comments are below. Adding Sameeh... On Wed, 26 Sep 2018 12:15:48 -0500 Michael Roth wrote: > Quoting Tomáš Golembiovský (2018-09-07 06:42:09) > > The guest-get-fsinfo command collects also information about PCI > > controller where the disk is att

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

2018-09-27 Thread Laszlo Ersek
On 09/27/18 09:03, Igor Mammedov wrote: > On Thu, 27 Sep 2018 00:31:07 +0200 > Laszlo Ersek wrote: > >> On 09/26/18 18:26, Alex Williamson wrote: >>> On Wed, 26 Sep 2018 13:12:47 +0200 >>> Laszlo Ersek wrote: >>> On 09/25/18 22:36, Alex Williamson wrote: > On Tue, 25 Sep 2018 00:13

Re: [Qemu-devel] [PATCH v9 1/6] linux-headers: linux header updates for AP support

2018-09-27 Thread Cornelia Huck
On Thu, 27 Sep 2018 09:41:31 +0200 David Hildenbrand wrote: > On 27/09/2018 00:54, Tony Krowiak wrote: > > Updates the linux header files in preparation for introduction > > of the VFIO AP device: > > > > * Added a feature ID to indicate AP facilities are installed > > > > * Added device attrib

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

2018-09-27 Thread Laszlo Ersek
On 09/27/18 11:21, Laszlo Ersek wrote: > On 09/27/18 07:48, Gerd Hoffmann wrote: >> Hi, >> Maybe using memdev file backend with manually created sparse file might actually work (with preallocate disabled) >>> >>> Thanks, this sounds like a good idea. >>> >>> I see shm_open() is used hea

[Qemu-devel] [PATCH] target/arm: fix code comments error

2018-09-27 Thread Dongjiu Geng
The parameter of kvm_arm_init_cpreg_list() is ARMCPU instead of CPUState, so correct the note to make it match the code. Signed-off-by: Dongjiu Geng --- target/arm/kvm.c | 2 +- target/arm/kvm_arm.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/kvm.c b/t

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

2018-09-27 Thread Laszlo Ersek
On 09/27/18 07:48, Gerd Hoffmann wrote: > Hi, > >>> Maybe using memdev file backend with manually created sparse file >>> might actually work (with preallocate disabled) >> >> Thanks, this sounds like a good idea. >> >> I see shm_open() is used heavily in ivshmem-related tests. I haven't >> look

Re: [Qemu-devel] [PATCH v9 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-09-27 Thread Cornelia Huck
On Wed, 26 Sep 2018 18:54:34 -0400 Tony Krowiak wrote: > From: Tony Krowiak > > This patch series is the QEMU counterpart to the KVM/kernel support for > guest dedicated crypto adapters. The KVM/kernel model is built on the > VFIO mediated device framework and provides the infrastructure for

[Qemu-devel] [PATCH v3] change get_image_size return type to int64_t

2018-09-27 Thread Li Zhijian
Previously, if the size of initrd >=2G, qemu exits with error: root@haswell-OptiPlex-9020:/home/lizj# /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 -kernel ./vmlinuz-4.16.0-rc4 -initrd large.cgz -nographic qemu: error reading initrd large.cgz: No such file or directory root@hasw

Re: [Qemu-devel] [PATCH v3] hw/arm: Add arm SBSA reference machine

2018-09-27 Thread Hongbo Zhang
On Wed, 19 Sep 2018 at 03:44, Peter Maydell wrote: > > On 9 September 2018 at 03:23, Hongbo Zhang wrote: > > For the Aarch64, there is one machine 'virt', it is primarily meant to > > run on KVM and execute virtualization workloads, but we need an > > environment as faithful as possible to physic

[Qemu-devel] intermittent failure in test-replication

2018-09-27 Thread Peter Maydell
Hi; I seem to be getting an intermittent failure in tests/test-replication: MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} gtester -k --verbose -m=quick tests/test-replication TEST: tests/test-replication... (pid=8465) /replication/primary/read:

Re: [Qemu-devel] [PATCH rebased 2/2] monitor: delay monitor iothread creation

2018-09-27 Thread Peter Xu
On Thu, Sep 27, 2018 at 10:46:34AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Tue, Sep 25, 2018 at 01:09:57PM +0200, Wolfgang Bumiller wrote: > >> > >> > On September 25, 2018 at 12:31 PM Peter Xu wrote: > >> > > >> > > >> > On Tue, Sep 25, 2018 at 10:15:07AM +0200, Wolfgang

Re: [Qemu-devel] [PATCH v3] hw/arm: Add arm SBSA reference machine

2018-09-27 Thread Hongbo Zhang
I would mention that there are some issues in the base qemu tree to boot this (and also 'virt') machine. The MPIDR isn't emulated well, currently only 4 cores on one cluster can be booted, if we have more cores / more clusters / different number of cores on one clusters, SMP cannot boot correctly

Re: [Qemu-devel] [PATCH v3] hw/arm: Add arm SBSA reference machine

2018-09-27 Thread Peter Maydell
On 27 September 2018 at 11:23, Hongbo Zhang wrote: > I would mention that there are some issues in the base qemu tree to > boot this (and also 'virt') machine. > > The MPIDR isn't emulated well, currently only 4 cores on one cluster > can be booted, if we have more cores / more clusters / differen

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 4/9] s390x/tcg: support flags for instructions

2018-09-27 Thread Thomas Huth
On 2018-09-17 11:34, David Hildenbrand wrote: > Storing flags for instructions allows us to efficiently verify certain > properties at a central point. Examples might later be handling if > AFP is disabled in CR0, we are not in problem state, or if vector > instructions are disabled in CR0. > > Re

Re: [Qemu-devel] [PATCH v3 10/10] block: Allow changing 'force-share' on reopen

2018-09-27 Thread Kevin Wolf
Am 26.09.2018 um 13:39 hat Alberto Garcia geschrieben: > On Wed 26 Sep 2018 01:34:28 PM CEST, Kevin Wolf wrote: > >> @@ -3353,6 +3370,7 @@ void bdrv_reopen_commit(BDRVReopenState > >> *reopen_state) > >> bs->open_flags = reopen_state->flags; > >> bs->read_only = !(reopen_state->f

Re: [Qemu-devel] [PATCH 1/2] Bootstrap Python venv for tests

2018-09-27 Thread Philippe Mathieu-Daudé
Hi Cleber, On 20/09/2018 16:19, Cleber Rosa wrote: > A number of QEMU tests are written in Python, and may benefit > from an untainted Python venv. > > By using make rules, tests that depend on specific Python libs > can set that rule as a requiment, along with rules that require > the presence o

Re: [Qemu-devel] [PATCH 2/3] memory: Refactor common shifting code from accessors

2018-09-27 Thread Philippe Mathieu-Daudé
On 9/27/18 9:00 AM, Peter Maydell wrote: > On 27 September 2018 at 01:24, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> memory.c | 30 +- >> 1 file changed, 21 insertions(+), 9 deletions(-) >> > > NB that this patch will have a (fai

Re: [Qemu-devel] [PATCH 3/3] memory: Fix access_with_adjusted_size(small size) on big-endian memory regions

2018-09-27 Thread Philippe Mathieu-Daudé
Hi Eric, On 9/27/18 4:56 AM, Eric Blake wrote: > On 9/26/18 7:24 PM, Philippe Mathieu-Daudé wrote: >> Memory regions configured as DEVICE_BIG_ENDIAN (or >> DEVICE_NATIVE_ENDIAN on >> big-endian guest) behave incorrectly when the memory access 'size' is >> smaller >> than the implementation 'access

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 5/9] s390x/tcg: add instruction flags for floating point instructions

2018-09-27 Thread Thomas Huth
On 2018-09-17 11:34, David Hildenbrand wrote: > These flags allow us to later on detect if a DATA program interrupt > is to be injected, and which DXC (1,2,3) is to be used. > > Interestingly, some support FP instructions are considered as HFP > instructions (I assume simply because they were avai

Re: [Qemu-devel] [PATCH v3 5/5] qga: return disk device in guest-get-fsinfo

2018-09-27 Thread Tomáš Golembiovský
On Thu, 27 Sep 2018 13:06:05 +0400 Marc-André Lureau wrote: > Hi > > On Fri, Sep 7, 2018 at 3:42 PM Tomáš Golembiovský wrote: > > > > Report device node of the disk. It is implemented for Linux (needs udev) > > and Windows. The node is reported e.g. as "/dev/sda2" on Linux and as > > "\\?\Physi

Re: [Qemu-devel] intermittent failure in test-replication

2018-09-27 Thread Kevin Wolf
Am 27.09.2018 um 12:08 hat Peter Maydell geschrieben: > Hi; I seem to be getting an intermittent failure in > tests/test-replication: > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} > gtester -k --verbose -m=quick tests/test-replication > TEST: tests/test-replication... (pid=8

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 6/9] s390x/tcg: check for AFP-register, BFP and DFP data exceptions

2018-09-27 Thread Thomas Huth
On 2018-09-17 11:34, David Hildenbrand wrote: > With the annotated functions, we can now easily check this at a central > place. > > DXC 1 is to be injected if an AFP register is used (for a HFP instruction) > when AFP is disabled. > DXC 2 is to be injected if a BFP instruction is used when AFP is

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 7/9] s390x/tcg: handle privileged instructions via flags

2018-09-27 Thread Thomas Huth
On 2018-09-17 11:34, David Hildenbrand wrote: > Let's check this also at a central place. > > Reviewed-by: Richard Henderson > Signed-off-by: David Hildenbrand > --- > target/s390x/insn-data.def | 138 ++--- > target/s390x/translate.c | 83 ++--

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 8/9] s390x/tcg: fix FP register pair checks

2018-09-27 Thread Thomas Huth
On 2018-09-17 11:34, David Hildenbrand wrote: > Valid register pairs are 0/2, 1/3, 4/6, 5/7, 8/10, 9/11, 12/14, 13/15. > > R1/R2 always selects the lower number, so the current checks are not > correct as e.g. 2/4 could be selected as a pair. > > Reviewed-by: Richard Henderson > Signed-off-by: D

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 9/9] s390x/tcg: refactor specification checking

2018-09-27 Thread Thomas Huth
On 2018-09-17 11:34, David Hildenbrand wrote: > We can fit this nicely into less LOC, without harming readability. > > Reviewed-by: Richard Henderson > Signed-off-by: David Hildenbrand > --- > target/s390x/translate.c | 34 ++ > 1 file changed, 6 insertions(+), 2

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 5/9] s390x/tcg: add instruction flags for floating point instructions

2018-09-27 Thread David Hildenbrand
On 27/09/2018 13:07, Thomas Huth wrote: > On 2018-09-17 11:34, David Hildenbrand wrote: >> These flags allow us to later on detect if a DATA program interrupt >> is to be injected, and which DXC (1,2,3) is to be used. >> >> Interestingly, some support FP instructions are considered as HFP >> instru

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 8/9] s390x/tcg: fix FP register pair checks

2018-09-27 Thread David Hildenbrand
On 27/09/2018 13:29, Thomas Huth wrote: > On 2018-09-17 11:34, David Hildenbrand wrote: >> Valid register pairs are 0/2, 1/3, 4/6, 5/7, 8/10, 9/11, 12/14, 13/15. >> >> R1/R2 always selects the lower number, so the current checks are not >> correct as e.g. 2/4 could be selected as a pair. >> >> Revi

Re: [Qemu-devel] [PATCH 1/7] qga: group agent init/cleanup init separate routines

2018-09-27 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 11:37 AM Bishara AbuHattoum wrote: > > From: Michael Roth > > This patch better separates the init/cleanup routines out into > separate functions to make make the start-up procedure a bit easier "make make" > to follow. This will be useful when we eventually break ou

Re: [Qemu-devel] [PATCH 2/7] qga: hang GAConfig/socket_activation off of GAState global

2018-09-27 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 11:40 AM Bishara AbuHattoum wrote: > > From: Michael Roth > > For w32 services we rely on the global GAState to access resources > associated with the agent within service_main(). Currently this is > sufficient for starting the agent since we open the channel once prio

Re: [Qemu-devel] [PATCH 3/7] qga: move w32 service handling out of run_agent()

2018-09-27 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 11:39 AM Bishara AbuHattoum wrote: > > From: Michael Roth > > Eventually we want a w32 service to be able to restart the qga main > loop from within service_main(). To allow for this we move service > handling out of run_agent() such that service_main() calls > run_age

Re: [Qemu-devel] [PATCH 4/7] qga: add --retry-path option for re-initializing channel on failure

2018-09-27 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 11:37 AM Bishara AbuHattoum wrote: > > From: Michael Roth > > This adds an option to instruct the agent to periodically attempt > re-opening the communication channel after a channel error has > occurred. The main use-case for this is providing an OS-independent > way

Re: [Qemu-devel] [PATCH 6/7] qga-win: report specific error when failing to open channel

2018-09-27 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 11:42 AM Bishara AbuHattoum wrote: > > From: Michael Roth > > Useful in general, but especially now that errors might occur more > frequently with --retry-path set. > > Signed-off-by: Michael Roth > Message-Id: <20171026233054.21133-7-mdr...@linux.vnet.ibm.com> witho

Re: [Qemu-devel] [PATCH 7/7] qga-win: changing --retry-path option behavior

2018-09-27 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 11:41 AM Bishara AbuHattoum wrote: > > Currently whenever the qemu-ga's service doesn't find the virtio-serial > the run_agent() loops in a QGA_RETRY_INTERVAL (default 5 seconds) > intervals and try to restart the qemu-ga which causes a synchronous loop. > Changed to wa

Re: [Qemu-devel] [PATCH v4 04/24] memory-device: handle integer overflows properly

2018-09-27 Thread Igor Mammedov
On Thu, 27 Sep 2018 10:58:47 +0200 David Hildenbrand wrote: > On 27/09/2018 10:47, Igor Mammedov wrote: > > On Thu, 27 Sep 2018 10:13:07 +0200 > > David Hildenbrand wrote: > > > >> On 27/09/2018 10:02, Igor Mammedov wrote: > >>> On Wed, 26 Sep 2018 11:41:59 +0200 > >>> David Hildenbrand wr

[Qemu-devel] [PATCH qemu v5 3/3] hw/arm/virt: Allow dynamic vfio-platform devices again

2018-09-27 Thread Geert Uytterhoeven
Allow the instantation of generic dynamic vfio-platform devices again, without the need to create a new device-specific vfio type. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eric Auger Tested-by: Eric Auger --- v5: - Drop reference to commit 6f2062b9758ebc64 ("hw/arm/virt: Allow only

[Qemu-devel] [PATCH qemu v5 2/3] hw/arm/sysbus-fdt: Allow device matching with DT compatible value

2018-09-27 Thread Geert Uytterhoeven
From: Auger Eric Up to now we have relied on the device type to identify a device tree node creation function. Since we would like the vfio-platform device to be instantiable with different compatible strings we introduce the capability to specialize the node creation depending on actual compati

[Qemu-devel] [PATCH qemu v5 1/3] vfio/platform: Make the vfio-platform device non-abstract

2018-09-27 Thread Geert Uytterhoeven
From: Auger Eric Up to now the vfio-platform device has been abstract and could not be instantiated. The integration of a new vfio platform device required creating a dummy derived device which only set the compatible string. Following the few vfio-platform device integrations we have seen the

[Qemu-devel] [PATCH qemu v5 0/3] vfio/sysbus-fdt: Prepare for Generic DT Pass-Through

2018-09-27 Thread Geert Uytterhoeven
Hi all, This patch series prepares for exporting generic devices in DT using vfio-platform, providing direct access from a QEMU+KVM guest to the exported devices. - Patches 1-2 (submitted before by Eric Auger) make the vfio-platform device non-abstract, incl. matching using a compat

Re: [Qemu-devel] [PATCH v4 04/24] memory-device: handle integer overflows properly

2018-09-27 Thread David Hildenbrand
On 27/09/2018 13:53, Igor Mammedov wrote: > On Thu, 27 Sep 2018 10:58:47 +0200 > David Hildenbrand wrote: > >> On 27/09/2018 10:47, Igor Mammedov wrote: >>> On Thu, 27 Sep 2018 10:13:07 +0200 >>> David Hildenbrand wrote: >>> On 27/09/2018 10:02, Igor Mammedov wrote: > On Wed, 26 Se

Re: [Qemu-devel] [PATCH v3 3/9] x86_iommu/amd: remove V=1 check from amdvi_validate_dte()

2018-09-27 Thread Singh, Brijesh
On 9/25/18 1:17 AM, Peter Xu wrote: > On Fri, Sep 21, 2018 at 02:25:37PM +, Singh, Brijesh wrote: >> Currently, the amdvi_validate_dte() assumes that a valid DTE will >> always have V=1. This is not true. The V=1 means that bit[127:1] are >> valid. A valid DTE can have IV=1 and V=0 (i.e addre

[Qemu-devel] [PATCH] pci-testdev: add optional memory bar

2018-09-27 Thread Gerd Hoffmann
Add memory bar to pci-testdev. Size is configurable using the membar property. Setting the size to zero (default) turns it off. Can be used to check whenever guests handle large pci bars correctly. Signed-off-by: Gerd Hoffmann --- docs/specs/pci-testdev.txt | 13 + hw/misc/pci-tes

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

2018-09-27 Thread Gerd Hoffmann
Hi, > I realize you pasted a prototype patch below (thanks for that!), but it > doesn't update the documentation. I wouldn't like to dig down another > design rabbit hole here. > > If you can pursue upstreaming this change, I can definitely delay my > series, and use the enhanced pci testdev as

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 2/9] s390x/tcg: factor out and fix DATA exception injection

2018-09-27 Thread David Hildenbrand
On 26/09/2018 13:37, Thomas Huth wrote: > On 2018-09-17 11:34, David Hildenbrand wrote: >> The DXC is to be stored in the low core, and only in the FPC in case AFP >> is enabled in CR0. Stub is not required in current code, but this way >> we never run into problems. >> >> Reviewed-by: Richard Hend

  1   2   3   >