From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E414F1DB37B for ; Tue, 7 Jan 2025 17:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736269812; cv=none; b=FFuEZE4XfwlXsJmSxUPXOaMwi56Nm3iiCgqqwiDQgU8NrJgIMjQxZ1XWvk+4UYJsNJD9woPPIE1IVgYryLeZ7fRLICXXoFPZpl5qe5sDoPdXAoGeAMvJBQvK8+lfi67jHDqxWjCerN1mW11A0RrzHFBv+inpWqMTj6lObFK68K4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736269812; c=relaxed/simple; bh=k6MVnlt34ZD0SBO9MSU8T78C7vNtxZTkYcttZnmsriY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=dp0LAZcp8NcFEWJjejoymEAMyk9KJcK0dtcufF6x9gSk7TRd3FRYI7qFG6VP+QmqR9fU3gRHcP7WA/6G30tQMwbYYmp1yviWgd9oNm5FxIeJe1uwMkg924QIcUwqU3Nzxiwe4FVECeDBB2+g/fXVkJXC1mpPHOtVaT3pv0pnmgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bPzaJbXT; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bPzaJbXT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736269809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwQkyTcOMsZ2EjZrTGgt+ipO0/RY4nS6QVm5/aGbi9U=; b=bPzaJbXTMKIgBehAZAuY3DUQ1y7QjzjeNZkLOr18UulevSdGk9bA0kB56hOmYQrWFKRJtc oWA5fxFMypngeZEW0/OUYJkPTDu3dk3VpTM5FoDZklWQAqF8Z7v5FfM3FN2FP1/sPklOIP 4XsznVAH0GRoMKqITN9EA5FoBgp9WLY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-152-FzCnfJCONz28L5NJDTvIKw-1; Tue, 07 Jan 2025 12:10:08 -0500 X-MC-Unique: FzCnfJCONz28L5NJDTvIKw-1 X-Mimecast-MFC-AGG-ID: FzCnfJCONz28L5NJDTvIKw Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4362b9c1641so76686725e9.3 for ; Tue, 07 Jan 2025 09:10:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736269807; x=1736874607; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gwQkyTcOMsZ2EjZrTGgt+ipO0/RY4nS6QVm5/aGbi9U=; b=JmK08WXvXIS+MpPETqGgo4rAzb0MXI5qfozsb2F9Iq4744znnhYtDRTjQ9qEZ2uIkO LdKVDe9vyhSAAB0AyBTWMHViL2l5///JCaJAoK/KlZpJVhVdMpAQBiGtKfddcGJx02I/ xCLiGgFvBUViZVJEhJ/BooM//hzyjCEDNRXZHPARzOo8xw5O4CEDtlTjMGiF2RYae0rB lVcZ0Dkiuykx4iImkvhFvGEAgK1uq+CBJBctV2d9sSubVMi4mLCxDfwABH9ImH18Gru0 EmZ5Ooifcnd8z27T9eYEVxM8NkElKLtq8ogl0dsWawYC2sMsmrxHjpwoF3hweCIY/Mhb Ahww== X-Forwarded-Encrypted: i=1; AJvYcCUYh/JhftAwrlXFaQe3d9+SwOAgXni0Xzkc5E9ZQ795p6u3PBxkxDAhE+8qQhRBmBaQbvqbSJMx6SFIKCA=@vger.kernel.org X-Gm-Message-State: AOJu0YwWbn9gpOzwDHRWwY/3mAawHnF18cDC3OkSuTAFmdJ4wlaSBB0L MAiHE3NE94ndm0f9JNCL06DondDtp9QQZ9FXhVauauxcBWzdwKmZ5D9bAkHXzWZ7DpsemVgwR6J I9cXp0wpD+Y/Qdq9LAN1CSf0lyyEkrLbzGIJ3SelMUFa7SVj+sntXTIXIdSuyP+Cu/4wrrHf5wV kOpYRVPLKDO3XHuHNNqeSTwMlpMiojpfr2/218 X-Gm-Gg: ASbGncuciSAH19eCvPoSQYqtv5Aj4HdekfKMzYoVFhk/STXyQBOlgYG1AEl4+Yj8PKA h062nzkHgHobF9EfqYRoky9ZGGhnm+9w6iiVwlw== X-Received: by 2002:a05:600c:1d21:b0:434:a4a6:51f8 with SMTP id 5b1f17b1804b1-4366790e3fdmr593069195e9.0.1736269806960; Tue, 07 Jan 2025 09:10:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSvogatKxKxqA2wBw/+7sDsL67SJLzCtKQockD6aGfvTv8LM12x53+vGigfD/GcR6BSKn5UMxxRiIg0aVgOFw= X-Received: by 2002:a05:600c:1d21:b0:434:a4a6:51f8 with SMTP id 5b1f17b1804b1-4366790e3fdmr593068955e9.0.1736269806643; Tue, 07 Jan 2025 09:10:06 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Paolo Bonzini Date: Tue, 7 Jan 2025 18:09:54 +0100 X-Gm-Features: AbW1kvYbICc679MeQNzE1ow2NFvGxOmTuZ13zzWBDAwtldHBRVtXoFV8OfA0EJs Message-ID: Subject: Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls To: Sean Christopherson Cc: Doug Covelli , Zack Rusin , kvm , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "the arch/x86 maintainers" , "H. Peter Anvin" , Shuah Khan , Namhyung Kim , Arnaldo Carvalho de Melo , Isaku Yamahata , Joel Stanley , Linux Doc Mailing List , linux-kernel@vger.kernel.org, linux-kselftest Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 18, 2024 at 4:44=E2=80=AFAM Sean Christopherson wrote: > > Changing our legacy BIOS is not an option so in order to support Window= s VMs > > with the legacy BIOS with decent performance we would either need to ad= d support > > for remote reads of the APIC ID register to KVM or support CR8 accesses= w/o > > exiting w/o the in-kernel APIC in order. Do you have a preference? > > I didn't quite follow the CR8 access thing. If the choice is between emu= lating > Remote Read IPIs and using a userspace local APIC, then I vote with both = hands > for emulating Remote Reads, especially if we can do a half-assed version = that > provides only what your crazy BIOS needs :-) Absolutely. Not quite userspace local APIC - VMware only needs userspace traps on CR8 access but yeah, it would not be great to have that. Remote read support is totally acceptable and hopefully win-win for VMware too. > The biggest wrinkle I can think of is that KVM uses the Remote Read IPI e= ncoding > for a paravirt vCPU kick feature, but I doubt that's used by Windows gues= ts and > so can be sacrificed on the Altar of Ancient BIOS. That's easy, the existing code can be wrapped with if (guest_pv_has(vcpu, KVM_FEATURE_PV_UNHALT)) The remote-read hack is not even supposed to be used by the guest (it's used internally by kvm_pv_kick_cpu_op). Paolo