[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v2 12/18] guest memory protection: Perform KVM init via interfa
From: |
Richard Henderson |
Subject: |
Re: [RFC v2 12/18] guest memory protection: Perform KVM init via interface |
Date: |
Mon, 1 Jun 2020 20:39:11 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 5/20/20 8:42 PM, David Gibson wrote:
> + if (object_dynamic_cast(obj, TYPE_GUEST_MEMORY_PROTECTION)) {
> + GuestMemoryProtection *gmpo = GUEST_MEMORY_PROTECTION(obj);
This duplicates the interface check. You should use
gmpo = (GuestMemoryProtection *)
object_dynamic_cast(obj, TYPE_GUEST_MEMORY_PROTECTION);
if (gmpo) {
AFICT.
r~
- Re: [RFC v2 12/18] guest memory protection: Perform KVM init via interface,
Richard Henderson <=