On 8/13/25 20:53, ~myrslint wrote:
> From: myrslint <qemu.haziness...@passinbox.com>
> 
> Most Intel CPUs in current use have self-snoop. The few added lines of
> code also check for availability of the quirk disablement option so if
> some CPU does not have this feature no change of behavior will occur.
> 
> Signed-off-by: Myrsky Lintu <qemu.haziness...@passinbox.com>
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2943
> ---
> Thanks to Alex Bennée <alex.ben...@linaro.org> for the kind code review
> and helpful guidance.
> 
>  target/i386/kvm/kvm.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
> index 369626f8c8..124818bf94 100644
> --- a/target/i386/kvm/kvm.c
> +++ b/target/i386/kvm/kvm.c
> @@ -16,6 +16,7 @@
>  #include "qapi/qapi-events-run-state.h"
>  #include "qapi/error.h"
>  #include "qapi/visitor.h"
> +#include <asm-x86/kvm.h>
>  #include <math.h>
>  #include <sys/ioctl.h>
>  #include <sys/utsname.h>
> @@ -3367,6 +3368,24 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
>          }
>      }
>  
> +/* if kernel version does not have it there is no point compiling this in */
> +#ifdef KVM_X86_QUIRK_IGNORE_GUEST_PAT

QEMU uses own copy of kernel headers, I expect this define should be
always available.

-- 
Best regards,
Dmitry


Reply via email to