Re: [PATCH v10 13/14] vfio-user: handle device interrupts

2022-06-06 Thread Alexander Duyck
On Mon, Jun 6, 2022 at 12:29 PM Jag Raman wrote: > > > > > On Jun 6, 2022, at 2:32 PM, Alexander Duyck > > wrote: > > > > On Tue, May 24, 2022 at 9:11 AM Jagannathan Raman > > wrote: > >> > >> Forward remote device's interru

Re: [PATCH v10 13/14] vfio-user: handle device interrupts

2022-06-06 Thread Alexander Duyck
On Tue, May 24, 2022 at 9:11 AM Jagannathan Raman wrote: > > Forward remote device's interrupts to the guest > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > include/hw/pci/pci.h | 13 >

Re: [RFC PATCH] mpqemu: Remove unlock/lock of iothread in mpqemu-link send and recv functions

2022-05-24 Thread Alexander Duyck
On Mon, May 23, 2022 at 3:56 PM Jag Raman wrote: > > > > > On May 23, 2022, at 11:09 AM, Alexander Duyck > > wrote: > > > > From: Alexander Duyck > > > > When I run Multi-process QEMU with an e1000 as the remote device and SMP > > enabled I

[RFC PATCH] mpqemu: Remove unlock/lock of iothread in mpqemu-link send and recv functions

2022-05-23 Thread Alexander Duyck
From: Alexander Duyck When I run Multi-process QEMU with an e1000 as the remote device and SMP enabled I see the combination lock up and become unresponsive. The QEMU build is a fairly standard x86_64-softmmu setup. After doing some digging I tracked the lockup down to the what appears

Re: [PATCH v1 2/2] virtio-balloon: disallow postcopy with VIRTIO_BALLOON_F_FREE_PAGE_HINT

2021-07-07 Thread Alexander Duyck
On Wed, Jul 7, 2021 at 1:08 PM Peter Xu wrote: > > On Wed, Jul 07, 2021 at 08:57:29PM +0200, David Hildenbrand wrote: > > On 07.07.21 20:02, Peter Xu wrote: > > > On Wed, Jul 07, 2021 at 04:06:55PM +0200, David Hildenbrand wrote: > > > > As it never worked properly, let's disable it via the

Re: [RFC PATCH 1/3] mm: support hugetlb free page reporting

2020-12-23 Thread Alexander Duyck
On Tue, Dec 22, 2020 at 7:39 PM Liang Li wrote: > > > > +hugepage_reporting_cycle(struct page_reporting_dev_info *prdev, > > > +struct hstate *h, unsigned int nid, > > > +struct scatterlist *sgl, unsigned int *offset) > > > +{ > > > + struct

Re: [RFC PATCH 1/3] mm: support hugetlb free page reporting

2020-12-22 Thread Alexander Duyck
duce the memory management overhead and improve system > performance. > This patch add the support for reporting hugepages in the free list > of hugetlb, it canbe used by virtio_balloon driver for memory > overcommit and pre zero out free pages for speeding up memory population. > &g

Re: [PATCH v2] e1000e: Added ICR clearing by corresponding IMS bit.

2020-12-14 Thread Alexander Duyck
So, I've added ICR clearing during read, according to the note by > section 13.3.27 of the 8257X developers manual. > > On Thu, Dec 3, 2020 at 7:57 PM Alexander Duyck > wrote: >> >> On Thu, Dec 3, 2020 at 5:00 AM Andrew Melnychenko wrote: >> > >> > Buglin

Re: [PATCH v2] e1000e: Added ICR clearing by corresponding IMS bit.

2020-12-03 Thread Alexander Duyck
On Thu, Dec 3, 2020 at 5:00 AM Andrew Melnychenko wrote: > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441 So the bugzilla seems to be reporting that the NIC operstate is being misreported when qemu has configured the link down. Based on the description it isn't clear to me how

Re: [PATCH v2] virtio-balloon: always indicate S_DONE when migration fails

2020-07-22 Thread Alexander Duyck
> >>> While at it, add similar locking to virtio_balloon_free_page_done() as > >>> done in virtio_balloon_free_page_stop. Locking is still weird, but that > >>> has to be sorted out separately. > >>> > >>> There is nothing to do in the PRECO

[PATCH v3 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-07-20 Thread Alexander Duyck
From: Alexander Duyck Recently a feature named Free Page Reporting was added to the virtio balloon. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v3 QEMU 1/3] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-07-20 Thread Alexander Duyck
From: Alexander Duyck Based on code review it appears possible for the driver to force the device out of a stopped state when hinting by repeating the last ID it was provided. Prevent this by only allowing a transition to the start state when we are in the requested state. This way the driver

[PATCH v3 QEMU 2/3] virtio-balloon: Add locking to prevent possible race when starting hinting

2020-07-20 Thread Alexander Duyck
From: Alexander Duyck There is already locking in place when we are stopping free page hinting but there is not similar protections in place when we start. I can only assume this was overlooked as in most cases the page hinting should not be occurring when we are starting the hinting, however

[PATCH v3 QEMU 0/3] virtio-balloon: Free page hinting clean-ups

2020-07-20 Thread Alexander Duyck
g Coverity issue Rebased on latest pull of QEMU --- Alexander Duyck (3): virtio-balloon: Prevent guest from starting a report when we didn't request one virtio-balloon: Add locking to prevent possible race when starting hinting virtio-balloon: Replace free page hinting references

[PATCH v2 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-07-06 Thread Alexander Duyck
From: Alexander Duyck Recently a feature named Free Page Reporting was added to the virtio balloon. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v2 2/3] virtio-balloon: Add locking to prevent possible race when starting hinting

2020-07-06 Thread Alexander Duyck
From: Alexander Duyck There is already locking in place when we are stopping free page hinting but there is not similar protections in place when we start. I can only assume this was overlooked as in most cases the page hinting should not be occurring when we are starting the hinting, however

[PATCH v2 0/3] virtio-balloon: Free page hinting clean-ups

2020-07-06 Thread Alexander Duyck
nd clarify which objects are for free page reporting and which are for free page hinting. Changes from v1: Split first patch into two patches as each addresses a separate issue. Added acked-by for first patch. --- Alexander Duyck (3): virtio-balloon: Prevent guest from starting a repo

[PATCH v2 1/3] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-07-06 Thread Alexander Duyck
From: Alexander Duyck Based on code review it appears possible for the driver to force the device out of a stopped state when hinting by repeating the last ID it was provided. Prevent this by only allowing a transition to the start state when we are in the requested state. This way the driver

Re: [PATCH 1/2] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-06-22 Thread Alexander Duyck
On Mon, Jun 22, 2020 at 1:10 AM David Hildenbrand wrote: > > On 19.06.20 23:53, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Based on code review it appears possible for the driver to force the device > > out of a stopped state when hi

[PATCH 2/2] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-19 Thread Alexander Duyck
From: Alexander Duyck Recently a feature named Free Page Reporting was added to the virtio balloon. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH 1/2] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-06-19 Thread Alexander Duyck
From: Alexander Duyck Based on code review it appears possible for the driver to force the device out of a stopped state when hinting by repeating the last ID it was provided. Prevent this by only allowing a transition to the start state when we are in the requested state. This way the driver

[PATCH 0/2] virtio-balloon: Free page hinting clean-ups

2020-06-19 Thread Alexander Duyck
containing the same ID it had submitted earlier. The second patch takes care of renaming various hinting objects that were using "reporting" in the name to try and clarify which objects are for free page reporting and which are for free page hinting. --- Alexander Duyck (2): virt

Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread Alexander Duyck
On Thu, Jun 18, 2020 at 10:10 AM David Hildenbrand wrote: > > >> > >> Ugh, ... > >> > >> @MST, you might have missed that in another discussion, what's your > >> general opinion about removing free page hinting in QEMU (and Linux)? We > >> keep finding issues in the QEMU implementation, including

Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread Alexander Duyck
On Thu, Jun 18, 2020 at 5:54 AM David Hildenbrand wrote: > > On 13.06.20 22:07, Alexander Duyck wrote: > > On Tue, May 26, 2020 at 9:14 PM Alexander Duyck > > wrote: > >> > >> From: Alexander Duyck > >> > >> In an upcoming patch a featu

Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-13 Thread Alexander Duyck
On Tue, May 26, 2020 at 9:14 PM Alexander Duyck wrote: > > From: Alexander Duyck > > In an upcoming patch a feature named Free Page Reporting is about to be > added. In order to avoid any confusion we should drop the use of the word > 'report' when referring to Free Pag

Re: [PATCH v25 QEMU 0/3] virtio-balloon: add support for page poison and free page reporting

2020-06-08 Thread Alexander Duyck
It's been almost 2 weeks since I submitted this. Just thought I would follow up and see if there is any ETA on when this might be applied, or if I missed the need to fix something and resubmit. Thanks. - Alex On Tue, May 26, 2020 at 9:13 PM Alexander Duyck wrote: > > This series pr

[PATCH v25 QEMU 1/3] virtio-balloon: Implement support for page poison reporting feature

2020-05-26 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-05-26 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v25 QEMU 2/3] virtio-balloon: Provide an interface for free page reporting

2020-05-26 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v25 QEMU 0/3] virtio-balloon: add support for page poison and free page reporting

2020-05-26 Thread Alexander Duyck
el headers were synced Added compat machine code for page-poison feature Changes from v24: Moved free page hinting rename to end of set as feature may be removed entirely Added code to cleanup reporting_vq --- Alexander Duyck (3): virtio-balloon: Implement support for page poison reporting

Re: [PATCH v24 QEMU 3/3] virtio-balloon: Provide an interface for free page reporting

2020-05-18 Thread Alexander Duyck
On Fri, May 8, 2020 at 2:30 PM Alexander Duyck wrote: > > From: Alexander Duyck > > Add support for free page reporting. The idea is to function very similar > to how the balloon works in that we basically end up madvising the page as > not being used. However we don't rea

Re: [PATCH v1 3/3] virtio-balloon: unref the iothread when unrealizing

2020-05-18 Thread Alexander Duyck
On Mon, May 18, 2020 at 8:42 AM David Hildenbrand wrote: > > On 18.05.20 17:35, Alexander Duyck wrote: > > On Mon, May 18, 2020 at 1:37 AM David Hildenbrand wrote: > >> > >> We took a reference when realizing, so let's drop that reference when > >> unr

Re: [PATCH v1 3/3] virtio-balloon: unref the iothread when unrealizing

2020-05-18 Thread Alexander Duyck
On Mon, May 18, 2020 at 1:37 AM David Hildenbrand wrote: > > We took a reference when realizing, so let's drop that reference when > unrealizing. > > Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") > Cc: Wei Wang > Cc: Alexander Duyck

Re: [PATCH v1 2/3] virtio-balloon: fix free page hinting check on unrealize

2020-05-18 Thread Alexander Duyck
13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") > Cc: Wei Wang > Cc: Michael S. Tsirkin > Cc: Philippe Mathieu-Daudé > Cc: Alexander Duyck > Signed-off-by: David Hildenbrand > --- > hw/virtio/virtio-balloon.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH v1 1/3] virtio-balloon: fix free page hinting without an iothread

2020-05-18 Thread Alexander Duyck
D_MIN; > +s->free_page_report_notify.notify = > virtio_balloon_free_page_report_notify; > +s->block_iothread = false; > + > object_property_add(obj, "guest-stats", "guest statistics", > balloon_stats_get_all, NULL, NULL, s); > So the one nit I have is that I am not sure you need to bother with initializing block_iothread since it should already be initialized to false/0 shouldn't it? Otherwise this all looks good to me. Reviewed-by: Alexander Duyck

[PATCH v24 QEMU 1/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-05-08 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v24 QEMU 3/3] virtio-balloon: Provide an interface for free page reporting

2020-05-08 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v24 QEMU 2/3] virtio-balloon: Implement support for page poison reporting feature

2020-05-08 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v24 QEMU 0/3] virtio-balloon: add support for page poison reporting and free page reporting

2020-05-08 Thread Alexander Duyck
el headers were synced Added compat machine bits for page-poison feature --- Alexander Duyck (3): virtio-balloon: Replace free page hinting references to 'report' with 'hint' virtio-balloon: Implement support for page poison reporting feature virtio-balloon: Provide an inter

Re: [PATCH v23 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-05-08 Thread Alexander Duyck
that are adding the functionality, or if this patch-set is good as-is? Thanks. - Alex On Mon, Apr 27, 2020 at 5:53 PM Alexander Duyck wrote: > > This series provides an asynchronous means of reporting free guest pages > to QEMU through virtio-balloon so that the memory associated with those &g

[PATCH v23 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v23 QEMU 4/5] virtio-balloon: Implement support for page poison reporting feature

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v23 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v23 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v23 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-27 Thread Alexander Duyck
ches 4 & 5 Added additional comment fixes in patch 3 to remove "reporting" reference Renamed rvq in patch 5 to reporting_vq to improve readability Moved call adding reporting_vq to after free_page_vq to fix VQ ordering --- Alexander Duyck (5): linux-headers:

[PATCH v23 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-27 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-27 Thread Alexander Duyck
On Mon, Apr 27, 2020 at 8:11 AM David Hildenbrand wrote: > > On 27.04.20 17:08, Alexander Duyck wrote: > > On Mon, Apr 27, 2020 at 1:15 AM David Hildenbrand wrote: > >> > >> There is only one wrong comment remaining I think. Something like > >> > >&

Re: [virtio-dev] Re: [PATCH v22 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-27 Thread Alexander Duyck
On Mon, Apr 27, 2020 at 1:21 AM David Hildenbrand wrote: > > Except one minor nit, looks good to me. We'll have to take care of > compat handling regarding patch #4 as soon as we have 5.0 compat > machines in place. I will clean up the one comment and submit later today if there is no other

Re: [PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-27 Thread Alexander Duyck
On Mon, Apr 27, 2020 at 1:15 AM David Hildenbrand wrote: > > There is only one wrong comment remaining I think. Something like > > diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c > index a1d6fb52c8..1b2127c04c 100644 > --- a/hw/virtio/virtio-balloon.c > +++

[PATCH v22 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v22 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[PATCH v22 QEMU 4/5] virtio-balloon: Implement support for page poison reporting feature

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v22 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v22 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-24 Thread Alexander Duyck
atch 3 Rewrote patch description for page poison reporting feature Made page-poison independent property and set to enabled by default Added logic to migrate poison_val Added several comments in code to better explain features Switched free-page-reporting property to disabled by default ---

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 8:34 AM David Hildenbrand wrote: > > > >> Also, I do wonder if we want to default-enable it. It can still have a > >> negative performance impact and some people might not want that. > > > > The negative performance impact should be minimal. At this point the > > hinting

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 4:20 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for free page reporting. The idea is to function very similar > > to how the balloon works in that we basic

Re: [PATCH v21 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 4:23 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > In an upcoming patch a feature named Free Page Reporting is about to be > > added. In order to avoid any confusion we s

Re: [PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-23 Thread Alexander Duyck
On Thu, Apr 23, 2020 at 9:02 AM David Hildenbrand wrote: > > On 23.04.20 16:46, Alexander Duyck wrote: > > On Thu, Apr 23, 2020 at 1:11 AM David Hildenbrand wrote: > >> > >> On 22.04.20 20:21, Alexander Duyck wrote: > >>> From: Alexander Duyck > &

Re: [PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-23 Thread Alexander Duyck
On Thu, Apr 23, 2020 at 1:11 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > We need to make certain to advertise support for page poison tracking if > > we want to actually get data on if the guest will b

[PATCH v21 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. Add a value for tracking the poison value being used if page poisoning is enabled. With this we can determine if we will need

[PATCH v21 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v21 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-22 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[PATCH v21 QEMU 0/5] virtio-balloon: add support for free page reporting

2020-04-22 Thread Alexander Duyck
ated cover page comments --- Alexander Duyck (5): linux-headers: Update to allow renaming of free_page_report_cmd_id linux-headers: update to contain virito-balloon free page reporting virtio-balloon: Replace free page hinting references to 'report' with 'hint' virtio-balloon:

[PATCH v20 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-16 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

[PATCH v20 QEMU 4/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-16 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v20 QEMU 2/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-16 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report

[PATCH v20 QEMU 0/5] virtio-balloon: add support for free page reporting

2020-04-16 Thread Alexander Duyck
moved code that was modifying config size for poison vs hinting Dropped x-page-poison property Added code to bounds check the reported region vs the RAM block Dropped patch for ROM devices as that was already pulled in by Paolo --- Alexander Duyck (5): linux-headers: Update to allo

[PATCH v20 QEMU 3/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-16 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[PATCH v20 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-16 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature

2020-04-16 Thread Alexander Duyck
On Thu, Apr 16, 2020 at 7:55 AM David Hildenbrand wrote: > > >> We should document our result of page poisoning, free page hinting, and > >> free page reporting there as well. I hope you'll have time for the latter. > >> > >>

Re: [PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature

2020-04-15 Thread Alexander Duyck
On Wed, Apr 15, 2020 at 12:46 PM David Hildenbrand wrote: > > > > > Am 15.04.2020 um 21:29 schrieb Alexander Duyck : > > > > On Wed, Apr 15, 2020 at 11:17 AM David Hildenbrand > > wrote: > >> > >>> > >>> The comment above expl

Re: [PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature

2020-04-15 Thread Alexander Duyck
On Wed, Apr 15, 2020 at 11:17 AM David Hildenbrand wrote: > > > > > The comment above explains the "why". Basically poisoning a page will > > dirty it. So why hint a page as free when that will drop it back into > > the guest and result in it being dirtied again. What you end up with > > is all

Re: [PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature

2020-04-15 Thread Alexander Duyck
On Wed, Apr 15, 2020 at 1:08 AM David Hildenbrand wrote: > > On 10.04.20 05:41, Alexander Duyck wrote: > > From: Alexander Duyck > > > > We need to make certain to advertise support for page poison tracking if > > we want to actually get data on if the gue

Re: [PATCH v19 QEMU 3/4] virtio-balloon: Provide an interface for free page reporting

2020-04-15 Thread Alexander Duyck
On Wed, Apr 15, 2020 at 1:17 AM David Hildenbrand wrote: > > On 10.04.20 05:41, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for free page reporting. The idea is to function very similar > > to how the balloon works in that we basic

Re: [PATCH v19 QEMU 4/4] memory: Do not allow direct write access to rom_device regions

2020-04-13 Thread Alexander Duyck
On Fri, Apr 10, 2020 at 3:50 AM Paolo Bonzini wrote: > > On 10/04/20 05:41, Alexander Duyck wrote: > > From: Alexander Duyck > > > > According to the documentation in memory.h a ROM memory region will be > > backed by RAM for reads, but is supposed to go thr

[PATCH v19 QEMU 1/4] virtio-balloon: Implement support for page poison tracking feature

2020-04-09 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[PATCH v19 QEMU 0/4] virtio-balloon: add support for free page reporting

2020-04-09 Thread Alexander Duyck
to address issue with ROM devices being directly writable --- Alexander Duyck (4): virtio-balloon: Implement support for page poison tracking feature linux-headers: update to contain virito-balloon free page reporting virtio-balloon: Provide an interface for free page reporting

[PATCH v19 QEMU 2/4] linux-headers: update to contain virito-balloon free page reporting

2020-04-09 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/standard-headers/linux

[PATCH v19 QEMU 4/4] memory: Do not allow direct write access to rom_device regions

2020-04-09 Thread Alexander Duyck
From: Alexander Duyck According to the documentation in memory.h a ROM memory region will be backed by RAM for reads, but is supposed to go through a callback for writes. Currently we were not checking for the existence of the rom_device flag when determining if we could perform a direct write

[PATCH v19 QEMU 3/4] virtio-balloon: Provide an interface for free page reporting

2020-04-09 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back

Re: [PATCH v18 QEMU 3/3] virtio-balloon: Provide a interface for free page reporting

2020-04-09 Thread Alexander Duyck
On Thu, Apr 9, 2020 at 10:35 AM David Hildenbrand wrote: > On 09.04.20 19:34, Alexander Duyck wrote: > >>> hw/virtio/virtio-balloon.c | 48 > >>> +++- > >>> include/hw/virtio/virtio-balloon.h |2 +- >

Re: [PATCH v18 QEMU 3/3] virtio-balloon: Provide a interface for free page reporting

2020-04-09 Thread Alexander Duyck
On Thu, Apr 9, 2020 at 12:44 AM David Hildenbrand wrote: > > On 09.04.20 00:55, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for what I am referring to as "free page reporting". > > "Add support for "free page report

Re: [PATCH v18 QEMU 2/3] virtio-balloon: Add support for providing free page reports to host

2020-04-09 Thread Alexander Duyck
On Thu, Apr 9, 2020 at 12:36 AM David Hildenbrand wrote: > > On 09.04.20 00:55, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for the page reporting feature provided by virtio-balloon. > > Reporting differs from the regular balloon functionali

[PATCH v18 QEMU 2/3] virtio-balloon: Add support for providing free page reports to host

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[PATCH v18 QEMU 0/3] virtio-balloon: add support for providing free page reporting

2020-04-08 Thread Alexander Duyck
/linux/kernel/git/torvalds/linux.git/commit/?id=b0c504f154718904ae49349147e3b7e6ae91ffdc Changes from v17: Fixed typo in patch 1 title Addressed white-space issues reported via checkpatch Added braces {} for two if statements to match expected coding style --- Alexander Duyck (3): virtio

[PATCH v18 QEMU 1/3] virtio-balloon: Implement support for page poison tracking feature

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[PATCH v18 QEMU 3/3] virtio-balloon: Provide a interface for free page reporting

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "free page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[PATCH v17 RESUBMIT QEMU 3/3] virtio-balloon: Provide a interface for free page reporting

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for what I am referring to as "free page reporting". Basically the idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate

[PATCH v17 RESUBMIT QEMU 1/3] virtio-balloon: Implement support for page poison tracking feature

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison tracking if we want to actually get data on if the guest will be poisoning pages. So if free page hinting is active we should add page poisoning support and let the guest disable it if it isn't using it. Page

[PATCH v17 RESUBMIT QEMU 2/3] virtio-balloon: Add support for providing free page reports to host

2020-04-08 Thread Alexander Duyck
From: Alexander Duyck Add support for the page reporting feature provided by virtio-balloon. Reporting differs from the regular balloon functionality in that is is much less durable than a standard memory balloon. Instead of creating a list of pages that cannot be accessed the pages are only

[PATCH v17 RESUBMIT QEMU 0/3] virtio-balloon: add support for providing free page reporting

2020-04-08 Thread Alexander Duyck
/linux/kernel/git/torvalds/linux.git/commit/?id=b0c504f154718904ae49349147e3b7e6ae91ffdc --- Alexander Duyck (3): virtio-balloon: Implement support for page poison tracking feature virtio-balloon: Add support for providing free page reports to host virtio-balloon: Provide

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v1 6/6] vhost-user: add VFIO based accelerators support

2018-02-07 Thread Alexander Duyck
On Wed, Feb 7, 2018 at 8:43 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > On Sun, Feb 04, 2018 at 01:49:46PM -0800, Alexander Duyck wrote: >> On Thu, Jan 25, 2018 at 9:57 PM, Tiwei Bie <tiwei@intel.com> wrote: >> > On Fri, Jan 26, 2018 at 11:41:27AM +0800, Ja

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v1 6/6] vhost-user: add VFIO based accelerators support

2018-02-04 Thread Alexander Duyck
On Thu, Jan 25, 2018 at 9:57 PM, Tiwei Bie wrote: > On Fri, Jan 26, 2018 at 11:41:27AM +0800, Jason Wang wrote: >> On 2018年01月26日 07:59, Michael S. Tsirkin wrote: >> > > The virtual IOMMU isn't supported by the accelerators for now. >> > > Because vhost-user currently lacks

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-06-12 Thread Alexander Duyck
On Sat, Jun 11, 2016 at 8:03 PM, Zhou Jie <zhoujie2...@cn.fujitsu.com> wrote: > Hi, Alex > > > On 2016/6/9 23:39, Alexander Duyck wrote: >> >> On Thu, Jun 9, 2016 at 3:14 AM, Zhou Jie <zhoujie2...@cn.fujitsu.com> >> wrote: >>> >>>

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-06-09 Thread Alexander Duyck
On Thu, Jun 9, 2016 at 3:14 AM, Zhou Jie wrote: > TO Alex > TO Michael > >In your solution you add a emulate PCI bridge to act as >a bridge between direct assigned devices and the host bridge. >Do you mean put all direct assigned devices to >one emulate

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Alexander Duyck
On Tue, Jan 5, 2016 at 1:40 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: >> >> The two mechanisms referenced above would likely require coordination with >> >> QEMU and as such are open to

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-04 Thread Alexander Duyck
On Mon, Jan 4, 2016 at 12:41 PM, Konrad Rzeszutek Wilk <konrad.w...@oracle.com> wrote: > On Sun, Dec 13, 2015 at 01:28:09PM -0800, Alexander Duyck wrote: >> This patch set is meant to be the guest side code for a proof of concept >> involving leaving pass-through device

  1   2   >