From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97FB6C64E7B for ; Tue, 1 Dec 2020 11:58:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF90020770 for ; Tue, 1 Dec 2020 11:58:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="N6ERR3oD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF90020770 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kk4II-0006TJ-Jr for qemu-devel@archiver.kernel.org; Tue, 01 Dec 2020 06:58:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kk4Gv-0005xl-8s for qemu-devel@nongnu.org; Tue, 01 Dec 2020 06:56:41 -0500 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:38259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kk4Gt-0007nG-Or for qemu-devel@nongnu.org; Tue, 01 Dec 2020 06:56:41 -0500 Received: by mail-ed1-x543.google.com with SMTP id y4so2813831edy.5 for ; Tue, 01 Dec 2020 03:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mY7iQAlCDv3m/pSFTAcG32WtflFk1CABCP1rf+2nyJY=; b=N6ERR3oDzH7bAbri2CfZlwbNC3SDoBMC/1OQXau8oCo9R7bBsZLtKgE3iJoWjyiWLP QlbnsxR2XXXVUVnXVMJLaKWWYZqr3uTUSc3juUWI2zi/3eIKukJJsAZ7IEffIktsTi/f aG44fb9hrqUvdZWTodJKVoY8DkKlmu3n+dBeOeN++VO8Cc3mOqYrlqP4uh4iotK768+G k7BIHZLXkihW8qOkaMNCcDx41oA5JE0ylirJi7Xzf9nhsgBT9EGdnHVxYzEOvzYZFu8n ylzs4u/ciNj/++ii9oa4LQ+HpsVVe8GL4KAU1fLatmOJkeLyEI1XjESQxqA9PRHJacyn FkdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mY7iQAlCDv3m/pSFTAcG32WtflFk1CABCP1rf+2nyJY=; b=ska/x47/cbVBV2SDPCb0BnamoobrxztT9BT8bhfWlbrgf63a5afz5fUTMLd8I1PlQ8 BiVJ0gzkmi0R5GFOP/x6KUX5jho/JtxqWDQPN4EoCDTIc29cTdUdN94VMdNkR6yL5vPP +71smmI9hmOtMT6AoPnbaDiBywt1CMfkQRhJ1KUXOYngzafZ9444m5L5NYtM8odDnqk3 UdePS9jqiKVvE9NM2mK8VmKwcd8Oj5hJKbPbxz+Xe+Mk8dTs9YIEzFL+IVH1vIQVkLj4 cTaRbMLebAGnY+XcvS3CafpCkSHk+nEOh5Cp67w+MFaqcfwOEdvF4hEMLLx1CBvtNSUI kj9w== X-Gm-Message-State: AOAM531sM5cf56hLD2vrU34sxzAU6/mhA2bBWFg1+faju1oqcFqNIpPf VALFsbo6BC4aAEJ9kb6RLfaOZBobIemQUaQ0nWy9iw== X-Google-Smtp-Source: ABdhPJxrdT5H/NK0SSJ+6i/lEOMxEKnNt6HXsoPmsOOxIwm7ajxcGRo5LbitxkE+siXGh+yTYebFymgMdEKZugzxm5U= X-Received: by 2002:aa7:d915:: with SMTP id a21mr2537511edr.251.1606823798104; Tue, 01 Dec 2020 03:56:38 -0800 (PST) MIME-Version: 1.0 References: <2ba88b512ec667eff66b2ece2177330a28e657c0.1605316268.git.ashish.kalra@amd.com> <20201201115047.GA15055@work-vm> In-Reply-To: <20201201115047.GA15055@work-vm> From: Peter Maydell Date: Tue, 1 Dec 2020 11:56:26 +0000 Message-ID: Subject: Re: [PATCH 01/11] memattrs: add debug attribute To: "Dr. David Alan Gilbert" Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x543.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Lendacky , Ashish Kalra , Brijesh Singh , Eduardo Habkost , kvm-devel , "Michael S. Tsirkin" , Marcelo Tosatti , Markus Armbruster , QEMU Developers , ssg.sos.patches@amd.com, Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, 1 Dec 2020 at 11:51, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.maydell@linaro.org) wrote: > > On Mon, 16 Nov 2020 at 19:28, Ashish Kalra wrote: > > > > > > From: Brijesh Singh > > > > > > From: Brijesh Singh > > > > > > Extend the MemTxAttrs to include a 'debug' flag. The flag can be used as > > > general indicator that operation was triggered by the debugger. > > > > > > A subsequent patch will set the debug=1 when issuing a memory access > > > from the gdbstub or HMP commands. This is a prerequisite to support > > > debugging an encrypted guest. When a request with debug=1 is seen, the > > > encryption APIs will be used to access the guest memory. > > > > So, what counts as "debug" here, and why are debug requests > > special? If "debug=1" means "can actually get at the guest memory", > > why wouldn't every device model want to use it? > > SEV has a flag that the guest-owner can set on a VM to enable debug; > it's rare for it to be enabled; so it's not suitable for use by normal > devices. It's only there for debug if the guest owner allows you to. So if I do a memory transaction with debug=1 then I should expect that it might come back with a failure status (meaning "this VM doesn't permit debug") and I should handle that error ? thanks -- PMM