From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 990FC3368AE for ; Thu, 5 Mar 2026 04:28:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772684889; cv=none; b=KVacfPG7+JFQCVs+THIqvL11M2vAW0pGqykL6MXQT0FsYY37ScTObw88E+pCGCJ4JNo8GrW/6LT7h1HKLWL5cTaPCo73dkOSoqJaldepAhU9/D8bPAQ3fPS1DXMVsTmPKl75WFy+pcovDlAnEd+s7fGISz8EJBtctBSlEVYcDW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772684889; c=relaxed/simple; bh=o5fKDhy74cdzgL9PNph7IkA920FfByjOquD6Ft0H/zY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CWxEIhz0TuxoRjUOlIZBdh8dKojuaVnDHF54W71qg4Tz0+3PmTPE69oSxQthoUykGUnzBB8CTBs0yUTFHjsbtB1iKy73pxbAJigM/e5+ffroypnv1S5RJWartR5ytLZPuVY8TkUohlUKzDTcs45pl8co8sf2C/FQqoufAR5UdMM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AQlcclL3; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AQlcclL3" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-35978cbc54aso3478542a91.0 for ; Wed, 04 Mar 2026 20:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772684888; x=1773289688; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Iz3l6YwXaDjdGRQXPgHOcgcLShfAqlVagFuNQ/atjtw=; b=AQlcclL3ABbG8q3uHhWZuUhD9djiZNrVkMhQuTITwONOvQEEaZ3RdMvoD8rEGI8R7R IcJJ5Gd74rBD7hmVExSJioTR+JTJVvSHGWCekVvoCmUb5h7/pSJwpFns+en3Hh1K/6yb 4bueRjr0bFvvxuCIUB2pH1Kbegiv6QqXjDmZGi4+BJpQFjwmukJJeR+1TnPnjcoGJqJz TLcHenQOlilU4av5N3mkmLAaL922ls7G9x83Bi0BNHKlY5gNJLdwziC3rzPors5mtnep Ne7WjpsZiMixS5MpM9sRh3mtRg5mzRBRp0LlVuR5aSmsEBLCNE0IMk5066P22pMunIH1 MTKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772684888; x=1773289688; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Iz3l6YwXaDjdGRQXPgHOcgcLShfAqlVagFuNQ/atjtw=; b=XNSw2U5ssP7CW0g2b1A9hiiFiGuoBc/wSxP+U5n3Op0svELTPWAC4SUTDhx+UoA/AH v6N6WDM8M/p+YwhWt2VtuPK/FPcxCFQzJx4Ui92xgZH3vN+nTfuIr0C/HJzGlik3G+w7 d7q6lDW9rIokSUJ885Wn67bEb4WQ1znM9BHIZWYFyHB7Ziqyd8h1BMLA+OCsaZPYAcW0 AbNa6/jMWHvTCk4vJWss6XAiwiSyDcpTZ0ggWsvaUb5wiNFVJxD92o4+5hP1f6yTDn9a tFFxaL52Jenn9sK9bnkYRHSsTrYM25AcTLGdYZhMMrY63BiQa9Edmuxwew1PbglujftS JjMQ== X-Forwarded-Encrypted: i=1; AJvYcCX64zD4At+yfH54/n3MXi5M6uk1rfcA9ZNpg9FGJlDGaHOfFzzuXAeOzpLkdvc6o//NSMeisnhSI8DrvxU=@vger.kernel.org X-Gm-Message-State: AOJu0YxW6+ypTea30Gqa38B7bBbUccYc8yz181ZfaB1FLr+5A4JS6QD7 Etg1MSnUjS8hPwykML6M7sbGEPVZNKQFSN7T2LIbC3xCqlha20BSZfNQFbYqkEAVoDxTNjdpQg8 2NpADCg== X-Received: from plbjx13.prod.google.com ([2002:a17:903:138d:b0:2ae:3cee:978a]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f548:b0:2ad:a96c:e40c with SMTP id d9443c01a7336-2ae75bb4d0bmr10245955ad.16.1772684887659; Wed, 04 Mar 2026 20:28:07 -0800 (PST) Date: Wed, 4 Mar 2026 20:28:06 -0800 In-Reply-To: <20260112235408.168200-17-chang.seok.bae@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260112235408.168200-1-chang.seok.bae@intel.com> <20260112235408.168200-17-chang.seok.bae@intel.com> Message-ID: Subject: Re: [PATCH v2 16/16] KVM: x86: selftests: Add APX state handling and XCR0 sanity checks From: Sean Christopherson To: "Chang S. Bae" Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, chao.gao@intel.com Content-Type: text/plain; charset="us-ascii" On Mon, Jan 12, 2026, Chang S. Bae wrote: > Now that KVM exposes the APX feature to guests on APX-capable systems, > extend the selftests to validate XCR0 configuration and state management. > > Since APX repurposes the XSAVE area previously used by MPX in the > non-compacted format, add a check to ensure that MPX states are not set > when APX is enabled. > > Also, load non-init APX state data in the guest so that XSTATE_BV[APX] is > set, allowing validation of APX state testing. I assume/hope there a more tests coming in future versions... KVM-Unit-Tests' x86/xsave.c would be a good fit, or at least a good reference for what we should be testing as far as EGPR accesses are concerned.