1. A computer implemented method comprising: executing, by a processor, an extract cache attribute machine instruction defined for a computer architecture, the extract cache attribute machine instruction comprising an opcode and an operand identifier, the operand identifier identifying an operand location, the executing comprising: determining a target cache based on a cache-level identifier; determining an attribute of the target cache to be extracted based on a cache attribute identifier; extracting the attribute of the target cache; and saving the extracted attribute of the target cache in the identified operand location.