Re: [PATCH v4 4/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-26 Thread Alejandro Jimenez
17 00:00:00 2001 From: Alejandro Jimenez Date: Fri, 26 Jan 2024 17:54:16 + Subject: [PATCH 5/4] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical SHUTDOWN event will be sent, it will be indistin

Re: [PATCH 0/2] i386: fixup number of logical CPUs when host-cache-info=on

2022-05-24 Thread Alejandro Jimenez
On 5/24/2022 3:48 PM, Moger, Babu wrote: On 5/24/22 10:19, Igor Mammedov wrote: On Tue, 24 May 2022 11:10:18 -0400 Igor Mammedov wrote: CCing AMD folks as that might be of interest to them I am trying to recreate the bug on my AMD system here.. Seeing this message.. qemu-system-x86_64: -nu

Re: [PATCH 0/2] i386: fixup number of logical CPUs when host-cache-info=on

2022-05-25 Thread Alejandro Jimenez
On 5/25/2022 3:56 PM, Moger, Babu wrote: On 5/24/22 18:23, Alejandro Jimenez wrote: On 5/24/2022 3:48 PM, Moger, Babu wrote: On 5/24/22 10:19, Igor Mammedov wrote: On Tue, 24 May 2022 11:10:18 -0400 Igor Mammedov wrote: CCing AMD folks as that might be of interest to them I am trying

Re: [PATCH 0/1] Do not stop guest when panic event is received

2020-10-21 Thread Alejandro Jimenez
On 10/20/2020 1:14 PM, Paolo Bonzini wrote: On 02/10/20 04:41, Alejandro Jimenez wrote: The fact that the behavior of hv-crash is also affected is why I chose to implement this change as an independent option, as opposed to making it a property of the pvpanic device (e.g. -device pvpanic

[PATCH 1/4] vl: Add an -action option to respond to guest events

2020-12-08 Thread Alejandro Jimenez
. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick --- MAINTAINERS | 2 + include/sysemu/runstate-action.h | 16 + include/sysemu/sysemu.h | 1 + qapi/run-state.json | 88

[PATCH 3/4] qmp: Allow setting -action parameters on the fly

2020-12-08 Thread Alejandro Jimenez
Add QMP commands to allow for the behaviors specified by the -action event=action command line option to be set at runtime, mimicking the watchdog-set-action QMP command. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick

[PATCH 0/4] Add a new -action parameter

2020-12-08 Thread Alejandro Jimenez
down, panic, and watchdog expiration are the current options). The existing options would translate to the new option, like: * -no-reboot --> "-action reboot=shutdown" * -no-shutdown --> "-action shutdown=pause" Please share any questions or comments. Regards, Alej

[PATCH 4/4] qtest/pvpanic: Test panic option that allows VM to continue

2020-12-08 Thread Alejandro Jimenez
Test the scenario where the -action panic=none parameter is used to signal that the VM must continue executing after a guest panic occurs. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick --- tests/qtest/pvpanic-test.c | 26

[PATCH 2/4] vl: Add option to avoid stopping VM upon guest panic

2020-12-08 Thread Alejandro Jimenez
: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick --- include/sysemu/sysemu.h | 1 + qapi/run-state.json | 27 ++- qemu-options.hx | 3 +++ softmmu/runstate-action.c | 22

Re: [PATCH 3/4] qmp: Allow setting -action parameters on the fly

2020-12-08 Thread Alejandro Jimenez
On 12/8/2020 2:58 PM, Paolo Bonzini wrote: On 08/12/20 20:57, Paolo Bonzini wrote: On 08/12/20 20:14, Alejandro Jimenez wrote:   ## +# @reboot-set-action: +# +# Set reboot action +# +# Since: 6.0 +## +{ 'command': 'reboot-set-action', 'data

[PATCH v2 3/4] qmp: Allow setting -action parameters on the fly

2020-12-09 Thread Alejandro Jimenez
: "set-action", "arguments": { "pair": { "event": "shutdown", "action": "pause" } } } <- { "return": {} } Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- qapi/run-state.json

[PATCH v2 4/4] qtest/pvpanic: Test panic option that allows VM to continue

2020-12-09 Thread Alejandro Jimenez
Test the scenario where the -action panic=none parameter is used to signal that the VM must continue executing after a guest panic occurs. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- tests/qtest/pvpanic-test.c | 26 +- 1 file changed, 25 insertions

[PATCH v2 2/4] vl: Add option to avoid stopping VM upon guest panic

2020-12-09 Thread Alejandro Jimenez
: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- include/sysemu/sysemu.h | 1 + qapi/run-state.json | 27 ++- qemu-options.hx | 3 +++ softmmu/runstate-action.c | 22 ++ softmmu/vl.c | 14 +++--- 5 files

[PATCH v2 1/4] vl: Add an -action option to respond to guest events

2020-12-09 Thread Alejandro Jimenez
. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- MAINTAINERS | 2 + include/sysemu/runstate-action.h | 16 + include/sysemu/sysemu.h | 1 + qapi/run-state.json | 88 ++ qemu-options.hx

[PATCH v2 0/4] Add a new -action parameter

2020-12-09 Thread Alejandro Jimenez
s). The existing options would translate to the new option, like: * -no-reboot --> "-action reboot=shutdown" * -no-shutdown --> "-action shutdown=pause" Please share any questions or comments. Regards, Alejandro Alejandro Jimenez (4): vl: Add an -action option to r

Re: [PATCH v2 3/4] qmp: Allow setting -action parameters on the fly

2020-12-09 Thread Alejandro Jimenez
On 12/9/2020 4:43 PM, Paolo Bonzini wrote: On 09/12/20 18:52, Alejandro Jimenez wrote: +# Set the action that will be taken by the emulator in response to a guest +# event. +# +# @pair: a @RunStateAction type that describes an event|action pair. +# +# Returns: Nothing on success

[PATCH v3 4/4] qtest/pvpanic: Test panic option that allows VM to continue

2020-12-11 Thread Alejandro Jimenez
Test the scenario where the -action panic=none parameter is used to signal that the VM must continue executing after a guest panic occurs. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- tests/qtest/pvpanic-test.c | 26 +- 1 file changed, 25 insertions

[PATCH v3 2/4] vl: Add option to avoid stopping VM upon guest panic

2020-12-11 Thread Alejandro Jimenez
: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- include/sysemu/runstate-action.h | 1 + qapi/run-state.json | 27 ++- qemu-options.hx | 3 +++ softmmu/runstate-action.c| 17 + softmmu/vl.c | 23

[PATCH v3 1/4] vl: Add an -action option to respond to guest events

2020-12-11 Thread Alejandro Jimenez
. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez --- MAINTAINERS | 2 + include/sysemu/runstate-action.h | 21 + include/sysemu/sysemu.h | 1 - monitor/qmp-cmds.c | 3 +- qapi/run-state.json | 90

[PATCH v3 3/4] qmp: Allow setting -action parameters on the fly

2020-12-11 Thread Alejandro Jimenez
", "arguments": { "reboot": "none", "shutdown": "poweroff", "panic": "none", "watchdog": "debug" } } <- { "return": {} } Suggested-by: Paolo Bonzini Signe

[PATCH v3 0/4] Add a new -action parameter

2020-12-11 Thread Alejandro Jimenez
reboot --> "-action reboot=shutdown" * -no-shutdown --> "-action shutdown=pause" Please share any questions or comments. Regards, Alejandro Alejandro Jimenez (4): vl: Add an -action option to respond to guest events vl: Add option to avoid stopping VM upon guest pani

Re: [PULL 16/45] vl: Add option to avoid stopping VM upon guest panic

2021-01-19 Thread Alejandro Jimenez
On 1/19/2021 4:34 PM, Peter Maydell wrote: On Tue, 15 Dec 2020 at 18:11, Paolo Bonzini wrote: From: Alejandro Jimenez The current default action of pausing a guest after a panic event is received leaves the responsibility to resume guest execution to the management layer. The reasons for

Re: [PATCH] runstate: cleanup reboot and panic actions

2021-01-20 Thread Alejandro Jimenez
); vm_stop(RUN_STATE_GUEST_PANICKED); -} else if (panic_action == PANIC_ACTION_POWEROFF) { +} else if (panic_action == PANIC_ACTION_SHUTDOWN) { qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF, !!info, info); vm_stop(RUN_STATE_GU

[PATCH 1/1] pvpanic: Advertise the PVPANIC_CRASHLOADED event support

2020-11-02 Thread Alejandro Jimenez
Advertise both types of events supported when the guest OS queries the pvpanic device. Currently only PVPANIC_PANICKED is exposed; PVPANIC_CRASHLOADED must also be advertised. Fixes: 7dc58deea79a ("pvpanic: implement crashloaded event handling") Signed-off-by: Alejandro Jimenez Acke

[PATCH 0/1] Do not stop guest when panic event is received

2020-10-01 Thread Alejandro Jimenez
device (e.g. -device pvpanic,no-panicstop). Please let me know if you have any comments or suggestions. Regards, Alejandro Alejandro Jimenez (1): vl: Add -no-panicstop option qemu-options.hx | 11 +++ softmmu/vl.c| 17 ++--- 2 files changed, 25 insertions(+), 3 deletions(-) -- 1.8.3.1

[PATCH 1/1] vl: Add -no-panicstop option

2020-10-01 Thread Alejandro Jimenez
proceed to capture a crash dump and automatically reboot without intervention of a management layer. Add an option to avoid stopping a VM after a panic event is received. Signed-off-by: Alejandro Jimenez Reviewed-by: Mark Kanda --- qemu-options.hx | 11 +++ softmmu/vl.c| 17

Re: [PATCH] pvpanic: Advertise the PVPANIC_CRASHLOADED event support

2020-11-09 Thread Alejandro Jimenez
advertised, but only on new machine types. Fixes: 7dc58deea79a ("pvpanic: implement crashloaded event handling") Reported-by: Alejandro Jimenez Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + hw/misc/pvpanic.c | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 0/5] Interrupt Remap support for emulated amd viommu

2024-09-20 Thread Alejandro Jimenez
quot; I pointed out a few minor nits, of which I think the most important is to correct the error message on PATCH 5/5. With that addressed: Reviewed-by: Alejandro Jimenez Thank you. Change History: V2: - Fixed non-kvm build issue (Reported by Michael Tsirkin) V1: - https://lore.kernel.org

Re: [PATCH v2 2/5] amd_iommu: Add support for pass though mode

2024-09-20 Thread Alejandro Jimenez
Hi Santosh, On 9/16/24 10:31, Santosh Shukla wrote: From: Suravee Suthikulpanit Introduce 'nodma' shared memory region to support PT mode so that for each device, we only create an alias to shared memory region when DMA-remapping is disabled. Signed-off-by: Suravee Suthikulpanit Signed-off-b

Re: [PATCH v2 4/5] amd_iommu: Send notification when invaldate interrupt entry cache

2024-09-20 Thread Alejandro Jimenez
In subject: s/invaldate/invalidate/ On 9/16/24 10:31, Santosh Shukla wrote: From: Suravee Suthikulpanit In order to support AMD IOMMU interrupt remapping emulation with PCI pass-through devices, QEMU needs to notify VFIO when guest IOMMU driver updates and invalidate the guest interrupt remapp

Re: [PATCH v2 5/5] amd_iommu: Check APIC ID > 255 for XTSup

2024-09-20 Thread Alejandro Jimenez
On 9/16/24 10:31, Santosh Shukla wrote: From: Suravee Suthikulpanit The XTSup mode enables x2APIC support for AMD IOMMU, which is needed to support vcpu w/ APIC ID > 255. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Santosh Shukla --- v2: - Fixed non-kvm build issue by adding a che

Re: [PATCH] hw/i386/amd_iommu: Don't leak memory in amdvi_update_iotlb()

2025-02-20 Thread Alejandro Jimenez
+ Suravee On 2/17/25 02:26, Philippe Mathieu-Daudé wrote: On 31/7/24 19:00, Peter Maydell wrote: In amdvi_update_iotlb() we will only put a new entry in the hash table if to_cache.perm is not IOMMU_NONE.  However we allocate the memory for the new AMDVIIOTLBEntry and for the hash table key rega

[PATCH 3/6] amd_iommu: Update bitmasks representing DTE reserved fields

2025-03-11 Thread Alejandro Jimenez
not yet implemented. Cc: qemu-sta...@nongnu.org Signed-off-by: Alejandro Jimenez --- hw/i386/amd_iommu.c | 7 --- hw/i386/amd_iommu.h | 9 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 068eeb0cae..8b97abe28c 100644

[PATCH 4/6] amd_iommu: Fix masks for Device Table Address Register

2025-03-11 Thread Alejandro Jimenez
The size mask currently encompasses reserved bits [11:9]. Extract only the corrects bits encoding size (i.e. [8:0]). Cc: qemu-sta...@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez --- hw/i386/amd_iommu.h | 10 +- 1 file

[PATCH 5/6] amd_iommu: Fix the calculation for Device Table size

2025-03-11 Thread Alejandro Jimenez
Correctly calculate the Device Table size using the format encoded in the Device Table Base Address Register (MMIO Offset h). Cc: qemu-sta...@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez --- hw/i386/amd_iommu.c | 4 ++-- 1 file

[PATCH 0/6] amd_iommu: Fixes to align with AMDVi specification

2025-03-11 Thread Alejandro Jimenez
state of the AMD vIOMMU, but the fixes on this series should be simple enough to apply, so I Cc'd stable for consideration. Thank you, Alejandro Alejandro Jimenez (6): amd_iommu: Fix Miscellanous Information Register 0 offsets amd_iommu: Fix Device ID decoding for INVALIDATE_IOTLB_PAGES co

[PATCH 6/6] amd_iommu: Do not assume passthrough translation for devices with DTE[TV]=0

2025-03-11 Thread Alejandro Jimenez
encountered. Do not assume that addresses for a device with DTE[TV]=0 are passed through (i.e. not remapped) and instead terminate the page table walk early. Cc: qemu-sta...@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez --- hw/i386/a

[PATCH 1/6] amd_iommu: Fix Miscellanous Information Register 0 offsets

2025-03-11 Thread Alejandro Jimenez
The definitions encoding the maximum Virtual, Physical, and Guest Virtual Address sizes supported by the IOMMU are using incorrect offsets i.e. the VASize and GVASize offsets are switched. Cc: qemu-sta...@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by:

[PATCH 2/6] amd_iommu: Fix Device ID decoding for INVALIDATE_IOTLB_PAGES command

2025-03-11 Thread Alejandro Jimenez
The DeviceID bits are extracted using an incorrect offset in the call to amdvi_iotlb_remove_page(). This field is read (correctly) earlier, so use the value already retrieved for devid. Cc: qemu-sta...@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by:

Re: [PATCH 3/6] amd_iommu: Update bitmasks representing DTE reserved fields

2025-03-13 Thread Alejandro Jimenez
On 3/12/25 12:12 AM, Arun Kodilkar, Sairaj wrote: Hi Alejandro, On 3/11/2025 8:54 PM, Alejandro Jimenez wrote: [...] --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -25,6 +25,8 @@   #include "hw/i386/x86-iommu.h"   #include "qom/object.h" +#define GENMASK64(h,

Re: [PATCH 6/6] amd_iommu: Do not assume passthrough translation for devices with DTE[TV]=0

2025-03-19 Thread Alejandro Jimenez
On 3/19/25 2:06 AM, Vasant Hegde wrote: Alejandro, On 3/11/2025 8:54 PM, Alejandro Jimenez wrote: The AMD I/O Virtualization Technology (IOMMU) Specification (see Table 8: V, TV, and GV Fields in Device Table Entry), specifies that a DTE with V=0, TV=1 does not contain a valid address