target/i386: sev: Use ram_block_discard_disable()
commitfee3f3baff12e78f544db51cc16ef028b8fe03a9
authorDavid Hildenbrand <david@redhat.com>
Fri, 26 Jun 2020 07:22:34 +0000 (26 09:22 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Jul 2020 09:54:59 +0000 (2 05:54 -0400)
tree6f48a322b5befb91361bf2cc009c4ac1a055aca3
parent06df2e692a95509ee5f6e7d1663502adb74cb2a5
target/i386: sev: Use ram_block_discard_disable()

AMD SEV will pin all guest memory, mark discarding of RAM broken. At the
time this is called, we cannot have anyone active that relies on discards
to work properly - let's still implement error handling.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200626072248.78761-8-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
target/i386/sev.c