Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Jiri Pirko
Tue, Feb 27, 2018 at 10:41:49PM CET, kubak...@wp.pl wrote: >On Tue, 27 Feb 2018 13:16:21 -0800, Alexander Duyck wrote: >> Basically we need some sort of PCI or PCIe topology mapping for the >> devices that can be translated into something we can communicate over >> the communication channel. > >Hm

[PATCH v2 1/6] jailhouse: Provide detection for non-x86 systems

2018-02-27 Thread Jan Kiszka
From: Jan Kiszka Implement jailhouse_paravirt() via device tree probing on architectures != x86. Will be used by the PCI core. CC: Rob Herring CC: Mark Rutland Signed-off-by: Jan Kiszka --- Documentation/devicetree/bindings/jailhouse.txt | 8 arch/x86/include/asm/jailhouse_para.h

[PATCH v2 0/6] jailhouse: Enhance secondary Jailhouse guest support /wrt PCI

2018-02-27 Thread Jan Kiszka
Basic x86 support [1] for running Linux as secondary Jailhouse [2] guest is currently pending in the tip tree. This builds on top and enhances the PCI support for x86 and also ARM guests (ARM[64] does not require platform patches and works already). Key elements of this series are: - detection of

[PATCH v2 3/6] x86/jailhouse: Enable PCI mmconfig access in inmates

2018-02-27 Thread Jan Kiszka
From: Otavio Pontes Use the PCI mmconfig base address exported by jailhouse in boot parameters in order to access the memory mapped PCI configuration space. Signed-off-by: Otavio Pontes [Jan: rebased, fixed !CONFIG_PCI_MMCONFIG] Signed-off-by: Jan Kiszka --- arch/x86/include/asm/pci_x86.h | 2

[PATCH v2 4/6] x86: Consolidate PCI_MMCONFIG configs

2018-02-27 Thread Jan Kiszka
From: Jan Kiszka Not sure if those two worked by design or just by chance so far. In any case, it's at least cleaner and clearer to express this in a single config statement. Signed-off-by: Jan Kiszka --- arch/x86/Kconfig | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --g

[PATCH v2 2/6] PCI: Scan all functions when running over Jailhouse

2018-02-27 Thread Jan Kiszka
From: Jan Kiszka Per PCIe r4.0, sec 7.5.1.1.9, multi-function devices are required to have a function 0. Therefore, Linux scans for devices at function 0 (devfn 0/8/16/...) and only scans for other functions if function 0 has its Multi-Function Device bit set or ARI or SR-IOV indicate there are

[PATCH v2 5/6] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI

2018-02-27 Thread Jan Kiszka
From: Jan Kiszka Jailhouse does not use ACPI, but it does support MMCONFIG. Make sure the latter can be built without having to enable ACPI as well. Primarily, we need to make the AMD mmconf-fam10h_64 depend upon MMCONFIG and ACPI, instead of just the former. Saves some bytes in the Jailhouse no

[PATCH v2 6/6] MAINTAINERS: Add entry for Jailhouse

2018-02-27 Thread Jan Kiszka
From: Jan Kiszka Signed-off-by: Jan Kiszka --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 93a12af4f180..4b889f282c77 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7521,6 +7521,13 @@ Q: http://patchwork.linuxtv.org/project/linux

Re: [PATCH RFC 2/2] vhost: packed ring support

2018-02-27 Thread Jason Wang
On 2018年02月27日 17:03, Tiwei Bie wrote: On Wed, Feb 14, 2018 at 10:37:09AM +0800, Jason Wang wrote: [...] +static void set_desc_used(struct vhost_virtqueue *vq, + struct vring_desc_packed *desc, bool wrap_counter) +{ + __virtio16 flags = desc->flags; + + if (

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Jakub Kicinski
On Tue, 27 Feb 2018 13:16:21 -0800, Alexander Duyck wrote: > Basically we need some sort of PCI or PCIe topology mapping for the > devices that can be translated into something we can communicate over > the communication channel. Hm. This is probably a completely stupid idea, but if we need to s

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 09:49:59AM +0100, Jiri Pirko wrote: > Now the question is: is it possible to merge the demands you have and > the generic needs I described into a single solution? From what I see, > that would be quite hard/impossible. So at the end, I think that we have > to end-up with 2

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 01:16:21PM -0800, Alexander Duyck wrote: > The other thing I am looking at is trying to find a good way to do > dirty page tracking in the hypervisor using something like a > para-virtual IOMMU. However I don't have any ETA on that as I am just > starting out and have limite

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Alexander Duyck
On Tue, Feb 27, 2018 at 12:49 AM, Jiri Pirko wrote: > Tue, Feb 20, 2018 at 05:04:29PM CET, alexander.du...@gmail.com wrote: >>On Tue, Feb 20, 2018 at 2:42 AM, Jiri Pirko wrote: >>> Fri, Feb 16, 2018 at 07:11:19PM CET, sridhar.samudr...@intel.com wrote: Patch 1 introduces a new feature bit VIR

Re: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread Michael S. Tsirkin
On Tue, Feb 27, 2018 at 09:54:58AM +0100, Jens Freimann wrote: > On Fri, Feb 23, 2018 at 07:18:00PM +0800, Tiwei Bie wrote: > > Signed-off-by: Tiwei Bie > > --- > > include/uapi/linux/virtio_config.h | 18 +- > > include/uapi/linux/virtio_ring.h | 68 > > +

CFP PECCS 2018 - 8th Int.l Joint Conf. on Pervasive and Embedded Computing and Communication Systems (Porto/Portugal)

2018-02-27 Thread pe...@insticc.info
SUBMISSION DEADLINE 8th International Joint Conference on Pervasive and Embedded Computing and Communication Systems Submission Deadline: March 13, 2018 http://www.peccs.org/ July 29 - 30, 2018 Porto, Portugal. In Cooperation with EUROMICRO. A short list of presented papers will be sele

Re: [PATCH 2/6] pci: Scan all functions when probing while running over Jailhouse

2018-02-27 Thread Andy Shevchenko
On Tue, Feb 27, 2018 at 9:22 AM, Jan Kiszka wrote: > On 2018-02-23 14:23, Andy Shevchenko wrote: >> On Mon, Jan 22, 2018 at 8:12 AM, Jan Kiszka wrote: >>> #include >>> #include >>> #include >>> +#include >> >> Ditto. >> > > Despite the context suggesting it, this file has no ordering. At

Re: [PATCH 4/6] x86: Consolidate PCI_MMCONFIG configs

2018-02-27 Thread Andy Shevchenko
On Tue, Feb 27, 2018 at 9:19 AM, Jan Kiszka wrote: > On 2018-01-28 18:26, Andy Shevchenko wrote: >> On Mon, Jan 22, 2018 at 8:12 AM, Jan Kiszka wrote: >>> From: Jan Kiszka >>> >>> Not sure if those two worked by design or just by chance so far. In any >>> case, it's at least cleaner and clearer

Re: [PATCH] virtio_balloon: export huge page allocation statistics

2018-02-27 Thread Michael S. Tsirkin
On Fri, Feb 16, 2018 at 09:44:32PM -0800, Jonathan Helman wrote: > Export statistics for successful and failed huge page allocations > from the virtio balloon driver. These 2 stats come directly from > the vm_events HTLB_BUDDY_PGALLOC and HTLB_BUDDY_PGALLOC_FAIL. > Signed-off-by: Jonathan Helman

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 `_kernel_offset_le

Re: v4.16-rc2: virtio-block + ext4 lockdep splats / sleeping from invalid context

2018-02-27 Thread Mark Rutland
On Mon, Feb 26, 2018 at 01:44:55PM +0100, Jan Kara wrote: > On Mon 26-02-18 11:38:19, Mark Rutland wrote: > > That seems to be it! > > > > With the below patch applied, I can't trigger the bug after ~10 minutes, > > whereas prior to the patch I can trigger it in ~10 seconds. I'll leave > > that ru

Re: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread Tiwei Bie
On Tue, Feb 27, 2018 at 09:54:58AM +0100, Jens Freimann wrote: > On Fri, Feb 23, 2018 at 07:18:00PM +0800, Tiwei Bie wrote: [...] > > > > +struct vring_packed_desc_event { > > + /* Descriptor Event Offset */ > > + __virtio16 desc_event_off : 15, > > + /* Descriptor Event Wrap Counter */ >

Re: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread Tiwei Bie
On Tue, Feb 27, 2018 at 09:26:27AM +, David Laight wrote: > From: Tiwei Bie > > Sent: 23 February 2018 11:18 > ... > > +struct vring_packed_desc_event { > > + /* Descriptor Event Offset */ > > + __virtio16 desc_event_off : 15, > > + /* Descriptor Event Wrap Counter */ > > +

RE: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread David Laight
From: Tiwei Bie > Sent: 23 February 2018 11:18 ... > +struct vring_packed_desc_event { > + /* Descriptor Event Offset */ > + __virtio16 desc_event_off : 15, > + /* Descriptor Event Wrap Counter */ > +desc_event_wrap : 1; > + /* Descriptor Event Flags */ > + __

Re: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread Jens Freimann
On Tue, Feb 27, 2018 at 09:54:58AM +0100, Jens Freimann wrote: On Fri, Feb 23, 2018 at 07:18:00PM +0800, Tiwei Bie wrote: Signed-off-by: Tiwei Bie --- include/uapi/linux/virtio_config.h | 18 +- include/uapi/linux/virtio_ring.h | 68 ++ 2 files change

Re: [PATCH RFC 2/2] vhost: packed ring support

2018-02-27 Thread Tiwei Bie
On Wed, Feb 14, 2018 at 10:37:09AM +0800, Jason Wang wrote: [...] > +static void set_desc_used(struct vhost_virtqueue *vq, > + struct vring_desc_packed *desc, bool wrap_counter) > +{ > + __virtio16 flags = desc->flags; > + > + if (wrap_counter) { > + desc->

Re: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread Jens Freimann
On Fri, Feb 23, 2018 at 07:18:00PM +0800, Tiwei Bie wrote: Signed-off-by: Tiwei Bie --- include/uapi/linux/virtio_config.h | 18 +- include/uapi/linux/virtio_ring.h | 68 ++ 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/include/uapi/li

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Jiri Pirko
Tue, Feb 20, 2018 at 05:04:29PM CET, alexander.du...@gmail.com wrote: >On Tue, Feb 20, 2018 at 2:42 AM, Jiri Pirko wrote: >> Fri, Feb 16, 2018 at 07:11:19PM CET, sridhar.samudr...@intel.com wrote: >>>Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be >>>used by hypervisor to indi

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-27 Thread Jiri Pirko
Tue, Feb 27, 2018 at 02:18:12AM CET, m...@redhat.com wrote: >On Mon, Feb 26, 2018 at 05:02:18PM -0800, Stephen Hemminger wrote: >> On Mon, 26 Feb 2018 08:19:24 +0100 >> Jiri Pirko wrote: >> >> > Sat, Feb 24, 2018 at 12:59:04AM CET, step...@networkplumber.org wrote: >> > >On Thu, 22 Feb 2018 13:30