Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Michael S. Tsirkin
On Thu, Apr 28, 2022 at 02:02:16PM +0800, Jason Wang wrote: > On Thu, Apr 28, 2022 at 1:55 PM Michael S. Tsirkin wrote: > > > > On Thu, Apr 28, 2022 at 01:51:59PM +0800, Jason Wang wrote: > > > On Thu, Apr 28, 2022 at 1:24 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Thu, Apr 28, 2022 a

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Jason Wang
On Thu, Apr 28, 2022 at 1:55 PM Michael S. Tsirkin wrote: > > On Thu, Apr 28, 2022 at 01:51:59PM +0800, Jason Wang wrote: > > On Thu, Apr 28, 2022 at 1:24 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Apr 28, 2022 at 11:04:41AM +0800, Jason Wang wrote: > > > > > But my guess is that rwlock + s

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Michael S. Tsirkin
On Thu, Apr 28, 2022 at 01:51:59PM +0800, Jason Wang wrote: > On Thu, Apr 28, 2022 at 1:24 PM Michael S. Tsirkin wrote: > > > > On Thu, Apr 28, 2022 at 11:04:41AM +0800, Jason Wang wrote: > > > > But my guess is that rwlock + some testing for the legacy indicator case > > > > just to double check

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Jason Wang
On Thu, Apr 28, 2022 at 1:24 PM Michael S. Tsirkin wrote: > > On Thu, Apr 28, 2022 at 11:04:41AM +0800, Jason Wang wrote: > > > But my guess is that rwlock + some testing for the legacy indicator case > > > just to double check if there is a heavy regression despite of our > > > expectations to se

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Michael S. Tsirkin
On Thu, Apr 28, 2022 at 11:04:41AM +0800, Jason Wang wrote: > > But my guess is that rwlock + some testing for the legacy indicator case > > just to double check if there is a heavy regression despite of our > > expectations to see none should do the trick. > > I suggest this, rwlock (for not airq

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Michael S. Tsirkin
On Thu, Apr 28, 2022 at 04:43:15AM +0200, Halil Pasic wrote: > On Wed, 27 Apr 2022 11:27:03 +0200 > Cornelia Huck wrote: > > > On Tue, Apr 26 2022, "Michael S. Tsirkin" wrote: > > > > > On Tue, Apr 26, 2022 at 05:47:17PM +0200, Cornelia Huck wrote: > > >> On Mon, Apr 25 2022, "Michael S. Tsir

Re: [PATCH v2 1/2] vdpa: add the check for id_table in struct vdpa_mgmt_dev

2022-04-27 Thread Jason Wang
On Thu, Apr 28, 2022 at 11:21 AM Cindy Lu wrote: > > On Thu, Apr 28, 2022 at 11:07 AM Jason Wang wrote: > > > > On Thu, Apr 28, 2022 at 9:56 AM Cindy Lu wrote: > > > > > > On Wed, Apr 27, 2022 at 12:04 PM Jason Wang wrote: > > > > > > > > > > > > 在 2022/4/27 10:01, Cindy Lu 写道: > > > > > On Mon

Re: [PATCH v2 1/2] vdpa: add the check for id_table in struct vdpa_mgmt_dev

2022-04-27 Thread Jason Wang
On Thu, Apr 28, 2022 at 9:56 AM Cindy Lu wrote: > > On Wed, Apr 27, 2022 at 12:04 PM Jason Wang wrote: > > > > > > 在 2022/4/27 10:01, Cindy Lu 写道: > > > On Mon, Apr 25, 2022 at 5:00 PM Jason Wang wrote: > > >> On Mon, Apr 25, 2022 at 2:27 PM Cindy Lu wrote: > > >>> To support the dynamic ids in

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Jason Wang
On Thu, Apr 28, 2022 at 10:43 AM Halil Pasic wrote: > > On Wed, 27 Apr 2022 11:27:03 +0200 > Cornelia Huck wrote: > > > On Tue, Apr 26 2022, "Michael S. Tsirkin" wrote: > > > > > On Tue, Apr 26, 2022 at 05:47:17PM +0200, Cornelia Huck wrote: > > >> On Mon, Apr 25 2022, "Michael S. Tsirkin" wrot

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Halil Pasic
On Wed, 27 Apr 2022 11:27:03 +0200 Cornelia Huck wrote: > On Tue, Apr 26 2022, "Michael S. Tsirkin" wrote: > > > On Tue, Apr 26, 2022 at 05:47:17PM +0200, Cornelia Huck wrote: > >> On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: > >> > >> > On Mon, Apr 25, 2022 at 11:53:24PM -0400, Micha

Re: [PATCH V2 03/11] perf/x86: Add support for TSC in nanoseconds as a perf event clock

2022-04-27 Thread Thomas Gleixner
On Tue, Apr 26 2022 at 09:51, Adrian Hunter wrote: > On 25/04/22 20:05, Thomas Gleixner wrote: >> On Mon, Apr 25 2022 at 16:15, Adrian Hunter wrote: >>> On 25/04/22 12:32, Thomas Gleixner wrote: It's hillarious, that we still cling to this pvclock abomination, while we happily expose TSC

Re: [PATCH v2 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 18:30, Michael Kelley (LINUX) wrote: From: Juergen Gross Sent: Wednesday, April 27, 2022 8:34 AM Instead of using arch_has_restricted_virtio_memory_access() together with CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, replace those with platform_has() and a new platform feature P

RE: [PATCH v2 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Michael Kelley (LINUX) via Virtualization
From: Juergen Gross Sent: Wednesday, April 27, 2022 8:34 AM > > Instead of using arch_has_restricted_virtio_memory_access() together > with CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, replace those > with platform_has() and a new platform feature > PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS. > >

[PATCH v2 1/2] kernel: add platform_has() infrastructure

2022-04-27 Thread Juergen Gross via Virtualization
Add a simple infrastructure for setting, resetting and querying platform feature flags. Flags can be either global or architecture specific. Signed-off-by: Juergen Gross --- V2: - rename set/reset functions to platform_[set|clear]() (Boris Petkov, Heiko Carstens) - move function implementation

[PATCH v2 0/2] kernel: add new infrastructure for platform_has() support

2022-04-27 Thread Juergen Gross via Virtualization
In another patch series [1] the need has come up to have support for a generic feature flag infrastructure. This patch series is introducing that infrastructure and adds the first use case. I have decided to use a similar interface as the already known x86 cpu_has() function. As the new infrastru

[PATCH v2 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
Instead of using arch_has_restricted_virtio_memory_access() together with CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, replace those with platform_has() and a new platform feature PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS. Signed-off-by: Juergen Gross --- V2: - move setting of PLATFORM_VIRTIO_RES

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Michael S. Tsirkin
On Wed, Apr 27, 2022 at 03:57:57PM +0800, Jason Wang wrote: > On Wed, Apr 27, 2022 at 2:30 PM Michael S. Tsirkin wrote: > > > > On Wed, Apr 27, 2022 at 11:53:25AM +0800, Jason Wang wrote: > > > On Tue, Apr 26, 2022 at 2:30 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Tue, Apr 26, 2022 a

Re: [PATCH v4 11/15] drm/shmem-helper: Add generic memory shrinker

2022-04-27 Thread Daniel Vetter
On Tue, Apr 19, 2022 at 11:40:41PM +0300, Dmitry Osipenko wrote: > On 4/19/22 10:22, Thomas Zimmermann wrote: > > Hi > > > > Am 18.04.22 um 00:37 schrieb Dmitry Osipenko: > >> Introduce a common DRM SHMEM shrinker. It allows to reduce code > >> duplication among DRM drivers that implement theirs o

Re: [PATCH v4 10/15] drm/shmem-helper: Take reservation lock instead of drm_gem_shmem locks

2022-04-27 Thread Daniel Vetter
On Mon, Apr 18, 2022 at 10:18:54PM +0300, Dmitry Osipenko wrote: > Hello, > > On 4/18/22 21:38, Thomas Zimmermann wrote: > > Hi > > > > Am 18.04.22 um 00:37 schrieb Dmitry Osipenko: > >> Replace drm_gem_shmem locks with the reservation lock to make GEM > >> lockings more consistent. > >> > >> Pre

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 16:09, Tom Lendacky wrote: On 4/27/22 07:37, Juergen Gross wrote: On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote:    /

Re: [PATCH] drm/bochs: Explicitly include linux/module.h

2022-04-27 Thread Daniel Vetter
On Wed, Apr 13, 2022 at 06:12:59PM +0200, Michel Dänzer wrote: > From: Michel Dänzer > > Instead of relying on it getting pulled in indirectly. > > Signed-off-by: Michel Dänzer Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/tiny/bochs.c | 1 + > 1 file changed, 1 insertion(+) > > diff

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Tom Lendacky via Virtualization
On 4/27/22 07:37, Juergen Gross wrote: On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote:    /* protected virtualization */    static

Re: [PATCH v2 3/5] hv_sock: Add validation for untrusted Hyper-V values

2022-04-27 Thread Stefano Garzarella
On Wed, Apr 27, 2022 at 03:12:23PM +0200, Andrea Parri (Microsoft) wrote: For additional robustness in the face of Hyper-V errors or malicious behavior, validate all values that originate from packets that Hyper-V has sent to the guest in the host-to-guest ring buffer. Ensure that invalid values

Re: [PATCH v2 2/5] hv_sock: Copy packets sent by Hyper-V out of the ring buffer

2022-04-27 Thread Stefano Garzarella
On Wed, Apr 27, 2022 at 03:12:22PM +0200, Andrea Parri (Microsoft) wrote: Pointers to VMbus packets sent by Hyper-V are used by the hv_sock driver within the guest VM. Hyper-V can send packets with erroneous values or modify packet fields after they are processed by the guest. To defend against

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 14:26, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:40:08AM +0200, Juergen Gross wrote: I was planning to look at the x86 cpu features to see whether some of those might be candidates to be switched to platform features instead. I'd say "never touch a running system" unless th

Re: [PATCH 2/2] virtio: replace arch_has_restricted_virtio_memory_access()

2022-04-27 Thread Juergen Gross via Virtualization
On 27.04.22 14:28, Borislav Petkov wrote: On Wed, Apr 27, 2022 at 08:37:31AM +0200, Juergen Gross wrote: On 26.04.22 19:35, Borislav Petkov wrote: On Tue, Apr 26, 2022 at 03:40:21PM +0200, Juergen Gross wrote: /* protected virtualization */ static void pv_init(void) { if (!is_

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Cornelia Huck
On Tue, Apr 26 2022, "Michael S. Tsirkin" wrote: > On Tue, Apr 26, 2022 at 05:47:17PM +0200, Cornelia Huck wrote: >> On Mon, Apr 25 2022, "Michael S. Tsirkin" wrote: >> >> > On Mon, Apr 25, 2022 at 11:53:24PM -0400, Michael S. Tsirkin wrote: >> >> On Tue, Apr 26, 2022 at 11:42:45AM +0800, Jason

Re: [PATCH V3 6/9] virtio-ccw: implement synchronize_cbs()

2022-04-27 Thread Jason Wang
On Wed, Apr 27, 2022 at 2:30 PM Michael S. Tsirkin wrote: > > On Wed, Apr 27, 2022 at 11:53:25AM +0800, Jason Wang wrote: > > On Tue, Apr 26, 2022 at 2:30 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Apr 26, 2022 at 12:07:39PM +0800, Jason Wang wrote: > > > > On Tue, Apr 26, 2022 at 11:55 AM