Skip to content

Instantly share code, notes, and snippets.

View ehabkost's full-sized avatar

Eduardo Habkost ehabkost

View GitHub Profile
00000000 47 4e 54 50 2f 31 2e 30 20 4e 4f 54 49 46 59 20 GNTP/1.0 NOTIFY
00000010 4e 4f 4e 45 0d 0a NONE..
00000016 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4e 61 6d 65 Applicat ion-Name
00000026 3a 20 41 64 69 75 6d 0d 0a : Adium. .
0000002F 4e 6f 74 69 66 69 63 61 74 69 6f 6e 2d 4e 61 6d Notifica tion-Nam
0000003F 65 3a 20 43 6f 6e 74 61 63 74 5f 53 74 61 74 75 e: Conta ct_Statu
0000004F 73 4f 6e 6c 69 6e 65 59 65 73 0d 0a 4e 6f 74 69 sOnlineY es..Noti
0000005F 66 69 63 61 74 69 6f 6e 2d 54 69 74 6c 65 3a 20 fication -Title:
0000006F 41 72 74 68 75 72 20 4d 65 6c 6c 6f 0d 0a Arthur M ello..
0000007D 4e 6f 74 69 66 69 63 61 74 69 6f 6e 2d 43 6f 61 Notifica tion-Coa
@ehabkost
ehabkost / make-bridge-for-libvirt.sh
Created May 7, 2010 15:08
Very small qemu-ifup script
#!/bin/bash
# make-bridge-for-libvirt.sh
#
# This scripts follows blindly the instructions from:
# http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging
#
# It tries to copy the existing physical network config
# to the bridge. It may not work if you have a non-trivial
# network setup on ifcfg-eth0.
#
@ehabkost
ehabkost / alltypes.tsv
Last active December 9, 2020 06:02
QOM type declaration parsing and conversion
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 14 columns, instead of 1. in line 8.
filename variable_name name parent abstract interfaces instance_size instance_init instance_post_init instance_finalize class_size class_init class_base_init class_data
accel/accel.c accel_type TYPE_ACCEL TYPE_OBJECT sizeof(AccelState) sizeof(AccelClass)
accel/kvm/kvm-all.c kvm_accel_type TYPE_KVM_ACCEL TYPE_ACCEL sizeof(KVMState) kvm_accel_instance_init kvm_accel_class_init
accel/qtest.c qtest_accel_type TYPE_QTEST_ACCEL TYPE_ACCEL qtest_accel_class_init
accel/tcg/tcg-all.c tcg_accel_type TYPE_TCG_ACCEL TYPE_ACCEL sizeof(TCGState) tcg_accel_instance_init tcg_accel_class_init
accel/xen/xen-all.c xen_accel_type TYPE_XEN_ACCEL TYPE_ACCEL xen_accel_class_init
authz/base.c authz_info TYPE_QAUTHZ TYPE_OBJECT true sizeof(QAuthZ) sizeof(QAuthZClass)
authz/list.c qauthz_list_info TYPE_QAUTHZ_LIST TYPE_QAUTHZ (InterfaceInfo[]) { { TYPE_USER_CREATABLE }, { } } sizeof(QAuthZList) qauthz_list_finalize sizeof(QAuthZListClass) qauthz_list_class_init
au
/* Copyright (C) 2019 Red Hat Inc.
*
* Authors:
* Eduardo Habkost <ehabkost@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
@ehabkost
ehabkost / 2to3 selected output.txt
Created May 11, 2018 18:20
2to3 output on QEMU source tree
So, most of the 2to3 fixes give false positives, but some fixers give some useful pointers:
'2to3 -f print' gives us this:
scripts/analyse-9p-simpletrace.py
scripts/analyse-locks-simpletrace.py [*]
scripts/analyze-migration.py
scripts/device-crash-test
scripts/dump-guest-memory.py [*]
scripts/kvm/kvm_flightrecorder
Raw commands that generated some of the files:
(qemu-qmp is at:
https://github.com/ehabkost/misc-build-scripts/blob/master/qemu-qmp
)
for d in *-softmmu/;do ../../scripts/qemu-qmp $b/qemu-system-* -machine none -display none -- qom-list-types > $d/qom-types.json;done
for d in *-softmmu/;do ../../scripts/qemu-qmp $d/qemu-system-* -machine none -display none -- qom-list-types > $d/qom-types.json;done
for d in *-softmmu;do (echo '{"execute":"qmp_capabilities"}';jq -c '.return[] | { execute: "query-device-type", arguments: { typename: .name } }' < $d/qom-types.json; echo '{"execute":"quit"}'; ) | $d/qemu-system-* -display none -qmp stdio;done
for d in *-softmmu;do (echo '{"execute":"qmp_capabilities"}';jq -c '.return[] | { execute: "query-device-type", arguments: { typename: .name } }' < $d/qom-types.json; echo '{"execute":"quit"}'; ) | $d/qemu-system-* -machine none -S -display none -qmp stdio;done
[
{
"request": [
"version"
],
"result": {
"os-release": "NAME=Fedora\nVERSION=\"24 (Workstation Edition)\"\nID=fedora\nVERSION_ID=24\nPRETTY_NAME=\"Fedora 24 (Workstation Edition)\"\nANSI_COLOR=\"0;34\"\nCPE_NAME=\"cpe:/o:fedoraproject:fedora:24\"\nHOME_URL=\"https://fedoraproject.org/\"\nBUG_REPORT_URL=\"https://bugzilla.redhat.com/\"\nREDHAT_BUGZILLA_PRODUCT=\"Fedora\"\nREDHAT_BUGZILLA_PRODUCT_VERSION=24\nREDHAT_SUPPORT_PRODUCT=\"Fedora\"\nREDHAT_SUPPORT_PRODUCT_VERSION=24\nPRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy\nVARIANT=\"Workstation Edition\"\nVARIANT_ID=workstation\n",
"rpm-qf": "file /home/ehabkost/rh/proj/virt/qemu/v2.8.0-build/x86_64-softmmu/qemu-system-x86_64 is not owned by any package\n",
"help": "QEMU emulator version 2.8.0 (v2.9.0-rc1-83-g9caf9e64d6-dirty)\nCopyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers\n"
}
# This is an automatically-generated collection of command-lines that could crash QEMU
#
# It was generated by the script at:
# https://github.com/ehabkost/qemu-hacks/blob/work/device-crash-script/scripts/device-crash-test.py
#
# Using QEMU built from commit 940a8ce075e3408742a4edcabfd6c2a15e2539eb
#
# "exit code: -6" means abort()
# "exit code: -11" means Segmentation fault
ERROR: failed: machine=n810 binary=./aarch64-softmmu/qemu-system-aarch64 device=ast2400-a1 accel=tcg
@ehabkost
ehabkost / msrs.c
Last active December 16, 2015 15:27
#include <stdio.h>
#define HV_X64_MSR_CRASH_CTL 0x40000105
#define MAX_MCG_BANKS 32 /* The limit in the Linux kernel */
#define MCE_BANKS_DEF 10 /* The default */
#define MCG_BANKS MAX_MCG_BANKS
/* Macros copied from other files: */
#define MAX_FIXED_COUNTERS 3
@ehabkost
ehabkost / failing config file
Created February 14, 2013 18:43
Config file where "nokvm" variants are all skipped
variants:
- unknown_qemu:
- rhel64:
- qemu13:
only unknown_qemu
variants:
- cpu.unset:
- cpu.set:
variants:
- 486: