Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Borislav Petkov
On Wed, Dec 09, 2020 at 07:34:16PM +, Ashish Kalra wrote: > This should work, but i am concerned about making IO_TLB_DEFAULT_SIZE > (which is pretty much private to generic swiotlb code) to be visible > externally, i don't know if there are any concerns with that ? Meh, it's just a define and

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Ashish Kalra
On Wed, Dec 09, 2020 at 06:51:05PM +0100, Borislav Petkov wrote: > On Wed, Dec 09, 2020 at 01:19:46PM +, Ashish Kalra wrote: > > reserve_crashkernel() calls swiotlb_size_or_default() to get SWIOTLB > ... > > Thanks for explaining. > > > There is a need to introduce an architecture specific

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Borislav Petkov
On Wed, Dec 09, 2020 at 01:19:46PM +, Ashish Kalra wrote: > reserve_crashkernel() calls swiotlb_size_or_default() to get SWIOTLB ... Thanks for explaining. > There is a need to introduce an architecture specific callback > for swiotlb_adjust() because of the following reason : So what your

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Ashish Kalra
On Wed, Dec 09, 2020 at 01:54:42PM +0100, Borislav Petkov wrote: > On Wed, Dec 09, 2020 at 12:29:07PM +, Ashish Kalra wrote: > > As i mentioned in the main comments above, this cannot be called in > > mem_encrypt_init() as that breaks reserve_crashkernel() which depends > > on SWIOTLB buffer

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Borislav Petkov
On Wed, Dec 09, 2020 at 12:29:07PM +, Ashish Kalra wrote: > As i mentioned in the main comments above, this cannot be called in > mem_encrypt_init() as that breaks reserve_crashkernel() which depends > on SWIOTLB buffer size Please elaborate how does it break. > and is called before

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Ashish Kalra
On Wed, Dec 09, 2020 at 12:01:15PM +0100, Borislav Petkov wrote: > > Subject: Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV > > guests. > > Fix subject prefix to "x86, swiotlb: ... SWIOTLB ... for SEV guests > > Fix typo and no fullstop at the e

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-09 Thread Borislav Petkov
> Subject: Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV > guests. Fix subject prefix to "x86, swiotlb: ... SWIOTLB ... for SEV guests Fix typo and no fullstop at the end. On Mon, Dec 07, 2020 at 11:10:57PM +, Ashish Kalra wrote: > From: Ashish Kalra >

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-08 Thread Borislav Petkov
On Tue, Dec 08, 2020 at 06:27:39PM -0500, Konrad Rzeszutek Wilk wrote: > That said if you have the time to take a peek at the x86 bits - that > would be awesome! Sure, tomorrow. Good night. :-) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-08 Thread Konrad Rzeszutek Wilk
On December 8, 2020 6:01:19 PM EST, Borislav Petkov wrote: >On Tue, Dec 08, 2020 at 05:22:20PM -0500, Konrad Rzeszutek Wilk wrote: >> I will fix it up. > >So who's picking this up? If not me then I probably should have a >detailed look at the x86 bits before it goes in... I was planning to pick

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-08 Thread Borislav Petkov
On Tue, Dec 08, 2020 at 05:22:20PM -0500, Konrad Rzeszutek Wilk wrote: > I will fix it up. So who's picking this up? If not me then I probably should have a detailed look at the x86 bits before it goes in... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-08 Thread Konrad Rzeszutek Wilk
On Mon, Dec 07, 2020 at 11:10:57PM +, Ashish Kalra wrote: > From: Ashish Kalra > > For SEV, all DMA to and from guest has to use shared (un-encrypted) pages. > SEV uses SWIOTLB to make this happen without requiring changes to device > drivers. However, depending on workload being run, the

[PATCH v8] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-12-07 Thread Ashish Kalra
From: Ashish Kalra For SEV, all DMA to and from guest has to use shared (un-encrypted) pages. SEV uses SWIOTLB to make this happen without requiring changes to device drivers. However, depending on workload being run, the default 64MB of SWIOTLB might not be enough and SWIOTLB may run out of