Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iIF5n-0001hc-QP for mharc-qemu-trivial@gnu.org; Wed, 09 Oct 2019 12:45:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56093) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIF5i-0001fZ-O7 for qemu-trivial@nongnu.org; Wed, 09 Oct 2019 12:45:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIF5f-0001Zy-8X for qemu-trivial@nongnu.org; Wed, 09 Oct 2019 12:45:33 -0400 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:46341) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIF5d-0001Vk-90 for qemu-trivial@nongnu.org; Wed, 09 Oct 2019 12:45:31 -0400 Received: by mail-ot1-x344.google.com with SMTP id 89so2275245oth.13 for ; Wed, 09 Oct 2019 09:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=from:to:cc:subject:date:message-id; bh=kgU/+2cos2QYBqiW/0hv0nTkJW/Vd88XDAxwpzLIkxo=; b=ZGuSZt0zLTvFTkmIuc3frUuyAilrSaKs/9/vLT7LE7tfZ/RpHGV5Df89qflF6YXazA ZcJXAurFqregBHEWNr4PSxZmrLBcQAb0If0jLCkj1mVmWJoe3Vbp0pEL088wXSE9sncy 3gCh0c9SI7Rw0iYQKhy9uDMD/5+uPDAnXpnAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kgU/+2cos2QYBqiW/0hv0nTkJW/Vd88XDAxwpzLIkxo=; b=XRhMS7MVl4lJnZzvXQljqlam7iZX9ueTx9+/70dMd1x8DPNTro/5SE7IuY8QWjl9fj j8MOpqP+MNky7CE13KbDrKXjnRK/G+SgUSVlE9BFpfe2FLIbnyv4R3IWON5B9IXXANwz 8nRZSj0LqUFcwMANXa0N5nyKwprmALOEio1kH6g3GkSk8cGC/7MtyQdHPRHhu7d9r4OL YoDz3gvCnlzaDghHG5jqAoQBZIyrzAbgPEdRGYyyRgeHbCpvOhD2Wa6uAWbhzP0hEuBk eWONY8JILvr9OOcc5qrKIp0qRXpeI5p1dniTZa23+5sezU0nQva4n4oDovpnCVNUTCFJ jlzA== X-Gm-Message-State: APjAAAXKFs/N5uWrt4yPr1DZVA5LT9OhPOe9efWMHVqkxoJBk/X6gxBr TQ7u1BhE1ZHGbnSkykXiFdba5w== X-Google-Smtp-Source: APXvYqxbc4JgTWnSKGPIgN/wjeGipaxS6apfBoHS/TzEzitt1uzVW4lR51gIC5kLuZ3OyTc2LB3pIA== X-Received: by 2002:a9d:70d0:: with SMTP id w16mr3617712otj.107.1570639525026; Wed, 09 Oct 2019 09:45:25 -0700 (PDT) Received: from msmarduch-ThinkPad-T460s.attlocal.net ([2600:1700:4a30:84c0:8d5e:794e:8a2e:ee89]) by smtp.gmail.com with ESMTPSA id q1sm789818otn.8.2019.10.09.09.45.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 09:45:24 -0700 (PDT) From: Mario Smarduch To: philmd@redhat.com, mtosatti@redhat.com, pbonzini@redhat.com, armbru@redhat.com Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, rth@twiddle.net, ehabkost@redhat.com, Mario Smarduch Subject: [PATCHv2 0/2] log guest name and memory error type AO, AR for MCEs Date: Wed, 9 Oct 2019 09:44:57 -0700 Message-Id: <20191009164459.8209-1-msmarduch@digitalocean.com> X-Mailer: git-send-email 2.9.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::344 X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2019 16:45:37 -0000 In a large VPC environment we want to log memory error occurrences and log them with guest name and type - there are few use cases - if VM crashes on AR mce inform the user about the reason and resolve the case - if VM hangs notify the user to reboot and resume processing - if VM continues to run let the user know, he/she maybe able to correlate to vm internal outage - Rawhammer attacks - isolate/determine the attacker possible migrating it off the hypervisor - In general track memory errors on a hyperviosr over time to determine trends Monitoring our fleet we come across quite a few of these and been able to take action where before there were no clues to the causes. When memory error occurs we get a log entry in qemu log: Guest [Droplet-12345678] 2019-08-02T05:00:11.940270Z qemu-system-x86_64: Guest MCE Memory Error at QEMU addr 0x7f3c7622f000 and GUEST 0x78e42f000 addr of type BUS_MCEERR_AR injected with enterprise logging environment we can to take further actions. v1 -> v2: - split into two patches one to get the gustname second to log MCEs - addressed comments for MCE logging Mario Smarduch (2): util/qemu-error: add guest name helper with -msg options target/i386: log MCE guest and host addresses include/qemu/error-report.h | 1 + qemu-options.hx | 10 ++++++---- target/i386/kvm.c | 29 ++++++++++++++++++++++++----- util/qemu-error.c | 31 +++++++++++++++++++++++++++++++ vl.c | 5 +++++ 5 files changed, 67 insertions(+), 9 deletions(-) -- 2.9.3