Thread (66 messages) 66 messages, 10 authors, 2022-11-30

Re: [Patch v3 07/14] x86/hyperv: Change vTOM handling to use standard coco mechanisms

From: Dave Hansen <hidden>
Date: 2022-11-22 18:30:52
Also in: linux-arch, linux-iommu, linux-pci, lkml, netdev

On 11/22/22 10:22, Michael Kelley (LINUX) wrote:
Anyway, that's where I think this should go. Does it make sense?
Other thoughts?
I think hard-coding the C-bit behavior and/or position to a vendor was
probably a bad idea.  Even the comment:

u64 cc_mkenc(u64 val)
{
        /*
         * Both AMD and Intel use a bit in the page table to indicate
         * encryption status of the page.
         *
         * - for AMD, bit *set* means the page is encrypted
         * - for Intel *clear* means encrypted.
         */

doesn't make a lot of sense now.  Maybe we should just have a:

	CC_ATTR_ENC_SET

which gets set for the "AMD" behavior and is clear for the "Intel"
behavior.  Hyper-V code running on AMD can set the attribute to get teh
"Intel" behavior.

That sure beats having a Hyper-V vendor.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help