[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] target/i386: Added VGIF feature

From: Paolo Bonzini
Subject: Re: [PATCH v2] target/i386: Added VGIF feature
Date: Thu, 29 Jul 2021 09:59:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 28/07/21 13:37, Lara Lazier wrote:
+    if (virtual_gif_enabled(env, int_ctl) && likely(env->hflags & 
+        x86_stl_phys(cs, env->vm_vmcb + offsetof(struct vmcb, control.int_ctl),
+                        int_ctl | V_GIF_MASK);
+    } else {

I would put the HF_GUEST_MASK check in virtual_gif_enabled.

In fact, the more logical order for the three checks is:

- am I in guest mode? (if not, the VMCB and thus int_ctl is unused)

- is the CPUID bit set? (if not, bit 9 has no effect)

- is bit 9 of int_ctl set?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]