1208963Srdivacky/****************************************************************************** 2208963Srdivacky * hvm/hvm_info_table.h 3231057Sdim * 4231057Sdim * HVM parameter and information table, written into guest memory map. 5214562Srpaulo * 6255722Semaste * Permission is hereby granted, free of charge, to any person obtaining a copy 7255722Semaste * of this software and associated documentation files (the "Software"), to 8246259Sdim * deal in the Software without restriction, including without limitation the 9246259Sdim * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10246259Sdim * sell copies of the Software, and to permit persons to whom the Software is 11246259Sdim * furnished to do so, subject to the following conditions: 12246259Sdim * 13246259Sdim * The above copyright notice and this permission notice shall be included in 14255722Semaste * all copies or substantial portions of the Software. 15255722Semaste * 16255722Semaste * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17246259Sdim * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18246259Sdim * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19246259Sdim * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20255722Semaste * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21255722Semaste * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22246259Sdim * DEALINGS IN THE SOFTWARE. 23208963Srdivacky * 24246259Sdim * Copyright (c) 2006, Keir Fraser 25208963Srdivacky */ 26208963Srdivacky 27208963Srdivacky#ifndef __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ 28208963Srdivacky#define __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ 29234353Sdim 30208963Srdivacky#define HVM_INFO_PFN 0x09F 31212904Sdim#define HVM_INFO_OFFSET 0x800 32208963Srdivacky#define HVM_INFO_PADDR ((HVM_INFO_PFN << 12) + HVM_INFO_OFFSET) 33208963Srdivacky 34246259Sdim/* Maximum we can support with current vLAPIC ID mapping. */ 35208963Srdivacky#define HVM_MAX_VCPUS 128 36212904Sdim 37246259Sdim/* 38208963Srdivacky * In some cases SMP HVM guests may require knowledge of Xen's idea of vCPU ids 39208963Srdivacky * for their vCPUs. For example, HYPERVISOR_vcpu_op and some EVTCHNOP_* 40234353Sdim * hypercalls take vcpu id as a parameter. It is valid for HVM guests to assume 41210299Sed * that Xen's vCPU id always equals to ACPI (not APIC!) id in MADT table which 42208963Srdivacky * is always present for SMP guests. 43208963Srdivacky */ 44208963Srdivacky 45208963Srdivackystruct hvm_info_table { 46221345Sdim char signature[8]; /* "HVM INFO" */ 47208963Srdivacky uint32_t length; 48221345Sdim uint8_t checksum; 49208963Srdivacky 50208963Srdivacky /* Should firmware build APIC descriptors (APIC MADT / MP BIOS)? */ 51249423Sdim uint8_t apic_mode; 52234353Sdim 53208963Srdivacky /* How many CPUs does this domain have? */ 54208963Srdivacky uint32_t nr_vcpus; 55249423Sdim 56234353Sdim /* 57208963Srdivacky * MEMORY MAP provided by HVM domain builder. 58208963Srdivacky * Notes: 59208963Srdivacky * 1. page_to_phys(x) = x << 12 60226633Sdim * 2. If a field is zero, the corresponding range does not exist. 61208963Srdivacky */ 62208963Srdivacky /* 63234353Sdim * 0x0 to page_to_phys(low_mem_pgend)-1: 64208963Srdivacky * RAM below 4GB (except for VGA hole 0xA0000-0xBFFFF) 65208963Srdivacky */ 66208963Srdivacky uint32_t low_mem_pgend; 67224145Sdim /* 68218893Sdim * page_to_phys(reserved_mem_pgstart) to 0xFFFFFFFF: 69208963Srdivacky * Reserved for special memory mappings 70221345Sdim */ 71234353Sdim uint32_t reserved_mem_pgstart; 72208963Srdivacky /* 73224145Sdim * 0x100000000 to page_to_phys(high_mem_pgend)-1: 74239462Sdim * RAM above 4GB 75208963Srdivacky */ 76224145Sdim uint32_t high_mem_pgend; 77208963Srdivacky 78224145Sdim /* Bitmap of which CPUs are online at boot time. */ 79208963Srdivacky uint8_t vcpu_online[(HVM_MAX_VCPUS + 7)/8]; 80221345Sdim}; 81208963Srdivacky 82208963Srdivacky#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */ 83224145Sdim