Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Alexander Duyck
On Fri, Apr 17, 2020 at 3:09 AM David Hildenbrand wrote: > > > What do you call "hinting ends" though? The fact we put > > a page in the VQ is not a guarantee that it's been consumed > > by the hypervisor. > > > > I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. The key bit

Re: improve use_mm / unuse_mm v2

2020-04-17 Thread Jens Axboe
On 4/15/20 11:31 PM, Christoph Hellwig wrote: > Hi all, > > this series improves the use_mm / unuse_mm interface by better > documenting the assumptions, and my taking the set_fs manipulations > spread over the callers into the core API. > > Changes since v1: > - drop a few patches > - fix a co

Re: [PATCH 05/70] x86/insn: Make inat-tables.c suitable for pre-decompression code

2020-04-17 Thread Joerg Roedel
On Fri, Apr 17, 2020 at 09:50:00PM +0900, Masami Hiramatsu wrote: > On Thu, 16 Apr 2020 17:24:06 +0200 > Joerg Roedel wrote: > Ah, I got it. So you intended to port the instruction decoder to > pre-decompression boot code, correct? Right, it is needed there to decode instructions which cause #VC

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
On 17.04.20 13:02, Michael S. Tsirkin wrote: > On Fri, Apr 17, 2020 at 12:31:14PM +0200, David Hildenbrand wrote: >> On 17.04.20 12:29, Michael S. Tsirkin wrote: >>> On Fri, Apr 17, 2020 at 12:26:24PM +0200, David Hildenbrand wrote: On 17.04.20 12:19, Michael S. Tsirkin wrote: > On Fri, Ap

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 12:31:14PM +0200, David Hildenbrand wrote: > On 17.04.20 12:29, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 12:26:24PM +0200, David Hildenbrand wrote: > >> On 17.04.20 12:19, Michael S. Tsirkin wrote: > >>> On Fri, Apr 17, 2020 at 12:09:38PM +0200, David Hildenbran

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
On 17.04.20 12:29, Michael S. Tsirkin wrote: > On Fri, Apr 17, 2020 at 12:26:24PM +0200, David Hildenbrand wrote: >> On 17.04.20 12:19, Michael S. Tsirkin wrote: >>> On Fri, Apr 17, 2020 at 12:09:38PM +0200, David Hildenbrand wrote: > What do you call "hinting ends" though? The fact we put >>

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 12:26:24PM +0200, David Hildenbrand wrote: > On 17.04.20 12:19, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 12:09:38PM +0200, David Hildenbrand wrote: > >> > What do you call "hinting ends" though? The fact we put > >>> a page in the VQ is not a guarantee that it'

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
On 17.04.20 12:19, Michael S. Tsirkin wrote: > On Fri, Apr 17, 2020 at 12:09:38PM +0200, David Hildenbrand wrote: >> > What do you call "hinting ends" though? The fact we put >>> a page in the VQ is not a guarantee that it's been consumed >>> by the hypervisor. >>> >> >> I'd say hinting ends once

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 12:09:38PM +0200, David Hildenbrand wrote: > > What do you call "hinting ends" though? The fact we put > > a page in the VQ is not a guarantee that it's been consumed > > by the hypervisor. > > > > I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. Ca

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
> What do you call "hinting ends" though? The fact we put > a page in the VQ is not a guarantee that it's been consumed > by the hypervisor. > I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. > > I think a strict definition is this: > - hint includes a command ID > - hint

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 11:51:31AM +0200, David Hildenbrand wrote: > > >>> I'll need to think about this. > >>> We need to remember that the whole HINT thing is not a mandate for host to > >>> corrupt memory. It's just some info about page use guest > >>> gives host. If host corrupts memory it's b

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
>>> I'll need to think about this. >>> We need to remember that the whole HINT thing is not a mandate for host to >>> corrupt memory. It's just some info about page use guest >>> gives host. If host corrupts memory it's broken ... >> >> I don't think that's true, > > Do you refer to "If host cor

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午5:38, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 05:33:56PM +0800, Jason Wang wrote: On 2020/4/17 下午5:01, Michael S. Tsirkin wrote: There could be some misunderstanding here. I thought it's somehow similar: a CONFIG_VHOST_MENU=y will be left in the defconfigs even if CONF

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 05:33:56PM +0800, Jason Wang wrote: > > On 2020/4/17 下午5:01, Michael S. Tsirkin wrote: > > > There could be some misunderstanding here. I thought it's somehow > > > similar: a > > > CONFIG_VHOST_MENU=y will be left in the defconfigs even if CONFIG_VHOST is > > > not set. >

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午5:01, Michael S. Tsirkin wrote: There could be some misunderstanding here. I thought it's somehow similar: a CONFIG_VHOST_MENU=y will be left in the defconfigs even if CONFIG_VHOST is not set. Thanks BTW do entries with no prompt actually appear in defconfig? Yes. I can see

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午5:25, Geert Uytterhoeven wrote: Hi Michael, On Fri, Apr 17, 2020 at 10:57 AM Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: On 20

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Geert Uytterhoeven
Hi Michael, On Fri, Apr 17, 2020 at 10:57 AM Michael S. Tsirkin wrote: > On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: > > > On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > > > On 2020/4/17 下午4:29, Michael S. Tsirkin

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 11:07:38AM +0200, David Hildenbrand wrote: > On 17.04.20 10:50, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 09:49:03AM +0200, David Hildenbrand wrote: > >> On 17.04.20 08:28, Michael S. Tsirkin wrote: > >>> On Thu, Apr 16, 2020 at 04:52:42PM -0700, Alexander Duyck

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
On 17.04.20 10:50, Michael S. Tsirkin wrote: > On Fri, Apr 17, 2020 at 09:49:03AM +0200, David Hildenbrand wrote: >> On 17.04.20 08:28, Michael S. Tsirkin wrote: >>> On Thu, Apr 16, 2020 at 04:52:42PM -0700, Alexander Duyck wrote: On Thu, Apr 16, 2020 at 3:13 PM Michael S. Tsirkin wrote:

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > > On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: > > > > On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: >

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > > On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: > > > > On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: >

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 11:12:1

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 09:49:03AM +0200, David Hildenbrand wrote: > On 17.04.20 08:28, Michael S. Tsirkin wrote: > > On Thu, Apr 16, 2020 at 04:52:42PM -0700, Alexander Duyck wrote: > >> On Thu, Apr 16, 2020 at 3:13 PM Michael S. Tsirkin wrote: > >>> > >>> On Thu, Apr 16, 2020 at 12:30:38PM -0700

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: > > > On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: > > > > On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: >

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: On Wed, Apr 15, 2020 at 10:43:5

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: > > On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: > > > On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: > > > > On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: >

Re: [PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 09:04:04AM +0200, Eugenio Perez Martin wrote: > On Fri, Apr 17, 2020 at 12:34 AM Michael S. Tsirkin wrote: > > > > On Thu, Apr 16, 2020 at 09:56:42AM +0200, Eugenio Pérez wrote: > > > This way behavior for vhost is more like a VM. > > > > > > Signed-off-by: Eugenio Pérez

[PATCH v9] virtio: force spec specified alignment on types

2020-04-17 Thread Michael S. Tsirkin
The ring element addresses are passed between components with different alignments assumptions. Thus, if guest/userspace selects a pointer and host then gets and dereferences it, we might need to decrease the compiler-selected alignment to prevent compiler on the host from assuming pointer is align

Re: [virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
On 17.04.20 08:28, Michael S. Tsirkin wrote: > On Thu, Apr 16, 2020 at 04:52:42PM -0700, Alexander Duyck wrote: >> On Thu, Apr 16, 2020 at 3:13 PM Michael S. Tsirkin wrote: >>> >>> On Thu, Apr 16, 2020 at 12:30:38PM -0700, Alexander Duyck wrote: From: Alexander Duyck If we have fre

Re: [PATCH] MAINTAINERS: Update PARAVIRT_OPS_INTERFACE and VMWARE_HYPERVISOR_INTERFACE

2020-04-17 Thread Jürgen Groß
On 17.04.20 08:22, Jürgen Groß wrote: On 17.04.20 01:45, Deep Shah wrote: Thomas Hellstrom will be handing over VMware's maintainership of these interfaces to Deep Shah. Signed-off-by: Deep Shah Acked-by: Thomas Hellstrom Acked-by: Juergen Gross BTW, I can carry this patch through the Xe

Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled

2020-04-17 Thread David Hildenbrand
On 16.04.20 21:30, Alexander Duyck wrote: > From: Alexander Duyck > > If we have free page hinting or page reporting enabled we should disable it > if the pages are poisoned or initialized on free and we cannot notify the > hypervisor. > Please split that up into an actual fix (Fixes:) for free

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: We try to keep the defconfig untouched after decoupling CONFIG_VHOST out of CON