mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-04-01 20:04:37 +00:00
hypervisor: mshv: fix GVA translation flags
Original we checked for R and W, but that code path never got executed. It is now understood that we can only get here when we execute code. Fix the permission flags. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
1eb4133034
commit
67f22b6aa4
@ -1526,8 +1526,10 @@ impl<'a> MshvEmulatorContext<'a> {
|
||||
return Ok(self.map.1);
|
||||
}
|
||||
|
||||
// TODO: More fine-grained control for the flags
|
||||
let flags = HV_TRANSLATE_GVA_VALIDATE_READ | HV_TRANSLATE_GVA_VALIDATE_WRITE;
|
||||
// We can only get into here when executing guest code. Check for R and X permissions. In
|
||||
// the future if we have other use cases, we may want to allow the caller to specify the
|
||||
// flags.
|
||||
let flags = HV_TRANSLATE_GVA_VALIDATE_READ | HV_TRANSLATE_GVA_VALIDATE_EXECUTE;
|
||||
|
||||
let (gpa, result_code) = self
|
||||
.vcpu
|
||||
|
Loading…
x
Reference in New Issue
Block a user