|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 31/35] arm : acpi map status override table to dom0
Hi Parth, You don't only map the status override table. You also create it. I would update the commit title to reflect it. On 04/02/2015 14:02, parth.dixit@xxxxxxxxxx wrote: stao = NULL + + stao = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_stao) ); No space before the last ) + if( stao == NULL ) + return -ENOMEM; + + ACPI_MEMCPY(stao->header.signature,ACPI_SIG_STAO, 4); Space after comma + stao->header.length = sizeof(struct acpi_table_header) + 1; + stao->header.checksum = 0; + ACPI_MEMCPY(stao->header.oem_id, "LINARO", 6); + ACPI_MEMCPY(stao->header.oem_table_id, "RTSMVEV8", 8); I though the plan was to use a Xen OEM ID? + stao->header.revision = 1; + ACPI_MEMCPY(stao->header.asl_compiler_id, "INTL", 4); + stao->header.asl_compiler_revision = 0x20140828; Where does this revision comes from? + stao->uart = 1; What about the devpath? + size = sizeof(struct acpi_table_stao); + checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, stao), size); + stao->header.checksum = (u8)( stao->header.checksum - checksum ); No space before the last ) + *mstao = addr = virt_to_maddr(stao); + + res = map_ram_regions(d, + paddr_to_pfn(addr & PAGE_MASK), + DIV_ROUND_UP(size, PAGE_SIZE), + paddr_to_pfn(addr & PAGE_MASK)); I'm concerned with this mapping, as long as most of the others. map_ram_regions is mapping Read/Write the region. In this case, the STAO size may not be aligned to PAGE_SIZE. So we may end up to map to DOM0 RW Xen memory. Even if DOM0 is a trusted domain, we should never let DOM0 write in Xen memory. IIRC, the plan was to map at least RO all the ACPI tables. if ( ... ) + return res; + + table_entry--; + *table_entry = addr ; + No space before ; No space before the last ) Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |