Re: [PATCH] Revert "irqbypass: do not start cons/prod when failed connect"

2021-05-11 Thread Michael S. Tsirkin
without a start consumer > > Signed-off-by: Zhu Lingshan Acked-by: Michael S. Tsirkin > --- > virt/lib/irqbypass.c | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c > index c9bb3957f58

Re: [RFC PATCH 12/12] virt/acpi: add SDEI table if SDEI is enabled

2019-10-10 Thread Michael S. Tsirkin
James Morse > Cc: Shannon Zhao > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > --- > hw/arm/virt-acpi-build.c| 16 > include/hw/acpi/acpi-defs.h | 5 + > 2 files changed, 21 insertions(+) > > diff --git a/hw/arm/virt-acpi-bu

Re: [RFC PATCH 01/12] linux-headers: import arm_sdei.h

2019-09-24 Thread Michael S. Tsirkin
c: Marc Zyngier > Cc: Mark Rutland > Cc: James Morse > Cc: "Michael S. Tsirkin" > Cc: Cornelia Huck > Cc: Paolo Bonzini Some issues with this. First linux-headers is for linux as a host. This is for linux as a guest, so belongs in include/standard-headers. Second, pl

Re: [virtio-dev] Re: [PATCH v8 2/7] dt-bindings: virtio: Add virtio-pci-iommu node

2019-06-16 Thread Michael S. Tsirkin
On Fri, May 31, 2019 at 12:13:47PM +0100, Jean-Philippe Brucker wrote: > On 30/05/2019 18:45, Michael S. Tsirkin wrote: > > On Thu, May 30, 2019 at 06:09:24PM +0100, Jean-Philippe Brucker wrote: > >> Some systems implement virtio-iommu as a PCI endpoint. The operating > >&g

Re: [PATCH v8 2/7] dt-bindings: virtio: Add virtio-pci-iommu node

2019-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2019 at 06:09:24PM +0100, Jean-Philippe Brucker wrote: > Some systems implement virtio-iommu as a PCI endpoint. The operating > system needs to discover the relationship between IOMMU and masters long > before the PCI endpoint gets probed. Add a PCI child node to describe the >

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-05-27 Thread Michael S. Tsirkin
On Mon, May 27, 2019 at 11:26:04AM +0200, Joerg Roedel wrote: > On Sun, May 12, 2019 at 12:31:59PM -0400, Michael S. Tsirkin wrote: > > OK this has been in next for a while. > > > > Last time IOMMU maintainers objected. Are objections > > still in force? > > &g

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-05-12 Thread Michael S. Tsirkin
; > [5] [PATCH] iommu/of: Fix probe-deferral > https://www.spinics.net/lists/arm-kernel/msg698371.html For virtio things: Acked-by: Michael S. Tsirkin > Jean-Philippe Brucker (7): > dt-bindings: virtio-mmio: Add IOMMU description > dt-bindings: virtio: Add virtio

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-05-12 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 12:19:52PM +, Jean-Philippe Brucker wrote: > Implement the virtio-iommu driver, following specification v0.9 [1]. > > This is a simple rebase onto Linux v5.0-rc2. We now use the > dev_iommu_fwspec_get() helper introduced in v5.0 instead of accessing >

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-01-29 Thread Michael S. Tsirkin
On Mon, Jan 21, 2019 at 11:29:05AM +, Jean-Philippe Brucker wrote: > Hi, > > On 18/01/2019 15:51, Michael S. Tsirkin wrote: > > > > On Tue, Jan 15, 2019 at 12:19:52PM +, Jean-Philippe Brucker wrote: > >> Implement the virtio-iommu driver, f

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-01-18 Thread Michael S. Tsirkin
On Tue, Jan 15, 2019 at 12:19:52PM +, Jean-Philippe Brucker wrote: > Implement the virtio-iommu driver, following specification v0.9 [1]. > > This is a simple rebase onto Linux v5.0-rc2. We now use the > dev_iommu_fwspec_get() helper introduced in v5.0 instead of accessing >

Re: [PATCH v6 0/7] Add virtio-iommu driver

2018-12-20 Thread Michael S. Tsirkin
On Thu, Dec 20, 2018 at 05:59:46PM +, Jean-Philippe Brucker wrote: > On 19/12/2018 23:09, Michael S. Tsirkin wrote: > > On Thu, Dec 13, 2018 at 12:50:29PM +, Jean-Philippe Brucker wrote: > >>>> [3] git://linux-arm.org/linux-jpb.git virtio-iommu/v0.9.1 > &g

Re: [PATCH v6 0/7] Add virtio-iommu driver

2018-12-19 Thread Michael S. Tsirkin
On Thu, Dec 13, 2018 at 12:50:29PM +, Jean-Philippe Brucker wrote: > >> [3] git://linux-arm.org/linux-jpb.git virtio-iommu/v0.9.1 > >> git://linux-arm.org/kvmtool-jpb.git virtio-iommu/v0.9 > > > > Unfortunatly gitweb seems to be broken on linux-arm.org. What is missing > > in this

Re: [virtio-dev] Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-12-12 Thread Michael S. Tsirkin
On Fri, Dec 07, 2018 at 06:52:31PM +, Jean-Philippe Brucker wrote: > Sorry for the delay, I wanted to do a little more performance analysis > before continuing. > > On 27/11/2018 18:10, Michael S. Tsirkin wrote: > > On Tue, Nov 27, 2018 at 05:55:20PM +, Jean-Phil

Re: [PATCH v6 0/7] Add virtio-iommu driver

2018-12-12 Thread Michael S. Tsirkin
On Wed, Dec 12, 2018 at 11:35:45AM +0100, Joerg Roedel wrote: > Hi, > > to make progress on this, we should first agree on the protocol used > between guest and host. I have a few points to discuss on the protocol > first. > > On Tue, Dec 11, 2018 at 06:20:57PM +, Jean-Philippe Brucker

Re: [PATCH v6 0/7] Add virtio-iommu driver

2018-12-11 Thread Michael S. Tsirkin
On Tue, Dec 11, 2018 at 10:31:01AM -0800, Christoph Hellwig wrote: > On Tue, Dec 11, 2018 at 06:20:57PM +, Jean-Philippe Brucker wrote: > > Implement the virtio-iommu driver, following specification v0.9 [1]. > > > > Only minor changes since v5 [2]. I fixed issues reported by Michael and > >

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-12-10 Thread Michael S. Tsirkin
On Mon, Dec 10, 2018 at 03:06:47PM +, Jean-Philippe Brucker wrote: > On 27/11/2018 18:53, Michael S. Tsirkin wrote: > > On Tue, Nov 27, 2018 at 06:10:46PM +, Jean-Philippe Brucker wrote: > >> On 27/11/2018 18:04, Michael S. Tsirkin wrote: > >>> On Tue, No

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Tue, Nov 27, 2018 at 06:10:46PM +, Jean-Philippe Brucker wrote: > On 27/11/2018 18:04, Michael S. Tsirkin wrote: > > On Tue, Nov 27, 2018 at 05:50:50PM +, Jean-Philippe Brucker wrote: > >> On 23/11/2018 22:02, Michael S. Tsirkin wrote: > >>>> +/* > &

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Tue, Nov 27, 2018 at 05:50:50PM +, Jean-Philippe Brucker wrote: > > I didn't notice this in the past but it seems this will spin > > with interrupts disabled until host handles the request. > > Please do not do this - host execution can be another > > task that needs the same host CPU. This

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Tue, Nov 27, 2018 at 05:55:20PM +, Jean-Philippe Brucker wrote: > On 23/11/2018 21:56, Michael S. Tsirkin wrote: > >> +config VIRTIO_IOMMU > >> + bool "Virtio IOMMU driver" > >> + depends on VIRTIO=y > >> + select IOMMU_API > >>

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Tue, Nov 27, 2018 at 05:58:18PM +, Jean-Philippe Brucker wrote: > On 23/11/2018 21:48, Michael S. Tsirkin wrote: > >> +struct virtio_iommu_config { > >> + /* Supported page sizes */ > >> + __u64 page_size_mask; &

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Tue, Nov 27, 2018 at 05:50:50PM +, Jean-Philippe Brucker wrote: > On 23/11/2018 22:02, Michael S. Tsirkin wrote: > >> +/* > >> + * __viommu_sync_req - Complete all in-flight requests > >> + * > >> + * Wait for all added requests to complete

Re: [PATCH v5 0/7] Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Tue, Nov 27, 2018 at 06:09:25PM +0100, Auger Eric wrote: > Hi Michael, > > On 11/27/18 5:53 PM, Michael S. Tsirkin wrote: > > On Thu, Nov 22, 2018 at 07:37:54PM +, Jean-Philippe Brucker wrote: > >> Implement the virtio-iommu driver, following specification v0.9 [1

Re: [PATCH v5 0/7] Add virtio-iommu driver

2018-11-27 Thread Michael S. Tsirkin
On Thu, Nov 22, 2018 at 07:37:54PM +, Jean-Philippe Brucker wrote: > Implement the virtio-iommu driver, following specification v0.9 [1]. > > Since v4 [2] I fixed the issues reported by Eric, and added Reviewed-by > from Eric and Rob. Thanks! > > I changed the specification to fix one

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-23 Thread Michael S. Tsirkin
On Thu, Nov 22, 2018 at 07:37:59PM +, Jean-Philippe Brucker wrote: > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio transport without emulating page > tables. This implementation handles ATTACH, DETACH, MAP and UNMAP > requests. >

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-23 Thread Michael S. Tsirkin
On Thu, Nov 22, 2018 at 07:37:59PM +, Jean-Philippe Brucker wrote: > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio transport without emulating page > tables. This implementation handles ATTACH, DETACH, MAP and UNMAP > requests. >

Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-11-23 Thread Michael S. Tsirkin
On Thu, Nov 22, 2018 at 07:37:59PM +, Jean-Philippe Brucker wrote: > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio transport without emulating page > tables. This implementation handles ATTACH, DETACH, MAP and UNMAP > requests. >

Re: [PATCH v3 0/7] Add virtio-iommu driver

2018-10-17 Thread Michael S. Tsirkin
On Wed, Oct 17, 2018 at 12:54:28PM +0100, Jean-Philippe Brucker wrote: > On 16/10/2018 21:31, Auger Eric wrote: > > Hi Jean, > > > > On 10/16/18 8:44 PM, Jean-Philippe Brucker wrote: > >> On 16/10/2018 10:25, Auger Eric wrote: > >>> Hi Jean, > >>> > >>> On 10/12/18 4:59 PM, Jean-Philippe Brucker

Re: [PATCH v3 3/7] PCI: OF: Allow endpoints to bypass the iommu

2018-10-17 Thread Michael S. Tsirkin
On Mon, Oct 15, 2018 at 08:46:41PM +0100, Jean-philippe Brucker wrote: > [Replying with my personal address because we're having SMTP issues] > > On 15/10/2018 11:52, Michael S. Tsirkin wrote: > > On Fri, Oct 12, 2018 at 02:41:59PM -0500, Bjorn Helgaas wrote: > >> s

Re: [PATCH v3 3/7] PCI: OF: Allow endpoints to bypass the iommu

2018-10-15 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 02:41:59PM -0500, Bjorn Helgaas wrote: > s/iommu/IOMMU/ in subject > > On Fri, Oct 12, 2018 at 03:59:13PM +0100, Jean-Philippe Brucker wrote: > > Using the iommu-map binding, endpoints in a given PCI domain can be > > managed by different IOMMUs. Some virtual machines may

Re: [PATCH v3 0/7] Add virtio-iommu driver

2018-10-12 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 03:59:10PM +0100, Jean-Philippe Brucker wrote: > Implement the virtio-iommu driver, following specification v0.8 [1]. > Changes since v2 [2]: > > * Patches 2-4 allow virtio-iommu to use the PCI transport, since QEMU > would like to phase out the MMIO transport. This

Re: [PATCH v3 6/7] iommu/virtio: Add probe request

2018-10-12 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 03:59:16PM +0100, Jean-Philippe Brucker wrote: > When the device offers the probe feature, send a probe request for each > device managed by the IOMMU. Extract RESV_MEM information. When we > encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. > This will

Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-10-12 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 03:59:15PM +0100, Jean-Philippe Brucker wrote: > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio transport without emulating page > tables. This implementation handles ATTACH, DETACH, MAP and UNMAP > requests. >

Re: [PATCH v4 02/20] virtio: pci-legacy: Validate queue pfn

2018-07-23 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 01:54:10PM +0100, Marc Zyngier wrote: > On 23/07/18 10:44, Suzuki K Poulose wrote: > > On 07/22/2018 04:53 PM, Michael S. Tsirkin wrote: > >> On Wed, Jul 18, 2018 at 10:18:45AM +0100, Suzuki K Poulose wrote: > >>> Legacy PCI over virtio

Re: [PATCH v4 01/20] virtio: mmio-v1: Validate queue PFN

2018-07-22 Thread Michael S. Tsirkin
ply miss out a proper link > to the other side of the queue. > > Add a check to validate the PFN, rather than silently breaking > the devices. > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: Peter Maydel &g

Re: [PATCH v2 02/17] virtio: pci-legacy: Validate queue pfn

2018-07-12 Thread Michael S. Tsirkin
On Tue, Mar 27, 2018 at 05:11:04PM +0300, Michael S. Tsirkin wrote: > On Tue, Mar 27, 2018 at 02:15:12PM +0100, Suzuki K Poulose wrote: > > Legacy PCI over virtio uses a 32bit PFN for the queue. If the > > queue pfn is too large to fit in 32bits, which we could hit on > > arm

Re: [PATCH v3 01/20] virtio: mmio-v1: Validate queue PFN

2018-07-03 Thread Michael S. Tsirkin
On Tue, Jul 03, 2018 at 09:04:01AM +0100, Suzuki K Poulose wrote: > Hi Michael, > > On 06/29/2018 06:42 PM, Michael S. Tsirkin wrote: > > On Fri, Jun 29, 2018 at 12:15:21PM +0100, Suzuki K Poulose wrote: > > > virtio-mmio with virtio-v1 uses a 32bit PFN for the queue

Re: [PATCH v3 02/20] virtio: pci-legacy: Validate queue pfn

2018-06-29 Thread Michael S. Tsirkin
out a proper link to the other side of > the queue. > > Add a check to validate the PFN, rather than silently breaking > the devices. > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: Peter Maydel > Cc: J

Re: [PATCH v3 01/20] virtio: mmio-v1: Validate queue PFN

2018-06-29 Thread Michael S. Tsirkin
ply miss out a proper link > to the other side of the queue. > > Add a check to validate the PFN, rather than silently breaking > the devices. > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: Peter Maydel &g

Re: [PATCH v2 0/5] Add virtio-iommu driver

2018-06-27 Thread Michael S. Tsirkin
On Wed, Jun 27, 2018 at 07:04:46PM +0100, Jean-Philippe Brucker wrote: > On 26/06/18 19:07, Michael S. Tsirkin wrote: > > So as I pointed out new virtio 0 device isn't really welcome ;) > > Agreed, virtio-iommu is expected to be implemented on virtio 1 and > later. I'll rem

Re: [PATCH v2 0/5] Add virtio-iommu driver

2018-06-26 Thread Michael S. Tsirkin
On Thu, Jun 21, 2018 at 08:06:50PM +0100, Jean-Philippe Brucker wrote: > Implement the base virtio-iommu driver, following version 0.7 of the > specification [1]. > > Changes since last version [2]: > * Address comments, thanks again for the review. > * As suggested, add a DT binding description

Re: [PATCH v2 3/5] iommu/virtio: Add probe request

2018-06-21 Thread Michael S. Tsirkin
On Thu, Jun 21, 2018 at 08:06:53PM +0100, Jean-Philippe Brucker wrote: > When the device offers the probe feature, send a probe request for each > device managed by the IOMMU. Extract RESV_MEM information. When we > encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. > This will

Re: [PATCH v2 2/5] iommu: Add virtio-iommu driver

2018-06-21 Thread Michael S. Tsirkin
On Thu, Jun 21, 2018 at 08:06:52PM +0100, Jean-Philippe Brucker wrote: > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio-mmio transport without emulating > page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP >

Re: [PATCH] vhost: Fix vhost_copy_to_user()

2018-04-11 Thread Michael S. Tsirkin
f-by: Eric Auger <eric.au...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com> > --- > > This fixes a stall observed when running an aarch64 guest with > virtual smmu > --- > drivers/vhost/vhost.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH v2 01/17] virtio: mmio-v1: Validate queue PFN

2018-03-27 Thread Michael S. Tsirkin
ply miss out a proper link > to the other side of the queue. > > Add a check to validate the PFN, rather than silently breaking > the devices. > > Cc: "Michael S. Tsirkin" <m...@redhat.com> > Cc: Jason Wang <jasow...@redhat.com> > Cc: Marc Zyngier <m

Re: [PATCH 1/4] iommu: Add virtio-iommu driver

2018-02-27 Thread Michael S. Tsirkin
On Thu, Feb 22, 2018 at 11:04:30AM +, Jean-Philippe Brucker wrote: > On 21/02/18 20:12, kbuild test robot wrote: > [...] > > config: arm64-allmodconfig (attached as .config) > [...] > >aarch64-linux-gnu-ld: arch/arm64/kernel/head.o: relocation > > R_AARCH64_ABS32 against

Re: [PATCH v1 01/16] virtio: Validate queue pfn for 32bit transports

2018-01-10 Thread Michael S. Tsirkin
On Wed, Jan 10, 2018 at 10:54:09AM +, Suzuki K Poulose wrote: > On 09/01/18 23:29, Michael S. Tsirkin wrote: > > On Tue, Jan 09, 2018 at 07:03:56PM +, Suzuki K Poulose wrote: > > > virtio-mmio using virtio-v1 and virtio legacy pci use a 32bit PFN > > > for

Re: [PATCH v1 01/16] virtio: Validate queue pfn for 32bit transports

2018-01-09 Thread Michael S. Tsirkin
ge size), we simply miss out a proper link to the other side of > the queue. > > Add a check to validate the PFN, rather than silently breaking > the devices. > > Cc: "Michael S. Tsirkin" <m...@redhat.com> > Cc: Jason Wang <jasow...@redhat.com> > Cc:

Re: [PATCH v3 1/4] ACPI: Add APEI GHES Table Generation support

2017-05-12 Thread Michael S. Tsirkin
On Sun, Apr 30, 2017 at 01:35:03PM +0800, Dongjiu Geng wrote: > This implements APEI GHES Table by passing the error cper info > to the guest via a fw_cfg_blob. After a CPER info is added, an > SEA/SEI exception will be injected into the guest OS. > > Below is the table layout, the max number of

Re: [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 03:36:59PM +0200, Laszlo Ersek wrote: > On 03/29/17 14:51, Michael S. Tsirkin wrote: > > On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote: > >> (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come > >> through a

Re: [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 01:58:29PM +0200, Laszlo Ersek wrote: > (8) When QEMU gets SIGBUS from the kernel -- I hope that's going to come > through a signalfd -- QEMU can format the CPER right into guest memory, > and then inject whatever interrupt (or assert whatever GPIO line) is > necessary for

[PATCH for-4.5] arm/kvm: fix ioctl error handling

2016-02-28 Thread Michael S. Tsirkin
Calling return copy_to_user(...) in an ioctl will not do the right thing if there's a pagefault: copy_to_user returns the number of bytes not copied in this case. Fix up kvm to do return copy_to_user(...)) ? -EFAULT : 0; everywhere. Cc: sta...@vger.kernel.org Signed-off-by: Michael S

Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-09 Thread Michael S. Tsirkin
On Thu, Jul 09, 2015 at 02:57:33PM +0200, Paolo Bonzini wrote: On 09/07/2015 11:48, Laurent Vivier wrote: On 09/07/2015 09:49, Thomas Huth wrote: The option for supporting cross-endianness legacy guests in the vhost and tun code should only be available on systems that support

Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-14 Thread Michael S. Tsirkin
On Thu, May 14, 2015 at 03:32:10PM +0200, Laszlo Ersek wrote: On 05/14/15 15:00, Andrew Jones wrote: On Thu, May 14, 2015 at 01:38:11PM +0100, Peter Maydell wrote: On 14 May 2015 at 13:28, Paolo Bonzini pbonz...@redhat.com wrote: Well, PCI BARs are generally MMIO resources, and hence should