Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
qemu-linux-user.20748
0065-target-i386-sev-Do-not-unpin-ram-de.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0065-target-i386-sev-Do-not-unpin-ram-de.patch of Package qemu-linux-user.20748
From: Alex Williamson <alex.williamson@redhat.com> Date: Mon, 15 Jul 2019 08:28:39 -0600 Subject: target/i386: sev: Do not unpin ram device memory region The commit referenced below skipped pinning ram device memory when ram blocks are added, we need to do the same when they're removed. Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Fixes: cedc0ad539af ("target/i386: sev: Do not pin the ram device memory region") Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Message-Id: <156320087103.2556.10983987500488190423.stgit@gimli.home> Reviewed-by: Singh, Brijesh <brijesh.singh@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 56e2ec9488b3b281130e064929f8ae5595d6ac39) [BR: BSC#1123205] Signed-off-by: Bruce Rogers <brogers@suse.com> --- target/i386/sev.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index 7d6f4032d6d8e2eb92d657b6ee3c..9466f90f39b01427ceaa7725d1d3 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -159,6 +159,17 @@ sev_ram_block_removed(RAMBlockNotifier *n, void *host, size_t size) { int r; struct kvm_enc_region range; + ram_addr_t offset; + MemoryRegion *mr; + + /* + * The RAM device presents a memory region that should be treated + * as IO region and should not have been pinned. + */ + mr = memory_region_from_host(host, &offset); + if (mr && memory_region_is_ram_device(mr)) { + return; + } range.addr = (__u64)(unsigned long)host; range.size = size;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor