Re: [PATCH 30/51] drm/cirrus: Fully embrace devm_

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:10PM +0100, Daniel Vetter wrote: > With the drm_device lifetime fun cleaned up there's nothing in the way > anymore to use devm_ for everything hw releated. Do it, and in the > process, throw out the entire onion unwinding. Acked-by: Gerd Hoffmann

Re: [PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:09PM +0100, Daniel Vetter wrote: > We can even delete the drm_driver.release hook now! > > This is made possible by a preceeding patch which added a drmm_ > cleanup action to drm_mode_config_init(), hence all we need to do to > ensure that drm_mode_config_cleanup()

Re: [PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:26:08PM +0100, Daniel Vetter wrote: > Instead rely on the automatic clean, for which we just need to check > that drm_mode_config_init succeeded. To avoid an inversion in the > cleanup we also have to move the dev_private allocation over to > drmm_kzalloc. > > This is

Re: [PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree

2020-03-02 Thread Gerd Hoffmann
> @@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev, > > dev = >dev; > ret = drm_dev_init(dev, _driver, >dev); > - if (ret) > - goto err_free_cirrus; > + if (ret) { > + kfree(cirrus); > + goto err_pci_release; > + }

Re: [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 11:25:47PM +0100, Daniel Vetter wrote: > With this we can drop the final kfree from the release function. Acked-by: Gerd Hoffmann > > Signed-off-by: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualization@lists.linux-foundation.org > Cc:

Re: [PATCH] drm/bochs: Remove vga write

2020-03-02 Thread Gerd Hoffmann
On Mon, Mar 02, 2020 at 02:14:02PM -0800, Alistair Francis wrote: > On Fri, Feb 28, 2020 at 1:57 AM Gerd Hoffmann wrote: > > > > On Thu, Feb 27, 2020 at 01:04:54PM -0800, Alistair Francis wrote: > > > The QEMU model for the Bochs display has no VGA memory section at offset > > > 0x400 [1]. By

Re: [PATCH v11 00/11] x86: PIE support to extend KASLR randomization

2020-03-02 Thread Kees Cook
On Thu, Feb 27, 2020 at 04:00:45PM -0800, Thomas Garnier wrote: > Minor changes based on feedback and rebase from v10. > > Splitting the previous serie in two. This part contains assembly code > changes required for PIE but without any direct dependencies with the > rest of the patchset. > >

Re: [PATCH v1 02/11] virtio-mem: Paravirtualized memory hotplug

2020-03-02 Thread kbuild test robot
Hi David, I love your patch! Yet something to improve: [auto build test ERROR on pm/linux-next] [also build test ERROR on linus/master v5.6-rc4 next-20200302] [cannot apply to linux/master mmotm/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve

[PATCH 30/51] drm/cirrus: Fully embrace devm_

2020-03-02 Thread Daniel Vetter
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc:

[PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call

2020-03-02 Thread Daniel Vetter
We can even delete the drm_driver.release hook now! This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for

[PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup

2020-03-02 Thread Daniel Vetter
Instead rely on the automatic clean, for which we just need to check that drm_mode_config_init succeeded. To avoid an inversion in the cleanup we also have to move the dev_private allocation over to drmm_kzalloc. This is made possible by a preceeding patch which added a drmm_ cleanup action to

[PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. I also noticed that cirrus forgot to call drm_dev_fini(). v2: Don't call kfree(cirrus) after we've handed overship of that to drm_device and the drmm_ stuff. Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Dave Airlie

[PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

Re: [PATCH] drm/bochs: Remove vga write

2020-03-02 Thread Alistair Francis
On Fri, Feb 28, 2020 at 1:57 AM Gerd Hoffmann wrote: > > On Thu, Feb 27, 2020 at 01:04:54PM -0800, Alistair Francis wrote: > > The QEMU model for the Bochs display has no VGA memory section at offset > > 0x400 [1]. By writing to this register Linux can create a write to > > unassigned memory

Re: [PATCH v1 06/11] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-03-02 Thread David Hildenbrand
On 02.03.20 18:40, Alexander Duyck wrote: > Reviewed-by: Alexander Duyck Thanks a lot Alex! -- Thanks, David / dhildenb ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH v1 00/11] virtio-mem: paravirtualized memory

2020-03-02 Thread David Hildenbrand
On 02.03.20 19:29, Michal Hocko wrote: > On Mon 02-03-20 19:15:09, David Hildenbrand wrote: > [...] >> As requested by Michal, I will squash some patches. > > Just to clarify. If I am the only one to care then do not bother. Oh, I do bother about your review comments a lot :) And pulling out the

Re: [PATCH v1 00/11] virtio-mem: paravirtualized memory

2020-03-02 Thread Michal Hocko
On Mon 02-03-20 19:15:09, David Hildenbrand wrote: [...] > As requested by Michal, I will squash some patches. Just to clarify. If I am the only one to care then do not bother. Btw. I still have patch 6 on the todo list to review. I just didn't find time for it today. -- Michal Hocko SUSE Labs

Re: [PATCH v1 00/11] virtio-mem: paravirtualized memory

2020-03-02 Thread David Hildenbrand
On 02.03.20 14:49, David Hildenbrand wrote: > This series is based on latest linux-next. The patches are located at: > https://github.com/davidhildenbrand/linux.git virtio-mem-v1 > > The basic idea of virtio-mem is to provide a flexible, > cross-architecture memory hot(un)plug solution that

Re: [virtio-dev] [PATCH v2 4/4] drm/virtio: Support virtgpu exported resources

2020-03-02 Thread Gurchetan Singh
On Mon, Mar 2, 2020 at 4:15 AM David Stevens wrote: > > Add support for UUID-based resource sharing mechanism to virtgpu. This > implements the new virtgpu commands and hooks them up to dma-buf's > get_uuid callback. > > Signed-off-by: David Stevens > --- > drivers/gpu/drm/virtio/virtgpu_drv.c

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-02 Thread Joerg Roedel
On Fri, Feb 28, 2020 at 06:25:36PM +0100, Jean-Philippe Brucker wrote: > This solution isn't elegant nor foolproof, but is the best we can do at > the moment and works with existing virtio-iommu implementations. It also > enables an IOMMU for lightweight hypervisors that do not rely on > firmware

Re: [PATCH v1 08/11] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-03-02 Thread Michal Hocko
On Mon 02-03-20 14:49:38, David Hildenbrand wrote: > virtio-mem wants to offline and remove a memory block once it unplugged > all subblocks (e.g., using alloc_contig_range()). Let's provide > an interface to do that from a driver. virtio-mem already supports to > offline partially unplugged

Re: [PATCH v1 04/11] mm: Export alloc_contig_range() / free_contig_range()

2020-03-02 Thread David Hildenbrand
On 02.03.20 15:05, Michal Hocko wrote: > On Mon 02-03-20 14:49:34, David Hildenbrand wrote: >> A virtio-mem device wants to allocate memory from the memory region it >> manages in order to unplug it in the hypervisor - similar to >> a balloon driver. Also, it might want to plug previously

Re: [PATCH v1 01/11] ACPI: NUMA: export pxm_to_node

2020-03-02 Thread David Hildenbrand
On 02.03.20 15:03, Michal Hocko wrote: > On Mon 02-03-20 14:49:31, David Hildenbrand wrote: >> Will be needed by virtio-mem to identify the node from a pxm. > > No objection to export the symbol. But it is almost always better to add > the export in the patch that actually uses it. The intention

Re: [PATCH v1 04/11] mm: Export alloc_contig_range() / free_contig_range()

2020-03-02 Thread Michal Hocko
On Mon 02-03-20 14:49:34, David Hildenbrand wrote: > A virtio-mem device wants to allocate memory from the memory region it > manages in order to unplug it in the hypervisor - similar to > a balloon driver. Also, it might want to plug previously unplugged > (allocated) memory and give it back to

Re: [PATCH v1 01/11] ACPI: NUMA: export pxm_to_node

2020-03-02 Thread Michal Hocko
On Mon 02-03-20 14:49:31, David Hildenbrand wrote: > Will be needed by virtio-mem to identify the node from a pxm. No objection to export the symbol. But it is almost always better to add the export in the patch that actually uses it. The intention is much more clear that way. > Acked-by:

[PATCH v1 10/11] virtio-mem: Better retry handling

2020-03-02 Thread David Hildenbrand
Let's start with a retry interval of 30 seconds and double the time until we reach 30 minutes, in case we keep getting errors. Reset the retry interval in case we succeeded. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Oscar Salvador Cc: Michal Hocko Cc: Igor Mammedov Cc: Dave Young Cc:

[PATCH v1 11/11] MAINTAINERS: Add myself as virtio-mem maintainer

2020-03-02 Thread David Hildenbrand
Let's make sure patches/bug reports find the right person. Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1636ce4613e3..fc7371c4b7eb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v1 09/11] virtio-mem: Offline and remove completely unplugged memory blocks

2020-03-02 Thread David Hildenbrand
Let's offline+remove memory blocks once all subblocks are unplugged. We can use the new Linux MM interface for that. As no memory is in use anymore, this shouldn't take a long time and shouldn't fail. There might be corner cases where the offlining could still fail (especially, if another notifier

[PATCH v1 07/11] virtio-mem: Allow to offline partially unplugged memory blocks

2020-03-02 Thread David Hildenbrand
Dropping the reference count of PageOffline() pages allows offlining code to skip them. However, we also have to convert PG_reserved to another flag - let's use PG_dirty - so has_unmovable_pages() will properly handle them. PG_reserved pages get detected as unmovable right away. We need the flag

[PATCH v1 06/11] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-03-02 Thread David Hildenbrand
virtio-mem wants to allow to offline memory blocks of which some parts were unplugged (allocated via alloc_contig_range()), especially, to later offline and remove completely unplugged memory blocks. The important part is that PageOffline() has to remain set until the section is offline, so these

[PATCH v1 08/11] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-03-02 Thread David Hildenbrand
virtio-mem wants to offline and remove a memory block once it unplugged all subblocks (e.g., using alloc_contig_range()). Let's provide an interface to do that from a driver. virtio-mem already supports to offline partially unplugged memory blocks. Offlining a fully unplugged memory block will not

[PATCH v1 04/11] mm: Export alloc_contig_range() / free_contig_range()

2020-03-02 Thread David Hildenbrand
A virtio-mem device wants to allocate memory from the memory region it manages in order to unplug it in the hypervisor - similar to a balloon driver. Also, it might want to plug previously unplugged (allocated) memory and give it back to Linux. alloc_contig_range() / free_contig_range() seem to be

[PATCH v1 05/11] virtio-mem: Paravirtualized memory hotunplug part 2

2020-03-02 Thread David Hildenbrand
We can use alloc_contig_range() to try to unplug subblocks. Unplugged blocks will be marked PG_offline, however, don't have the PG_reserved flag set. This way, we can differentiate these allocated subblocks from subblocks that were never onlined and handle them properly in

[PATCH v1 02/11] virtio-mem: Paravirtualized memory hotplug

2020-03-02 Thread David Hildenbrand
Each virtio-mem device owns exactly one memory region. It is responsible for adding/removing memory from that memory region on request. When the device driver starts up, the requested amount of memory is queried and then plugged to Linux. On request, further memory can be plugged or unplugged.

[PATCH v1 03/11] virtio-mem: Paravirtualized memory hotunplug part 1

2020-03-02 Thread David Hildenbrand
Unplugging subblocks of memory blocks that are offline is easy. All we have to do is watch out for concurrent onlining activity. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Oscar Salvador Cc: Michal Hocko Cc: Igor Mammedov Cc: Dave Young Cc: Andrew Morton Cc: Dan Williams Cc: Pavel

[PATCH v1 01/11] ACPI: NUMA: export pxm_to_node

2020-03-02 Thread David Hildenbrand
Will be needed by virtio-mem to identify the node from a pxm. Acked-by: "Rafael J. Wysocki" Cc: Len Brown Cc: linux-a...@vger.kernel.org Signed-off-by: David Hildenbrand --- drivers/acpi/numa/srat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/numa/srat.c

[PATCH v1 00/11] virtio-mem: paravirtualized memory

2020-03-02 Thread David Hildenbrand
This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v1 The basic idea of virtio-mem is to provide a flexible, cross-architecture memory hot(un)plug solution that avoids many limitations imposed by existing

Re: [PATCH RFC v4 08/13] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-03-02 Thread David Hildenbrand
On 02.03.20 13:48, Michal Hocko wrote: > On Tue 25-02-20 15:27:28, David Hildenbrand wrote: >> On 25.02.20 15:11, Michal Hocko wrote: >>> On Thu 12-12-19 18:11:32, David Hildenbrand wrote: virtio-mem wants to offline and remove a memory block once it unplugged all subblocks (e.g., using

Re: [PATCH RFC v4 08/13] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-03-02 Thread Michal Hocko
On Tue 25-02-20 15:27:28, David Hildenbrand wrote: > On 25.02.20 15:11, Michal Hocko wrote: > > On Thu 12-12-19 18:11:32, David Hildenbrand wrote: > >> virtio-mem wants to offline and remove a memory block once it unplugged > >> all subblocks (e.g., using alloc_contig_range()). Let's provide > >>

[PATCH v4 0/3] virtio-net: introduce features defined in the spec

2020-03-02 Thread Yuri Benditovich
This series introduce virtio-net features VIRTIO_NET_F_RSC_EXT, VIRTIO_NET_F_RSS and VIRTIO_NET_F_HASH_REPORT. Changes from v3: reformatted structure in patch 1 Yuri Benditovich (3): virtio-net: Introduce extended RSC feature virtio-net: Introduce RSS receive steering feature virtio-net:

[PATCH v4 1/3] virtio-net: Introduce extended RSC feature

2020-03-02 Thread Yuri Benditovich
VIRTIO_NET_F_RSC_EXT feature bit indicates that the device is able to provide extended RSC information. When the feature is negotiatede and 'gso_type' field in received packet is not GSO_NONE, the device reports number of coalesced packets in 'csum_start' field and number of duplicated acks in

[PATCH v4 2/3] virtio-net: Introduce RSS receive steering feature

2020-03-02 Thread Yuri Benditovich
RSS (Receive-side scaling) defines hash calculation rules and decision on receive virtqueue according to the calculated hash, provided mask to apply and provided indirection table containing indices of receive virqueues. The driver sends the control command to enable multiqueue and provide

[PATCH v4 3/3] virtio-net: Introduce hash report feature

2020-03-02 Thread Yuri Benditovich
The feature VIRTIO_NET_F_HASH_REPORT extends the layout of the packet and requests the device to calculate hash on incoming packets and report it in the packet header. Signed-off-by: Yuri Benditovich --- include/uapi/linux/virtio_net.h | 36 + 1 file changed, 36

Re: [PATCH v3 2/3] virtio-net: Introduce RSS receive steering feature

2020-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2020 at 12:58:34PM +0200, Yuri Benditovich wrote: > All the classes of commands are defined without indentation. > All the commands are defined with indentation of 1 space. > Only the last one (VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET at the end of > the file) does not have an

Re: [PATCH v3 2/3] virtio-net: Introduce RSS receive steering feature

2020-03-02 Thread Yuri Benditovich
All the classes of commands are defined without indentation. All the commands are defined with indentation of 1 space. Only the last one (VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET at the end of the file) does not have an indentation. On Mon, Mar 2, 2020 at 12:54 PM Michael S. Tsirkin wrote: > > On Mon,

Re: [PATCH v3 2/3] virtio-net: Introduce RSS receive steering feature

2020-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2020 at 10:53:14AM +0200, Yuri Benditovich wrote: > On Sun, Mar 1, 2020 at 9:58 PM Michael S. Tsirkin wrote: > > > > On Sun, Mar 01, 2020 at 04:33:01PM +0200, Yuri Benditovich wrote: > > > RSS (Receive-side scaling) defines hash calculation > > > rules and decision on receive

Re: [PATCH v3 2/3] virtio-net: Introduce RSS receive steering feature

2020-03-02 Thread Yuri Benditovich
On Sun, Mar 1, 2020 at 9:58 PM Michael S. Tsirkin wrote: > > On Sun, Mar 01, 2020 at 04:33:01PM +0200, Yuri Benditovich wrote: > > RSS (Receive-side scaling) defines hash calculation > > rules and decision on receive virtqueue according to > > the calculated hash, provided mask to apply and > >