Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 10.0.26100.1 SDK #1930

Open
mikebattista opened this issue Jun 19, 2024 · 10 comments · May be fixed by #1934
Open

Update to 10.0.26100.1 SDK #1930

mikebattista opened this issue Jun 19, 2024 · 10 comments · May be fixed by #1934
Assignees

Comments

@mikebattista
Copy link
Contributor

          The new SDK didn't help with the exports and also the Hypervisor headers were changed to add AMD64 conditionals which requires some changes. It's confusing the cross-arch build of the partition and needs to be investigated.

Originally posted by @mikebattista in #1928 (comment)

@riverar
Copy link
Collaborator

riverar commented Jun 19, 2024

@mikebattista Did you want a hand with this one or is this a placeholder for your PR?

@mikebattista
Copy link
Contributor Author

If you could take a look, that would be great. Here are the steps to follow to get to where I left off:

  • Run scripts\UpdateSDK.ps1 10.0.26100.1.

  • Fix the few reported libMappings.rsp errors related to multiple mappings by removing the alternative mappings

  • The bottom of libMappings.rsp should have a hunk of removals as those are manual additions. Add them back by reverting the removal hunk in the git diff

  • Remove "Hypervisor" from the below line given the changes to the Hypervisor headers in the latest SDK. You'll get a different error about a Hypervisor-related CloseApi not being found if you don't do this so things are broken either way

    <ExcludeFromCrossarch>ActiveDirectory;AllJoyn;Antimalware;ApplicationVerifier;Audio.Apo;Audio.DirectMusic;Audio.DirectSound;Audio.Endpoints;Authorization;Authorization.UI;Base;Bits;Bluetooth;Buses;CEIP;Certificates;Cloudapi;ClrHosting;ClrProfiling;CmpApi;Com;Com.CallObj;Com.ChannelCreds;Com.Events;Com.StructuredStorage;Com.Urlmon;Communication;ComOle;CompositionSwapchain;Console;Cos;Credentials;DataXchg;Debug.ActiveScript;Debug.Extensions;Debug.WebApp;Dedup;DeviceAccess;DeviceQuery;Devices.Properties;DevLic;Dhcp;Direct2D;Direct2D.Common;Direct3D;Direct3D10;Direct3D11;Direct3D11on12;Direct3D12;Direct3D9on12;Direct3DDxc;Direct3DFxc;DirectComp;DirectDraw;DirectManipulation;DirectML;DirectWrite;Dlna;DTC;Dwm;DXCore;Dxgi;Dxgi.Common;Eap;EapHost;Edp;Enstor;Environment;Etw;Fax;FileHistory;Foundation;Fs;Fsrm;FunctionDiscovery;GameMode;GamingDvcInfo;Gdi;Gdiplus;Gpmc;HostComputeNetwork;HostComputeSystem;HtmlHelp;HttpServer;Hypervisor;Identity;IdentityProvider;Ifsk;Iis;ImagingDevice;IMapi;IndexSrv;Input_Ink;Input_IntContext;Input.Ime;InputRadial;InternetConnectionWizard;InternetExplorer;Intl;IO;Isolation;JobObjects;Kernel;KeyboardAndMouseInput;Ldap;LibraryLoader;Lwef;MachineLearning;MadCap;MagApi;Mapi;Mbn;MdmReg;Media;Media.DShow;Media.DShow.Xml;Media.DxMediaObjects;Memory;MessageQueuing;Mi;MixedReality;MixedRealityInterop;Mmc;Monitor;MsChap;MsCs;MsHtml;MsTv;MsXml;Multimedia;Ndf;Ndis;NetMgmt;NetShell;NetworkAccessProtection;Nla;Nps;NWifi;Of;Opc;OpenGL;P2p;Parcon;PicAcq;Pipes;Pla;Policy;Power;PrintTicket;Proc_Snap;ProjFs;Properties;PsApi1;PsApi2;PWM;Qos;Rdc;Rdp;RealTimeCommunications;Registry;RemoteAssist;Rm;Rpc;RstMgr;SecBitomet;Security;Security.AppLocker;Security.ConfigurationSnapin;Security.Cryptography;Security.Cryptography.Catalog;Security.Cryptography.Sip;Security.Cryptography.UI;Security.DiagnosticDataQuery;Security.DirectoryServices;Security.LicenseProtection;Security.Tpm;Security.WinTrust;Security.WinWlx;SecurityCenter;Sens;SerPorts;Services;Setup;Shell.Common;Shutdown;SideShow;Smi;Speech;Sr;Storage.Nvme;SwDevice;SystemInformation;Tablet;Tapi3;TaskSchd;Tbs;Tcui;TermServ;Threading;Time;ToolHelp;TraceLogging;TransactionServer;Tsf;Ual;UiAnimation;UpdateAssessment;Upnp;Variant;Vhd;VirtualDiskService;VSS;Wab;Wcm;Wcn;Wcs;Wds;WebDav;WebServicesOnDevices;WebSock;Wec;Wer;Wes;Wia;Wibe;Wic;Win32_Tile_Badge_Notif;WinAuto;WinContacts;WindowsConnectionManager;WindowsFilteringPlatform;WindowsFirewall;WindowsRibbon;WindowsSetupAndMigration;WinInet;WinLocation;WinRm;WinRT;WinRT.AllJoyn;WinRT.Composition;WinRT.CoreInputView;WinRT.Direct2D;WinRT.Direct3D11;WinRT.Display;WinRT.Graphics.Capture;WinRT.Graphics.Imaging;WinRT.Holographic;WinRT.Isolation;WinRT.Media;WinRT.ML;WinRT.Pdf;WinRT.Printing;WinRT.Storage;WinRT.Xaml;WinSat;WinSensors;WinSync;WinTouch;Wmdm;WmFormat;Wmi;Wmlss;Wmp;Wnet;wnv;WpdSdk;Wsb;Wsl;Wsw;Wua;Xaml_Diagnostics;Xaudio2;Xblidp;Xinput;XmlLite;Xps;XpsPrinting</ExcludeFromCrossarch>

  • Run a clean build

You'll run into unresolved reference errors in the Hypervisor APIs. It looks like the referenced types are getting scraped during the arm64 and x64 passes which is expected given how the headers changed. The errors are reported in the Hypervisor.modified files which are generated by the crossarch part of the build.

image

@riverar
Copy link
Collaborator

riverar commented Jun 20, 2024

@mikebattista Hm, think there's something going on with the crossarch tree merging and maybe some bad assumptions about enumerations always existing in x86. Just my early thinking so far.

@riverar riverar linked a pull request Jun 22, 2024 that will close this issue
@riverar
Copy link
Collaborator

riverar commented Jun 22, 2024

@mikebattista WIP if you want to take a peek: #1934

Some changes:

  • Restored any headers, mappings, etc. that would lead to breakage downstream (e.g. left obsolete AllJoyn, P2P, etc. headers in)
  • Added enum support to cross-arch tree merger + tests
  • Dropped enums ISC_REQ_FLAGS, ASC_REQ_FLAGS, DNS_QUERY_OPTIONS due to mixed constant sizes/types (we should address this prior to update)
  • Updated NTDDI_VERSION for IDL passes

Am investigating some enum test failures now.

@mikebattista
Copy link
Contributor Author

@mikebattista Hm, think there's something going on with the crossarch tree merging and maybe some bad assumptions about enumerations always existing in x86. Just my early thinking so far.

Based on your changes, looks like you were exactly right about this. Looking good.

@riverar
Copy link
Collaborator

riverar commented Jun 24, 2024

@mikebattista Current blocker is that the Hyper-V platform reuses enum names across architectures, such as:

#if defined(_AMD64_)
typedef enum WHV_RUN_VP_EXIT_REASON
{
    WHvRunVpExitReasonNone                   = 0x00000000,
    WHvRunVpExitReasonMemoryAccess           = 0x00000001,
    // ...
}
#elif defined(_ARM64_)
typedef enum WHV_RUN_VP_EXIT_REASON
{
    WHvRunVpExitReasonNone                   = 0x00000000,
    WHvRunVpExitReasonUnmappedGpa            = 0x80000000,
    // ...
}

If we create architecture-specific types (e.g. WHV_xxx_AMD64 and WHV_xxx_ARM64), we then need to propagate that to any references (e.g. methods), which I don't think we support today. Attempting to merge any duplicate bitflag enums could work for the above example...

But then we'll run into the same problem with structures such as:

typedef union WHV_CAPABILITY_FEATURES
{
    struct
    {
        UINT64 PartialUnmap : 1;
#if defined(_AMD64_)
        UINT64 LocalApicEmulation : 1;
        UINT64 Xsave : 1;
#else
        UINT64 ReservedArm0 : 2;
#endif
        UINT64 DirtyPageTracking : 1;
        UINT64 SpeculationControl : 1;
#if defined(_AMD64_)
        UINT64 ApicRemoteRead : 1;
#else
        UINT64 ReservedArm1 : 1;
#endif
        UINT64 IdleSuspend : 1;
        UINT64 VirtualPciDeviceSupport : 1;
        UINT64 IommuSupport : 1;
        UINT64 VpHotAddRemove : 1;
        UINT64 Reserved : 54;
    };

    UINT64 AsUINT64;
} WHV_CAPABILITY_FEATURES;

I believe a similar architecture-specific references change is needed to fix CONTEXT (#1044) and others too.

@mikebattista
Copy link
Contributor Author

Related to microsoft/wdkmetadata#23 as well.

@mikebattista
Copy link
Contributor Author

mikebattista commented Sep 10, 2024

So that we don't block on the SDK update, we could hold back the Hypervisor headers to the previous version until we have a proper fix for this.

@riverar
Copy link
Collaborator

riverar commented Sep 11, 2024

Can explore that, but I'll be out until October. Just heads up.

@mikebattista
Copy link
Contributor Author

I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants