mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
A large set of small patches. I have not included yet vhost-user-scsi,
but it'll come in the next pull request. * use GDB XML register description for x86 * use _Static_assert in QEMU_BUILD_BUG_ON * add "R:" to MAINTAINERS and get_maintainers * checkpatch improvements * dump threading fixes * first part of vhost-user-scsi support * QemuMutex tracing * vmw_pvscsi and megasas fixes * sgabios module update * use Rev3 (ACPI 2.0) FADT * deprecate -hdachs * improve -accel documentation * hax fix * qemu-char GSource bugfix -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJZDE+gAAoJEL/70l94x66DIpYH/1IOz3u8ObD8D4Lor07LkCCZ vWFnTBMgGi9gTL5JQDnukRR3cmNp9EVOtAP5Yf+v+/Xqyq/FNGnoVWxCxEby7LtN zrIXbsKMCaEcGzRNJFcbKV+KZnzkJrz92J0NHy29ruCK1AsslOXAWf4Qb1MV+fQl 6w2Upsh35usvWCNpFm2o8arzMEmNuE2xJDPKUB11GMrZT6TExq4Zqa8Zj1Ihc0sX XcDr+eeBmb65Vv3jQLntOhSWAy0Xxf/fDXYTQx+JLHFgvpSOIWMiS+fqIVXtT0bH 0E4hQrBr0qjes8n8+9WGGQW2k8Ak0QlDvrZnQ97hTeV1k6SxW+2ATO2mLeJp9TM= =5hf2 -----END PGP SIGNATURE----- Merge remote-tracking branch 'bonzini/tags/for-upstream' into staging A large set of small patches. I have not included yet vhost-user-scsi, but it'll come in the next pull request. * use GDB XML register description for x86 * use _Static_assert in QEMU_BUILD_BUG_ON * add "R:" to MAINTAINERS and get_maintainers * checkpatch improvements * dump threading fixes * first part of vhost-user-scsi support * QemuMutex tracing * vmw_pvscsi and megasas fixes * sgabios module update * use Rev3 (ACPI 2.0) FADT * deprecate -hdachs * improve -accel documentation * hax fix * qemu-char GSource bugfix # gpg: Signature made Fri 05 May 2017 06:10:40 AM EDT # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * bonzini/tags/for-upstream: (21 commits) vhost-scsi: create a vhost-scsi-common abstraction libvhost-user: replace vasprintf() to fix build get_maintainer: add subsystem to reviewer output get_maintainer: --r (list reviewer) is on by default get_maintainer: it's '--pattern-depth', not '-pattern-depth' get_maintainer: Teach get_maintainer.pl about the new "R:" tag MAINTAINERS: Add "R:" tag for self-appointed reviewers Fix the -accel parameter and the documentation for 'hax' dump: Acquire BQL around vm_start() in dump thread hax: Fix memory mapping de-duplication logic checkpatch: Disallow glib asserts in main code trace: add qemu mutex lock and unlock trace events vmw_pvscsi: check message ring page count at initialisation sgabios: update for "fix wrong video attrs for int 10h,ah==13h" scsi: avoid an off-by-one error in megasas_mmio_write vl: deprecate the "-hdachs" option use _Static_assert in QEMU_BUILD_BUG_ON target/i386: Add GDB XML register description support char: Fix removing wrong GSource that be found by fd_in_tag hw/i386: Build-time assertion on pc/q35 reset register being identical. ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
1c5d506101
41 changed files with 703 additions and 295 deletions
|
@ -2577,6 +2577,15 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static gchar *x86_gdb_arch_name(CPUState *cs)
|
||||
{
|
||||
#ifdef TARGET_X86_64
|
||||
return g_strdup("i386:x86-64");
|
||||
#else
|
||||
return g_strdup("i386");
|
||||
#endif
|
||||
}
|
||||
|
||||
X86CPU *cpu_x86_init(const char *cpu_model)
|
||||
{
|
||||
return X86_CPU(cpu_generic_init(TYPE_X86_CPU, cpu_model));
|
||||
|
@ -4056,10 +4065,14 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
|
|||
cc->write_elf32_qemunote = x86_cpu_write_elf32_qemunote;
|
||||
cc->vmsd = &vmstate_x86_cpu;
|
||||
#endif
|
||||
/* CPU_NB_REGS * 2 = general regs + xmm regs
|
||||
* 25 = eip, eflags, 6 seg regs, st[0-7], fctrl,...,fop, mxcsr.
|
||||
*/
|
||||
cc->gdb_num_core_regs = CPU_NB_REGS * 2 + 25;
|
||||
cc->gdb_arch_name = x86_gdb_arch_name;
|
||||
#ifdef TARGET_X86_64
|
||||
cc->gdb_core_xml_file = "i386-64bit-core.xml";
|
||||
cc->gdb_num_core_regs = 40;
|
||||
#else
|
||||
cc->gdb_core_xml_file = "i386-32bit-core.xml";
|
||||
cc->gdb_num_core_regs = 32;
|
||||
#endif
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
cc->debug_excp_handler = breakpoint_handler;
|
||||
#endif
|
||||
|
|
|
@ -106,10 +106,10 @@ static void hax_update_mapping(uint64_t start_pa, uint32_t size,
|
|||
uint64_t host_va, uint8_t flags)
|
||||
{
|
||||
uint64_t end_pa = start_pa + size;
|
||||
uint32_t chunk_sz;
|
||||
HAXMapping *entry, *next;
|
||||
|
||||
QTAILQ_FOREACH_SAFE(entry, &mappings, entry, next) {
|
||||
uint32_t chunk_sz;
|
||||
if (start_pa >= entry->start_pa + entry->size) {
|
||||
continue;
|
||||
}
|
||||
|
@ -121,7 +121,16 @@ static void hax_update_mapping(uint64_t start_pa, uint32_t size,
|
|||
start_pa += chunk_sz;
|
||||
host_va += chunk_sz;
|
||||
size -= chunk_sz;
|
||||
} else if (start_pa > entry->start_pa) {
|
||||
/* split the existing chunk at start_pa */
|
||||
chunk_sz = start_pa - entry->start_pa;
|
||||
hax_insert_mapping_before(entry, entry->start_pa, chunk_sz,
|
||||
entry->host_va, entry->flags);
|
||||
entry->start_pa += chunk_sz;
|
||||
entry->host_va += chunk_sz;
|
||||
entry->size -= chunk_sz;
|
||||
}
|
||||
/* now start_pa == entry->start_pa */
|
||||
chunk_sz = MIN(size, entry->size);
|
||||
if (chunk_sz) {
|
||||
bool nop = hax_mapping_is_opposite(entry, host_va, flags);
|
||||
|
@ -165,8 +174,14 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags)
|
|||
unsigned int delta;
|
||||
uint64_t host_va;
|
||||
|
||||
/* We only care about RAM pages */
|
||||
/* We only care about RAM and ROM regions */
|
||||
if (!memory_region_is_ram(mr)) {
|
||||
if (memory_region_is_romd(mr)) {
|
||||
/* HAXM kernel module does not support ROMD yet */
|
||||
fprintf(stderr, "%s: Warning: Ignoring ROMD region 0x%016" PRIx64
|
||||
"->0x%016" PRIx64 "\n", __func__, start_pa,
|
||||
start_pa + size);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue