qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	mst@redhat.com, "David Hildenbrand" <david@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	marcandre.lureau@redhat.com, eric.auger@redhat.com,
	"Peter Xu" <peterx@redhat.com>
Subject: Re: [PATCH 2/2] tpm_crb: mark memory as protected
Date: Tue, 4 Jul 2023 08:45:04 +0200	[thread overview]
Message-ID: <3b60a84b-88ab-0d5e-54d3-f47961b1a85d@redhat.com> (raw)
In-Reply-To: <CACGkMEs9L82XyMfnR6ngSio18n=_Baxh1xFtGkNp72eHVtrUeg@mail.gmail.com>

Hi,

as the region is already skipped by the test of the memory region alignment, I'm going to 
update my patches by only removing the error_report() as proposed by Peter.

I will replace it by a trace to help to debug.

Thanks,
Laurent

On 7/4/23 05:07, Jason Wang wrote:
> On Thu, Jun 22, 2023 at 9:39 PM Laurent Vivier <lvivier@redhat.com> wrote:
>>
>> On 6/22/23 15:12, Peter Maydell wrote:
>>> On Tue, 20 Jun 2023 at 20:51, Laurent Vivier <lvivier@redhat.com> wrote:
>>>>
>>>> This memory is not correctly aligned and cannot be registered
>>>> by vDPA and VFIO.
>>>
>>> Isn't this a vDPA/VFIO problem? There's no requirement
>>> for RAM MemoryRegions to be aligned in any way.
> 
> It's more about the limitation of the IOMMU which can't do subpage protection.
> 
>>> Code
>>> that doesn't want to work with small or weirdly aligned
>>> regions should skip them if that's the right behaviour
>>> for that particular code IMHO.
> 
> We had already had this:
> 
>      if ((!memory_region_is_ram(section->mr) &&
>           !memory_region_is_iommu(section->mr)) ||
>          memory_region_is_protected(section->mr) ||
>          /* vhost-vDPA doesn't allow MMIO to be mapped  */
>          memory_region_is_ram_device(section->mr)) {
>          return true;
>      }
> 
>>>
>>
>> Marc-André proposed to modify vDPA code to skip the region but Michal disagreed:
>>
>> https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg03670.html
>>
>> No one wants the modification, so the problem cannot be fixed.
>>
> 
> Yes, otherwise we end up with explicit check for TPM crb in vhost code...
> 
> Thanks
> 
>> Thanks,
>> Laurent
>>
> 



  reply	other threads:[~2023-07-04  6:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 19:50 [PATCH 0/2] vhost-vdpa: skip TPM CRB memory section Laurent Vivier
2023-06-20 19:50 ` [PATCH 1/2] memory: introduce memory_region_init_ram_protected() Laurent Vivier
2023-06-21 12:27   ` Stefan Berger
2023-06-22 13:05   ` David Hildenbrand
2023-06-22 13:16   ` Peter Maydell
2023-06-20 19:50 ` [PATCH 2/2] tpm_crb: mark memory as protected Laurent Vivier
2023-06-21  9:13   ` David Hildenbrand
2023-06-22 12:59     ` Laurent Vivier
2023-06-22 13:05       ` David Hildenbrand
2023-06-21 12:29   ` Stefan Berger
2023-06-22 13:05   ` David Hildenbrand
2023-06-22 13:12   ` Peter Maydell
2023-06-22 13:39     ` Laurent Vivier
2023-06-22 13:53       ` Peter Maydell
2023-07-04  3:07       ` Jason Wang
2023-07-04  6:45         ` Laurent Vivier [this message]
2023-06-21 15:32 ` [PATCH 0/2] vhost-vdpa: skip TPM CRB memory section Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b60a84b-88ab-0d5e-54d3-f47961b1a85d@redhat.com \
    --to=lvivier@redhat.com \
    --cc=david@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).