mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
pseries: More complete WIMG validation in H_ENTER code
Currently our implementation of the H_ENTER hypercall, which inserts a mapping in the hash page table assumes that only ordinary memory is ever mapped, and only permits mapping attribute bits accordingly (WIMG==0010). However, we intend to start adding emulated IO to the pseries platform (and real IO with PCI passthrough on kvm) which means this simple test will no longer suffice. This patch extends the h_enter validation code to check if the given address is a RAM address. If it is it enforces WIMG==0010, otherwise it assumes that it is an IO mapping and instead enforces WIMG=010x. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
9dfef5aae4
commit
f73a2575a3
3 changed files with 21 additions and 5 deletions
|
@ -10,6 +10,7 @@ typedef struct sPAPREnvironment {
|
|||
struct VIOsPAPRBus *vio_bus;
|
||||
struct icp_state *icp;
|
||||
|
||||
target_phys_addr_t ram_limit;
|
||||
void *htab;
|
||||
long htab_size;
|
||||
target_phys_addr_t fdt_addr, rtas_addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue