[PATCH v3 16/16] libqos: add VIRTIO PCI 1.0 support

2019-10-18 Thread Stefan Hajnoczi
Implement the VIRTIO 1.0 virtio-pci interface. The main change here is that the register layout is no longer a fixed layout in BAR 0. Instead we have to iterate of PCI Capabilities to find descriptions of where various registers are located. The vring registers are also more fine-grained, allowi

[PATCH v3 15/16] libqos: extract Legacy virtio-pci.c code

2019-10-18 Thread Stefan Hajnoczi
The current libqos virtio-pci.c code implements the VIRTIO Legacy interface. Extract existing code in preparation for VIRTIO 1.0 support. Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Thomas Huth --- tests/libqos/virtio-pci.h | 2 -- tests/libqos/virtio-pci.c | 29 +++

[PATCH v3 12/16] libqos: add MSI-X callbacks to QVirtioPCIDevice

2019-10-18 Thread Stefan Hajnoczi
The MSI-X vectors are programmed differently in the VIRTIO 1.0 and Legacy interfaces. Introduce callbacks so different implementations can be used depending on the interface version. Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Thomas Huth --- tests/libqos/virtio-pci.

[PATCH v3 11/16] libqos: pass full QVirtQueue to set_queue_address()

2019-10-18 Thread Stefan Hajnoczi
Instead of just passing the vring page frame number, pass the full QVirtQueue. This will allow the VIRTIO 1.0 transport to program the fine-grained vring address registers in the future. Signed-off-by: Stefan Hajnoczi Reviewed-by: Sergio Lopez Reviewed-by: Thomas Huth --- tests/libqos/virtio.

[PATCH v3 14/16] libqos: make the virtio-pci BAR index configurable

2019-10-18 Thread Stefan Hajnoczi
The Legacy virtio-pci interface always uses BAR 0. VIRTIO 1.0 may need to use a different BAR index, so make it configurable. Signed-off-by: Stefan Hajnoczi --- v3: * Change uint8_t bar_idx to int [Thomas] --- tests/libqos/virtio-pci.h | 2 ++ tests/libqos/virtio-pci.c | 3 ++- 2 files changed

[PATCH v3 10/16] libqos: add iteration support to qpci_find_capability()

2019-10-18 Thread Stefan Hajnoczi
VIRTIO 1.0 PCI devices have multiple PCI_CAP_ID_VNDR capabilities so we need a way to iterate over them. Extend qpci_find_capability() to take the last address. Signed-off-by: Stefan Hajnoczi -- v3: * Document qpci_find_capability() --- tests/libqos/pci.h | 2 +- tests/libqos/pci.c | 30 +

[PATCH v3 09/16] libqos: access VIRTIO 1.0 vring in little-endian

2019-10-18 Thread Stefan Hajnoczi
VIRTIO 1.0 uses little-endian for the vring. Legacy VIRTIO uses guest endianness. Adjust the code to handle both. Note that qvirtio_readq() is not defined because it has no users. All the other accessors are really needed. Signed-off-by: Stefan Hajnoczi --- tests/libqos/virtio.h | 4 +

[PATCH v3 13/16] libqos: expose common virtqueue setup/cleanup functions

2019-10-18 Thread Stefan Hajnoczi
The VIRTIO 1.0 code will need to perform additional steps but it will reuse the common virtqueue setup/cleanup code. Make these functions public. Make sure to invoke callbacks via QVirtioBus instead of directly calling the virtio-pci Legacy versions of these functions. Signed-off-by: Stefan Hajn

[PATCH v3 07/16] libqos: enforce Device Initialization order

2019-10-18 Thread Stefan Hajnoczi
According to VIRTIO 1.1 "3.1.1 Driver Requirements: Device Initialization", configuration space and virtqueues cannot be accessed before features have been negotiated. Enforce this requirement. Signed-off-by: Stefan Hajnoczi --- tests/libqos/virtio.c | 11 +++ 1 file changed, 11 inserti

[PATCH v3 08/16] libqos: implement VIRTIO 1.0 FEATURES_OK step

2019-10-18 Thread Stefan Hajnoczi
Device initialization has an extra step in VIRTIO 1.0. The FEATURES_OK status bit is set to indicate that feature negotiation has completed. The driver then reads the status register again to check that the device agrees with the final features. Implement this step as part of qvirtio_set_features

[PATCH v3 06/16] libqos: add missing virtio-9p feature negotiation

2019-10-18 Thread Stefan Hajnoczi
VIRTIO Device Initialization requires feature negotiation. The libqos virtio-9p driver lacks feature negotiation and is therefore non-compliant. Signed-off-by: Stefan Hajnoczi --- tests/libqos/virtio-9p.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/libqos/virtio-9p.c b/tests

[PATCH v3 05/16] tests/virtio-blk-test: set up virtqueue after feature negotiation

2019-10-18 Thread Stefan Hajnoczi
VIRTIO Device Initialization requires that feature negotiation has completed before virtqueues are set up. This makes sense because the driver must know whether it is operating in Legacy or VIRTIO 1.0 mode before it can access vring fields with the correct endianness. Signed-off-by: Stefan Hajnoc

[PATCH v3 01/16] tests/virtio-blk-test: read config space after feature negotiation

2019-10-18 Thread Stefan Hajnoczi
The VIRTIO Configuration Space cannot be accessed before device feature bits have been read because a driver doesn't know the endianness until it has checked VIRTIO_F_VERSION_1. Fix this problem in preparation for VIRTIO 1.0 support. Signed-off-by: Stefan Hajnoczi --- tests/virtio-blk-test.c |

[PATCH v3 00/16] libqos: add VIRTIO PCI 1.0 support

2019-10-18 Thread Stefan Hajnoczi
v3: * Now implements VIRTIO 1.0 fully (vring, device initialization). This required several new patches to address the following issues: 1. Tests that do not negotiate features (non-compliant!) 2. Tests that access configuration space before feature negotiation (non-compliant!) 3

[PATCH v3 02/16] libqos: read QVIRTIO_MMIO_VERSION register

2019-10-18 Thread Stefan Hajnoczi
There was no real virtio-mmio ABI change between Legacy and VIRTIO 1.0 except that the Version field was incremented from 1 to 2. However, QEMU does not allow Legacy drivers to perform VIRTIO 1.0 operations like accessing 64-bit feature bits. Since we will introduce 64-bit feature bit support we

[PATCH v3 04/16] virtio-scsi-test: add missing feature negotiation

2019-10-18 Thread Stefan Hajnoczi
VIRTIO Device Initialization requires feature negotiation. Currently virtio-scsi-test.c is non-compliant. Signed-off-by: Stefan Hajnoczi --- tests/virtio-scsi-test.c | 8 1 file changed, 8 insertions(+) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 7c8f9b27f8.

[PATCH v3 03/16] libqos: extend feature bits to 64-bit

2019-10-18 Thread Stefan Hajnoczi
In VIRTIO 1.0 feature bits changed from 32-bit to 64-bit. (In fact, the transports allow even more feature bits but nothing uses more than 64 bits today.) Add 64-bit feature bit support to virtio-mmio and virtio-pci. This will be necessary for VIRTIO 1.0 support. Signed-off-by: Stefan Hajnoczi

Re: [PATCH v3 1/2] hw: timer: Add Goldfish RTC device

2019-10-18 Thread Aleksandar Markovic
On Saturday, October 19, 2019, Anup Patel wrote: > Hi, > > From: Aleksandar Markovic > Sent: Saturday, October 19, 2019 2:45 AM > To: Anup Patel > Cc: Peter Maydell ; Palmer Dabbelt < > pal...@sifive.com>; Alistair Francis ; Sagar > Karandikar ; Bastian Koppelmann < > kbast...@mail.uni-paderbor

Re: Using virtual IOMMU in guest hypervisors other than KVM and Xen?

2019-10-18 Thread Jintack Lim
On Fri, Oct 18, 2019 at 8:37 PM Peter Xu wrote: > > On Wed, Oct 16, 2019 at 03:01:22PM -0700, Jintack Lim wrote: > > On Mon, Oct 14, 2019 at 7:50 PM Peter Xu wrote: > > > > > > On Mon, Oct 14, 2019 at 01:28:49PM -0700, Jintack Lim wrote: > > > > Hi, > > > > > > Hello, Jintack, > > > > > Hi Peter,

Re: [PATCH v2 2/2] spapr/xive: Set the OS CAM line at reset

2019-10-18 Thread Greg Kurz
On Fri, 18 Oct 2019 19:22:19 +0200 Cédric Le Goater wrote: > When a Virtual Processor is scheduled to run on a HW thread, the > hypervisor pushes its identifier in the OS CAM line. When running with > kernel_irqchip=off, QEMU needs to emulate the same behavior. > > Set the OS CAM line when the i

Re: [PATCH v2 1/2] spapr: Introduce a interrupt presenter reset handler

2019-10-18 Thread Greg Kurz
On Fri, 18 Oct 2019 19:22:18 +0200 Cédric Le Goater wrote: > The interrupt presenters are created by a machine handler at the core > level and are reseted independently. This is not consistent and it > raises some issues when it comes to handle hot-plugged CPUs. These are > reseted from the reali

RE: [PATCH v3 1/2] hw: timer: Add Goldfish RTC device

2019-10-18 Thread Anup Patel
Hi, From: Aleksandar Markovic Sent: Saturday, October 19, 2019 2:45 AM To: Anup Patel Cc: Peter Maydell ; Palmer Dabbelt ; Alistair Francis ; Sagar Karandikar ; Bastian Koppelmann ; Atish Patra ; qemu-ri...@nongnu.org; qemu-devel@nongnu.org; Anup Patel Subject: Re: [PATCH v3 1/2] hw: timer

[Bug 1834113] Re: QEMU touchpad input erratic after wakeup from sleep

2019-10-18 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1834113 Title: QEMU touchp

[Bug 1834113] Re: QEMU touchpad input erratic after wakeup from sleep

2019-10-18 Thread Launchpad Bug Tracker
[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.] ** Changed in: libvirt (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/18341

[Bug 1834113] Re: QEMU touchpad input erratic after wakeup from sleep

2019-10-18 Thread Launchpad Bug Tracker
[Expired for qemu (Ubuntu) because there has been no activity for 60 days.] ** Changed in: qemu (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1834113 Ti

RE: [PATCH v3 1/2] hw: timer: Add Goldfish RTC device

2019-10-18 Thread Anup Patel
> -Original Message- > From: Alistair Francis > Sent: Saturday, October 19, 2019 2:29 AM > To: Anup Patel > Cc: Peter Maydell ; Palmer Dabbelt > ; Alistair Francis ; Sagar > Karandikar ; Bastian Koppelmann > ; Atish Patra ; > qemu-ri...@nongnu.org; qemu-devel@nongnu.org; Anup Patel > >

Re: [PATCH v2 0/4] apic: Fix migration breakage of >255 vcpus

2019-10-18 Thread Peter Xu
On Wed, Oct 16, 2019 at 11:40:01AM -0300, Eduardo Habkost wrote: > On Wed, Oct 16, 2019 at 10:29:29AM +0800, Peter Xu wrote: > > v2: > > - use uint32_t rather than int64_t [Juan] > > - one more patch (patch 4) to check dup SaveStateEntry [Dave] > > - one more patch to define a macro (patch 1) to si

[PATCH] hw/xtensa: add virt machine

2019-10-18 Thread Max Filippov
virt machine is a sim machine with generic PCI host controller. Make common parts of sim machine initialization reusable. Add PCI controller at 0xf000 with PIO space at its base address, ECAM space at base address + 1M and MMIO space at base address + 64M. Connect IRQ lines to consecutive CPU e

Re: Using virtual IOMMU in guest hypervisors other than KVM and Xen?

2019-10-18 Thread Peter Xu
On Wed, Oct 16, 2019 at 03:01:22PM -0700, Jintack Lim wrote: > On Mon, Oct 14, 2019 at 7:50 PM Peter Xu wrote: > > > > On Mon, Oct 14, 2019 at 01:28:49PM -0700, Jintack Lim wrote: > > > Hi, > > > > Hello, Jintack, > > > Hi Peter, > > > > > > > I'm trying to pass through a physical network device

Re: [PATCH 0/6] migration/postcopy: enable compress during postcopy

2019-10-18 Thread Wei Yang
On Fri, Oct 18, 2019 at 09:50:05AM -0700, no-re...@patchew.org wrote: >Patchew URL: >https://patchew.org/QEMU/20191018004850.9888-1-richardw.y...@linux.intel.com/ > > > >Hi, > >This series failed the docker-mingw@fedora build test. Please find the testing >commands and >their output below. If you

Re: [PATCH] Do not use %m in common code to print error messages

2019-10-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191018104438.6158-1-th...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #! /

Re: [PATCH] Do not use %m in common code to print error messages

2019-10-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191018104438.6158-1-th...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/

Re: [PATCH] migration: savevm_state_insert_handler: constant-time element insertion

2019-10-18 Thread Juan Quintela
Scott Cheloha wrote: > On Thu, Oct 17, 2019 at 10:43:08AM +0200, Juan Quintela wrote: >> Scott Cheloha wrote: >> >> > Registering a SaveStateEntry object via savevm_state_insert_handler() >> > is an O(n) operation because the list is a priority queue maintained by >> > walking the list from head

qemu crashing when attaching an ISO file to a virtio-scsi CD-ROM device through libvirt

2019-10-18 Thread Fernando Casas Schössow
Hi, Today while working with two different Windows Server 2012 R2 guests I found that when I try to attach an ISO file to a SCSI CD-ROM device through libvirt (virsh or virt-manager) while the guest is running, qemu crashes and the following message is logged: Assertion failed: blk_get_aio_con

qemu crashing when attaching an ISO file to a virtio-scsi CD-ROM device through libvirt

2019-10-18 Thread Fernando Casas Schössow
Hi, Today while working with two different Windows Server 2012 R2 guests I found that when I try to attach an ISO file to a SCSI CD-ROM device through libvirt (virsh or virt-manager) while the guest is running, qemu crashes and the following message is logged: Assertion failed: blk_get_aio_con

Re: [PATCH] configure: Require Python >= 3.5

2019-10-18 Thread John Snow
On 10/18/19 5:14 PM, Eduardo Habkost wrote: > On Fri, Oct 18, 2019 at 05:07:36PM -0400, John Snow wrote: >> >> >> On 10/16/19 6:42 PM, Eduardo Habkost wrote: >>> Python 3.5 is the oldest Python version available on our >>> supported build platforms, and Python 2 end of life will be 3 >>> weeks a

Re: [PATCH v3 1/2] hw: timer: Add Goldfish RTC device

2019-10-18 Thread Aleksandar Markovic
ū On Tuesday, October 15, 2019, Anup Patel wrote: > This patch adds model for Google Goldfish virtual platform RTC device. > > We will be adding Goldfish RTC device to the QEMU RISC-V virt machine > for providing real date-time to Guest Linux. The corresponding Linux > driver for Goldfish RTC de

Re: [PATCH] configure: Require Python >= 3.5

2019-10-18 Thread Eduardo Habkost
On Fri, Oct 18, 2019 at 05:07:36PM -0400, John Snow wrote: > > > On 10/16/19 6:42 PM, Eduardo Habkost wrote: > > Python 3.5 is the oldest Python version available on our > > supported build platforms, and Python 2 end of life will be 3 > > weeks after the planned release date of QEMU 4.2.0. Drop

Re: [PATCH] iotests: Remove 130 from the "auto" group

2019-10-18 Thread John Snow
On 10/18/19 12:10 PM, Thomas Huth wrote: > Peter hit a "Could not open 'TEST_DIR/t.IMGFMT': Failed to get shared > 'write' lock - Is another process using the image [TEST_DIR/t.IMGFMT]?" > error with 130 already twice. Looks like this test is a little bit > shaky, and currently nobody has a real

Re: [PATCH] configure: Require Python >= 3.5

2019-10-18 Thread John Snow
On 10/16/19 6:42 PM, Eduardo Habkost wrote: > Python 3.5 is the oldest Python version available on our > supported build platforms, and Python 2 end of life will be 3 > weeks after the planned release date of QEMU 4.2.0. Drop Python > 2 support from configure completely, and require Python 3.5

Re: [PATCH v3 2/2] riscv: virt: Use Goldfish RTC device

2019-10-18 Thread Alistair Francis
On Tue, Oct 15, 2019 at 1:37 AM Anup Patel wrote: > > We extend QEMU RISC-V virt machine by adding Goldfish RTC device > to it. This will allow Guest Linux to sync it's local date/time > with Host date/time via RTC device. > > Signed-off-by: Anup Patel Reviewed-by: Alistair Francis Alistair >

Re: [PATCH] configure: Require Python >= 3.5

2019-10-18 Thread John Snow
On 10/18/19 4:15 AM, Kevin Wolf wrote: > Am 17.10.2019 um 21:39 hat John Snow geschrieben: >> On 10/17/19 7:21 AM, Kevin Wolf wrote: >>> Am 17.10.2019 um 00:48 hat John Snow geschrieben: On 10/16/19 6:42 PM, Eduardo Habkost wrote: > Python 3.5 is the oldest Python version available on o

Re: [PATCH v3 1/2] hw: timer: Add Goldfish RTC device

2019-10-18 Thread Alistair Francis
On Tue, Oct 15, 2019 at 1:36 AM Anup Patel wrote: > > This patch adds model for Google Goldfish virtual platform RTC device. > > We will be adding Goldfish RTC device to the QEMU RISC-V virt machine > for providing real date-time to Guest Linux. The corresponding Linux > driver for Goldfish RTC de

Re: [PATCH] qemu-img.texi: Describe data_file and data_file_raw

2019-10-18 Thread John Snow
CC qemu-block On 10/18/19 5:59 AM, Han Han wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1763105 > > Signed-off-by: Han Han > --- > qemu-img.texi | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/qemu-img.texi b/qemu-img.texi > index b5156d6316..44596c2d93 100644 > --

Re: [PATCH v2 1/1] riscv/boot: Fix possible memory leak

2019-10-18 Thread Palmer Dabbelt
On Thu, 17 Oct 2019 05:08:39 PDT (-0700), Peter Maydell wrote: Ping? It would be nice to see this patch get into master to silence the coverity errors. Sorry, it looks like I dropped this. It's in my queue, I hope to submit a PR soon. thanks -- PMM On Thu, 3 Oct 2019 at 18:05, Alistair F

Re: [PATCH 05/11] qapi: add unplug primary event

2019-10-18 Thread Eric Blake
On 10/18/19 3:20 PM, Jens Freimann wrote: This event is emitted when we sent a request to unplug a failover primary device from the Guest OS and it includes the device id of the primary device. Signed-off-by: Jens Freimann --- qapi/migration.json | 19 +++ 1 file changed, 19

[PATCH 07/11] migration: allow unplug during migration for failover devices

2019-10-18 Thread Jens Freimann
In "b06424de62 migration: Disable hotplug/unplug during migration" we added a check to disable unplug for all devices until we have figured out what works. For failover primary devices qdev_unplug() is called from the migration handler, i.e. during migration. This patch adds a flag to DeviceState

[PATCH 10/11] net/virtio: add failover support

2019-10-18 Thread Jens Freimann
This patch adds support to handle failover device pairs of a virtio-net device and a vfio-pci device, where the virtio-net acts as the standby device and the vfio-pci device as the primary. The general idea is that we have a pair of devices, a vfio-pci and a emulated (virtio-net) device. Before mi

[PATCH 11/11] vfio: unplug failover primary device before migration

2019-10-18 Thread Jens Freimann
As usual block all vfio-pci devices from being migrated, but make an exception for failover primary devices. This is achieved by setting unmigratable to 0 but also add a migration blocker for all vfio-pci devices except failover primary devices. These will be unplugged before migration happens by t

[PATCH 04/11] pci: mark device having guest unplug request pending

2019-10-18 Thread Jens Freimann
Set pending_deleted_event in DeviceState for failover primary devices that were successfully unplugged by the Guest OS. Signed-off-by: Jens Freimann --- hw/pci/pcie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 19363ff8ce..08718188bb 100644 --- a/hw

[PATCH 09/11] libqos: tolerate wait-unplug migration state

2019-10-18 Thread Jens Freimann
Signed-off-by: Jens Freimann --- tests/libqos/libqos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index d71557c5cb..f229eb2cb8 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c @@ -125,7 +125,8 @@ void migrate(Q

[PATCH 06/11] qapi: add failover negotiated event

2019-10-18 Thread Jens Freimann
This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature was not negotiated during virtio feature negotiation. If this event is received it means any primary devices hotplugged before this were were never really added to QEMU devices. Signed-off-by: Jens Freimann --- qapi/net.jso

[PATCH 08/11] migration: add new migration state wait-unplug

2019-10-18 Thread Jens Freimann
This patch adds a new migration state called wait-unplug. It is entered after the SETUP state if failover devices are present. It will transition into ACTIVE once all devices were succesfully unplugged from the guest. So if a guest doesn't respond or takes long to honor the unplug request the use

[PATCH 05/11] qapi: add unplug primary event

2019-10-18 Thread Jens Freimann
This event is emitted when we sent a request to unplug a failover primary device from the Guest OS and it includes the device id of the primary device. Signed-off-by: Jens Freimann --- qapi/migration.json | 19 +++ 1 file changed, 19 insertions(+) diff --git a/qapi/migration.jso

[PATCH 03/11] pci: mark devices partially unplugged

2019-10-18 Thread Jens Freimann
Only the guest unplug request was triggered. This is needed for the failover feature. In case of a failed migration we need to plug the device back to the guest. Signed-off-by: Jens Freimann --- hw/pci/pcie.c| 3 +++ include/hw/pci/pci.h | 1 + 2 files changed, 4 insertions(+) diff --gi

[PATCH v4 0/11] add failover feature for assigned network devices

2019-10-18 Thread Jens Freimann
This is implementing the host side of the net_failover concept (https://www.kernel.org/doc/html/latest/networking/net_failover.html) Changes since v3: * Patch 1, make return values of qdev_should_hide_device() more clear * Patch 1, clarify comment about new should_be_hidden DeviceListener * Patc

[PATCH 01/11] qdev/qbus: add hidden device support

2019-10-18 Thread Jens Freimann
This adds support for hiding a device to the qbus and qdev APIs. The first user of this will be the virtio-net failover feature but the API introduced with this patch could be used to implement other features as well, for example hiding pci devices when a pci bus is powered off. qdev_device_add()

[PATCH 02/11] pci: add option for net failover

2019-10-18 Thread Jens Freimann
This patch adds a net_failover_pair_id property to PCIDev which is used to link the primary device in a failover pair (the PCI dev) to a standby (a virtio-net-pci) device. It only supports ethernet devices. Also currently it only supports PCIe devices. QEMU will exit with an error message otherwis

Re: [PATCH] target/riscv: PMP violation due to wrong size parameter

2019-10-18 Thread Dayeol Lee
I'll move the entire check into pmp_hart_has_privs as it makes more sense. Thanks! On Fri, Oct 18, 2019, 3:01 PM Palmer Dabbelt wrote: > On Tue, 15 Oct 2019 10:04:32 PDT (-0700), day...@berkeley.edu wrote: > > Hi, > > > > Could this patch go through? > > If not please let me know so that I can

Re: [PATCH v1 5/6] s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW INDICATION

2019-10-18 Thread Richard Henderson
On 10/18/19 9:10 AM, David Hildenbrand wrote: > Testing this, there seems to be something messed up. We are dealing with > unsigned numbers. "Each operand is treated as an unsigned binary integer." > Let's just implement as written in the PoP: > > "A subtraction is performed by adding the contents

Re: [PATCH v5 2/3] tests/vm: Let subclasses disable IPv6

2019-10-18 Thread Philippe Mathieu-Daudé
On 10/18/19 8:17 PM, Eduardo Habkost wrote: The mechanism will be used to work around issues related to IPv6 on the netbsd image builder. Signed-off-by: Eduardo Habkost --- tests/vm/basevm.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/v

Re: [PATCH v1 3/6] s390x/tcg: Fix VECTOR SHIFT RIGHT ARITHMETIC BY BYTE

2019-10-18 Thread Richard Henderson
On 10/18/19 9:10 AM, David Hildenbrand wrote: > We forgot to propagate the highest bit accross the high doubleword in > two cases (shift >=64). > > Fixes: 5f724887e3dd ("s390x/tcg: Implement VECTOR SHIFT RIGHT ARITHMETIC") > Signed-off-by: David Hildenbrand > --- > target/s390x/vec_int_helper.c

Re: [PATCH v1 2/6] s390x/tcg: Fix VECTOR MULTIPLY AND ADD *

2019-10-18 Thread Richard Henderson
On 10/18/19 9:10 AM, David Hildenbrand wrote: > We missed that we always read a "double-wide even-odd element > pair of the fourth operand". Fix it in all four variants. > > Fixes: 1b430aec4157 ("s390x/tcg: Implement VECTOR MULTIPLY AND ADD *") > Signed-off-by: David Hildenbrand > --- > target/s

Re: [PATCH v1 1/6] s390x/tcg: Fix VECTOR MULTIPLY LOGICAL ODD

2019-10-18 Thread Richard Henderson
On 10/18/19 9:10 AM, David Hildenbrand wrote: > We have to read from odd offsets. > > Fixes: 2bf3ee38f1f8 ("s390x/tcg: Implement VECTOR MULTIPLY *") > Signed-off-by: David Hildenbrand > --- > target/s390x/vec_int_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Rich

Re: [PATCH] target/riscv: PMP violation due to wrong size parameter

2019-10-18 Thread Palmer Dabbelt
On Tue, 15 Oct 2019 10:04:32 PDT (-0700), day...@berkeley.edu wrote: Hi, Could this patch go through? If not please let me know so that I can fix. Thank you! Sorry, I dropped this one. It's in the patch queue now. We should also check for size==0 in pmp_hart_has_privs(), as that won't work.

Re: [PATCH v1 6/6] s390x/tcg: Fix VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION

2019-10-18 Thread Richard Henderson
On 10/18/19 9:10 AM, David Hildenbrand wrote: > +/* Isolate the carry to the next doubleword */ > tcg_gen_andi_i64(dl, th, 1); You can remove this now, since the only possible results are 0/1; it was only our subtract implementation that produced -1/0. r~

Re: [PATCH v1 4/6] s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION

2019-10-18 Thread Richard Henderson
On 10/18/19 11:18 AM, David Hildenbrand wrote: > On 18.10.19 19:41, David Hildenbrand wrote: >> On 18.10.19 18:10, David Hildenbrand wrote: >>> Looks like my idea of what a "borrow" is was wrong. We are dealing with >>> unsigned numbers. A subtraction is simply an addition with the bitwise >>> comp

Re: [PATCH] Fix unsigned integer underflow in fd-trans.c

2019-10-18 Thread Laurent Vivier
Le 18/10/2019 à 20:27, Shu-Chun Weng a écrit : > (Re-sending to the list because I forgot to turn off HTML before and > it was bounced.) > > That does prevent the integer underflow, but it also changes the > behavior and I don't think the new behavior is desirable. > > If the extra payload has a

Re: [PATCH v3 2/2] riscv: virt: Use Goldfish RTC device

2019-10-18 Thread Palmer Dabbelt
On Tue, 15 Oct 2019 01:35:42 PDT (-0700), Anup Patel wrote: We extend QEMU RISC-V virt machine by adding Goldfish RTC device to it. This will allow Guest Linux to sync it's local date/time with Host date/time via RTC device. Signed-off-by: Anup Patel --- hw/riscv/Kconfig| 1 + hw/risc

Re: [PATCH v3 1/2] hw: timer: Add Goldfish RTC device

2019-10-18 Thread Palmer Dabbelt
On Tue, 15 Oct 2019 01:35:31 PDT (-0700), Anup Patel wrote: This patch adds model for Google Goldfish virtual platform RTC device. We will be adding Goldfish RTC device to the QEMU RISC-V virt machine for providing real date-time to Guest Linux. The corresponding Linux driver for Goldfish RTC de

Re: [PATCH v6 1/4] block/replication.c: Ignore requests after failover

2019-10-18 Thread Lukas Straub
On Sat, 5 Oct 2019 15:05:23 +0200 Lukas Straub wrote: > After failover the Secondary side of replication shouldn't change state, > because > it now functions as our primary disk. > > In replication_start, replication_do_checkpoint, replication_stop, ignore > the request if current state is BLOCK

Re: [PATCH v4 0/3] target/riscv: Expose "priv" register for GDB

2019-10-18 Thread Palmer Dabbelt
On Mon, 14 Oct 2019 08:45:26 PDT (-0700), jonat...@fintelia.io wrote: This series adds a new "priv" virtual register that reports the current privilege mode. This is helpful for debugging purposes because that information is not actually available in any of the real CSRs. The third patch in thi

Re: [PATCH v5 31/55] target/riscv: fetch code with translator_ld

2019-10-18 Thread Palmer Dabbelt
On Mon, 14 Oct 2019 10:59:07 PDT (-0700), alistai...@gmail.com wrote: On Mon, Oct 14, 2019 at 4:20 AM Alex Bennée wrote: From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis and Acked-by: Palmer

Re: [PATCH] Fix unsigned integer underflow in fd-trans.c

2019-10-18 Thread Shu-Chun Weng
(Re-sending to the list because I forgot to turn off HTML before and it was bounced.) That does prevent the integer underflow, but it also changes the behavior and I don't think the new behavior is desirable. If the extra payload has a smaller alignment than the header, it makes sense for the use

[Bug 1848556] Re: qemu-img check failing on remote image in Eoan

2019-10-18 Thread Rod Smith
I tried qemu from git, but I get an "unknown protocol" error when I try to access an image via HTTP: $ ./qemu-img check http://10.193.37.117/cloud/eoan-server-cloudimg-amd64.img qemu-img: Could not open 'http://10.193.37.117/cloud/eoan-server-cloudimg-amd64.img': Unknown protocol 'http' Is ther

Re: [PATCH v1 4/6] s390x/tcg: Fix VECTOR SUBTRACT COMPUTE BORROW INDICATION

2019-10-18 Thread David Hildenbrand
On 18.10.19 19:41, David Hildenbrand wrote: On 18.10.19 18:10, David Hildenbrand wrote: Looks like my idea of what a "borrow" is was wrong. We are dealing with unsigned numbers. A subtraction is simply an addition with the bitwise complement. If we get a carry during the addition, that's the bor

[PATCH v5 2/3] tests/vm: Let subclasses disable IPv6

2019-10-18 Thread Eduardo Habkost
The mechanism will be used to work around issues related to IPv6 on the netbsd image builder. Signed-off-by: Eduardo Habkost --- tests/vm/basevm.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index b5d1479bee..2929de23aa 100755

[PATCH v5 3/3] tests/vm/netbsd: Disable IPv6

2019-10-18 Thread Eduardo Habkost
Workaround for issues when the host has no IPv6 connectivity. Signed-off-by: Eduardo Habkost --- tests/vm/netbsd | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 49a99477f4..5e04dcd9b1 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -62,6 +

qemu/powernv: coreboot support?

2019-10-18 Thread Marty E. Plummer
Hello, First off, thank you for the work you've done on the ppc64 support, it has been very useful. I'm currently working on a coreboot port for the talos ii line of systems (which means more ppc64 support, support specifically for the power9 sforza chip, and specific mainboard support. My plate i

Re: [PATCH] Fix unsigned integer underflow in fd-trans.c

2019-10-18 Thread Shu-Chun Weng
That does prevent the integer underflow, but it also changes the behavior and I don't think the new behavior is desirable. If the extra payload has a smaller alignment than the header, it makes sense for the user program to generate a nlmsg_len that is not a multiple of the alignment. When it's th

[PATCH v5 1/3] tests/vm: netbsd autoinstall, using serial console

2019-10-18 Thread Eduardo Habkost
From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann Reviewed-by:

Re: [PATCH] hw/timer/exynos4210_mct: Initialize ptimer before starting it

2019-10-18 Thread Guenter Roeck
On Fri, Oct 18, 2019 at 03:31:49PM +0100, Peter Maydell wrote: > From: Guenter Roeck > > When booting a recent Linux kernel, the qemu message "Timer with delta > zero, disabling" is seen, apparently because a ptimer is started before > being initialized. Fix the problem by initializing the offen

[PATCH v5 0/3] tests/vm: netbsd autoinstall, with IPv6 disabled

2019-10-18 Thread Eduardo Habkost
I'm numbering this series v5 because it's a new version of the patch sent by Gerd, at: Date: Mon, 17 Jun 2019 06:38:56 +0200 Message-Id: <20190617043858.8290-10-kra...@redhat.com> Subject: [PATCH v4 09/11] tests/vm: netbsd autoinstall, using serial console Changes v4 -> v5: * Rebase to late

Re: [PATCH 4/4] target/arm: Convert PMULL.8 to gvec

2019-10-18 Thread Alex Bennée
Richard Henderson writes: > We still need two different helpers, since NEON and SVE2 get the > inputs from different locations within the source vector. However, > we can convert both to the same internal form for computation. > > The sve2 helper is not used yet, but adding it with this patch

Re: [PATCH 05/14] dp8393x: replace PROP_PTR with PROP_LINK

2019-10-18 Thread Aleksandar Markovic
On Friday, October 18, 2019, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > hw/mips/mips_jazz.c | 3 ++- > hw/net/dp8393x.c| 7 +++ > 2 files changed, 5 insertions(+), 5 deletions(-) > > Marc-Andre, Can you put together a paragraph on why we need this patch, and pl

[PATCH v8 20/22] target/arm: Rebuild hflags for M-profile

2019-10-18 Thread Richard Henderson
Continue setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- v7: Add rebuilds for v7m_msr and nvic_writel to v7m.ccr. v8: Split nvic update to a new patch and generalize location. --- target/arm/m_helper.c | 6 ++ target/arm/translate.c

[PATCH v8 16/22] target/arm: Rebuild hflags at EL changes

2019-10-18 Thread Richard Henderson
Begin setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- linux-user/syscall.c| 1 + target/arm/cpu.c| 1 + target/arm/helper-a64.c | 3 +++ target/arm/helper.c | 2 ++ target/arm/machine.c| 1 + target/arm/op_helper.c |

[PATCH v8 14/22] target/arm: Hoist store to cs_base in cpu_get_tb_cpu_state

2019-10-18 Thread Richard Henderson
By performing this store early, we avoid having to save and restore the register holding the address around any function calls. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper

Re: [PATCH v32 04/13] target/avr: Add instruction translation - Registers definition

2019-10-18 Thread Aleksandar Markovic
On Friday, October 18, 2019, Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Friday, October 18, 2019, Michael Rolnik wrote: > >> On Fri, Oct 18, 2019 at 4:23 PM Aleksandar Markovic >> wrote: >> > >> > >> > >> > On Friday, October 18, 2019, Michael Rolnik wrote: >> >> >> >> >

[PATCH v8 11/22] target/arm: Hoist computation of TBFLAG_A32.VFPEN

2019-10-18 Thread Richard Henderson
There are 3 conditions that each enable this flag. M-profile always enables; A-profile with EL1 as AA64 always enables. Both of these conditions can easily be cached. The final condition relies on the FPEXC register which we are not prepared to cache. Reviewed-by: Alex Bennée Signed-off-by: Ri

[PATCH v8 22/22] target/arm: Rely on hflags correct in cpu_get_tb_cpu_state

2019-10-18 Thread Richard Henderson
This is the payoff. >From perf record -g data of ubuntu 18 boot and shutdown: BEFORE: - 23.02% 2.82% qemu-system-aar [.] helper_lookup_tb_ptr - 20.22% helper_lookup_tb_ptr + 10.05% tb_htable_lookup - 9.13% cpu_get_tb_cpu_state 3.20% aa64_va_parameters_both

[PATCH v8 10/22] target/arm: Simplify set of PSTATE_SS in cpu_get_tb_cpu_state

2019-10-18 Thread Richard Henderson
Hoist the variable load for PSTATE into the existing test vs is_a64. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/helper.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index e2a62c

[PATCH v8 21/22] target/arm: Rebuild hflags for M-profile NVIC

2019-10-18 Thread Richard Henderson
Continue setting, but not relying upon, env->hflags. Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- hw/intc/armv7m_nvic.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 8e93e51e81.

Re: [PATCH 0/4] target/arm vector improvements

2019-10-18 Thread Alex Bennée
Richard Henderson writes: > The first patch has been seen before. > > https://patchwork.ozlabs.org/patch/1115039/ > > It had a bug and I didn't fix it right away and then forgot. > Fixed now; I had mixed up the operand ordering for aarch32. > > The next 3 are something that I noticed while do

[PATCH v8 17/22] target/arm: Rebuild hflags at MSR writes

2019-10-18 Thread Richard Henderson
Continue setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 13 +++-- target/arm/translate.c | 28 +++- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/target/

Re: [PATCH 05/14] dp8393x: replace PROP_PTR with PROP_LINK

2019-10-18 Thread Peter Maydell
On Fri, 18 Oct 2019 at 16:42, Marc-André Lureau wrote: > > Signed-off-by: Marc-André Lureau > --- > hw/mips/mips_jazz.c | 3 ++- > hw/net/dp8393x.c| 7 +++ > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c > index 8d010a0b6e..87

[PATCH v8 19/22] target/arm: Rebuild hflags at Xscale SCTLR writes

2019-10-18 Thread Richard Henderson
Continue setting, but not relying upon, env->hflags. Signed-off-by: Richard Henderson --- target/arm/helper.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index aae7b62458..c55783e540 100644 --- a/target/arm/helper.c +++ b/target/arm/h

[PATCH v8 08/22] target/arm: Split out rebuild_hflags_aprofile

2019-10-18 Thread Richard Henderson
Create a function to compute the values of the TBFLAG_ANY bits that will be cached, and are used by A-profile. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/helper.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/target/arm/h

[PATCH v8 18/22] target/arm: Rebuild hflags at CPSR writes

2019-10-18 Thread Richard Henderson
Continue setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index ccc2cecb46..b529d6c1bf 100644 --- a/target/arm/o

[PATCH v8 04/22] target/arm: Split arm_cpu_data_is_big_endian

2019-10-18 Thread Richard Henderson
Set TBFLAG_ANY.BE_DATA in rebuild_hflags_common_32 and rebuild_hflags_a64 instead of rebuild_hflags_common, where we do not need to re-test is_a64() nor re-compute the various inputs. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/cpu.h| 49

  1   2   3   4   5   >