Peter Maydell writes:
> On Wed, 12 Apr 2023 at 09:40, Alex Bennée wrote:
>> Peter Maydell writes:
>> > Whoops, hadn't noticed that guint type... (glib's
>> > g_int64_hash()'s approach to this is to XOR the top
>> > 32 bits with the bottom 32 bits to produce the 32-bit
>> > hash value.)
>>
>>
On Wed, 12 Apr 2023 at 09:40, Alex Bennée wrote:
> Peter Maydell writes:
> > Whoops, hadn't noticed that guint type... (glib's
> > g_int64_hash()'s approach to this is to XOR the top
> > 32 bits with the bottom 32 bits to produce the 32-bit
> > hash value.)
>
> This is less of a hash and more jus
Peter Maydell writes:
> On Tue, 11 Apr 2023 at 15:14, Peter Xu wrote:
>>
>> On Mon, Apr 10, 2023 at 11:32:08AM +0800, Jason Wang wrote:
>> > @@ -222,9 +222,9 @@ static guint vtd_iotlb_hash(gconstpointer v)
>> > {
>> > const struct vtd_iotlb_key *key = v;
>> >
>> > -return key->gfn |
On Tue, Apr 11, 2023 at 10:44 PM Peter Xu wrote:
>
> On Tue, Apr 11, 2023 at 03:30:08PM +0100, Peter Maydell wrote:
> > On Tue, 11 Apr 2023 at 15:14, Peter Xu wrote:
> > >
> > > On Mon, Apr 10, 2023 at 11:32:08AM +0800, Jason Wang wrote:
> > > > @@ -222,9 +222,9 @@ static guint vtd_iotlb_hash(gco
On Tue, Apr 11, 2023 at 03:30:08PM +0100, Peter Maydell wrote:
> On Tue, 11 Apr 2023 at 15:14, Peter Xu wrote:
> >
> > On Mon, Apr 10, 2023 at 11:32:08AM +0800, Jason Wang wrote:
> > > @@ -222,9 +222,9 @@ static guint vtd_iotlb_hash(gconstpointer v)
> > > {
> > > const struct vtd_iotlb_key *
On Tue, 11 Apr 2023 at 15:14, Peter Xu wrote:
>
> On Mon, Apr 10, 2023 at 11:32:08AM +0800, Jason Wang wrote:
> > @@ -222,9 +222,9 @@ static guint vtd_iotlb_hash(gconstpointer v)
> > {
> > const struct vtd_iotlb_key *key = v;
> >
> > -return key->gfn | ((key->sid) << VTD_IOTLB_SID_SHIFT)
On Mon, Apr 10, 2023 at 11:32:08AM +0800, Jason Wang wrote:
> Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into
> account when calculating iotlb hash like:
>
> static guint vtd_iotlb_hash(gconstpointer v)
> {
> const struct vtd_iotlb_key *key = v;
>
> return key->gfn | ((
On Mon, 10 Apr 2023 at 04:32, Jason Wang wrote:
>
> Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into
> account when calculating iotlb hash like:
>
> static guint vtd_iotlb_hash(gconstpointer v)
> {
> const struct vtd_iotlb_key *key = v;
>
> return key->gfn | ((key->sid) <
Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into
account when calculating iotlb hash like:
static guint vtd_iotlb_hash(gconstpointer v)
{
const struct vtd_iotlb_key *key = v;
return key->gfn | ((key->sid) << VTD_IOTLB_SID_SHIFT) |
(key->level) << VTD_IOTLB_LVL