[Possible causes] Meningitis (chronic or carcinomatous), brain abscess including toxoplasmosis, metastasis People with HIV or cancer are immunosuppressed so are likely to get infections of the meninges or infections in the brain causing abscesses. Cancer can metastasize, or travel through the blood or lymph to other sites in the body. [Diagnostic tests] Neuroimaging, lumbar puncture if neuroimaging is negative [Red Flag] 
New onset headache in a person with possible HIV or cancer