public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Cc: "joro@8bytes.org" <joro@8bytes.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"rkrcmar@redhat.com" <rkrcmar@redhat.com>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>
Subject: Re: [PATCH v2] svm/avic: Fix invalidate logical APIC id entry
Date: Mon, 8 Apr 2019 14:16:23 +0000	[thread overview]
Message-ID: <3779617e-e695-e8ce-e7fc-d86c383b3824@amd.com> (raw)
In-Reply-To: <20190326035711.77916-1-suravee.suthikulpanit@amd.com>

Ping

On 3/26/19 10:57 AM, Suthikulpanit, Suravee wrote:
> Only clear the valid bit when invalidate logical APIC id entry.
> The current logic clear the valid bit, but also set the rest of
> the bits (including reserved bits) to 1.
> 
> Fixes: 98d90582be2e ('svm: Fix AVIC DFR and LDR handling')
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
>   arch/x86/kvm/svm.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 7a4ce1a22ca0..8a123bd0f591 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -270,6 +270,7 @@ struct amd_svm_iommu_ir {
>   };
>   
>   #define AVIC_LOGICAL_ID_ENTRY_GUEST_PHYSICAL_ID_MASK	(0xFF)
> +#define AVIC_LOGICAL_ID_ENTRY_VALID_BIT			31
>   #define AVIC_LOGICAL_ID_ENTRY_VALID_MASK		(1 << 31)
>   
>   #define AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK	(0xFFULL)
> @@ -4640,7 +4641,7 @@ static void avic_invalidate_logical_id_entry(struct kvm_vcpu *vcpu)
>   	u32 *entry = avic_get_logical_id_entry(vcpu, svm->ldr_reg, flat);
>   
>   	if (entry)
> -		WRITE_ONCE(*entry, (u32) ~AVIC_LOGICAL_ID_ENTRY_VALID_MASK);
> +		clear_bit(AVIC_LOGICAL_ID_ENTRY_VALID_BIT, (unsigned long *)entry);
>   }
>   
>   static int avic_handle_ldr_update(struct kvm_vcpu *vcpu)
> 

  reply	other threads:[~2019-04-08 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26  3:57 [PATCH v2] svm/avic: Fix invalidate logical APIC id entry Suthikulpanit, Suravee
2019-04-08 14:16 ` Suthikulpanit, Suravee [this message]
2019-04-09 16:39 ` Paolo Bonzini

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=3779617e-e695-e8ce-e7fc-d86c383b3824@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=vkuznets@redhat.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